Dkms and Template kernels provided by dom0 (kernel-qubes-vm and kernel-latest-qubes-vm)

My goal is to run template and dependent qubes on the default kernel.
I have a template in which external USB WiFi driver is installed via dkms, but it could be installed only on kernel 5.15.x.
My default Qubes kernel is 6.0.8.
How can I set 6.0.8 kernel for the given template so dkms to recompile the module for this kernel?
Simple setting it in Settings>Advanced tab for the template doesn’t work

sudo dkms status

upon template boot with 6.x kernel still gives driver version and kernel 5.15.x and the device doesn’t work.

wifi dongle name?

Do you need it specifivally, or this is enough?

I don’t want to put too much info in one post,. No one likes that but I prepared it all for the audit.

I tried

but same thing. Do you, at this stage, want the error from dkms’ make.log under kernel 6.x?

Thanks for the response anyway.

step by step in here, Can't Install The RTL8812AU driver

then change the git repo to ‘GitHub - morrownr/8812au-20210629: Linux Driver for USB WiFi Adapters that are based on the RTL8812AU Chipset - v5.13.6

At the moment I’m waitng to compile and downgrade gcc in my template to a version complained in the make.log while in kernel 6.08.
If that doesn’t work, I’ll try what you advice, although I have my dilemmas:

  • That topic was old for more than a year now, when the kernel-devel/latest probably was 5.15.x on which I can already build the driver.
  • Building it and installing in dispVM (sys-net) is something that is huge mystery to me, since I don’t know how it would survive restart, and for that case when sys-net is dispVM, there’s no tip in your topic there.

Thanks for the tips, I’ll be back with the outcomes.

I meant on this

Did you mean here

if your sys-net IS disp vm, then install in template.

The kernel was built by: gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1)
  You are using:           gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)

So, I can’t seem to find this snapshot of gcc - 10.3.1 20210422. Any help?

Bump?

LMGTFY:

Not so hard to find …

Hey @cayce. Thanks for your reply, but you probably responded on wrong topic, since you already did this here and it was correct answer there.

To remind you (and others who might help), the question was:

Thanks.

Hey @enmus you posted the above and I responded appropriately.

Hey, thanks. My question here was about dkms. In regular OS, when you upgrade kernel, dkms should automatically recompile drivers (in my case) too. But, since this “upgrade” is never done actually, but we simply choose another kernel in dom0 for qube, what would force dkms to recognize this and (to try to) recompile drivers too. I am not sure at all how it should work, actually.

The simplest way is to use native kernel and headers rather than dom0
provided.
In a Debian system you can trigger the rebuild using dpkg-reconfigure
DRIVER_PACKAGE_NAME

Thanks @unman.

Does this necessarily mean standalone HVM?

The closest I found was this

https://src.fedoraproject.org/rpms/gcc/blob/f32/f/gcc.spec

But I don’t know how to use this in order to somehow clone and compile it.
https://src.fedoraproject.org/rpms/gcc/blob/f32/f/gcc.spec#_3061
is it possible someone to give me some pointers?

Also, I found this,

It’s exactly my case, but couldn’t make it work with proposed workaround. This is how I changed dkms.conf

PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.6.4.2~20221105"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16
DEST_MODULE_LOCATION[0]="/updates"
MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
AUTOINSTALL="yes"
IGNORE_CC_MISMATCH=1

Did I do it wrong?

Oh I think I see

Only in Debian PVH possible…

I gave up. Nothing will work. Dkms will work only in native kernels.

Do the devs think it is not important enough dkms to work in kernels provided by them?

Download and install fedora-32-minimal. Build driver there, then do in-place upgrade to fedora-38 with

sudo dnf clean all
sudo dnf --releasever=38 distro-sync --best --allowerasing

DKMS will do its job then.