24

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?

5
  • 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/… Apr 26, 2020 at 13:50
  • 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 :/ Apr 26, 2020 at 13:56
  • 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 Apr 26, 2020 at 14:07
  • 1
    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. Apr 26, 2020 at 14:08
  • Thanks buddy, I've done the same thing. Seems to be working now, although i haven't tried reinstalling the nvidia drivers yets Apr 26, 2020 at 14:10

12 Answers 12

19

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.

1
  • 1
    I can confirm that this a problem with automatic login. Also gives some very weird visuals, overlapping the desktop with the tty. thanks
    – Picard
    May 1, 2020 at 12:34
5

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.

3
  • 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.
    – raghavan
    Mar 7, 2021 at 2:44
  • Wow. This is the second time in a row Chrome Remote Desktop has broken my Linux install.
    – TMB
    Nov 24, 2021 at 1:23
  • 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).
    – HenrikB
    Apr 21 at 0:12
5

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.

4
  • In my case, this one helped. Thanks Jun 14, 2021 at 6:58
  • 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.
    – zslim
    Jun 15, 2021 at 14:45
  • Thanks. It worked for me and saved my severel hours to reinstall everything. Jan 19 at 12:46
  • Very useful answer, thank you :-)
    – intumwa
    May 11 at 13:02
3

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.

3

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!

1
  • Thank you - you can have my firstborn.
    – Gail Foad
    Jul 22, 2021 at 17:29
2

I had a similar login problem with Xubuntu 20.04.1 after an update. I figured out my disk is out of space. So I logged in via the text console (Ctrl+Alt+F3) and ran

sudo apt autoremove

then, I was able to log in normally.

2

I had the same issue, please try these steps:

  1. Go to your recovery and log in as root by choosing the respective option in GUI.

  2. Run:

    sudo pam-auth-update
    
  3. Hit YES and at the next prompt window select all stars and hit Enter so the changes will be applied.

  4. Reboot and you will be fine.

0
0

Like you, I installed Ubuntu 20.04, spent half a day working on a project, then was unable to login the next day I booted up again in recovery mode and added a new user #useradd test then booted up again, tried to login as test - didn't work Switched back to the original user and it allowed me to login

0

From the login screen, press ctrl + alt + F3 to enter the grub mode, give the following commands:

sudo apt-get update
sudo apt-get dist-upgrade
sudo dpkg --configure -a

running these commands worked for me.

0

Nothing above worked in my Ubuntu. Ultimately I switched to command mode and restarted the default-device-manager.

View your device-manager:

cat /etc/X11/default-display-manager

In my case it was gdm3. After that type:

sudo service gdm3 restart

Now reboot the system. Hope this works!

0

Current Exprience I'm using BackBox 20x (a pentasting version of ubuntu) on my other pc. It turns out this can also happen if you do not have enough space. Problem fixed after deleting some old files on terminal pressing ctrl + alt + F3 on login screen and then I deleted some old movies which I already watched. After that the issue was gone.

Previous Experience This also happens on this pc I'm using now (Ubuntu 18x) apart from my other pc. When you modify the '.profile' file. Not sure why but resetting the .profile file to the previous version resolves this issue. Then if you wanna modify environment variables on your system just use .bashrc file.

0
0

This happened to me after a reboot following a kernel version bump. I was using gdm3 as my display manager. I fixed it by switching to a tty login, installing lightdm, configuring it as my display manager, rebooting, logging in, setting gdm3 as the DM and rebooting again.

  • Ctrl-Alt-F3 (login as normal)
  • sudo apt install lightdm
  • sudo dpkg-reconfigure lightdm (choose lightdm in dialog)
  • reboot
  • login to GUI using lightdm to ensure it works
  • sudo dpkg-reconfigure gdm3 (choose gdm3in dialog)
  • reboot
  • Success!

I do not know if installing lightdm was necessary or if just reconfiguring gdm3 would have done the trick, but at least it would have given me a usable system. After reconfiguring gdm3 logins started working again.

This fix doesn't rise to much more than mystic incantations as I have no idea what went wrong. Correlation isn't causation, but in addition to a broken display manager, something pretty comprehensively borked my Python3 installation at the same time, to the extent of having to nuke and reinstall.

Not the answer you're looking for? Browse other questions tagged or ask your own question.