Steps for installing modern Nvidia drivers on Debian Stable

Each commands I type requires root privileges, so the first command I use is su.

If you want to prevent each command from being executed as administrator, just type sudo in front of each command.

  1. Install package extrepo with the command apt install extrepo
  2. Refresh its repositories with the command extrepo update
  3. Search for Nvidia repos in extrepo with the command extrepo search nvidia
  4. Enable the official repo Nvidia Cuda with the command extrepo enable nvidia-cuda
  5. Now you can see the new repo in the folder /etc/apt/sources.list.d/
  6. The repository for now is for Debian 12, but it’s fully compatible with Debian 13. At the moment I’m typing this guide, repos for Debian 13 are having only Nvidia Beta drivers, so for now is better stuck with Debian 12 repo for another while.
  7. Install the package apt install build essential and apt install linux-headers-amd64
  8. If you own an old GTX card install the package apt install nvidia-drivers, otherwise if you own a newer RTX or a newer generation GTX 1650 series you need to install apt install nvidia-open. The nvidia-driver-open package is incompatible with older videocards.
  9. Notice that this command will install lates beta drivers. For what I tested they tent to be buggy. So type apt install nvidia- and press tab couple of times. You first need to install nvidia-pinning-5xx.xx.xx package, for pinning stable drivers and not the beta version.
  10. once you installed the drivers and they successfully compiled over your dkms you can restart your system and new drivers should be correctly installed
  11. Notice this procedure is intended for install drivers without the secure boot active in bios settings. If you want to enable the secure boot feature you also need to import the certificate you’ll find at this address: Index of /compute/cuda/repos

That’s all folks. Enjoy your Debian stable with the latest Nvidia shiny drivers. You can actually play very decent videogames on Debian.

2 Likes

I don’t know about needing to install extrepo, I was just fine adding non free firmware to my sources.list then running apt update. I’m on Debian Testing, but you can do that in Trixie. From there I used synaptic to find my nvidia drivers, then I can read any descriptions put in the package.
But it sounds like you got it done.

2 Likes

hi @tmick :grinning_face:

I tried couple of times installing Nvidia drivers from non-free repository, but what I got was only a black screen.
The fact is I own a RTX 5070, and its installation on Debian is a bit tricky because I need very fresh drivers. If I’m not wrong Debian Trixie in its repository currently is having Driver 550.x.x, for RTX 5000 series I need version 570 or newer.

So far currently I have installed drivers 580.105 thanks extrepo and everything is going smooth.

Notice: Before the RTX 5070 I owned an RTX 3070ti, and I was able to install the drivers with non-free repository.

3 Likes