I can confirm the validity of previous investigation reported by @ycdzj.
The root of the issue is that qubesd
daemon fails parsing PCI devices on a system, which as a consequence makes all qubes (including system ones) fail to start, Devices tab in Qube Manager becomes disabled/grayed-out, and commands like e.g. qvm-pci
give an error.
It fails to parse PCI devices because there are some PCI devices that don’t belong to PCI domain 0000.
Hardware in my case is Asus G614J. The issue can be confirmed by running lspci
or virsh nodedev-list
which in my case reports 3 PCI devices which do not belong to “0000” but to “10000”:
10000:e0:1d.0 System peripheral: Intel Coropration Device 09ab
10000:e0:1d.4 PCI bridge: Intel Corpration Device 7a34 (rev 11)
10000:e1:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a80c
This breaks qubesd
PCI-related functionality which expects or embeds a literal “0000” in a couple places.
So what happens is as follows: (the example is for running command qvm-pci
, but it’s the same for Qubes manager etc.
- User runs qvm-pci
- This command goes to ask for “Available” PCI devices from
qubesd
. It does so for all domains (for each domain, including dom0, it asks for available devices) - When it gets to domain dom0 where the offending PCI devices are, it triggers an exception (which is visible in
journalctl -xef
), returning empty response to the caller - qvm-pci code then makes a further mistake by masking the real error text with a generic message: “Failed to list ‘pci’ devices, this device type either does not exist or you do not have access to it”
So to fix this ad-hoc, we can patch a line of Python code in dom0, and restart qubesd
:
- Open qubes-core-admin/pci.py at master · QubesOS/qubes-core-admin · GitHub
- In function
on_device_list_pci
, aboveyield PCIDevice(...)
, add this code:
if not libvirt_name.startswith("pci_0000_"):
continue
Then restart qubesd
with service qubesd restart
.
Commands like qvm-pci
and Qube Manager will start running. You might need to open Devices tab for system qubes and make sure that no “Unknown” devices are assigned to them (those will prevent qubes from starting, since they are invalid.)
And you will need to make sure not to assign any wrong/incorrect devices to a qube afterwards, as that might make your OS just keep rebooting on boot (If by chance that happens, reboot in Grub press ‘e’ to edit the boot menu, find then line which mentions “vmlinuz”, and then at the end of that line add option “qubes.skip_autostart=1”. This will allow you to boot into the system and fix the issue.)