How to make a dkms module out of a git of an experimental forked driver

I am using a wacom graphical tablet as a mouse replacement and have had a great trouble with making it work acceptably. I had to resort to having patches be done to the official source code of the driver to address some issues with my particular tablet. These patches work, but every time the kernel gets updated i need to recompile and install the drivers, as apparently they are built against a certain kernel version.
I am trying to come up with a method to not have to recompile the driver every time a kernel update occurs, or at least have this happen automatically, as it does with dkms modules for example.
Any idea how I can accomplish this?


Maybe these threads can help a little …

1 Like

Thanks judd, I had a look at those but I don’t think they help. I’ve sorted out the issues regarding the functioning of the tablet. My problem was i don’t know how to launch the make install for the patched driver at every kernel update. I was looking for something like DKMS, but after even more google i learned that in fact it’s DKMS I actually need. I thought it’s only for packages, but apparently it can be used directly with a source directory.

I guess you’re thinkig about adding a personalized hook, so everytime a kernel is updated, a specific hook can run pushed by mkinitcpio. I’ve never done anything like this, hope this can help:

You’ll need to adpat this to the necessary instructions.


EndeavourOS has a pacman hook at

Why not use that as an example of how to create a pacman hook for your purposes.


Interesting I think I will follow this path as I’m not having great success with dkms.