[qubes-users] Include ath11k in kernel 5.10

So, I have a XPS13. Unfortunately it comes with an horrid killer AX500 wireless card that is moreover soldered on the motherboard, so no hope to replace it.

The drivers for this wireless card should be shipped with kernel version 5.10.8.

So I followed Managing VM kernel | Qubes OS and gave:

sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable kernel-latest-qubes-vm

…Which installed kernel 5.10.8. Unfortunately, it appears that the ath11k drivers are still missing. Indeed, modprobe ath11k_pci says it can’t find the module.
At the moment, lspci in sys-net detect my wireless card as Unassigned class [ff00]: Qualcomm Device 1101
I’ve spent the whole day trying to understand what to do with scarce success, and nearly all solutions involve kernel recompilation. I’ve never attempted that, so any help, or equivalently an idiot-proof guide about how to proceed would be super appreciated. :slight_smile:

Fab

Fabrizio Romano Genovese:

...Which installed kernel 5.10.8. Unfortunately, it appears that the ath11k
drivers are still missing. Indeed, `modprobe ath11k_pci` says it can't find
the module.
At the moment, `lspci` in `sys-net` detect my wireless card as `Unassigned
class [ff00]: Qualcomm Device 1101`

Saw in the other thread you were trying other kernel versions. Were you able to get it working? You might be able to pass it through to a full HVM and experiment with getting it working in there, which could hopefully help guide how to build it in. Haven't done it myself, though.

Yes, I managed to get 5.10.13-1 working. The things that do not work at the moment are:

  • Wifi (AX500, according to google a notorious throublemaker), that is still detected as unassigned both in sys-net and dom0.

  • Sound (must be a problem with the driver, sof-audio-pci

  • Sleep (no idea what the problem may be, but sometimes fixing wifi improves this too)

The closest thing to what I need is this: https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM which fixed audio for XPS9700 (I have XPS9310), but not wifi, even if the drivers were included in the kernel.

I would very much like to help with this, but I’m totally a novice when it comes to kernel building. Should I create a kernel-building vm, build my kernels there and then distribute them to dom0/vms for installation? Also, in the thread I referenced above, a patch is provided. I don’t understand where to apply it tho. Should I download some qubes kernel source and patch it, or the kernel source has to be downloaded from Fedora repos? Any help/guide, way to make this kind of thing more accessible would be appreciated, this seems a very nice skill to master!

Fabrizio Romano Genovese:

Yes, I managed to get 5.10.13-1 working. The things that do not work at the
moment are:
- Wifi (AX500, according to google a notorious throublemaker), that is
still detected as unassigned both in sys-net and dom0.

Check out this thread: Re: [qubes-devel] Re: msi pci pass-through error with new Qualcomm AX500. Looks like there's a limitation in QEMU that makes it unable to passthrough multiple MSI vectors on a device, so driver upgrades will not help. You could try disabling them and see if it reverts to old style interrupts with the following:

qvm-prefs sys-net kernelopts "nopat iommu=soft swiotlb=8192 pci=nomsi"

Qvm-shutdown sys-net and start it again and test. If it doesn't help, repeat the above command less the pci=nomsi option. Only option at that point is to wait until appropriate support is added to QEMU then Xen & Qubes, or to switch to a USB wifi device (but search on this list, etc. to find one known to work with Qubes).

- Sound (must be a problem with the driver, sof-audio-pci
- Sleep (no idea what the problem may be, but sometimes fixing wifi
improves this too)

The closest thing to what I need is this:
https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM which fixed audio for
XPS9700 (I have XPS9310), but not wifi, even if the drivers were included
in the kernel.

Mind starting a new thread for these two issues, or pointing me towards one if you already have? They are a bit off-topic from the thread title of ath11k.

Fabrizio Romano Genovese:

Yes, I managed to get 5.10.13-1 working. The things that do not work at the
moment are:

  • Wifi (AX500, according to google a notorious throublemaker), that is
    still detected as unassigned both in sys-net and dom0.

Check out this thread:
https://www.mail-archive.com/qubes…@googlegroups.com/msg04757.html.
Looks like there’s a limitation in QEMU that makes it unable to
passthrough multiple MSI vectors on a device, so driver upgrades will
not help.

More than “upgrades”, is worth pointing out that at the moment there is literally no driver for my wireless card in sys-net.

I found a few hints on google about how to recompile the kernel to include those drivers, but they weren’t qubes-specific and I never did kernel building before, so I don’t know really where to begin.

You could try disabling them and see if it reverts to old
style interrupts with the following:

qvm-prefs sys-net kernelopts “nopat iommu=soft swiotlb=8192 pci=nomsi”

Qvm-shutdown sys-net and start it again and test. If it doesn’t help,
repeat the above command less the pci=nomsi option. Only option at that
point is to wait until appropriate support is added to QEMU then Xen &
Qubes, or to switch to a USB wifi device (but search on this list, etc.
to find one known to work with Qubes).

I tried, but nothing changes. My card is still read as “unassigned class”. Do you know if adding support to QEMU is in the works by any chance? I don’t mind waiting, but it would be nice to have at least a vague idea of the time windows we are looking at (months? years?).

  • Sound (must be a problem with the driver, sof-audio-pci
  • Sleep (no idea what the problem may be, but sometimes fixing wifi
    improves this too)

The closest thing to what I need is this:
https://groups.google.com/g/qubes-users/c/Fa65-e8vqdM which fixed audio for
XPS9700 (I have XPS9310), but not wifi, even if the drivers were included
in the kernel.

Mind starting a new thread for these two issues, or pointing me towards
one if you already have? They are a bit off-topic from the thread title
of ath11k.

Will do. Thanks!

Fabrizio Romano Genovese:

I tried, but nothing changes. My card is still read as "unassigned class".
Do you know if adding support to QEMU is in the works by any chance? I
don't mind waiting, but it would be nice to have at least a vague idea of
the time windows we are looking at (months? years?).

It sounded like the author of that other thread was looking into writing support, but it probably is not a simple matter so I would guess a year minimum for the code to be developed (if he decides to proceed) then pushed through the ecosystem.