Can't log in on Ubuntu 20.04

Solution 1:

It seems to be an issue with the auto-login. One way to fix this is by disabling auto-login from the command prompt:

  • From the login screen hit Ctrl+Alt+F4
  • Login through the command prompt input: sudo nano /etc/gdm3/custom.conf

Line number 5 and 6 of custom.conf should be:

AutomaticLoginEnable=true
AutomaticLogin=[username]

where, [username] is the name of the user for auto-login. Change this to:

#AutomaticLoginEnable=true
#AutomaticLogin=[username]

Hit Ctrl + S to save, then reboot by hitting Ctrl+Alt+F1 and selecting restart from the login menu.

Solution 2:

I found another solution in the comments on this article. Chrome remote desktop seems not to work well. From the login screen, I did Ctrl+Alt+F3 to get the command line, I logged in, then ran

sudo apt-get purge chrome-remote-desktop

Alt+F1 took me back to the login screen and I was able to login. Thanks to pRose there.

Solution 3:

In Ubuntu 20.04 the reason for this login screen loop can also be in conflicting environment variables setup ($PATH).

In case PATH variable is assigned in several places simultaneously like:

  • /etc/environment
  • /etc/profile
  • ~/.profile
  • ~/.bashrc

PATH modifications should be in one place (~/.profile), not several. This might help.

Solution 4:

The answer from Jonathan Lisic above was the most helpful of the many that I have had to go through today. This is a new Login Loop problem, and yes it does appear that the latest NVidia drivers on 20.04 LTS actually block the progress from Login Screen to the Desktop Screen if Automatic Login is active.

The editing using nano works, but I used Ctrl-O then Ctrl-X to save and exit, (as Ctrl-S was not available), and then I used shutdown -r 0 to restart the machine.

Worked fine.

After restart and successful login, I updated the Graphics Driver to the latest version of the NVidia proprietary drivers, from the GUI "Additional Drivers", and tested the login again.

Glad to report that the Login Loop has been eliminated.