Remove uninstalled DKMS module

I previously had the nvidia-dkms package installed, and have removed it after removing that GPU and thus not needing it. But now when I update the kernel I get an error saying it can’t find the source tree for the nvidia module and that manual intervention is required. I figured uninstalling the package would have also gotten rid of the DKMS module but I guess not?

$ pacman -Qm nvidia-dkms
error: package 'nvidia-dkms' was not found

$ dkms status
nvidia/550.78: broken

Error! nvidia/550.78: Missing the module source directory or the symbolic link pointing to it.
Manual intervention is required!

Attempting to remove it fails:

$ sudo dkms remove -m nvidia -v 550.78 --all

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

Error! nvidia/550.78 is broken!
Missing the source directory or the symbolic link pointing to it.
Manual intervention is required!

How do I get rid of it? My first guess was that I’d reinstall the nvidia-dkms package, remove the DKMS module, and then uninstall the package again (silly as it seems). But after trying that, it doesn’t help since the package is the wrong version. After installing nvidia-dkms:

$ dkms status
nvidia/550.78: broken

Error! nvidia/550.78: Missing the module source directory or the symbolic link pointing to it.
Manual intervention is required!
nvidia/565.77, 6.12.7-arch1-1, x86_64: installed
nvidia/565.77, 6.12.8-lqx1-1-lqx, x86_64: installed

Edit: Also, the old version is no longer in my package cache so I can’t install the old version from there either.

Seems like the solution was surprisingly easy:

$ sudo rm -rf /var/lib/dkms/nvidia

Unsure if there would be any other artifacts left around on the system, but at least DKMS seems happy, kernel installation is working, and my machine boots so. :person_shrugging:

2 Likes

There now is a proper solution to this issue.

That looks like a different problem to me, but does that fix also fix this problem?

The problem here specifically was that I removed the nvidia-dkms package (pacman -R nvidia-dkms), but that didn’t seem to remove it from DKMS. So when I later downloaded new kernel versions, it would attempt to build it still and fail.

I’m not sure I just wanted you to be aware that there was a problem with dkms and is fixed now with a new version of eos-dracut but requires manual intervention to remove the old left over files first in order for dkms status to report properly. Did you try running that?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.