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.

Simon Sudler
  • 4,111
ThomasK
  • 373

9 Answers9

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

Zanna
  • 72,312
Thierry
  • 306
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.

10

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

7

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]
mdesantis
  • 346
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
Kulfy
  • 18,154
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.

Martin
  • 209
3

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

ThomasK
  • 373
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
Cerin
  • 6,923