Can't log in on Ubuntu 20.04

54,574

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

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 3

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 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.

Solution 5

When I tried Ctrl+Alt+F3 or F4, the screen froze and I had to press the power button to power off.

Instead, I simply chose the "Ubuntu on Wayland" option at the bottom right corner and I immediately logged in!

Share:
54,574

Related videos on Youtube

Karl Griffiths
Author by

Karl Griffiths

Updated on September 18, 2022

Comments

  • Karl Griffiths
    Karl Griffiths over 1 year

    I've just installed Ubuntu 20.04 on my PC (this is a completely clean install) and I've had nothing but problems. Firstly it would keep booting into GRUB and absolutely nothing in BIOS settings fixed it. I had to reinstall Ubuntu to fix it.

    Now I can't even log in! Every time I press enter after my password it takes me back to the login screen! Does anyone know how to fix it?

    • Jules Colle
      Jules Colle about 4 years
      i was able to log in a couple of times. i just installed docker, installed a vnc viewer and added some configuration changes i also have a very unsafe single digit password. maybe it's due to one of these things? do you see any resemblance with your setup? edit: i'm going to give this a try now, cause i also installed the nvidia driver: askubuntu.com/questions/1229821/…
    • Karl Griffiths
      Karl Griffiths about 4 years
      okay, but i'm stuck on the grub at boot again now. It seems like it doesn't even want to run on my computer :/
    • Karl Griffiths
      Karl Griffiths about 4 years
      Update: I don't know how its fixed, but after the 4th reinstall its booted and logged in. I didn't tick the install thirdparty software this time, so maybe that's the issue
    • Jules Colle
      Jules Colle about 4 years
      uninstalling nvidia fixed it for me. then i disabled auto-login, and reinstalled nvidia again. now it works. the auto-login in combination with nvidia drivers was causing it for me. hope you get it fixed too! gl! Edit: yep: the third party software likely includes the nvidia driver.
    • Karl Griffiths
      Karl Griffiths about 4 years
      Thanks buddy, I've done the same thing. Seems to be working now, although i haven't tried reinstalling the nvidia drivers yets
  • Picard
    Picard about 4 years
    I can confirm that this a problem with automatic login. Also gives some very weird visuals, overlapping the desktop with the tty. thanks
  • raghavan
    raghavan about 3 years
    The link in the answer helped and it stopped the login loop. If facing with appstream error, comment out if /usr/bin/test -w /var/cache/app-info in file /etc/apt/apt.conf.d/50appstream. do apt-get update and apt-get upgrade and that should fix appstream and accept package maintainer config. Try logging after all the previous commands completed successfully.
  • Christopher Kikoti
    Christopher Kikoti almost 3 years
    In my case, this one helped. Thanks
  • zslim
    zslim almost 3 years
    Thank you very much sir! I've found this after 2 hours of troubleshooting and worked! I tried to add JAVA_HOME to PATH in /etc/environment. I moved it to ~/.profile where all the other PATH modifications are and I can now log in.
  • Gail Foad
    Gail Foad almost 3 years
    Thank you - you can have my firstborn.
  • TMB
    TMB over 2 years
    Wow. This is the second time in a row Chrome Remote Desktop has broken my Linux install.
  • Atequer Rahman
    Atequer Rahman over 2 years
    Thanks. It worked for me and saved my severel hours to reinstall everything.
  • HenrikB
    HenrikB about 2 years
    Brilliant. Ran into this Lock screen bug after upgrading to Ubuntu 20.04 from Ubuntu 18.04. Uninstalling chrome-remote-desktop solved the problem (after a reboot).
  • Admin
    Admin about 2 years
    Very useful answer, thank you :-)