Any hardware change breaks Qubes (even adding/removing SATA/NVMe drives) - wrong PCI devices get assigned

Every time I add or remove hardware in Qubes 4.2, my qubes lose their assigned PCI devices or get the wrong ones assigned. This happens even when I just connect/disconnect SATA or NVMe drives between reboots.

Examples of what goes wrong:

  • sys-usb loses the keyboard controller and gets VGA instead
  • sys-usb suddenly contains random devices unrelated to USB
  • sys-net loses the network card
  • My storage qube gets USB controllers (2 items) instead of SATA controllers (2 items)
  • Sometimes I see “Unknown device” in assignments

When this happens to system qubes, the OS won’t boot. When it happens to my personal qubes, they either fail to start or don’t work properly.

My Use Case

I regularly need to connect and disconnect storage drives (SATA/NVMe) between boots for my workflow. This shouldn’t break the entire PCI device configuration, but it does.

All this makes Qubes not very useful, because in such cases I always need to reboot with system qubes auto start disabled and reassign (with help of Qubes Manager) literally all devices to qubes (sys-usb, sys-net, and my custom ones) from scratch and then reboot again.

I could understand this if it happened because of real hardware changes, but it ruins my life when I just add or remove drives.

What I Think Is Happening

It seems like PCI enumeration changes when hardware is added/removed, causing BDF addresses (Bus:Device.Function) to shift. Qubes appears to store device assignments by BDF address, so when a device that was at 00:12.0 moves to 00:13.0, my qubes get reassigned to whatever is now at the old address.

Please help.

Is it started with Q4.2 but wasn’t present in Q4.1?

It should be fixed in Qubes OS 4.3:

1 Like

Unfortunately, I haven’t use Qubes 4.1.

That’s great!
I see that #8681 has already been fixed in Qubes 4.3 RC2: Qubes OS 4.3 release notes — Qubes OS Documentation

I’ll be looking forward to the Qubes 4.3 release and will update immediately.

Meanwhile, is there any workaround for this in 4.2?

I don’t think there is a workaround for this and this feature is unlikely to be backported to 4.2.

1 Like