For AEM: Attach USB device to Dom0 does not work

How do I attach an USB device to Dom0 for AEM?
I tried to use the guide from GitHub - QubesOS/qubes-antievilmaid: Qubes component: antievilmaid, but it does not work:

Note: If you choose to use a USB device (e.g., a flash drive) as your AEM
device and you previously created a USB qube, then you may have to unhide
your USB controller from dom0:

  1. Open the file /etc/default/grub in dom0.
  2. Find the line that begins with GRUB_CMDLINE_LINUX.
  3. If present, remove rd.qubes.hide_all_usb from that line.
  4. Save and close the file.
  5. Run the command grub2-mkconfig -o /boot/grub2/grub.cfg in dom0.
  6. Reboot.

After following the steps above, lsusb doesn’t show any usb device, lsblk doesn’t show any new block device (both in Dom0).
I also tried to use qvm-usb (in Dom0, too): qvm-usb attach --persistent dom0 <device name found out with "qvm-usb">, but it does not work. Even worse: If I try to detach with qvm-usb detach dom0 <device-name>, there is an error message that I “can not remove a persistent attachment from a non halted vm”. Do I have to halt Dom0 while still using it?

Qubes OS version: R4.0

1 Like

Did you consult these docs? Anti Evil Maid (AEM) | Qubes OS

Also this might be helpful: I am not an expert but you may need to remove the USB qube as described there.


Thanks for your answer.

I did consult these docs. They say that I have to attach a USB device to Dom0 - they did not say that I have to attach all USB devices directly to Dom0 so I assume that I can still use a USB qube and just need to make sure that the USB stick used for AEM – and all other USB devices – are visible to Dom0. They also don’t say that I have to remove the USB qube, so I did not have tested that.

USB Qubes | Qubes OS says that I have not to hide the USB devices from Dom0 if I’m using an USB qube - so in theory just unhiding them should work.