24

I just installed Ubuntu 20.04 with proprietary drivers for Nvidia, in dual boot with Windows.

Everything went smoothly, but I cannot login. After I enter the password nothing happens, it stuck in a login loop.

I tried reinstalling, but it leads to the same issue.

6
  • Yes, Nvidia graphics, intel processor. I selected to install proprietary drivers if that makes a difference.
    – ThomasK
    Apr 23, 2020 at 15:47
  • It actually worked! Thanks a bunch!
    – ThomasK
    Apr 23, 2020 at 16:01
  • 1
    This is the fix from Ubuntu 19. Valid also for 20.04. I used this solution for myself. It's GRUB bug. ubuntuhandbook.org/index.php/2020/01/… Another Martin.
    – Martin
    Apr 26, 2020 at 17:36
  • Thierry, please can you say me more about the Samba bug? I am using Ubuntu at my work in Win environment.
    – Martin
    Apr 26, 2020 at 17:45
  • 3
    Does this answer your question? Ubuntu gets stuck in a login loop
    – Adam
    Sep 14, 2020 at 11:15

9 Answers 9

29

I fixed the bug with my Ubuntu 20.04 and Nvidia RTX 2080 as follows:

  1. Do not check the box the automatic loggon during installation.
  2. First start Ubuntu with your password
  3. Move on Parameter, users, and check the box for the automatic login (after unlocking).
  4. Reboot Ubuntu.
  5. In GRUB, select advanced options for Ubuntu, then recovery mode.
  6. Select the 'root' mode.
  7. Write: sudo nano /etc/default/grub
  8. Replace GRUB_CMDLINE_LINUX_DEFAUT="quiet splash" with GRUB_CMDLINE_LINUX_DEFAUT="quiet" (i.e. delete splash).
  9. CTRL+X then Y then ENTER
  10. Write, sudo update-grub
  11. Write either reboot or exit then resume

It works for me for starting Ubuntu 20.04 without my password.

Good luck, my opinion is this 20.04 is not suitable for a novice, few months should be waited before installation (especially if you use a nas at home, there also is a serious bug with samba client used by nautilus).

9
  • Many thanks, it seems to solve my problem. I continue to monitor Ubuntu 20.04. Apr 27, 2020 at 17:02
  • I am using Dell Inspiron 15 7000 series 7757 gaming laptop. I have set up the dual boot with Win 10 too. I tried various things and did the same but removed quiet too. It is working finally. Apr 28, 2020 at 12:40
  • 1
    Sorry, but does not help.
    – Greg G
    May 30, 2020 at 17:47
  • Problemo Solved! Removing "splash" did the job! Jun 13, 2020 at 6:01
  • 1
    this worked for me! does anyone have an explanation for why this works? I'd be really interested in learning why!
    – k_g
    Jun 29, 2020 at 8:22
12

At the boot screen, go to "Advanced options for Ubuntu". Then select the option that has "recovery" in it. At the recovery menu, the first option is "resume - Resume normal boot". Press enter in this option and enter again in the next screen. Now enter your password and the desktop will show up. Press "windows" button and type "login". Press enter and then click on "unlock" at the top. Type your password and deactivate "automatic login". There is a bug with nvidia drivers and automatic login. What I described worked for me, without having to install or remove anything. the only annoyance is having to typr the password at login.

1
  • 2
    This actually helped me but could be a lot clearer. The fix boils down to "disable automatic login". The way to get there - complicated by not being able to access GNOME settings because, well, you cannot log in - is to do some GRUB magic. The "boot screen" refered to is the GRUB boot menu and you should pick one of the "(recovery)" options from the "Advanced optionsfor Ubuntu" submenu. From the ncurses menu after that, pick "Resume normal boot". Log in from your DM. Once in GNOME (fingers crossed), go to the "User" section of Settings and disable "Automatic Login".
    – brokkr
    May 22, 2020 at 11:46
8

If some of the answer above doesn't work and you previously installed chrome remote desktop,switch to TTY pressing ctrl + alt + f3 and executing sudo apt-get purge chrome-remote-desktop for uninstalling, hope this solve the problem

3
  • Yes, that's what did it for me.
    – David V.
    May 8, 2020 at 8:24
  • that worked for me as well. Is this a bug for Ubuntu on supporting Chrome Remote Desktop?
    – Desmond
    Jun 15, 2020 at 6:12
  • Thank you so much. That was so frustrating!! Sep 17, 2020 at 4:39
6

From comments:

Switch to Nouveau which is an open source driver for Nvidia graphics since Nvidia's proprietary drivers are known to have issues with Ubuntu. To switch the drivers, press Ctrl+Alt+F3 to switch to TTY mode. Login with your credentials and run

sudo apt-get purge 'nvidia.*'
sudo reboot now
11
  • What is the point of sudo apt-get install xserver-xorg-video-nouveau? It is installed in all systems. Purging nvidia makes sense. Generally it is a good practice to remove proprietary drivers before upgrade.
    – Pilot6
    Apr 23, 2020 at 16:06
  • @Pilot6 It's been a while since I had a PC with Nvidia. IIRC Nvidia's proprietary and nouveau used to conflict. Now I'm doubting my memory. Well on a side note, there's no harm in "installing" that if that's already installed :)
    – Kulfy
    Apr 23, 2020 at 16:16
  • How does the performance compare from noueau to Nvidia drivers? Any difference at all?
    – ThomasK
    Apr 23, 2020 at 16:18
  • There is harm. if a HWE xorg is installed, it will break everything, Now it won't make any harm, but this answer may be used later. People will break everything and will be guessing where did they take commands they've run.
    – Pilot6
    Apr 23, 2020 at 16:18
  • @Pilot6 I believe it's fine as of now for 20.04 since HWE isn't going to happen for 20.04 before the second point release. I have removed the installation part. I hope it's fine now :)
    – Kulfy
    Apr 23, 2020 at 16:20
6

This is the only thing that worked for me:

sudo apt install nvidia-driver-440; sudo reboot

You heard me, my problem wasn't Nvidia driver, but Nouveau driver.

Also note that I tried before with the nvidia-driver-390 package: I could login but the only available resolution was 640x480.

This is my hardware:

> sudo lshw -c cpu -c display -short
H/W path           Device     Class          Description
========================================================
/0/4                          processor      Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
/0/100/1/0                    display        TU106 [GeForce RTX 2070]
3
  • Thank you! This is what worked for me too, after trying some of the other answers here.
    – Julian
    Jul 6, 2020 at 19:00
  • This is the one that did it for me. Purging old (410), and installing new (440). Or, at least, this was the last thing I did before login worked.
    – Arthur
    Nov 27, 2020 at 14:41
  • Thanks, that did it for me too! Not sure why the drivers were not installed during setup - I actually explicitly selected the option to install additional drivers (and the MOK procedure for adding the key to secure boot also seemed to go successfully...)
    – codeling
    Jan 20 at 12:55
5

Another option if you want to keep the Nvidia drivers:

Switch to TTY by pressing Ctrl+Alt+F3 Then install lightdm via

sudo apt-get install lightdm

When asked set lightdm instead of gdm3. After reboot you will be asked to login in lightdm and not in gdm3. This still works with the Nvidia drivers.

2
  • Works great, no poking at setup or recovery. Thanks!
    – Jeff Ward
    May 12, 2020 at 5:07
  • It broked my computer. Now it not starts correctly.
    – Daniel
    Aug 24, 2020 at 15:55
3

So, what works consistently for me, i reinstalled and did not select "login automatically on boot" when configuring Ubuntu. Works flawlessly now!

0

Go to Settings -> Privacy -> Screen Lock -> Automatic Screen Lock and turn it off

This is caused by the system locking itself twice. In power options when "automatically lock the screen" and "lock screen when system is going to sleep" are activated at the same time.

It looks like when both are enabled, this issue happens.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1296270

0

As others have mentioned, this can be caused by a few things.

I've experienced this error after a couple Ubuntu upgrades, and each time, it was because I was using the Nvidia driver, which didn't update properly update, was incompatible with the new kernel, and was causing the window manager to crash and bump me back to the login screen.

Unfortunately, how this manifests doesn't make this cause immediately obvious, and just looks like your password isn't working.

The following commands are how I fixed it. The general solution is to purge the old video driver, all config files that were customized by it, and then reinstall.

These exact commands probably won't work for you, but something like them might work if the cause is indeed a bad video driver.

sudo apt-get purge nvidia*
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install linux-headers-generic
sudo apt-get purge xserver-xorg-video-nouveau nouveau*
sudo nano /etc/modprobe.d/blacklist.conf # Add: blacklist nouveau
sudo rm -fr ~/.Xauthority
sudo rm -fr ~/.config/autostart
sudo apt-get remove --purge compiz
sudo apt-get install nvidia-settings
ubuntu-drivers devices # Find the recommended package for the video driver.
sudo apt-get install nvidia-340 # recommended by ubuntu-drives for me
sudo apt install gnome-shell
sudo apt autoremove
sudo reboot now

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