Ubuntu 18.04 – LOCKS UP AT LOGIN AFTER UPDATE (VMWARE)

Last night I did what I imagine a lot of people do, click the OK on the Ubuntu package updater, let it do it’s thing and then restart later. I was only doing a bit of late night work and off to bed. This morning… well fire up VMWare Player, start my Ubuntu VM, and it gets as far as where the Login prompt would appear, if I squint I can see the “Ubuntu” logo VERY faintly at the bottom and the dark purplish tint to the screen. The VM is fully unresponsive :/

I have however managed to recover from this. Initially I thought it could be related to the nVidia drivers on the host being updated (Windows 10 Host), tried disabling 3D etc found and followed this helpful guide (not the fix for me) Fix Ubuntu freezing with nVidia but that did at least get me into the system by adding nomodeset to the kernel boot in GRUB.

So at least now I am able to boot, but everything is a bit sluggish, and I cannot enable full screen on the VM. I then found this very helpful page, Rolling back recent updates specifically the 1st answer by “user unknown”.

What I did was to use the info in that page to find what has been updated, and then roll things back in the order that I guessed could be the most likely candidates and attempt to boot again afterwards.

 find /var/lib/dpkg/info/ -name \*.list -mtime -1 | sed 's#.list$##;s#.*/##'

Got me a list of packages that were updated in the last 24 hours. I copied this list to a text editor on the host machine and removed the unlikely candidates (pretty confident LibreOffice is not involved in the graphics drivers or login process in any way 😉 )

With my list of suspects I gathered the install versions with policy

apt-cache policy libgles2:

Which gives an output along the lines of

libgles2:
Installed: 1.0.0-2ubuntu2
Candidate: 1.0.0-2ubuntu2.3
Version table:
*** 1.0.0-2ubuntu2.3 500
500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
1.0.0-2ubuntu2 500
500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status

From this I can see that the installed version of libgles2 is 1.0.0-2ubuntu2.3 and there is an older version of 1.0.0-2ubuntu2 available (be wary, there may be security packages between major releases, this may have longer versions with the word git in the version, probably wise to try and go for these.

Now, I attempted to roll this one package back but as it has dependencies with other packages this could upset a great many things. Pay EXTRA special attention to the output from apt-get install You don’t want to be removing your whole desktop system!!! To perform a downgrade

apt-get install libgles=1.0.0-2ubuntu2

This will spit out a whole bunch of dependency errors and things that will be removed. So each needs to be inspected in turn, at one point apt was kindly offering to downgrade some packages and remove most of my system! just say no kids! find the extra missing dependency and you should just see apt DOWNGRADE the packages you have listed.

In my case it took me 4 attempts, it may only have required me downgrading the final set of packages (in my instance mutter) but I haven’t tested combinations so I suggest people check with their own systems and carefully read the outputs. I did also revert the kernel to a previous version too (didn’t work) so this may be part of the issue. By all means attempt the downgrade of mutter first, hopefully that is all it was. Anyway, the full list of downgrades I did in order were as follows:

#Attempt1:
apt-get install libgles2=1.0.0-2ubuntu2 libegl1=1.0.0-2ubuntu2 libglx0=1.0.0-2ubuntu2 libglvnd0=1.0.0-2ubuntu2 libgl1=1.0.0-2ubuntu2
#Attempt 2:
apt-get install linux-image-generic=4.15.0.20.23
#Attempt 3:
apt-get install mutter=3.28.1-1ubuntu1 gnome-shell=3.28.3+git20190124-0ubuntu18.04.2 gnome-shell-common=3.28.3+git20190124-0ubuntu18.04.2
#Attempt 4:
apt-get install mutter-common=3.28.1-1ubuntu1 gir1.2-mutter-2=3.28.1-1ubuntu1 libmutter-2-0=3.28.1-1ubuntu1

Obviously, check your own install and versions.. this worked for me, and hopefully the details of how I did it will help others (or myself if it happens again 😉 ) I am not responsible if following these steps you trash your system, this is what *I* did to fix *MY* install 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *