Fix Login Infinite Loop After Installing Nvidia Driver

16.04nvidia

Using information from here: link to info about installing Nvidia drivers

I installed an Nvidia driver. I have Ubuntu 16.04 and the Nvidia GT 710. I believe this video card was a new model around early 2016 and made to target older desktops or small form factors. I put it into an old server.

I used nvidia-304 because it is for the 7 series and it was built 4 days ago. It doesn't work because the login dialog performs an infinite loop.

The infinite loop is as follows:

display login dialog… type password… screen goes black… display login dialog… etc.

This is what I did:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get purge nvidia*
sudo apt-get install nvidia-304

I also tried

sudo apt-get install nvidia-current and

sudo apt-get install nvidia-340 and

sudo apt-get install nvidia-367 and

sudo apt-get install nvidia-370 and

sudo apt-get install nvidia-375

but they have the same problem.

I've read that it is wrong to download and use the *.run file from Nvidia so I didn't do that.

I have read the ~/.Xauthority file might have incorrect ownership leading to an inability to login but I checked ownership and it is my user name not the root.

There is also the suggestion at this link to Ctrl-Alt-F1 in order to do this:

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

However, Ctrl-Alt-F1 does not seem to produce a command line interface for me.

What is the solution?

Best Answer

As Marc Vanhoomissen has said, there are many questions and many solutions about this problem on askubuntu.com. Many of them don't work in my case.

Here is the solution that worked for me at this link.

Here's the text reproduced from that link:

Here is modern way to install the nvidia drivers for Ubuntu (for 14.04 and newer)

        sudo add-apt-repository ppa:graphics-drivers/ppa
        sudo apt-get update
        sudo ubuntu-drivers autoinstall
        sudo reboot

I would add that if you have had many failed attempts you should start with

sudo apt-get purge nvidia* and

sudo apt-get autoclean and

sudo apt-get autoremove nvidia* and

shutdown and power-off and reboot before installing the driver in the suggested manner.

Related Question