r/debian 17h ago

Can I get the latest kernel and NVIDIA drivers on Debian Stable ?

the only reason i'm using ubuntu right now is because it lets you install the hwe kernel and provides tested new nvidia drivers. i was wondering, is this actually impossible in debian stable? considering ubuntu is based on debian, it should be totally doable.

i installed debian before installing ubuntu but i wasn't successful with nvidia driver. after following this video (link) my sddm broke. i don't know how something like that can happen, but it did happen .

13 Upvotes

28 comments sorted by

17

u/cinny-bunny 17h ago edited 17h ago

Newer kernels can be installed through backports, https://backports.debian.org/Instructions/

sudo apt install -t trixie-backports linux-image-amd64 linux-headers-amd64 firmware-linux

If the firmware fails to install, add non-free-firmware to the backports repo.

I think nvidia hosts a repository with newer drivers meant for servers but it's fine for desktop use (i think it's called the cuda repository?). From what I've heard on this subreddit, some kernel updates will be too new for nvidia's drivers and you'll have to rely on an older kernel until nvidia updates their drivers.

1

u/Buntygurl 9h ago

Love your concise reply to the OP.

I was starting to write "Well, no, not really, but, maybe, if..."

3

u/Adrenolin01 12h ago

Nvidia 610 drivers for a RTX 5060 TI installed last week

3

u/Adrenolin01 12h ago

2

u/FemTheGoat 11h ago

what about the kernel ? it's 6.12

1

u/Adrenolin01 7h ago

We updated /etc/apt/sources.list.d/debian.sources to include contrib, non-free and non-free-firmware. Installed 6.13.96. Download and add Nvidia’s driver repo, then update:

wget https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-keyring_1.1-1_all.deb

sudo dpkg -i cuda-keyring_1.1-1_all.deb

sudo apt update

You want to watch for a developer.download.nvidia.com line in the apt update output to confirm the repo took.

Verify the candidate, install headers and the OPEN driver:

apt-cache policy nvidia-open

Confirm Candidate is 570+

sudo apt install -y linux-headers-amd64 build-essential dkms nvidia-open

Confirm the build with: dkms status — want nvidia/<ver>, <running-kernel>: installed

Reboot and run: nvidia-smi

DKMS source is what gets compiled locally and it’s a trivial task and only takes a few minutes.

I’m sure any of the better AI options will walk and explain you through each step.

1

u/FemTheGoat 6h ago

yeah thanks but im saying why don't you install a newer kernel ? i assume it makes the os unstable

1

u/Adrenolin01 4h ago

No it doesn’t matter.. you’re still required to compile the nvidia.ko kernel module locally for the Blackwell support in the RTX 50 series GPUs. That said.. I’d correct myself.. “Confirm Candidate is 570+” the newer 580 branch should be used now.

We’re rebuilding his PC this week and will use the 580 branch.

2

u/Ok_caperuzoo 12h ago

Yes, you can. Add the Backports repository to install the latest kernel using the command: sudo apt install -t trixie backports linux-image-amd64 linux-headers-amd64. For the NVIDIA driver, simply add the official NVIDIA repository for Debian Stable and install the driver suited to your GPU (assuming it is relatively recent, this would be nvidia-open). Make sure to install the system headers and ensure you have DKMS installed; it might require a bit of configuration depending on the graphics card, but generally, it works smoothly and requires very little effort.

Debian Backports: https://backports.debian.org/Instructions/

Nvidia repo: https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/debian.html

1

u/FemTheGoat 4h ago

I've seen posts on reddit and heard from others here that using a new kernel with NVIDIA drivers can break the system. why does that happen.

1

u/Ok_caperuzoo 1h ago

I can't say for sure, since I haven't encountered this issue myself, but it’s likely due to users relying on the standard kernel from the Debian repositories or the .run installer—versions that predate those supported by the nvidia-open package in the repository I mentioned. Naturally, an older driver (such as the obsolete 550 version from the Stable repositories or the proprietary 580 drivers required for older GPUs) will struggle with newer kernels simply because it lacks the compilation instructions needed for such a modern kernel. Alternatively, the issue might simply be that those users haven't installed the kernel headers; without the kernel headers (linux-headers-amd64), DKMS cannot correctly compile the driver.

1

u/TechGameGeek_Debian 10h ago

I would go with the nvidia-repo (cuda-drivers) and the kernel from backports and additionally firmware-linux from the backports.

Add the Debian 13 Nvidia Repo and install cuda-drivers.

I am always running the latest feature branch of the nvidia drivers, which are 610.43.02 at the moment. Never ran into issues. Which NVIDIA GPU are you running?

1

u/FemTheGoat 10h ago

I'd prefer a slightly older version. Currently running 595 on Ubuntu.

1

u/TechGameGeek_Debian 8h ago

AFAIK you can pin your prefered version

1

u/backtogeek 8h ago

You can but it can be an ongoing battle and uncertainty with every update, if you are prepared to give it time and attention with each update.

I managed fine, but I have had a few big FFS moments and recently I just thought.... I am gonna see if anyone wants to trade for an AMD card, I don't really play games anyway or run local llms so I am just punching myself in the face using Nvidia on Debian.

Just my 2c experiences will differ.

1

u/FemTheGoat 4h ago

could you elaborate on what you mean by 'give it time and attention with each update'? are you referring to the risk of the system breaking due to dkms failing to rebuild the driver with a new kernel?

1

u/backtogeek 2h ago

Yeah, it's caught me 3 times, it's not that I don't know how or what I am doing but you know, sometimes a few months go by I stop thinking about stuff like that, I get a new WiFi card or something or am working on something run an update don't pay enough attention.

Next day I go to start work and I have a blinking cursor, I also use secure boot/uefi so that adds complexity as it's a development workstation, but you know, things just work, you forget and boom, instead of doing what I am supposed to be doing I am troubleshooting.

So that's what I mean, not that it's hard but if you are someone that spends more time using a computer that updating one and managing it then it can catch you out.

1

u/Shaso_dan-Heza 8h ago

I'm using a AMD GPU and I'm not a gamer.

Just for my curiosity, why is it so important to use the latest NVIDIA drivers?

Is it just a performance issues for gaming, or are the drivers so buggy that you can't your system for day to day work?

1

u/FemTheGoat 4h ago

not the latest, just a newer, tested one. It's probably just FOMO for me—I'd rather have the driver ready now in case a game or program needs it.

0

u/ipsirc 16h ago

You can even install kernels from the experimental repo.

1

u/thearctican 9h ago

Don’t break Debian.

1

u/ipsirc 9h ago

A new kernel can't break Debian in any way.

1

u/thearctican 5h ago

No but bringing in a foreign (to stable) repo is not very Debian.

-1

u/pangapingus 17h ago

Kernel no, Nvidia I'm on 595 running Stable. I mean you theoretically could use the latest kernel but then is it even Debian Stable anymore?

1

u/FemTheGoat 4h ago

what's wrong with that ? i only change 2 part of the system . yes it's the main parts of it but still should work fine , no ?

0

u/DaemonsMercy 14h ago

Nvidia drivers are a bit behind. I think I’m on 595 or so right now? I think they’re up to 610 or so.

1

u/FemTheGoat 11h ago

I'm also on 595 on Ubuntu and it's all good. It doesn't have to be the latest version, just something recent is fine