DKMS modules never installed properly on kernel upgrade

7,938

You miss information which distro you're using currently. And for what it's worth, VirtualBox 5.x also didn't register properly with dkms for me, meaning after a kernel update those modules would not be rebuilt by dkms.

For the instructions you provided regarding the DKMS installation those steps only take care that the module source is installed under /usr/src/<modulename>-<moduleversion>/ and that the module is built for the currently running kernel (or the one that is specified). If there's no dkms service running at boot then no new version will be compiled if a new kernel was booted for the first time.

It should be easy to verify, all modules that show up when running dkms status as root should be rebuilt automatically once you boot a new kernel for the first time and if you have the kernel headers for that kernel installed. Additionally the dkms.conf for the module in question needs to have AUTOINSTALL=Y specified, and the dkms service ( usually /etc/rc.d/init.d/dkms for older distributions ) will rebuilt those registered modules on next boot.

Can you check each of those conditions is met, especially that a service runs during bootup that will check dkms status and build new modules if necessary? It should either be called dkms or dkms_autoinstaller or similar.

For comparison, this is what dkms status output looks here with several binary and source modules installed for several kernel versions:

[doktor5000@Mageia5]─[16:40:27]─[~] sudo dkms status | sort
broadcom-wl, 6.30.223.271-1.mga5.nonfree, 4.1.12-desktop-1.mga5, x86_64: installed 
broadcom-wl, 6.30.223.271-1.mga5.nonfree, 4.1.13-desktop-2.mga5, x86_64: installed 
broadcom-wl, 6.30.223.271-1.mga5.nonfree, 4.1.8-desktop-1.mga5, x86_64: installed 
nvidia-current, 346.96-1.mga5.nonfree, 4.1.12-desktop-1.mga5, x86_64: installed 
nvidia-current, 346.96-1.mga5.nonfree, 4.1.12-desktop-1.mga5, x86_64: installed-binary from 4.1.12-desktop-1.mga5
nvidia-current, 346.96-1.mga5.nonfree, 4.1.13-desktop-2.mga5, x86_64: installed-binary from 4.1.13-desktop-2.mga5
nvidia-current, 346.96-1.mga5.nonfree, 4.1.8-desktop-1.mga5, x86_64: installed 
nvidia-current, 346.96-1.mga5.nonfree, 4.1.8-desktop-1.mga5, x86_64: installed-binary from 4.1.8-desktop-1.mga5
rtl8192cu-fixes, 1.10, 4.1.12-desktop-1.mga5, x86_64: installed 
rtl8192cu-fixes, 1.10, 4.1.13-desktop-2.mga5, x86_64: installed 
rtl8192cu-fixes, 1.10, 4.1.8-desktop-1.mga5, x86_64: installed 
sysdig, 0.2.0-1.mga5, 4.1.13-desktop-2.mga5, x86_64: installed 
virtualbox, 5.0.10-1.mga5, 4.1.12-desktop-1.mga5, x86_64: installed 
virtualbox, 5.0.10-1.mga5, 4.1.13-desktop-2.mga5, x86_64: installed-binary from 4.1.13-desktop-2.mga5
virtualbox, 5.0.8-1.mga5, 4.1.12-desktop-1.mga5, x86_64: installed-binary from 4.1.12-desktop-1.mga5
virtualbox, 5.0.8-1.mga5, 4.1.8-desktop-1.mga5, x86_64: installed-binary from 4.1.8-desktop-1.mga5
Share:
7,938

Related videos on Youtube

Naftuli Kay
Author by

Naftuli Kay

Updated on September 18, 2022

Comments

  • Naftuli Kay
    Naftuli Kay over 1 year

    I have multiple DKMS modules installed on my system, some of them mine, and some of them belonging to pretty major maintained packages such as Oracle's VirtualBox 5.

    What I've found is that on every kernel upgrade, all DKMS modules get broken and not installed in the new kernel. I thought it was bad configuration on my behalf in my own modules, but now that I'm seeing VirtualBox broken as well, I'm suspecting it's something else.

    How can I debug why DKMS isn't installing modules in newer kernel versions?

    I'm on kernel 3.19, Ubuntu 14.04.

    After a kernel upgrade dkms status doesn't output much of anything, meaning that none of my DKMS modules are getting installed properly.

    • Admin
      Admin over 8 years
      Well, if dkms doesn't install anything, and if there's no service that would check the status and rebuild your dkms modules on each reboot, then those are two issues you would need to fix. As you don't provide more information, can't really help you further.
  • Naftuli Kay
    Naftuli Kay over 8 years
    Updated question.
  • Naftuli Kay
    Naftuli Kay over 8 years
    There is no DKMS service here.
  • telcoM
    telcoM over 5 years
    DKMS is not necessarily a continuously-running service: it can also be triggered by the kernel installation mechanism by a script placed in e.g. /etc/kernel/postinst.d/dkms and /etc/kernel/header_postinst.d. Note that you'll have to install the exact same version of both the kernel headers and the actual kernel package: if the headers are missing, dkms cannot compile modules for your kernel. That's why there are two trigger scripts: they should trigger the compilation once both a new kernel and its headers have been installed, regardless of which order the packages are installed in.