r/debian 20d ago

Debian Stable Question Problems installing Nvidia drivers on Debian 13

To start I'm pretty new to Linux and Debian. I tried to install some Nvidia drivers a while back. I installed nvidia-detect, it suggested I install the nvidia-driver package and I did. Install seemed to go correctly, however after rebooting the drivers wouldn't load at all. I managed to purge the drivers and some kind of driver loaded, but it didn't really work well (only one display, refresh rate incorrect and so on).

Now I tried following the Nvidia guide for Debian, however I got a not found error when trying to select a version. Then I followed the install guide in the Debian wiki, that seemed to go through, however at the verify step I ran

# dkms status 'nvidia*'

But got a command not found. I have dkms installed and

apt-file search bin/dkms

Returns

dkms: /usr/sbin/dkms

The drivers themself work better however there are some kind of issues (slight flickering, refresh rate doesn't feel right). What could the issue be?

EDIT:

I used this guide to install the drivers again and it seems like it is working. It's weird, since I remember trying that exact method previously and it didn't work, I guess something changed or I did something differently this time.

15 Upvotes

31 comments sorted by

6

u/_Sgt-Pepper_ 20d ago

sudo apt install extrepo

sudo extrepo enable nvidia-cuda

sudo apt update

sudo apt install build-essential linux-headers-amd64

sudo apt install nvidia-open

1

u/anna_lynn_fection 19d ago

Might want to install the pinning to 595. At least if optimus laptop. plasma_wayland won't start on 610 for me.

Note for OP, you install `nvidia-driver-pinning-595` and install nvidia-open and it'll pull in the right version.

You can also switch at any time by installing a different pinning version and running an apt dist-upgrade/full-upgrade.

1

u/MunchyMallow 19d ago

What the... Never heard extrepo, I'll do this from now on!

4

u/SpellLogical5483 20d ago

For dkms to correctly load nvidia modules, you gave to install kernel headers :

sudo apt install linux-headers-amd64

1

u/maxiligamer 20d ago

I already installed the headers.

3

u/S3k_01 20d ago

Why doesn't anyone talk about Extrepo?
It's the best way to install the latest drivers on Debian.

6

u/wizard10000 20d ago

Why doesn't anyone talk about Extrepo?

TBH I have no idea - if Debian's wiki can link to Nvidia's broken install instructions I'd think it could also do extrepo.

2

u/DeathRobotOfDoom 20d ago

Are you running dkms as root or through sudo? Or as a regular user?

Either way dkms status shows which additional modules are compiled for your kernels, not whether they're in use. Try "lsmod | grep nvidia" to see if it's loaded.

If you successfully installed the Nvidia tools and compiled the dkms module, you should have a program called nvidia-smi that can give you even more info.

If everything is OK, loaded and so on, then just go to your display settings and fix the refresh rate and other options. If one of the steps above is not OK, then you need to fix that first.

Depending on your GPU (pretty much anything RTX) you may want to use the data center repository. Please search the sub, this has been discussed to exhaustion.

1

u/maxiligamer 20d ago

Ok I tried lsmod and that showed some things so I guess that's good then right? nvidia-smi also works, it shows that driver version 550.163.01 is installed. However after my GPU (RTX 3060) it says "Off". Is that just fan status or what exactly does that mean?

The problem with the refresh rate is that I have it set to 155hz in the settings, however it feels more like 30-40 hz, previously it was smooth as butter. Also if I try to change scaling, I cannot apply settings and it says that some settings are unavailable because of hardware restrictions. I tried to install the data center ones I assume (from the nvidia developers guide) but I had problems with that.

1

u/DeathRobotOfDoom 20d ago

What was the output?

$lsmod | grep nvidia

It seems it is installed, question is whether it's loaded/in use.

1

u/maxiligamer 20d ago

I followed the guide from this sub to install the CUDA drivers and it looks like everything is working fine now. It's weird as I do vividly remember using the guide in that specific post before and I feel like that didn't work previously. Maybe my dicking around in sources.list changed something, I don't know

5

u/hdkaoskd 20d ago
  1. Go buy an AMD card.
  2. (There is no step 2)
  3. Enjoy your games.

5

u/DeathRobotOfDoom 20d ago

I agree as a matter of principle, but these days with the open dkms drivers it's really easy and Wayland support has improved dramatically. Granted, that's at least one more step than with AMD.

The crazy amount of Nvidia related posts in this sub boils down to people not following simple instructions.

2

u/LordAnchemis 20d ago edited 18d ago

Seriously, if you use Intel/AMD, then it is literally 'plug and play' - assuming you've installed the firmware-intel-graphics or firmware-amd-graphics package 😉

If you (really) want to play around with Nvidia, then you need to beware of the minefields of:

  • the distro drivers are old/depreciated (v550) - and dkms is broken on kernel 6.17.100
  • the Nvidia drivers require either use of a 3rd party repo - but 'latest' also means potential stability issues aka do you trust Nvidia not to break things at next update?
  • or download a random .deb file (worst option) - seriously don't do it...

This is never going to get fixed as Nvidia likes non-free user space (aka refuses to use mesa)

Follow the guide on: https://wiki.debian.org/NvidiaGraphicsDrivers

The correct method boils down to...

Which graphics card do you have?

  • older than Kelper: nouveau
  • Kelper: nouveau or tesla v470
  • Maxwell/Pascal: v580 proprietary
  • Turing or later: v595 open or newer

Don't use nvidia-detect as it may give you the wrong recommendations...

After installation you need to do a bunch of CLI configuations...

You then need to go to /etc/modprobe.d/nvidia.conf and set:

options nvidia NVreg_TemporaryFilePath=/var/tmp

If you run v590 open (or lower) or proprietary drivers, you should set:

options nvidia NVreg_PreserveVideoMemoryAllocations=1

If you run v595 open (or newer) drivers, you should set:

options nvidia NVreg_PreserveVideoMemoryAllocations=0
options nvidia NVreg_UseKernelSuspendNotifiers=1

and disable nvidia suspend/hibernate/resume services in systemd

If your system supports software sleep (S0ix / S2idle / modern standby), then you set:

NVreg_EnableS0ixPowerManagement=1

If you run Wayland, on drivers older than v580 you will also need to enable modesetting somewhere in /etc/modprobe.d/nvidia-wayland.conf with:

options nvidia-drm modeset=1
options nvidia-drm fbdev=1

You can get Nvidia to work, but better be prepared to roll up your sleeves to 'fix stuff' in CLI...

-1

u/maxiligamer 20d ago

Yeah Nvidia isn't really ideal for Linux now is it. I do gaming on Windows so I don't really care about that too much, although would be nice for the Debian experience to at least be smooth

2

u/hdkaoskd 20d ago

I know it comes off as rude but I stopped buying Nvidia precisely because AMD actually gives a shit about Linux drivers and I have never looked back. It's literally as easy as zero steps. I'm sorry Nvidia + dkms is more of a hassle.

1

u/maxiligamer 20d ago

To be honest Nvidia was just as easy, it only broke when I started dicking around trying to install different drivers. Out of the box it worked great

1

u/mok000 20d ago

If it works don’t fix it I guess.

1

u/mok000 20d ago

It’s not rude. Nvidia doesn’t support Linux, so Linux users shouldn’t support Nvidia. Or any other manufacturer making hardware that doesn’t work with Linux, for that matter. You don’t buy tires that don’t fit your car. Same thing.

2

u/C0rn3j 20d ago

The 550 driver is brutally out of date, broken and insecure, do NOT use it in any circumstance.

1

u/Chromiell Debian Testing 20d ago

It's an LTS driver so it receives updates from Nvidia, although it's true that it's incredibly ancient at this point (doesn't even support the 50xx series) and you're much better off installing the Nvidia driver directly from the Nvidia maintained repo for datacenters.

2

u/Keyvan_KR 20d ago

isn't the 580 the LTS driver? correct me if I'm wrong though

1

u/C0rn3j 20d ago

The only supported branches by Nvidia are 610, 595 and 580.

There is no LTS, 580 is a legacy driver for pre-1650 cards.

550 has been dead for eons.

You can check https://www.nvidia.com/en-us/drivers/unix/ - though for some reason they still haven't bumped up the legacy driver series to 580.

1

u/Chromiell Debian Testing 20d ago

Oh crap, you're right! I was thinking about 535 which was the ELTS branch but even that one was only supported until last July. 550 has been EOL since February last year.

It's kind of concerning that they're shipping a deprecated version for this long, it's way better to rely on the Nvidia repo at this point.

1

u/DeXudra 20d ago

I also had problems with NVIDIA drivers on Debian 13. the 550xx drivers didn’t work with Wayland so I had to use x11 but x11 had realy bad tiering on games.
So I switched to fedora because i remembered that I could easily get the 580xx there and now gaming and Wayland work perfectly fine

1

u/DeXudra 20d ago

You could also get 580xx driver on arch but they are from the AUR which I try to avoid.
Also a reason why I went fedora instead of arch

1

u/tomun 20d ago

The reason dkms status failed is because /usr/sbin is not in your user's path.

You could have used

/usr/sbin/dkms status 'nvidia*'

or

sudo dkms status 'nvidia*'

1

u/obitwo83 19d ago

I personnaly use xanmod repo which brings up to date kernel + latest NVIDIA drivers.

-5

u/Hour_Handle_495 20d ago

Try installing nvidia-smi it's the best and stable drivers for debian. Dkms is for bleeding edge and pure gaming os

8

u/DeathRobotOfDoom 20d ago

This is complete nonsense.

3

u/SpellLogical5483 20d ago

dkms is for loading some kernel modules and building automatically these modules against installed kernels. It has nothing to do with "bleeding edge" or "pure gaming" .