Qubes kernel have a big problem with a lot wifi driver

EDIT : sorry for my english it’s not my first language

The first time i install Qubes, i was so happy because everything was working fine except my wifi… which is very annoying. I’ve spent like 1 day for understand what is the problem and install my wifi driver inside the net-template.

But not everyone is like me or us. People don’t want to spend 1 day or 3 day searching on the forum or duckduckgo “how to get wifi on qubes”

The fact some people like me need to install wifi driver from random user on github is a huge security issue… (please tell me what you guys think about this)

Just for info i’m using the rtl8821ce network card. This network card is supported on every kernel since 5.9 except on the qubes kernel. I know i’m not the only one who have problem with this network card and this is why i made this post.

I’m wondering if dev can fix the problem with qubes kernel and wifi driver ?

Maybe you don’t have necessary firmware installed in your sys-net template?

Then they should stick to supported hardware, either by buying certified hardware or hardware that is confirmed to be working by the HCL.

I don’t know if the devs can fix your driver, but they can’t fix all issues for non-supported hardware. Qubes OS doesn’t have the same hardware support as traditional Linux, and that probably isn’t going to change anytime soon.

2 Likes

Also you can always use in-VM kernel instead of Qubes OS kernel provided by dom0 if it’s really a problem with Qubes OS kernel:

1 Like

I’ve tried to install linux-firmware and realtek-firmware inside the net-template and it doesn’t work
I’ve tried to blacklist the module and nothing work too without the wifi driver from github.
The only thing who work is install the wifi driver from AND blacklist the module GitHub - tomaspinho/rtl8821ce

But like i said this it’s a security issue…

First of all this is not what i’ve asked. And i will never buy a specific hardware just for running Qubes OS sorry buy what are u saying have no sense… imagine you have to buy a 2000$ laptop just for running an OS wtf ?

But the driver is supported by every linux kernel and every OS. Qubes is using linux kernel right ? So every wifi driver should work too with qubes even the “non-supported hardware” or maybe i’m missing something

Thanks ! But i tried this too and it’s doesn’t work. VM don’t want to start if i select the option kernel “Provide by qube” my vm is crashing at boot

What’s the error?
You can check the errors in dom0 terminal with sudo journalctl or in these files:

/var/log/libvirt/libxl/libxl-driver.log
/var/log/xen/console/guest-sys-net.log
/var/log/xen/console/guest-sys-net-dm.log

Change sys-net to the name of your VM.

Hello ! Thanks for trying to help this is the log i’ve got :
guest-test-sysnet-dm.log (30.7 KB)
libxl-driver.log (13.5 KB)

This log doesn’t exist when i try to open this log i got “Logfile opened”

I don’t see anything relevant in these log files.
Can you check if you have older log files?

ls /var/log/xen/console/guest-sys-net.log-*
ls /var/log/xen/console/guest-sys-net-dm.log-*

Sorry, i don’t have older log files for this specific VM, i create the VM just for showing you there is a problem with “Provide qube” kernel option inside the net-template for this VM there is no driver installed and there is no blacklist. Only theses packages are installed

realtek-firmware, linux-firmware, kernel 6.5.9, qubes-core-agent-networking, qubes-core-agent-network-manager NetworkManager-wifi network-manager-applet @hardware-support

By the way i found something very strange. I’ve cloned the template where i installed these packages then i wanted to see if it was my network card the problem. So i tried to change the kernel option inside this net template to “Provide by qube” and start the template WITHOUT attached my network card and the template crash at boot.

Here what happen : Kernel option “Provide by qube” > VM will start > CPU go to 90% ~ 100% > After 5-15s VM will crash
guest-fedora-38-minimal-net-1.log (931.6 KB)
guest-fedora-38-minimal-net-1-dm.log (25.2 KB)

Did you change virtualization mode to HVM?
I don’t see anything in these logs. What message do you see when VM crash?
I think you should be able to see these crash messages in dom0 terminal with sudo journalctl.

UPD:
I’ve tried it with debian-12-minimal myself and it didn’t work as well. I think it’s because it’s missing some packages since it’s a minimal template.

After following Installing kernel in Debian VM guide from here:

debian-12-minimal with in-VM kernel worked for me.

So if you follow this guide Installing kernel in Fedora VM for your fedora minimal template it should work for you too:

1 Like

I’ve installed debian-12-minimal then i installed the kernel and network package + firmware-realtek package. Here is the log from the app-vm with the network card attached
guest-netdvmtestdeb.log (95.9 KB)

As u can see the firmware fail to load the module but… it’s look like the kernel detect the network card ? or maybe i’m wrong ?

By the way i tried to blacklist the module inside the net-template

sudo -e /etc/modprobe.d/blacklist.conf > blacklist rtw88_8821ce

It’s not working the firmware still fail to load the module.

Perhaps the issue is coming from the virtualization maybe i have to set the appvm to PV mode instead of HVM ? I will try this but i don’t think this will work

You can try the newer kernel 6.5 and firmware from bookworm-backports. Or use kernel-latest from Qubes OS.
You can also try to use pci=nomsi kernel option or attach the network card with permissive=True option:

Thanks again for your help ! I just tried everything install kernel and firmware from backports , kernel-latest , pci=nomsi kernel option and then “permissive=True” it’s still not working. I’m sure the issue is coming from Qubes something block the module

PV mode is very inescure. From the docs:

See here for a discussion of the switch from PV to HVM and here for the announcement about the change to using PVH as default.

1 Like

My guess is that there is a bug in kernel driver for rtl8821ce when it’s used inside VM. And this bug was fixed here GitHub - tomaspinho/rtl8821ce but it wasn’t reported to upstream kernel.
I can only suggest you to report this issue to kernel so they could fix it.

1 Like

Thank you very much for trying to help !

I will do it :smile: by the way if i find a way to fix this bug i will update my post

Based on this discussion:

tomaspinho wanted to cease maintaining this driver long ago but Realtek’s Linux developers are just don’t maintain the official driver properly.

These realtek dev are so lazy… it’s a shame

Not sure if it is from the same problem. I also have laptops that will not connect wireless. My workaround, is to use an external USB Antenna that has its own WiFi chip inside. One of the Atheros modules.

I use devices, assign the USB Antenna to the existing network Qube.