29

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?

Zanna
  • 70,465
  • 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: https://askubuntu.com/questions/1229821/login-loop-after-installing-20-04 – Jules Colle Apr 26 '20 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 :/ – Karl Griffiths Apr 26 '20 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 – Karl Griffiths Apr 26 '20 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. – Jules Colle Apr 26 '20 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 – Karl Griffiths Apr 26 '20 at 14:10
  • We're 9 months further and this issue is still there :-( I also have it. – jaques-sam Dec 12 '22 at 07:51

12 Answers12

21

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.

Kulfy
  • 17,696
Jonathan Lisic
  • 311
  • 1
  • 4
  • 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 01 '20 at 12:34
7

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.

Greenonline
  • 2,081
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.

Zanna
  • 70,465
  • 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 07 '21 at 02:44
  • Wow. This is the second time in a row Chrome Remote Desktop has broken my Linux install. – TMB Nov 24 '21 at 01: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 '22 at 00:12
4

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!

Greenonline
  • 2,081
George Liu
  • 151
  • 1
  • 5
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.

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.

Zanna
  • 70,465
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

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

mike
  • 1
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!

Stephan Vierkant
  • 1,236
  • 2
  • 14
  • 35
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.

Mwase
  • 109
  • For me it happened after a couple of days after a clean install... – jaques-sam Dec 12 '22 at 07:55
  • Hi. If your disk space is fine then it's probably the system configs. Try to trace the steps of what you did before your distro was last working. And it will be great if you try to undo the changes you did to the system configuration files etc or reset to default if you are not sure what you edited wrong. – Mwase Dec 13 '22 at 14:43
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.

David G
  • 123