module-assistant has been the de-facto method of compiling and building binary Debian packages containing kernel modules for a while now. More recently a comparable utility has appeared - dkms.

If anyone has experience using both, please do a compare and constrast on the advantages and disadvantages of using one versus the other.

One item to address in an answer is whether dkms builds binary Debian packages for kernel modules too, and if so, how, and if so, what the differences between the packages built by m-a and dkms are, if any.

I have personally never used dkms, but I have used module-assistant sporadically over many years, and it has been a good experience. I don't have immediate plans to experiment with dkms, so I don't think I am the right person to write an answer.

Random googling found a discussion here, also this.

Needless to say, any answer should be based on first hand experience, not copying from web forums. A worked example using both would be nice. Possibly nvidia-kernel, since that is quite commonly used. Yes, I know it is a proprietary kernel module. :-(

UPDATE: Thanks to jordanm for his answer. I'd like something that goes into a little more detail about what is going on under the hood, for both m-a and dkms, though I did not initially mention this. Also, it sounds like most of the time dkms will work transparently and automatically. But what are the failure modes of dkms. How do they both cope with manually compiled/installed kernels? Either installed from a binary package or a local install.

  • 1
    Those are not random web forums you linked to. They are actually discussions between Debian developers. They are quite old and dkms has made improvements since (such as handling multiple kernel versions).
    – jordanm
    Mar 17, 2014 at 23:43
  • @jordanm yes, i know what they are. And I can see they are (relatively) old. They were just intended as illustration that m-a and dkms are considered comparable. Mar 17, 2014 at 23:51

1 Answer 1


The main difference from a user's perspective is that module-assistant (m-a) is a tool to manually compile a kernel module, whereas dkms does it automatically without user intervention. If you are using m-a and the kernel package is upgraded, you must manually recompile the module using m-a. Since m-a only compiles for the kernel you are currently running, this means you will have a broken GUI for the next reboot if the module that you need m-a for is a graphics driver.

The triggers for dkms are executed on every kernel package installation and it ensures the module is installed for every kernel on the system. I personally can not think of a reason for an end-user to continue use of m-a.

Here are some examples of m-a vs dkms for the nvidia kernel module:

Building a module with module-assistant:

apt-get install module-assistant nvidia-kernel-source
m-a prepare # install the header package for the current kernel and compilation tools 
m-a install nvidia-kernel-source # compile the source into a .deb and install it

Building a module with dkms:

apt-get install nvidia-kernel-dkms

Kernel upgrade with module-assistant:

apt-get upgrade # assumed to upgrade kernel
# reboot
m-a prepare
m-a install nvidia-kernel-source

Kernel upgrade with dkms:

apt-get upgrade # assumed to upgrade kernel
  • does dkms build binary Debian packages too? Also, can you indicate whether m-a install nvidia-kernel-source build and installs the binary module packages? I suppose in dkms the module is build transparently. What happens with manually compiled kernels? Mar 17, 2014 at 23:46
  • You have two sections. The first two are just titled "module-assistant" and "dkms". Can you be more specific what these are for? The last two are clearer - "Kernel upgrade with module-assistant" and "Kernel upgrade with dkms". Mar 17, 2014 at 23:49
  • m-a does build and install a debian package. m-a would not work with a manually compiled kernel, unless it was installed via Debian package. I am not sure how dkms would handle it.
    – jordanm
    Mar 17, 2014 at 23:50
  • @FaheemMitha clarification to examples added
    – jordanm
    Mar 17, 2014 at 23:51
  • Let us distinguish between the cases where a manually installed kernel was installed via a Debian package, and where it is not. If the latter, the question is whether the user would have the option to use either dkms and m-a. if the former (binary kernel package) I assume they would, but details would be interesting. I know m-a works with manually installed binary kernel packages, because I have used it with them. You do have to make sure to build the headers as well - which is another Debian package. Mar 17, 2014 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .