Using dkms with Qubes

After too many headaches, I found it impossible to make dkms to recompile modules with all the kernels provided by dom0.
The only thing I succeeded was to use native kernel(-latests) in a template, with kernel set to pvgrub2-pvh and virt_mode to PVH, to compile modules with dkms, and on each native kernel update/upgrade, dkms will recompile the module.

I needed this to install RTL8812au drivers, so sys-net is needed to be set with these prefs too.

I created this topic for a better visibility to the other users having the need to install modules with dkms too.

Solution above.

I guess you wanted to put this topic in Guides - Qubes OS Forum.

Ah, it was more than complicated then this… This is only to be able to install drivers in kernel >=6.x. Native only, turned out to be. But when succeeded, then… Murphey
But, just resolved that issue too, so I will write the guide that will cover all puzzle pieces.