This didn't start out as a problem with the login loop. I was attempting a clean install of Ubuntu 16 and using the new feature that allows it to detect proprietary drivers for me.

I started off with this issue

When I attempted to use the recommended Nvidia Drivers, it caused the laptop to become unstable and freeze.

I attempted the remedy from that post and it resulted in a login loop.

I have attempted this

sudo mv ~/.config/dconf/user ~/.config/dconf/user.old

Tried this

sudo mv ~/.Xauthority ~/.Xauthority.backup
sudo service lightdm restart

I have tried locating and disabling secureboot, but there is no secureboot option in the bios. This is an HP DV2000 series laptop.

Nothing is helping

what i get when i try to log in

Can someone help?

edit:

Guest session does the same loop.

/var/log/Xorg.0.log shows a lot of stuff, but I took a pic of what seems relevant Here

Thing is the driver I first tried that started this mess was 304 drivers and the 364 drivers were supposed to be the fix according to other posts.

More editing:

I purged the nvidia files and it came back to a blank desktop w/o the interfaces so I right clicked and restored a backup.. The sidebar came back and it was running gallium. I restarted and its the blank purple screen again.

I am thinking of just reinstalling and not using nvidia drivers. The software center is telling me I have a presario and i should use 304 drivers. Its not a presario. =( At least the software center provides a suggestion for the coprocessor driver which is nice.

  • Does the guest session allow logins to work? What errors are in /var/log/Xorg.0.log (tagged with (EE)")? What errors are in ~/.xsession-errors ? Did you try deleting/renaming ~/.ICEauthority ? – ubfan1 Apr 26 '16 at 1:52
  • i too have the same problem. askubuntu.com/questions/761819/… – shiv garg Apr 26 '16 at 3:34
  • i have solved the problem. refer my question for answer – shiv garg Apr 27 '16 at 13:02
  • Goto UEFI/BIOS settings and disable secure boot. Then install NVIDIA drivers. This will work – pradyot Jun 2 '16 at 4:45
  • if you think the the problem is with the user settings then try logging in with a freshly created user account and see if the same issue occurs. This is much quicker and less disruptive than changing your config. – Amias Oct 12 '16 at 13:10

If you've been successfully running 16.04 with your video driver before, but the login loop issue happens after the latest software update, try this, it worked for me after trying EVERYTHING else. This is the equivalent of searching for "additional drivers":

sudo ubuntu-drivers list

then use:

sudo ubuntu-drivers autoinstall

For me, this updated the driver for my nvidia quadroFx 3800 in a way that using sudo apt-get install nvidia-current would not.

After autoinstall, invoke another tty (ex. ctrl+alt+f1) and

sudo service lightdm restart
  • 1
    This worked for me after the installation of CUDA 8.0 on Ubuntu 16.04 caused a login loop. Haven't verified that cuda is working properly, though. – John Prior Nov 18 '16 at 16:40
  • 1
    I'm using the nvidia-304 and I face the login loop in almost in each upgrade. This is the simplest solution I found. – Italo Borssatto Dec 30 '16 at 13:27
  • 2
    I know we aren't supposed to say 'thank you' on here, but you have saved my day. – Cokes Mar 31 '17 at 4:38
  • 2
    This is what happened to me too just last weekend; was getting login loop after updates were installed. Running sudo ubuntu-drivers autoinstall sorted it for me. (Ubuntu 16.04.2 LTS) – AnthonyK Jul 5 '17 at 0:44
  • 1
    Just wanted to create an account and say THANKS SO MUCH, fucking bizzare problem espically coz I just used ubuntu system settings to select what I thought was a normal option and then random crash, this fixed it all perfectly, really really appreciate the post. Also these sort of problems give me more experience in fixing problems in linux – Cacoon Nov 16 '17 at 20:48

In case you really want to use the drivers provided by Nvidia from their website (they solved cublas error CUBLAS_STATUS_NOT_INITIALIZED on my NVIDIA GTX980M), the only thing that worked for me was:

Press CTRL-ALT-F1

Uninstall any previous drivers:

sudo apt-get remove nvidia-*
sudo apt-get autoremove

Uninstall the drivers from the .run file:

sudo nvidia-uninstall

This should remove the login loop, so now reboot and login normally.

Apply only if you use lightdm, Press again CTRL-ALT-F1 and do:

sudo service lightdm stop
sudo bash Your-Nvidia-Drivers-File.run

I used all the default options, except for the opengl, where I said no. I don't know if this is important though.

And here is the important part: DO NOT reboot. Just do:

sudo service lightdm restart

and press CTRL-ALT-F7 to login immediately after installation. This way I never saw a login loop again.

  • 1
    Not sure what actually is happening in the background, the first half of this post managed to get me through the infinite loop login part and I'm now back in the Ubuntu GUI! :) – Atlas7 May 30 '17 at 14:53
  • 1
    The first section solved my login loop. Thank you! But when I tried to install the new CUDA pack, the login loop appeared again. Then I realized that my original Ubuntu default Nvidia driver was newer than the CUDA pack's Nvidia driver. Thus when I reinstalled the CUDA pack I chose "not installing the new Nvidia driver" and then go further with the default options (btw I chose opengl installing and caused no problem). Finally it worked! – Geeocode Jul 12 '17 at 23:50
  • I needed remove --purge. – Ciro Santilli 新疆改造中心 六四事件 法轮功 Apr 3 at 10:59

I used to have this problem and I googled it all day all night and finally found the right site for solution. It looks like the problem lies in your laptop using NVIDIA Optimus. I solve this using

sudo apt-get install nvidia-364 nvidia-prime

Follow this installation guide here for more info http://rajat-osgyan.blogspot.co.id/2016/04/how-to-install-latest-nvidia-drivers-on.html

I had the same problem with Ubuntu 14.04 and NVIDIA-304 driver.

This driver was updated from version 304.131 to 304.132 during one of the system updates. This new driver version was the source of my problem.

Reinstalling the old driver version (304.131) solved this. Everything works fine now.

For more Info see this Launchpad bug page

Here you can find driver 304.1: https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-304/304.131-0ubuntu0.14.04.1 On the right hand side of the page choose your build (amd 64 or i386), this will open the downloads page, where you can choose your download (mine was nvidia-304_304.131-0ubuntu0.14.04.1_i386.deb ). Download and copy to a USB stick. Power on the computer with the login Loop problem, open terminal, stop lightdm:

sudo service lightdm stop

Purge NVIDIA drivers:

sudo apt-get purge nvidia*

Plug in the USB stick with the downoaded file, run fdisk to identify your USB stick on the computer:

sudo fdisk -l

(mine was /dev/sdb1)

Mount the usb stick, but first create a mount point:

sudo mkdir /media/usb

Mount the usb stick:

sudo mount /dev/sdb1 /media/usb

Check if the downloaded file is present:

ls /media/usb

Install the NVIDIA driver:

sudo dpkg -i /media/usb/nvidia-304_304.131-0ubuntu0.14.04.2_i386.deb

(please replace the file name with the one of your download)

Unmount USB stick:

sudo umount /media/usb

Reboot system

sudo reboot

Hope this helps.

  • 1
    Could you please elaborate on this a little more? Explaining how to reinstall the driver would really be helpful to the OP, and anyone else who has a similar issue. :) – ThatGuy Dec 4 '16 at 8:10

I had a similar issue after messing around with my screen configs in xorg.conf via the Nvidia-control panel. I had previously been running the currently latest drivers (at the time 381.09) on my 1080 with 3 screens with no problem. But once I restarted I got the login loop.

To fix I simply:

  • opened a terminal ctrl-alt-f1
  • moved my renamed my xorg.conf file sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf~
  • Then restarted allowing the system to workout it's own config again.

This was a very quick fix - no need to reinstall drivers etc. Which I was keen to do to avoid messing up various dependents e.g. CUDA

Called the customer service and finally the problem solved. I have 2 GPUs (Geforce 1080 and 1080Ti) on my SuperMicro workstation. After install the GPU driver in a proper way that needs to go into the tty mode and stop the lightdm, you need to plug out the VGA/DVI on the motherboard and plug the monitor cable to the GPU ports. In my case, plug to the DVI of GPU 1080Ti, the login loop problem solved.

I have had similar problems on several computers since upgrading to 16.04. First of all make sure secure boot is disabled in computer BIOS. Older computers won't even have this option.

Can you get to a command prompt by hitting Ctrl-Alt-F4? If so type your username and then your password to login. From there try typing:

sudo lspci|grep VGA

and enter password when asked.

If your system says you have NVIDIA graphics then type:

sudo apt-get purge nvidia

Wait until this finishes and then type:

sudo apt-get install nvidia-current

Once complete type sudo shutdown -r now to restart the computer. You should be booting into a functional desktop.

This can also fix a login loop issue on 16.04 or a black screen with cursor problem.

  • nividia-current install an (old) stable and LTS driver version not apt to newer chipset. This should not be the default recommendation. – user589808 Feb 14 '17 at 11:23

I ran into the login loop problem running Ubuntu 16.04 on a Macbook Pro Retina bought in 2012. Over the years I have always been using the nvidia-304 driver from xorg-edgers that was going fine and mostly the only working option (with uefi boot). With the latest update (Nov 4 2016 on ubuntu 16.04) this driver stopped working and I spent long time trying to figure out the problems (I had nomodeset in boot options throughout).

My solution finally was to either 1) use nouveau (surprisingly because this never worked before) putting nouveau in /etc/modules and using a xorg.conf putting nouveau as device (but performance of this driver is suboptimal even on ordinary desktop activities) or 2) actually the latest nvidia driver nvidia-367 with no xorg.conf

Nuance: in my case I have a rather old gfx card - GTX280 What I did:

  • checked at nvidia.com which driver version supports my card, in my case it was nvidia-340

  • service lightdm stop

  • apt-get purge lightdm

  • apt-get purge nvidia*

  • apt-get install nvidia-340

  • apt-get install lightdm

  • restarted the system

I've noted that nvidia-367 installs gdm, so after nvidia drivers installation you will have both lightdm and gdm alongside, possibley it can be the key to the problem.

protected by Community Nov 27 '17 at 14:45

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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