Ubuntu: After Upgrade from 14.04 to 16.04 login screen runs in a loop while console login works


I am on a DELL Precision 5510 Ubuntu Edition with Ubuntu 14.04 as default installation. Today I upgraded from 14.04. to 16.04 as shown here

The upgrade went without any error messages. However, after reboot I cannot login via Login Manager (lightdm by default?) anymore. While the password is accepted, the screen shortly prompts the desktop view for, say, a second and then immediately switches back to the login screen without further notice.

I can properly login via text console ( CTL + ALT + F1). So it is definitely not a password wrong issue.

I have read that this might have happened users before, see here. Difference with me is, that the screen after the login attempt is not completely black but it actually shows the desktop overview and even a system dialogue which I can't access because the loop follows to quickly.

What could be wrong here? How can I use my system again? Any help is much appreciated.


I ran into this after updating from 15.10 Wily Werewolf.

I use Nvidia's prime-select command to enable and disable the dedicated graphics card. (After using Ctrl+Alt+F1 and logging into the console) I disabled my GT 540M graphics card with sudo prime-select intel followed by sudo reboot. Upon reboot I was able to log into Unity.

Obviously this is more of a short-term fix and as the other answers have indicated, perhaps the long term solution will be related to replacing or upgrading the Nvidia drivers or allowing the existing unsigned driver to run by disabling secure boot. But hopefully this at least gets you to the desktop!

Edit: The Nvidia driver can now be installed using the official PPA, per this answer:

sudo apt purge nvidia-*  sudo add-apt-repository ppa:graphics-drivers/ppa  sudo apt update  sudo apt install nvidia-364  


I had the same problem after upgrading from 15.10

What was the problem?

For me, the problem was that UEFI Secure Boot was enabled. The NVIDIA drivers are compiled locally and are therefore not signed.

Ubuntu 16.04 does not allow unsigned kernel modules when Secure Boot is enabled.

I disabled Secure boot, but still, I ended up in a login loop.

Well, that was my own fault. In the meantime I switched to a terminal using Ctrl+Alt+F1 and started an Xserver using sudo. It then changed files in my home directory and set the ownership to root.

After running sudo chown username:username -R /home/username (change all three username to your personal user name) I was able to log in to a normal X session.


I got the same problem after a fresh install.



sudo apt-get dist-upgrade  

Worked for me.

It looks like there were some packages left behind


I have exactly the same laptop and the same problem. After this command:

sudo apt-get purge nvidia*

I'm able to login again but to my surprise the system is not 16.04. I'm back at 14.04 - absolutely strange.

Update: Actually, I'm running 16.04 but system settings are telling me it's 14.04. And after activating nvidia proprietary drivers the login problem is back again.


I did a fresh install for a PC having a NVIDIA graphic card. In my case, there was the following simple solution:

Change to console login via ctrl+alt+F1

after login, perform the following steps:

sudo apt update

sudo apt upgrade

After that, I could login normally (possibly after a reboot).

It appears that even though the installation was done with internet access, not all updates were properly installed. The two above step complete the update process.


Step 1 : Reboot The Machine

Step 2 : Select advance option for Ubuntu

Step 3 : Select recovery mode

Step 4 : Select Clean Try to make free space

Step 5 : Select dpkg Repair broken packages

Step 5 : Select Resume normal boot


Do not purge your drivers, if you have install them again via Additional Drivers under Software and Updates in System Settings.

Then open up your terminal (ctrl + alt + f1 if stuck at log in screen) and type "sudo mokutil --disable-validation" then enter your passwords three times.

Restart and disable Secure Boot via Shim which should appear while booting, continue to boot and Log In.

Then open up your terminal again after re installing the nvidia drivers via software and updates, then type "sudo mokutil --enable-validation" then enter your passwords three times.

Restart and now enable Secure Boot and continue to boot.

This worked for me.


I got the same looping login after install NVIDIA driver, I tried to all above recommends and reinstall ubuntu-desktop, lightdm, gdm3, or unity but nothing worked. Only installing other desktop environment(mate, kubuntu) works.

So the problem (in my case) is because of NOMODESET

If you have problem that looping login that you've ever used nomodeset to boot on ubuntu or cannot boot ubuntu even from live usb, you should try first

  1. set nouveau.modeset=0 (press e when ubuntu first restart, when you are choosing list of OS. Then add argument nouvea.modeset=0 after quite splash) let's add argument nouveau.modeset=0 after quite splash
  2. if the first one does not work, then try set nomodeset instead of nouveau.modeset=0 (add nomodeset after quite splash)


  • We ONLY use nomodeset temporary, don't change it in grub default (don't add nomodeset in this file /etc/default/grub) after booting ubuntu with nomodeset, install any driver you want from additional driver or from .deb package. then restart the ubuntu.

  • Setting nomodeset after install nvidia will create the loop login or crash the ubuntu-control-center

If working well, then add the nouveau.modeset=0 in default of grub, run some commands in this link How do I set 'nomodeset' after I've already installed Ubuntu?

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »