I have an older Nvidia video card and my PC crashes when installing the driver for the video card in Ubuntu 16.04. When I get to the login screen but no further: after entering my password, the system went into a loop and returned always back to the login screen [with funny stripes present].

How do I fix this problem?

  • This is too harsh of a solution. I've had the same problem and the solution is in fact simpler than that. – fge Apr 23 '16 at 3:58
  • Please put your answer in the answer space rather than in the question. It's fine to answer your own question. – chaskes Apr 23 '16 at 4:00
  • I'm voting this as too broad because there is no possible answer, the answer is in the question. – The Returning Pencil Apr 23 '16 at 4:02
  • @WindowsinsiderBoomTech That doesn't make it too broad. OP just needs to move the answer to an answer. – chaskes Apr 23 '16 at 5:00

Edited out of the question posted by Rob grune:

To recover, follow these steps:

Ctrl+Alt+F1 [to exit and get into the TTY mode]

sudo apt-get remove --purge nvidia*
sudo apt-get install ubuntu-desktop
sudo apt-get autoremove
sudo rm /etc/X11/xorg.conf
echo "nouveau" | sudo tee -a /etc/modules
sudo reboot

[after reboot, you should be back to operational with the nouveau driver, and can login]

sudo add-apt-repository --remove ppa:graphics-drivers/ppa
sudo apt-get autoremove
sudo apt-get autoclean
  • I'm not convinced that sudo apt-get install ubuntu-desktop is necessary as I didn't nor did I sudo rm /etc/X11/xorg.conf as the file was not in existence in the installation I was working on. There's also no need to sudo add-apt-repository --remove ppa:graphics-drivers/ppa if you aren't using that ppa. All that said I can confirm the rest of the process works. As this system does not require high performance graphics, I'll be sticking with the nouveau driver, however I would imagine that if desired one could try installing the latest nvidia-current package – Elder Geek Nov 13 '16 at 0:11
  • Correction: the 'autoremove' command lines should both be using apt-get, not apt. – Leland Woodbury Dec 4 '16 at 17:22
  • This worked for me. (My assessment agrees with @ElderGeek's.) Thanks! – Leland Woodbury Dec 4 '16 at 17:28
  • @LelandWoodbury You are correct regarding apt autoremove (fixex) Keep in mind that once your reputation is high enough you'll be able to make these corrections yourself. – Elder Geek Dec 6 '16 at 1:40
  • I know this question is about 16.04. Just as an update these steps didn't work for me on Ubuntu 17.10 – byf-ferdy Nov 24 '17 at 12:42

Ubuntu has this guide on their own wiki - but that one was last updated 2013-02-06, so I wouldn't put too much trust/hope/faith/work/time in it.

Here is a recipe which removes all old video drivers, and reinstalls nouveau:

sudo nvidia-settings --uninstall
sudo apt-get remove --purge nvidia*
sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv
sudo apt-get install nvidia-common
sudo apt-get install xserver-xorg-video-nouveau
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

I was having the same issue with Dell Vostro 1500 (GeForce 8400M GS) after updating to the recent Ubuntu 16.04.2 and using the nvidia-340 driver. It took me almost a day to resolve it. Here in shortcut what you can try:

First of all press CTRL+ALT+F1 to get to the text console. Then log in.

Do cat /var/log/gpu-manager.log. If you see something like this:

Looking for nvidia modules in /lib/modules/4.4.0-72-generic/updates/dkms
Found nvidia module: nvidia_340_uvm.ko
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? yes

Then the reason for the login loop is most likely that the nvidia kernel DRI module is blacklisted. This might be because bumblebee was previously installed with an older version of the nvidia driver (in my case nvidia-304) and now is no longer used. If not purge deleted it leaves config files in /etc, among them also module blacklists. The blacklisted module causes the X server to fail to initialize after logging in, which results in the login loop.

Check whether bumblebee is installed:

apt list --installed | grep bumble

If not (no output of the above command) check if /etc/modprobe.d/bumblebee.conf exists:

ls -l /etc/modprobe.d/bumblebee.conf

If it exists just delete it:

sudo rm /etc/modprobe.d/bumblebee.conf

And now try again either by rebooting or by running:

sudo service lightdm restart

You can also see the detailed problem analysis in my other post.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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