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 Linux Mint, isn't recent enough.
A sure sign for that, is when Driver Manager doesn't offer you a proprietary driver for your brand-new Nvidia video card....
If this happens, it's safest to stick with the default open source driver Nouveau. And wait until the next 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 slightly 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, low-risk) and one is purely manual (discouraged, high-risk).
Contents of this page:
- 1. Installation by means of the graphics-drivers PPA
- 2. Purely manual installation of the new driver (discouraged)
Installation by means of the graphics-drivers PPA
1. You can install a newer Nvidia driver by means of a non-official (and therefore slightly risky) software source: the graphics-drivers PPA. This PPA usually gets the latest Nvidia drivers a bit sooner than the official Mint/Ubuntu sources.This method has the biggest chance of success, because the graphics-drivers 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 non-free Nvidia driver it contains. At the moment of writing this (January, 2024), the latest one is version 545.
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 a matching video driver 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 the Nvidia website! Because later on in this how-to, you're going to use the PPA for downloading and installing the right driver.
Right now, it's only important that you find out if one of the available drivers is fit for your video card.
Note (1): the only relevant figure is the main number, not the minor numbers after the first dot. For example: for version 545.29.06 the only relevant number is the main number 545.
Note (2): for unclear reasons, this PPA is using other names for its drivers in the list on its homepage, than the names in the official software sources of Ubuntu and Mint.
An example makes this clear: the PPA has listed version 545 of the Nvidia driver on its homepage as nvidia-graphics-drivers-545, whereas the expected normal name would be nvidia-driver-545.
But when installing from the PPA, you still need to use the normal name of the driver! This is important to know when you're going to install it, because then you'll need to type the normal name in the terminal.
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 non-free Nvidia driver (use copy/paste to avoid typing errors):
sudo apt-get purge nvidia*
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
D. If the purge command in step C did actually remove an older Nvidia driver: reboot your computer.
E. 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.
F. 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.
G. In Linux Mint you now have two options for installing the driver. The easiest option at this point is to simply launch Driver Manager, which should offer you the new driver. But you can also use the terminal window again and install (for example) version 545 of the driver, in the following fashion:
sudo apt-get install nvidia-driver-545
Press Enter.
Note that the package name that you have to use in the install command, differs a bit from the way it's being named in the list on the home page of the PPA itself (which is weird and confusing)! So you need to pay attention to that: it's not nvidia-graphics-drivers-xxx, but nvidia-driver-xxx.
H. 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, 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.
I. 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-driver-545
(example for main version nvidia-driver-545; adapt it to your main version number)
Press Enter.
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).
Then click the OK button to 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 the graphics-drivers PPA 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 unimportant.
Removal
1.1. Don't you like the new Nvidia driver? Removal of the newer driver is simple: in step I of the install procedure, you've 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 when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. 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.
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 at the beginning 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).
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. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
C. Make the installer file executable (use copy/paste in order to avoid typos):
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 this terminal command:
sudo service lightdm 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.
Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.
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 ever 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 manually installed driver, execute this command line in the terminal: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