Black screen on login, gnome-shell eating 100% of CPU

From the usual Ubuntu login screen, I click on my name, type my password, and press ENTER. Screen goes black...and stays black. I cannot get to my desktop.

If I SSH from another computer and run htop, I can see /usr/bin/gnome-shell is eating up 100% of a single core. Other than gnome-shell, the system is completely idle. Load average in htop is exactly 1.00.

htop showing gnome-shell at 100%

Earlier today I left it there for over an hour, but no change. Since then I've also tried rebooting, but same results. This desktop was previously working fine, not sure what I messed up. How can I debug what is happening?


On a whim, because I had seen some updates to the nvidia drivers, I tried to switch to nouveau. I have no idea if I did so correctly, but it solved the problem. This is what I ran:

sudo apt-get purge nvidia-\*
sudo apt-get autoclean
sudo apt-get autoremove
sudo reboot

At this point, everything seems to be working again, and looking at the "Additional Driver" tab of "Software & Updates", I see that this computer is now using Nouveau instead of NVIDIA.


My advice is first try logging in with a new user, you can create the user over SSH:

sudo adduser testuser

Try logging in with that new user. If gnome-shell is still taking up 100% and not working, then there is likely a problem with that package, possibly a corrupt disk could have cause the /usr/bin/gnome-shell binary to become corrupted, you can check this by running:

sudo debsums -s

If it prints anything then those package files have been corrupted (or modified by a user/program for some reason, which they shouldn't be)

Lastly if you are able to login as a test user but cannot with your existing account, try renaming these files in your home directory to something else and logging in to narrow down which files are causing the problems:

  • ~/.config
  • ~/.gconf
  • ~/.local