Using usb wifi controller in different VM is not working, although attached (and HW works out of the box)

Hello, I installed qubes today, so please be patient if I don’t get basic concepts. I have searched a lot, and did find more or less similar questions, but not exactly the same, and thus could not find an answer or usefull hint.

I try to accomplish the following:

  1. Create a sys-wifi VM for wireless networking (I agree, not very secure, but atm my only option).
  2. Attach an USB Wifi controller from sys-usb to sys-wifi
  3. Make the network-manager service available to sys-wifi
  4. Make sys-wifi the NetVM for sys-firewall (and this way for all VMs that have sys-firewall as NetVM)
  5. Connect to the cyber and feel like a pro

My first question should be: Do these steps make sense in regard to the concept of how it should work?

Now, it does not work. Here is what really happens:

  1. sys-wifi VM was created without any problem. In the networking dropdown I chose (none). Template is fedora-32. Mode is PVH (Although I tried different modes, just to be sure)
  2. I used the command qvm-usb attach --persistent sys-wifi sys-usb:4-2.1.4 (as obtained from qvm-usb list within Dom0)
  3. I added (and selected) network-manager in the Services tab of the sys-wifi settings.
  4. I select sys-wifi in the “Networking” dropdown of the sys-firewall (nvm, we’ll never get this far…)

So far so good…
I restarted both sys-wifi and sys-usb…
Checked again that the wifi controller is attached to sys-wifi…
But I don’t see a network-manager icon in the task bar (well, I see two, but none of them comes from the sys-wifi).
HOWEVER, when I check “network-manager” in the sys-usb settings, I can connect to my wifi router ! This makes internet available from the sys-usb only, tho. So I unchecked the network-manager service in the sys-usb settings again (rebooted everything in different orders…twice…) and came here, to ask for help.

Please let me know if I can provide you with additional information. Also, if you realize I have a misunderstanding in the basic concepts of e.g. usb attachments, networking or something, don’t hold yourself back. I am happy about every hint :slight_smile:

Thank you for your support.

sys-wifi has to be created as HVM.

Most likely this guide would help you when you carefully follow it.

Also network-manager service isn’t mandatory to specifically select in Services tab - default state is ON.

You probably meant USB WiFi dongle here, not the controller the dongle is attached to?

What are the outputs of ifconfig -a and sudo dkms status in sys-wifi?

Thank you enmus for your reply. Changing to HVM alone did not solve it. I went through the guide and attempt to re-create the VM from scratch today considering its content and your hint.

Yes I meant dongle, I only never remember this term :smiley: Not a native english speaker here…

I am too lazy to type out the output, but basically ifconfig shows the loopback device and the virtual interface (no wifi interface whatsoever). dkms status prints “u2mfn yada yada: installed” (and no more)

After some trial and error, I found some lines in the dmesg stating “Cannot enable. maybe the USB cable is bad”. This seems to be an issue with usbip (source: USB Passthrough with RT2800USB does not work · Issue #3778 · QubesOS/qubes-issues · GitHub)

If sys-wifi receives its networking device from sys-usb, virtualization mode can be left at PVH. HVM is typically only needed if the qube interacts with PCI devices, or you wish to use the kernel provided within the Fedora 32 template. In Qubes, the linux kernel used within qubes is provided by dom0, by default.

With some USB wifi dongles and hardware devices, Qubes OS USB redirection may not work. Should this be the case, you’d have to keep the dongle operated by sys-usb.

You are absolutely right, thanks for further clarifying. I just wanted to be sure that @rndmn didn’t assign whole controller to sys-wifi since he was used the term. That’s why I asked him about it.

If I were the one that this happens to, I’d probably do some trial and errors that include:

  • If I have more than one USB controller, I’d try to plug-in USB dongle in all USB ports (including 2.0, if there’s any)
  • I’d try to create additional sys-usb and sys-wifi based on a different templae (Debian for example, even Whonix-ws) and then combined all sys’ with each other (regardless that it is reported there it doesn’t work too).
  • I’d try to check if the drivers for the dongle are installed in the template on which sys-wifi is based on. If not, I’d clone the template, install the drivers there, and then would create sys-wifi from it.
  • I’d try to pass trough whole controller to sys-wifi (this time HVM-has-to-be) adn if it works, I’d check if I can live with that or/and I’d buy PCI-Express card with USB ports, if it’s an older laptop, which would be perfect then.
  • I don’t have enough knowledge about that, but I’d try to connect USB dongle to Ethernet port on a laptop via usb2RJ45 adapter, although even if it would work, tou should keep in mind that this is probably against Qubes security principals basics.
  • If everything was to no avail, I’d buy some dongle with a chipset that for sure works with Qubes.

But, it’s me what I’d do, since I’m myself set on --persistent :grin: