Skip to content

800-783-2120
M-F 9 AM - 5 PM

Articles

How to Install NVIDIA Drivers on Linux Debian: A Complete Guide

by Salman Siddique 06 Feb 2025

Installing NVIDIA drivers on Linux Debian can be challenging, especially for new users unfamiliar with Linux’s package management system. Unlike Windows, where drivers are installed automatically, Debian requires manual installation and configuration to ensure your NVIDIA GPU runs smoothly.

In this guide, we’ll cover step-by-step instructions to install, configure, and troubleshoot NVIDIA drivers on Debian Linux.

Check Your NVIDIA GPU Model

Before installing the drivers, you need to determine which NVIDIA graphics card you have.

Command to Check GPU Model

Open a terminal (Ctrl + Alt + T) and run:

lspci | grep -i nvidia

This command will output details about your NVIDIA graphics card.

If you don’t see NVIDIA in the output, use:

sudo lshw -C display

or

nvidia-smi # If you already have NVIDIA drivers installed.


Update Your System

Ensure your Debian system is fully updated before proceeding.

sudo apt update && sudo apt upgrade -y

A fully updated system ensures compatibility with the latest NVIDIA drivers.

Enable Non-Free Repositories

Debian, by default, does not include proprietary drivers in its repositories. You must enable the non-free and contrib repositories.

Step 1: Open the Sources List

sudo nano /etc/apt/sources.list

Step 2: Add the Following Lines (If Not Already Present)

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware

Replace bookworm with your Debian version (buster, bullseye, etc.).

Step 3: Save and Exit

Press CTRL + X, then Y, and press Enter.

Step 4: Update the Package List

sudo apt update

Install NVIDIA Drivers Using apt (Recommended)

Debian provides official NVIDIA drivers through the package manager. This is the easiest way to install and update drivers.

Step 1: Install the NVIDIA Driver Package

Run the following command:

sudo apt install nvidia-driver firmware-misc-nonfree -y

This will install: ✔ NVIDIA kernel modules
Graphics driver
Required firmware files

Step 2: Reboot Your System

sudo reboot

Step 3: Verify the Installation

Once rebooted, check if the driver is correctly installed:

nvidia-smi

If NVIDIA drivers are installed correctly, this command will display GPU details.

Alternative: Install NVIDIA Drivers Manually from NVIDIA’s Website

If the Debian repository does not have the latest driver for your GPU, you can install it manually.

Step 1: Download the Latest Driver

  1. Visit NVIDIA's Official Driver Page.
  2. Select your GPU model.
  3. Download the .run file.

Step 2: Switch to TTY Mode

Before installing, disable the graphical interface.

sudo systemctl set-default multi-user.target sudo systemctl reboot

Step 3: Install Build Essentials

You need compiler tools to install the driver.

sudo apt install build-essential dkms linux-headers-$(uname -r) -y

Step 4: Run the Installer

Navigate to the directory where the file is downloaded:

cd ~/Downloads chmod +x NVIDIA-Linux-*.run sudo ./NVIDIA-Linux-*.run

Follow the on-screen instructions.

Step 5: Restart the System

sudo reboot

Check the installation with:

nvidia-smi

Set Up NVIDIA Drivers for Prime or Optimus Laptops (Hybrid GPU)

If you’re using a laptop with an NVIDIA GPU and Intel integrated graphics, you need NVIDIA Prime for switching GPUs.

Step 1: Install Required Packages

sudo apt install nvidia-prime -y

Step 2: Check GPU Modes

  • To switch to NVIDIA GPU:

    sudo prime-select nvidia
  • To switch to Intel GPU (Power Saving Mode):

    sudo prime-select intel

Restart your system after switching GPUs.

Troubleshooting NVIDIA Driver Issues

If you run into problems after installation, here are some common fixes:

A. Check If NVIDIA Drivers Are Loaded

lsmod | grep nvidia

If the output is empty, your drivers aren’t loaded.

B. Reinstall NVIDIA Drivers

sudo apt remove --purge '^nvidia-.*' sudo apt install nvidia-driver firmware-misc-nonfree -y sudo reboot

C. Black Screen After Installation

If you get a black screen after reboot:

  1. Boot into recovery mode.
  2. Open a terminal and run:

    sudo nano /etc/default/grub
  3. Find the line:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    and change it to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
  4. Save the file (CTRL + X, then Y and Enter).
  5. Update GRUB:

    sudo update-grub sudo reboot

D. NVIDIA X Server Settings Not Opening

If nvidia-settings doesn’t open:

sudo apt install --reinstall nvidia-settings

Summary

Step Command / Action
Check GPU Model `lspci
Update Debian sudo apt update && sudo apt upgrade -y
Enable Non-Free Repo Add to /etc/apt/sources.list, then sudo apt update
Install NVIDIA Driver sudo apt install nvidia-driver firmware-misc-nonfree -y
Verify Installation nvidia-smi
Manually Install from NVIDIA sudo ./NVIDIA-Linux-*.run
For Hybrid Laptops (Prime) sudo apt install nvidia-prime -y
Switch GPUs (Hybrid Systems) sudo prime-select nvidia or sudo prime-select intel

Conclusion

Installing NVIDIA drivers on Debian Linux requires enabling non-free repositories, using the Debian package manager, or manually installing from NVIDIA’s website. By following the steps in this guide, you can ensure your NVIDIA GPU runs optimally for gaming, development, and AI workloads.

With this setup, your Debian system will fully utilize the power of your NVIDIA GPU, delivering smooth performance and stability.

Prev Post
Next Post

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Edit Option
Back In Stock Notification
Terms & Conditions
Dear Buyers, Thank you for visiting our store and choosing us to upgrade your computer. We tried to make our terms, conditions and policies as easy and friendly as we possibly can and make it a pleasurable experience for you. All situations are unique, our staff is trained to accommodate your request within our policy and make You happy. Our Motto “Match Less Service and Support” Privacy We do not sell, trade or share your personal or contact information to marketers. We use information provided by you or we collected. To process the order, update you with the progress of your order, any changes to our site, products or services we offer and when to provide customer service. Information Accuracy All information on this site is believed to be accurate. UPGRADE DADDY has made reasonable efforts in providing information to make purchasing as easy as possible. UPGRADE DADDY assumes no liability resulting from errors or omissions in the information. Price Guarantees UPGRADE DADDY makes every effort to ensure pricing is accurate and up to date, but in case of an error, UPGRADE DADDY reserves the right to correct pricing at any time as well as cancel any order that was placed for products. Orders All orders received by 4.00 PM PST are processed and shipped the same day. Orders received after 4.00 PM PST or on weekend and holidays will be shipped the next business day. Please see order policy Returns Products can be returned with in 30 days of the order date. Please see return policy. Warranty UPGRADE DADDY offers one Year warranty on memory upgrade products. All other product warranties are covered by the manufacturer of the product. All terms and conditions apply as stated on manufacturers web site.
this is just a warning
Login
Shopping Cart
0 items