Debian

Install NVIDIA Drivers on Debian 11

If you have an NVIDIA GPU installed on your computer, installing the NVIDIA GPU drivers is the first thing you would want to do after installing Debian 11 on your computer.

In this article, I will show you how to install NVIDIA drivers on Debian 11. So, let’s get started.

Table of Contents:

  1. Finding Out Whether You Have NVIDIA GPU Installed
  2. Enabling contrib and non-free Repositories
  3. Updating Package Repository Cache
  4. Installing NVIDIA Drivers
  5. Checking if NVIDIA Drivers are Installed Correctly
  6. Conclusion

Finding Out Whether You Have NVIDIA GPU Installed:

You can check whether your computer has an NVIDIA GPU installed or not with the following command:

$ lspci | egrep 'VGA|NVIDIA'

As you can see, I have an NVIDIA GeForce GTX 1050 Ti GPU installed on my computer. You may have a different NVIDIA GPU installed.

Enabling contrib and non-free Repositories:

NVIDIA drivers are available in the official contrib and non-free package repositories of Debian 11. The official contrib and non-free package repositories are not enabled by default. But you can easily enable them.

To enable the contrib package repository, run the following command:

$ sudo apt-add-repository contrib

To enable the non-free package repository, run the following command:

$ sudo apt-add-repository non-free

Updating Package Repository Cache:

To update the APT package database, run the following command:

$ sudo apt update

The APT package database should be updated.

Installing NVIDIA Drivers:

To install NVIDIA drivers, run the following command:

$ sudo apt install nvidia-driver

To confirm the installation, press Y and then press <Enter>.

NVIDIA drivers and all the required packages will be downloaded from the internet. It will take a while to complete.

Once all the packages are downloaded, the APT package manager will install them one by one. It will take a while to complete.

Once you see the following prompt, navigate to <Ok> and press <Enter>.

The installation should continue.

At this point, NVIDIA drivers and all the required dependencies should be installed.

For the changes to take effect, reboot your computer with the following command:

$ sudo reboot

Checking if NVIDIA Drivers are Installed Correctly:

Once your computer boots, you should find the NVIDIA X Server Settings app in the Application Menu of Debian 11. Click on the NVIDIA X Server Settings app icon as marked in the screenshot below.

If the NVIDIA drivers are installed correctly, the NVIDIA X Server Settings app should run without errors and show you information related to your NVIDIA GPU, as you can see in the screenshot below.

NVIDIA driver kernel modules are loaded correctly, as you can see in the screenshot below.

$ lsmod | grep nvidia

Conclusion:

In this article, I have shown you how to install NVIDIA GPU drivers on Debian 11 and check that it’s working correctly.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.