[SOLVED] how to make future updates no longer break nvidia.

diversity

Well-Known Member
Feb 19, 2020
252
16
58
55
The title sais it all. I am once again in a pickle because like a good trooper I hit update when I am told there are available. Especially when it is security related.

But what I would like to learn is how to prevent then the nvidia drivers going bad and I can no longer use them. No longer login to my desktop envirnoment that made use of these drivers.

How can we tell the update procedure to never change anything one cares about?
 
Hello diversity! Updates are important for security, so you did the right thing. You are using the proprietary Nvidia driver, right? The situation with the Nvidia driver is a bit more complicated, since using it requires having the kernel headers installed for dkms to build the module. For that to work, you need to install the kernel headers for your kernel version. For example, for kernel 6.8 you'll need to install proxmox-headers-6.8, for kernel 6.11 you'll need to install proxmox-headers-6.11, etc. DKMS should then be able to rebuild the modules automatically whenever updates are installed. However, since the headers were not installed before upgrading, you'll now need to first install the headers, then - just this one time - call dkms install manually.

If you still have issues, please provide us with some more information (kernel version, driver version, etc.).
 
  • Like
Reactions: carles89
thank you thank you :) I accept graceful the scouts honers badge :)
Nah all jokes aside.

Thank you for the response. And yes you were correct. It were the non free nvidia drivers that went haywire after the kernel update.

I am still not sure though do I really need them? especially given now we have proxmox embracing more and more features like VirtGL.

I will go on for a while with the nouveau just to see if I can find other ways to have videos play smooth. And have local AI models run as efficient as could be.

But as soon as I need the non free stuff again I will follow your suggestion and see how long it lasts. If it then breaks again months/years down the line, I will be sure to followup detailed.
 
this message is really just overhead and not really needed for the thread in the first place;

But I felt the need to defend a desktop environment over a server OS like Proxmox.

You see, some of us think that root on ZFS should be the default. on any system, any device. period. :)

Now that I use one of the many Proxmox installations I have as a desktop should then not come as a surprise :)

If only the installation iso's and there emergency feature would start working again for those ZFS scenarios then all would be bliss :)

Or by now they do and I just missed that note?
 
You're welcome! :) Glad to hear it's working now!
Thank you for the response. And yes you were correct. It were the non free nvidia drivers that went haywire after the kernel update.
Basically, you will simply need to follow Debian's Nvidia Graphics Drivers guide, but install the correct kernel header package from the Proxmox repositories (proxmox-headers-6.8, proxmox-headers-6.11, etc.). On each kernel update, DKMS will run automatically and make it work with your current kernel version. In case the headers are missing, you just need to install them and run dkms autoinstall or dkms install -m MODULE/VERSION manually afterwards.

Thank you for the response. And yes you were correct. It were the non free nvidia drivers that went haywire after the kernel update.

I am still not sure though do I really need them? especially given now we have proxmox embracing more and more features like VirtGL.

I will go on for a while with the nouveau just to see if I can find other ways to have videos play smooth. And have local AI models run as efficient as could be.
Whether you should use the proprietary Nvidia drivers or Nouveau depends on your use case. Nouveau has a feature matrix showing the GPU features that are available for each GPU generation. If you are happy with what they offer and don't have any performance issues, you can continue simply using Nouveau. Otherwise you can use the proprietary Nvidia drivers. The choice is yours ;)

I am still not sure though do I really need them? especially given now we have proxmox embracing more and more features like VirtGL.
I still want to mention that VirGL is a virtual GPU for QEMU virtual machines (see VirGL documentation), but you still need a graphics driver on your host to communicate with the physical GPU if you want video output on your Proxmox VE host.
 
Last edited:
  • Like
Reactions: diversity
but install the correct kernel header package from the Proxmox repositories (proxmox-headers-6.8, proxmox-headers-6.11, etc.). On each kernel update, DKMS will run automatically and make it work with your current kernel version. In case the headers are missing, you just need to install them and run dkms autoinstall or dkms install -m MODULE/VERSION manually afterwards.

So, do I have to install pve-headers-xxxx before updating? Or after updating but before rebooting?
I am a bit confused.
 
I’m a bit confused why you’re talking about a desktop environment when talking about Proxmox. For the vGPU drivers, simply install the drivers, use pve-headers (which is a meta-package and will always have the current kernel version), apt-get will fail if you need newer drivers, which you can get from nVIDIA. For passthrough, the host doesn’t need drivers.

If the issue is in your guest, same applies, but with other drivers, nVIDIA has a repo for most OS that will keep the latest public driver updated with a simple apt dist-upgrade.
 
I’m a bit confused why you’re talking about a desktop environment when talking about Proxmox. For the vGPU drivers, simply install the drivers, use pve-headers (which is a meta-package and will always have the current kernel version), apt-get will fail if you need newer drivers, which you can get from nVIDIA. For passthrough, the host doesn’t need drivers.

If the issue is in your guest, same applies, but with other drivers, nVIDIA has a repo for most OS that will keep the latest public driver updated with a simple apt dist-upgrade.
Are you replying to my post? Because I did not mention anything about desktop environment.
Host does need nvidia drivers if you want to use the GPU in LXC.

The question is about kernel updates breaking nvidia drivers.
 
Various posts say something about desktop environment. And as I said, you have to upgrade kernel and nVIDIA driver at the same time, for that simply use the nVIDIA apt repo.
 
So, do I have to install pve-headers-xxxx before updating? Or after updating but before rebooting?
I am a bit confused.
If you install any out-of-tree module, you will need the kernel headers to be able to build the kernel module with DKMS. Using DKMS will allow you build the kernel module for the currently installed kernel, without having to wait for the project/maintainer to release an updated version of the kernel module for the new kernel version. The Nvidia driver is a well-known kernel module using DKMS, but there are other drivers/kernel modules as well.

Installing the package proxmox-headers-x.xx is required when installing a new major kernel version, e.g. if you use kernel 6.8 and want to upgrade to kernel 6.14. Just like installing opt-in kernels like 6.11 or 6.14 must be done manually, installing the corresponding kernel headers must be done manually as well.

My personal guess (please correct me if I'm wrong) is that some people installed Proxmox VE with an older kernel version, installed the Nvidia drivers and the kernel headers as part of the process, then upgrade the kernel to a new major version 1-2 years later (and forget that the kernel headers must be installed as well), which then breaks the Nvidia driver due to DKMS not being able to run (due to the missing headers). In that case, installing the correct kernel headers for the currently used kernel version (e.g. proxmox-headers-6.8 for kernel 6.8) and re-running DKMS using either dkms autoinstall or dkms install -m MODULE/VERSION is required.
 
  • Like
Reactions: UdoB