The Problem Dkms Solves

Linux drivers compiled against one kernel version usually do not work on another, because the kernel's internal API is not stable across major versions. Without help, every kernel upgrade would break every out-of-tree driver on the system.

Dkms — Dynamic Kernel Module Support — solves this by keeping the source code of out-of-tree drivers around and rebuilding them automatically each time the kernel updates. The result is that the user almost never notices the kernel changing under their feet.

Linux kernel concept

How Dkms Works in Practice

When you install an out-of-tree driver — say, a proprietary graphics driver via your distribution's package manager, or a Wi-Fi driver from a vendor's website — the package places its source under /usr/src and registers it with Dkms.

Each time apt, dnf, or pacman installs a new kernel, Dkms rebuilds every registered driver against the new kernel and installs the resulting modules. Boot into the new kernel and your hardware just works, with no extra steps from you.

Linux workstation

When Dkms Quietly Fails

Occasionally a kernel update introduces a change that breaks a particular out-of-tree driver. Dkms reports the build failure, the user boots into the new kernel without that driver, and the affected hardware stops working until the vendor publishes a patched source.

This is the small price for using out-of-tree drivers. Drivers that are upstream in the kernel tree do not need Dkms at all — the kernel maintainers update them in lockstep with the rest of the code.

Calm Linux diagnostic
Quick Answers

Frequently Asked Questions

The questions readers send us most often on this topic.

No — only for out-of-tree drivers. Drivers shipped with the kernel itself update along with the kernel automatically.

The system boots without that driver. You either pick a different kernel temporarily or wait for the vendor to publish updated source code.

Yes — Debian, Ubuntu, Fedora, openSUSE, and Arch all ship Dkms in their default repositories.

Keep Reading

Related Overviews on PrintSoftDriver

Hand-picked articles that pair well with this one.

Want More Plain-English Driver Reads?

We translate the technical so you can focus on using your computer rather than fighting it.