github linkedin
Broken Nvidia driver or: clean up old DKMS modules
2018-12-25

On my laptop at work I ran into a strange issue with the binary nvidia driver. The Laptop has a mobile nvidia GPU and I use the driver from https://negativo17.org/. After a while, I suspect after multiple driver and kernel updates, the nvidia driver no longer loads and the system falls back to the Nouveau driver. At least my display works, but battery life is much worse. I went to investigate why the binary driver doesn’t work anymore and stumbled over DKMS.

You can execute dkms status to list the installed DKMS modules and their versions. Executing the command gave me:

Error! Could not locate dkms.conf file.
File: /var/lib/dkms/nvidia/415.18/source/dkms.conf does not exist.

Huh? When doing a ls /var/lib/dkms/nvidia/415.18/source/dkms.conf the file really isn’t there. Looks like the installation of a new version of the binary driver deleted the old DKMS sources, but didn’t remove the symlink which registers it with DKMS. This brings DKMS to a grinding halt, even newer versions of the binary driver (where the symlink points to the existing sources) won’t be installed anymore.

My solution: just delete the DKMS sources from the old drivers with sudo rm -rf /var/lib/dkms/nvidia/415.18. Now dkms status works again, and on the next reboot, DKMS builds and loads the new driver.


Back to posts