Install Nvidia Firmware Debian
Installing NVIDIA drivers on Debian requires a few steps, which involve adding the necessary repositories, updating the system, and then installing the drivers. Before you start, make sure that you have a good internet connection and root or sudo access to your system.
Here are the steps:
First, open a terminal window.
Check if you have a Nvidia GPU, enter:
bashlspci | grep -i nvidia
This should list your Nvidia card if it exists. If not, you may not have an Nvidia GPU, or it is not recognized by your system.
Now, you need to add the "non-free" component to your package sources. Edit the sources.list file, typing the command:
bashsudo nano /etc/apt/sources.list
Then, append "contrib non-free" to the end of your main and updates repositories, it should look like this:
bashdeb http://deb.debian.org/debian/ bullseye main contrib non-free deb-src http://deb.debian.org/debian/ bullseye main contrib non-free deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
Press
CTRL+X
thenY
thenEnter
to save and exit.Update your package list with the command:
bashsudo apt update
Then, install the kernel headers. You'll need these to build the Nvidia module:
bashsudo apt install linux-headers-$(uname -r)
Now, you can install the Nvidia driver:
bashsudo apt install nvidia-driver
After the installation is completed, you can reboot your system:
bashsudo reboot
After rebooting, you can check if the Nvidia drivers are being used:
bashglxinfo | grep -i "direct rendering"
The output should be "Direct Rendering: Yes" if the Nvidia driver is working correctly.
This is the process for installing the Nvidia driver on a Debian system. Keep in mind that the specific driver version might vary based on your GPU model and the Debian version you are using. For the most accurate results, you should refer to the Nvidia website or your GPU documentation.
Also remember that if you're using a laptop with both integrated and discrete graphics, you might need to install and configure Bumblebee for Nvidia Optimus technology.
The command glxinfo
is a part of the mesa-utils
package which is not installed by default on most distributions. If the command is not found, you likely do not have mesa-utils
installed on your machine.
You can install it using the following command:
bashsudo apt install mesa-utils
After running the above command, you should be able to use glxinfo
. If you're checking to see if direct rendering is working, you can use:
bashglxinfo | grep -i "direct rendering"
If your Nvidia driver is working correctly, you should see Direct Rendering: Yes
as the output.