The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 20:31:47

Shelkin
Member
Registered: Yesterday
Posts: 2  

avoid reinstalling nvidia drivers for every kernel update?

I have been enjoying Devuan Excalibur with the Cinnamon desktop for a few months now, but there is one annoyance I can't seem to find a solution for.

Every time a new kernel drops, on reboot, GRUB drops me at the command line with some nvidia errors, I don't know where the boot log lives so I can't quote the exact error(s).

I reinstall nvidia and everything works after reboot.

Is there a way I can reboot after a kernel update and not have to reinstall nvidia every time (3-4 times now)?

Thanks,
Shelkin

Offline

#2 Yesterday 21:47:33

Mercury
Member
Registered: 2024-11-14
Posts: 64  

Re: avoid reinstalling nvidia drivers for every kernel update?

I believe you're describing the same issue I had. After a kernel update, run:

sudo dpkg-reconfigure nvidia-dkms [Edit: Might actually be sudo dpkg-reconfigure nvidia-kernel-dkms]

Video is reliant on nvidia dkms modules, which for some reason aren't automatically rebuilt for the new kernel, hence the need to do it manually. dpkg-reconfigure will do it (which is what I use), as will reinstalling the nvidia driver completely (as you found).

Gemini says this will also work:

sudo dkms autoinstall

But I have not tested it.

As to how to do it automatically... one could put together a script which checks whether dkms modules exist for the current kernel, rebuild them if not, and set that script to autorun. But that seems like a lot of work.

Last edited by Mercury (Yesterday 22:48:15)

Offline

#3 Today 09:55:07

blackhole
Member
Registered: 2020-03-16
Posts: 257  

Re: avoid reinstalling nvidia drivers for every kernel update?

If you're using the proprietary driver installation shell script from Nvidia's website, then rebuilding the kernel module for every kernel update is the norm.

You have a few options:

- Continue as you are.

- Use the driver from the non-free repository, if the version supports your hardware. This should be automatically rebuilt every kernel update.

- Use the in tree nouveau driver, if it supports your hardware

- Get rid of it; use the Intel or AMD iGPU or source some AMD hardware.

Last edited by blackhole (Today 10:36:17)

Offline

#4 Today 10:28:16

Andre4freedom
Member
Registered: 2017-11-15
Posts: 270  

Re: avoid reinstalling nvidia drivers for every kernel update?

Completely agree with blackhole.
I only had bad experiences with nvidia cards. The nouveau driver works reasonably well, if not get rid the nvidia card.
It's not only the complicated use of these cards, but in my cases they caused intermittent system crashes, mostly at boot times and were not re-producible, in otherwise perfectly working hardware. Trying to search in the log-files: Hahaha

Offline

#5 Today 11:48:23

blackhole
Member
Registered: 2020-03-16
Posts: 257  

Re: avoid reinstalling nvidia drivers for every kernel update?

To be clear: My post was not a suggestion that the OP get rid of the Nvidia card or a critiisn of Nvidia hardware. Those are simply the options, with getting rid of the hardware in question being the last resort.

I'm on the fence with GPUs. I'm no fan of Nvidia, but Intel and AMD are not exactly saints either. Nvidia have simply refused to expose their proprietary IP and specs to their competitors. Intel and AMD contribute their permissive licensed driver code to the Linux kernel, but the firmware and hardware remains closed, so in effect they have done the same, so not a massive difference there.

Offline

#6 Today 13:25:56

rations
Member
Registered: 2025-11-06
Posts: 87  

Re: avoid reinstalling nvidia drivers for every kernel update?

@shelkin What type or nvidia card have you got? I've had no dramas using the cuda-keyring_1.1-1_all.deb it updates automatically after every kernel upgrade.

This is how I install it. https://dev1galaxy.org/viewtopic.php?pid=62623#p62623


You will own nothing and be depressed
SOURCEFORGE rations

Offline

#7 Today 16:49:54

Shelkin
Member
Registered: Yesterday
Posts: 2  

Re: avoid reinstalling nvidia drivers for every kernel update?

Thanks for the information. It is good to know that having to re apply the nvidia kernel mod each time in normal and I was not missing anything.

My plan is to try the commands Mercury mentioned.  It is not too much of a burden and not doing a full install should be a little quicker.

I have had compatibility and performance issues with nouveau in the, distant, past, but have heard it has gotten better over the years.

My desktop is older and when the PC parts market returns to an even keel, someday, I might well move away from nvidia, as I did with my laptop.

Thank again for the advice.

Offline

Board footer