In this article, we will show you how to download the latest version of the official NVIDIA drivers for Debian 11 and install it on a Debian 11 desktop operating system.
- Remove the Old NVIDIA Drivers from Debian 11
- Enable the Official Contrib Repository on Debian 11
- Enable the Official Non-Free Repository on Debian 11
- Update the APT Package Repository Cache of Debian 11
- Install the Required Dependencies for the Latest Version of the Official NVIDIA Drivers on Debian 11
- Download the Latest Version of the Official NVIDIA Drivers for Debian 11 Desktop
- Make the Official NVIDIA Installer File Executable
- Switch the Default Debian 11 Target to Multi-User
- Login to Debian 11 from the Interactive Terminal Interface
- Disable the Open-Source Nouveau Drivers from Debian 11
- Install the Latest Version of the Official NVIDIA Drivers on Debian 11
- Switch the Default Debian 11 Target to Graphical
- Check If the Official NVIDIA Drivers Are Installed Correctly on the Debian 11 Desktop
- Uninstall the Official NVIDIA Drivers from the Debian 11 Desktop
- Conclusion
- References
Remove the Old NVIDIA Drivers from Debian 11
Before you attempt to install the latest version of the official NVIDIA drivers on your Debian 11 desktop, uninstall the NVIDIA drivers that you already installed from the official package repository of Debian 11. If you need any assistance on that, read the article on How to Clean Install the NVIDIA Drivers on Debian 11.
Enable the Official Contrib Repository on Debian 11
To install the required dependency packages to install the latest version of the official NVIDIA drivers, enable the official Debian 11 contrib package repository.
Run the following command to enable the official Debian 11 contrib package repository:
Enable the Official Non-Free Repository on Debian 11
To install the required dependency packages to install the latest version of the official NVIDIA drivers, enable the official Debian 11 “non-free” package repository.
Run the following command to enable the official Debian 11 non-free package repository:
Update the APT Package Repository Cache of Debian 11
Run the following command to update the APT package repository cache of Debian 11:
The APT package repository cache of Debian 11 should be updated.
Install the Required Dependencies for the Latest Version of the Official NVIDIA Drivers on Debian 11
Run the following command to install the dependency packages that are required to install the latest version of the official NVIDIA drivers on the Debian 11 desktop:
To confirm the installation, press Y. Then, press <Enter>.
The APT package manager should start downloading all the required packages from the internet. It takes a while to complete.
The APT package manager should start installing all the required packages. It takes a while to complete.
At this point, all the dependency packages should be installed.
Download the Latest Version of the Official NVIDIA Drivers for Debian 11 Desktop
In this section, we will show you how to download the latest version of the official NVIDIA drivers for Debian 11.
To download the latest version of the official NVIDIA drivers, open a web browser and visit https://nvidia.com/en-us/drivers/unix.
Once the page loads, you should find the latest version of the official NVIDIA drivers in the “Latest Production Branch Version” section. At the time of this writing, the latest version of the official NVIDIA drivers is 525.89.02. To download it, click on the version number as marked in the following screenshot:
You will find all the NVIDIA graphics cards that this driver supports[1] in the “Supported Products” tab.
If your NVIDIA GPU is in the “Supported Products” list, click on “Download” to download it[2].
Click on “Agree & Download”.
Your browser should start downloading the latest version of the official NVIDIA Drivers installer file.
At this point, the latest version of the official NVIDIA drivers installer file should be downloaded.
Make the Official NVIDIA Installer File Executable
The latest version of the official NVIDIA drivers installer file should be downloaded in the ~/Downloads directory (usually the default downloads directory of your web browser) of your Debian 11 desktop.
$ ls -lh
Run the following command to make the NVIDIA drivers installer file executable:
NOTE: Replace 525.89.02 with the version number of the NVIDIA drivers that you downloaded.
The official NVIDIA drivers installer file should be executable.
Switch the Default Debian 11 Target to Multi-User
You can’t install the official NVIDIA drivers on your Debian 11 desktop as long as the graphical user interface is running. Disable the graphical user interface and enable the interactive terminal interface to install the official NVIDIA drivers on your Debian 11 desktop.
Run the following command to enable the interactive terminal interface and disable the graphical user interface of Debian 11:
The default target of Debian 11 should be changed to “multi-user”.
Reboot your Debian 11 machine for the changes to take effect.
The next time your Debian 11 machine boots, you will see an interactive terminal instead of the Debian 11 graphical user interface.
Login to Debian 11 from the Interactive Terminal Interface
To login to your Debian 11 machine from the interactive terminal, type in your login username and press <Enter>.
Then, type in your login password and press <Enter>.
You should be logged in to the interactive terminal of your Debian 11 machine.
Disable the Open-Source Nouveau Drivers from Debian 11
Before you can install the official NVIDIA drivers on your Debian 11 operating system, disable the open-source Nouveau drivers.
To disable the open-source Nouveau drivers on Debian 11, create a new /etc/modprobe.d/nvidia-installer-disable-nouveau.conf file as follows:
Type in the following lines in the nvidia-installer-disable-nouveau.conf file:
options nouveau modeset=0
Once you’re done, press <Ctrl> + X followed by Y and <Enter> to save the nvidia-installer-disable-nouveau.conf file.
For the changes to take effect, restart your Debian 11 machine with the following command:
Once the Debian 11 machine machine boots, you should see that the nouveau drivers are not being used anymore.
Install the Latest Version of the Official NVIDIA Drivers on Debian 11
At this point, your Debian 11 machine should be ready to install the latest version of the official NVIDIA drivers.
First, navigate to the ~/Downloads directory as follows:
You will find the official NVIDIA installer file here:
To install the latest version of the official NVIDIA drivers, run the installer file as follows:
NOTE: Replace 525.89.02 with the version number of the NVIDIA drivers that you downloaded.
The official NVIDIA drivers installer is being initialized. It takes a few seconds to complete.
The official NVIDIA drivers installer installs the latest version of the official NVIDIA drivers on your Debian 11 machine. It takes a few seconds to complete.
Once you see the following window, select Yes and press <Enter>.
The installation should continue.
Once you see the following window, select Yes and press <Enter>.
The latest version of the official NVIDIA drivers should be installed on your Debian 11 machine.
Press <Enter>.
For the changes to take effect, restart your Debian 11 machine with the following command:
Once your Debian 11 machine boots, you can verify that the NVIDIA kernel modules are loaded with the following command. If the NVIDIA kernel modules are loaded, you will see similar outputs (as shown in the following screenshot):
Switch the Default Debian 11 Target to Graphical
Now, you can disable the interactive terminal interface of your Debian 11 machine and enable the graphical user interface with the following command:
The default target of Debian 11 should be changed to “graphical”.
For the changes to take effect, reboot your Debian 11 machine as follows:
The next time your Debian 11 machine boots, you will see that the graphical user interface of Debian 11 is displayed instead of the interactive terminal interface.
Check If the Official NVIDIA Drivers Are Installed Correctly on the Debian 11 Desktop
To check whether the official NVIDIA drivers are working correctly on your Debian 11 desktop, search for the “NVIDIA X Server Settings” app in the “Application Menu” of your Debian 11 machine. Once you find it, click on the “NVIDIA X Server Settings” app icon to run it.
The “NVIDIA X Server Settings” app should be opened. If the official NVIDIA drivers are working, it correctly shows you all the information about your NVIDIA GPU.
You can also run the “nvidia-smi” command from a “Terminal” app and verify whether the official NVIDIA drivers are working.
If the official NVIDIA drivers are working, the “nvidia-smi” command shows you the usage information of your NVIDIA GPU and the version number of the installed NVIDIA and NVIDIA CUDA drivers.
Uninstall the Official NVIDIA Drivers from the Debian 11 Desktop
To uninstall the official NVIDIA drivers from your Debian 11 desktop machine, disable the graphical user interface and enable the interactive terminal interface again.
You also need to have the official NVIDIA installer file. If you removed it, you can download it again before enabling the interactive terminal interface.
Once you enable the interactive terminal interface and logged in to your Debian 11 machine from the interactive terminal interface, navigate to the ~/Downloads directory as follows:
You should find the official NVIDIA installer file here:
To uninstall the official NVIDIA drivers from your Debian 11 machine, run the official NVIDIA installer file as follows:
NOTE: Replace 525.89.02 with the version number of the NVIDIA drivers that you downloaded.
The NVIDIA drivers installer is being initialized. It takes a while to complete.
Once you see the following window, select “Yes” and press <Enter>.
The official NVIDIA drivers are being uninstalled from Debian 11. It takes a few seconds to complete.
At this point, the official NVIDIA drivers should be removed from your Debian 11 machine.
Select “OK” and press <Enter>.
Now, disable the interactive terminal interface of your Debian 11 machine and enable the graphical user interface. Then, reboot your Debian 11 machine for the changes to take effect.
Conclusion
We showed you how to download the latest version of the official NVIDIA drivers for Debian 11. We also showed you how to install the latest version of the official NVIDIA drivers on a Debian 11 desktop and how to uninstall the latest version of the official NVIDIA drivers from the Debian 11 desktop as well.