Installing NVIDIA Drivers on Debian 13 (Trixie)

Getting proprietary NVIDIA drivers running on Debian 13 “Trixie” takes a few more manual steps than you might expect — especially around disabling the nouveau driver and making sure DKMS has what it needs to build the kernel module. This walkthrough uses NVIDIA’s official .run installer rather than the Debian-packaged driver, which tends to lag behind NVIDIA’s latest releases. At time of writing, the Debian trixie package is at 550 (550.163.01) while the latest production .run is 595 (595.84).

The reason for choosing the .run installer over apt: installing via the Debian package manager did not disable nouveau correctly. On a system with a GUI this resulted in a boot hang; on a headless system the GPU was not detected at all. The two-pass .run installer handles nouveau cleanly and reliably.

Prerequisites

Step 1: Log in as root

Switch to the root user (su - or sudo -i) before starting. The rest of the steps assume a root shell.

Step 2: Install and run nvidia-detect

apt install nvidia-detect
nvidia-detect

This confirms the system can see your NVIDIA GPU and reports which driver package Debian would recommend — a useful sanity check even though we’re installing directly from NVIDIA.

Step 3: Install build tools and kernel headers

DKMS needs a compiler toolchain and matching kernel headers to build the NVIDIA kernel module. Install the headers matching the running kernel:

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

Note: linux-headers-generic also works if the versioned package is unavailable.

Step 4: Download the driver

Download the latest .run file from NVIDIA’s driver download page directly onto the Debian machine, or copy it over (scp, USB drive, whatever’s convenient).

Step 5: Run the installer (first pass)

sh NVIDIA-Linux-x86_64-<version>.run

During this first run, the installer will prompt you to:

  1. Disable the nouveau driver — choose Yes
  2. Rebuild the initramfs — choose Yes
  3. When prompted, choose Abort installation — then manually reboot the machine

This is expected behaviour. The installer exits so nouveau can be fully disabled before the NVIDIA module is built and loaded. Reboot now, then continue to Step 6.

Step 6: Run the installer again (second pass)

After rebooting, run the same .run file again:

sh NVIDIA-Linux-x86_64-<version>.run

This time, with nouveau disabled, the installer proceeds to build the kernel modules via DKMS and completes the installation successfully.

Step 7: Reboot and verify

Reboot once more to load the new driver:

reboot

Then confirm everything is working:

nvidia-smi

If the driver installed correctly, nvidia-smi will print your GPU model, driver version, and current utilization — confirming the card is recognised and the proprietary driver is active.

Summary

StepAction
1Log in as root
2apt install nvidia-detect → run nvidia-detect
3apt install build-essential + linux-headers-$(uname -r) (or linux-headers-generic)
4Download .run installer from NVIDIA, copy to machine
5Run .run file → disable nouveau (yes) → rebuild initramfs (yes) → Abort installation → reboot manually
6Run .run file again → builds kernel modules
7Reboot → verify with nvidia-smi

The two-pass installer run is the part most people trip up on — it’s not a failure, it’s just how the installer sequences disabling nouveau before it can safely build and load the proprietary module.

← All posts
← Turning an Armbian SBC into a USB-Tether Router (and Everything That Went Wrong) KS015 Dual Current Sensor →