NVIDIA: how to install the latest video card drivers


Back to the homepage



Sometimes, when you have a very new graphics card from Nvidia, you have a problem: the closed source non-free Nvidia driver in the repositories of Ubuntu or Linux Mint, isn't recent enough.

A sure sign for that, is when Driver Manager (Mint) or Additional Drivers (Ubuntu) doesn't offer you a proprietary driver for your brand-new Nvidia video card....

If this happens, it's safer to stick with the default open source driver Nouveau. And wait until the next Ubuntu or Mint release, which will probably provide a newer proprietary driver from Nvidia.

But especially gamers won't be satisfied with that, because games definitely need the best available video driver. So: are you not afraid to apply a somewhat risky system hack, if that will provide you with the right driver? Then read on.

There are two ways to bypass the official software sources and install a newer Nvidia driver: one uses a non-official but trustworthy PPA (the preferred method) and one is purely manual.


Installation by means of the graphics-drivers PPA

1. You can install a newer Nvidia driver by means of a non-official (and therefore somewhat risky) software source: the graphics-drivers PPA (the successor to the mamarley PPA).

This method has the biggest chance of success, because this PPA is in the hands of trustworthy and able developers with a good reputation. Those developers have adapted the Nvidia drivers to Ubuntu and Linux Mint, so that they should work well in these Linux distributions.

But using a PPA still carries some risks with it, that's unavoidable. However, if you apply this how-to exactly and fully, you can reduce those risks greatly.

The method is as follows:

A. First visit the homepage of the graphics-drivers PPA, in order to see which versions of the Nvidia driver it contains. At the moment of writing my how-to (June, 2016), the latest is the nvidia-367.


B. Then you have to find out what's the right version of the Nvidia driver for your graphics card. The goal is, to check whether your video card can run on at least one of the driver versions that are available in the graphics-drivers PPA.

You can search for that in two ways:

a. on card type (not always up to date);

b. on driver version (up to date, but always check whether your particular card type is supported by a driver version, by looking on the tab supported products!

Note: don't download the driver from that website! Because later on in this how-to, you're going to use the PPA for that.

Right now, it's only important that you find out if one of the available drivers is fit for your video card.

Note: the only relevant figure is the main number, not the minor numbers after the dot. For example: for version 367.18 the only relevant number is the main number 367.


C. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Then in the terminal, in order to remove a potential older Nvidia driver (use copy/paste to avoid typing errors):

sudo apt-get purge nvidia*

Press Enter. Type your password; your password will remain entirely invisible, you won't even see dots, that's normal. Press Enter again.


D. Copy/paste into the terminal:

sudo add-apt-repository ppa:graphics-drivers/ppa

Press Enter. With this, you add the software source to your sources list.


E. Then in the terminal:

sudo apt-get update

Press Enter. With this, you inform your system about the contents of the newly added software source.


F. Launch a terminal window again and install (for example) version 367 of the driver, in the following fashion:

sudo apt-get install nvidia-367

Press Enter.


G. Reboot your computer. After this reboot your video card should run on the new driver. Check it by means of the following terminal command:

lsmod | grep nvidia

Press Enter.

Is there no terminal output? Then the operation has failed, so your video card probably still runs on the open source driver Nouveau. Check it like this:

lsmod | grep nouveau

Press Enter.

Note: your new Nvidia driver might be too new for the database of Driver Manager (Mint) or Additional Drivers (Ubuntu), so that they won't show it as being installed. That's no problem and even expected behaviour. All is well if the terminal output above, shows that it's well.


H. Now remove the graphics-drivers PPA from your sources list, so that later on you won't run the risk of getting into trouble by updates for the driver:

Note: Do you want to keep the graphics-drivers PPA in your sources list, for example in order to install major driver version updates later on? Then at least prevent minor driver version updates, by means of the following terminal command (use copy/paste to transfer it to the terminal):

sudo apt-mark hold nvidia-367

(example for main version nvidia-367; adapt it to your main version number)

Press Enter.


Linux Mint: launch the application Software Sources. That's usually to be found by: menu button - Administration (or System) - Software Sources.

Click the button PPAs

Remove both instances of graphics-drivers (click on an instance and then click the button Remove permanently).

Then click the button Update the cache

Close Software Sources and then launch Update Manager. In Update Manager, click the button Refresh. With that action, the possibility of updates from graphics-drivers will have disappeared.

Don't worry about not getting updates for your new Nvidia driver: for normal desktop users, even security updates for drivers are usually never relevant.

Removal

1.1. Don't you like the new Nvidia driver? Removal of the newer driver is simple: in step G of the install procedure, you already removed the software source graphics-drivers from your sources list, so you only need to do this:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Then in the terminal (use copy/paste to avoid typing errors):

sudo apt-get purge nvidia*

Press Enter. Type your password; your password will remain entirely invisible, you won't even see dots, that's normal. Press Enter again.

- Reboot your computer.

- Your video card should now run again on the open-source driver Nouveau, which you can check with the following terminal command (use copy/paste to transfer it to your terminal):

lsmod | grep nouveau

Press Enter.


To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer


This website is being sponsored by Google Ads.

Are you using an ad blocker? Then you're also blocking my earnings from advertisements....

If you wish to support my website, you can configure your ad blocker to make an exception for this website. Or you can make a donation (and get free goodies).

Thanks in advance....


Purely manual installation of the new driver (discouraged)

2. This is the method with the smallest chance of success, that's why it isn't the preferred method. The reason for the frequent failure of this manual method is, that the driver is generic and hasn't been adapted at all to Ubuntu or Linux Mint.

So I strongly advise not to do a manual installation, when you also can install a good driver for your video card by means of the graphics-drivers PPA (as described in the left column of this web page).

Anyway: for a purely manual installation of the new Nvidia driver, you can proceed like this:

A. Go to the website of Nvidia itself, and download the right driver. You can search in two ways:

on card type (not always up to date);

on driver version (up to date, but always check whether your particular card type is supported by a driver version, by looking on the tab supported products!

Note: take care to select the right version; not only should it be fit for your particular video card, but also it has to be 64-bit for a 64-bit operating system and 32-bit for a 32-bit operating system. Don't you know whether your system is 32-bit or 64-bit? Then determine it like this (item 11, left column).

Leave the downloaded file as it is, in the folder Downloads.


B. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Now copy/paste the following command into the terminal, in order to remove older versions of the Nvidia driver:

sudo apt-get purge nvidia*

Press Enter. Type your password when prompted; this will remain entirely invisible, not even asterisks will show, which is normal.


C. Make the installer file executable (use copy/paste in order to avoid typo's):

chmod +x -v ~/Downloads/NVIDIA-Linux-*.run

Press Enter.


D. Terminate the graphic session (which will make your graphical view disappear, so that you only see a black terminal), with the right green command line from the list below:

In the terminal:

For Ubuntu (LightDM):
sudo service lightdm stop


For Linux Mint (MDM):
sudo service mdm stop


For Gnome (GDM):
sudo service gdm stop

Press Enter.


E. Now you see a login prompt without graphical view. So you have to login in the terminal.

Type your username. Note: "under the hood" your user name has only lower-case letters, so don't use any upper-case letters!

Press Enter.

Type your password when prompted; this will remain entirely invisible, not even asterisks will show, which is normal.

Now you're logged into your user account, entirely without graphical view.


F. Run the executable installer file
; of course you can't use copy/paste now, so take care to type the command line below with exact precision:

sudo sh ~/Downloads/NVIDIA-Linux-*.run

Press Enter.

This will start the installation process. Follow the on-screen instructions to complete the process; you can activate the OK button by means of the Tab key. Then press Enter.

Note: do NOT accept writing the settings in /etc/X11/xorg.conf, because that might spoil your display resolution!

Also installing 32-bit support in a 64-bit system is useless, so don't agree with that, too.


G. Reboot your computer in the following manner:

sudo reboot

Now your Nvidia video card should be running on the new driver. Check it by this terminal command:
lsmod | grep nvidia

Is there no terminal output? Then the operation has failed, so your video card probably still runs on the open source driver Nouveau. Check it like this:
lsmod | grep nouveau

Note: don't remove the installer file! You'll need it in case you'd want to remove the driver, for example when it doesn't function well.

Removal

2.1. Don't you like the new driver? For removing the driver, do this:

sudo sh ~/Downloads/NVIDIA-Linux-*.run --uninstall

Followed by:
sudo rm -v /etc/X11/xorg.conf

And finally:
sudo reboot



To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer

Comments