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

85,150

Solution 1

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

Solution 2

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.

Solution 3

I got the same problem after a fresh install.

Ctrl+alt+F1

then

sudo apt-get dist-upgrade

Worked for me.

It looks like there were some packages left behind

Solution 4

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.

Solution 5

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)

NOTE:

  • 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?

Share:
85,150

Related videos on Youtube

Bunjip
Author by

Bunjip

Updated on September 18, 2022

Comments

  • Bunjip
    Bunjip over 1 year

    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.

    • Alin Andrei
      Alin Andrei about 8 years
      Did you use Bumblebee? If so, remove bumblebee from a tty (Ctrl + Alt + F1) and see if that fixes it.
    • ubfan1
      ubfan1 about 8 years
      Can you log into the guest session in the GUI? That should avoid any leftover config files (dot files) in your home directory.
    • Bunjip
      Bunjip about 8 years
      @AlinAndrei if Bumblebee comes with a default 14.04 LTS, then I may be using it. However, I did not have Bumblebee actively installed or configured. Hence, I am a bit worried what it might mean for the system if I remove a pre-intalled software...
    • Admin
      Admin about 8 years
      just a note, try sudo apt-get update && sudo apt-get purge lightdm -y && sudo apt-get lightdm -y ...it works for some people. you'll see a screen pop up asking you to select your default and choose lightdm hit tab and enter to ok it. then sudo dpkg-reconfigure lightdm. sudo chown your-user-name-here:your-user-name-here ~/.Xauthority; mv -v .Xauthority .Xauthority.bak ...this works for some people. you may want to consider video driver issues as well. for instance, none of this worked for me, but I learned that my video card driver is not officially supported yet. not sure what's wrong tbh.
    • Admin
      Admin about 8 years
      sudo apt-get install lightdm** I don't want u to make a mistake. reboot after and try to login again. not a gaurenteed fix, did not work for me.
    • Bunjip
      Bunjip about 8 years
      @jargonjunkie Thnx for the tipp. Unfortunately didn't help at all. Only the login screen now looks a bit incomplete. That is the login mask first and foremost, which now looks kinda outdated... Behaviour not changed at all.
  • Bunjip
    Bunjip about 8 years
    I've had this very same problem regarding UEFI Secure Boot. I have disabled secure boot, too. But this did not solve the issue either. Didn't chown ~home/ though, as I wouldn't suspect any altering here. Finally, I ended up with a fresh installation via bootable USB stick. Now I can log into my user account again. But that's not a viable solution for everyone, so I didn't want to post it as an answer.
  • Kristofer
    Kristofer about 8 years
    After using a similar method (purging nvidia drivers) I ran more updates and autoremoved old packages and after that I could enable the nvidia driver successfully again
  • cpz
    cpz about 7 years
    You should mention that this command will upgrade the ubuntu to a newer version.