Most modern Linux Desktop systems such as Debian come with an Nvidia driver pre-installed in the Nouveau open-source graphics device driver for Nvidia video cards. For the most part, this is acceptable; however, if you are using your Linux system for graphical design or gaming, you may get better drivers.
Historically, the Nouveau proprietary drivers are slower than Nvidia’s proprietary drivers, along with lacking the newest features, software technology, and support for the latest graphics card hardware. In most situations, upgrading your Nvidia Drivers using the following guide is more beneficial than not doing it. In some cases, you may see some substantial improvements overall.
The following tutorial will teach you to install the latest bleeding-edge Nvidia Beta Graphic drivers for Debian 11 Bullseye.
This tutorial uses a stock standard installation of the Debian 11 Bullseye & GNOME desktop. This may not work for users with alternative display managers or desktop environments, so make sure to back up any important files before you begin.
Table of Contents
Prerequisites
- Recommended OS: Debian 11 Bullseye
- User account: A user account with sudo or root access.
- Required: Internet Connection
Update Operating System
Update your Debian operating system to make sure all existing packages are up to date:
sudo apt update && sudo apt upgrade -y
The tutorial will be using the sudo command and assuming you have sudo status.
To verify sudo status on your account:
sudo whoami
Example output showing sudo status:
[joshua@debian~]$ sudo whoami
root
To set up an existing or new sudo account, visit our tutorial on Adding a User to Sudoers on Debian.
To use the root account, use the following command with the root password to log in.
su
Part 1. Install Dependencies & Configure
Currently, the Nvidia 495 Drivers are still in beta and have not made their way onto any official repository at the current moment. However, for those enthusiasts that would like to install the beta drivers and keep them up to date manually, the following steps will help you achieve this goal.
First, visit the Nvidia downloads page and download the latest .run file or get the link and use the wget command.
Example only (make sure to get the latest link):
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/495.29.05/NVIDIA-Linux-x86_64-495.29.05.run
Install Linux Headers and compilation dependencies:
sudo apt install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config -y
Example output:
Type Y, then press the ENTER KEY to proceed and complete the installation.
Next, blacklist the nouveau driver create a blacklist file:
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
Once inside the file, add the following:
blacklist nouveau
options nouveau modeset=0
Save the file CTRL+O, then exit CTRL+X. You will then need to regenerate the kernel initramfs:
sudo update-initramfs -u
Now, reboot to the multi-user run level. This will disable the GUI user after reboot:
sudo systemctl set-default multi-user.target
sudo reboot now
Part 2. Install Nvidia Beta Drivers
Login to your account; it will be a terminal-only screen. Navigate to the directory if needed where you downloaded the .run file too. Next, run the following bash command to start the installation process.
Example only (your version will be different and more updated in the future):
sudo bash NVIDIA-Linux-x86_64-495.29.05.run
If everything has been set correctly, you will see a screen and loading bar for building the kernel. After a few minutes, you will see your first prompt.
The first prompt you will see on a fresh installation is to install 32-bit compatibility. Select Yes or No to proceed with the following optional prompt installation choice.
Example:
Next, you will receive another prompt asking to keep default settings for the nvidia-xconfig utility or if you would like the utility to configure the files for you automatically.
This is optional, but the recommended option for fresh installs would be Yes.
One last prompt will appear informing you that you have successfully installed the Nvidia Drivers package.
Example:
Now that the drivers are installed, you need to reboot your system but first, make sure to switch back to the graphical UI:
sudo systemctl set-default graphical.target
sudo reboot now
Part 3. Confirm Beta Drivers Installation
After you log back into your system, you can view the status of the graphic card with the “nvidia-smi” command.
nvidia-smi
Example output:
Alternatively, open your Nvidia X Server GUI to confirm the driver’s build version.
Example:
Comments and Conclusion
Congratulations, you have installed the latest Nvidia Beta Drivers. Do not forget to keep checking for updated packages through the download link. If new beta drivers come out, you will repeatedly run the same process to install the drivers over the existing ones.