A question has been bugging my mind recently.

Since virtually all proprietary modules are out of tree (and therefore not compiled against any kernel versions), I'm wondering how exactly they are compiled and loaded.

Many major organizations allow for the download of a single .tar.gz, .deb or whatever and it just works across many kernel versions.

Are modules that are downloaded built on the target machine?

Do they distribute the source code?

Does the source code know which kernel module version they are building against?

Or do the drivers force load themselves against the kernel a la finit_module or init_module with ignore version magic flags

Or is something else going on behind the scenes?

Thanks in advance.

  • Where you hear the word distribution it is almost always referring to a Gnu/Linux distribution (sometimes Gnu/Cygwin, Gnu/WSL, or …). NOT a kernel distribution. Very few people have a need for just a kernel. Aug 19, 2019 at 10:09
  • I don't know the answer, but I note that on MS-Windows almost all drivers are propitiatory and it seems to work (for the most part). I don't think that the Freedom or proprietary nature has anything to do with it. I suspect it to be something technical, such as linking. Aug 19, 2019 at 10:12
  • but still, my proprietary driver for my nvidia gpu or my radeon gpu works for all of my kernel versions on my pcs and they are always installed from the same package. So independent from distros such as the debian family, somehow proprietary drivers work on my pc. Are they built locally or am I getting a version for my pc without knowing it? Aug 19, 2019 at 10:13
  • No matter the Gnu/Linux distro, they all have (mostly) the same Linux kernel. The driver links to the kernel. Using well a well defined interface. This will be the same no-matter the Gnu/Linux distro. Aug 19, 2019 at 10:32
  • thank you, your answer in conjunction with Stephen Kitt's cleared it up for me Aug 19, 2019 at 10:53

1 Answer 1


The general approach is to ship an object file containing the proprietary code, and a “shim”, provided as source code, which is rebuilt for the appropriate kernels when necessary. The interface code handles all the module interface for the kernel, including symbol imports with version strings etc.

For example, NVIDIA drivers contain an nv-kernel.o file which is provided only as a binary, and ends up wrapped in the kernel module.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.