Major problem with qvm-pci and devices in general

hey guys, i am really new to qubes and i’ve been experimenting for a while now. everything seems to work quite fine, except for the touchpad that sometimes stops working and after 30 seconds it comes back again.

But i have encountered one big problem, while trying to create a new netVM based off of a template with the mac anonimizer configuration i saw that i cannot access the devices attached to each VM in the GUI, the devices tab is there but i cannot click it.
I tried attaching my net card to the vm using the terminal then, and the qvm-pci command doesn’t seem to work:

[user@dom0 ~] $ qvm-pci
Failed to list 'pci' devices, this device type either does not exist or you do not have access to it

this already wasn’t looking good. since qvm-pci wouldn’t work i tried lspci, wich turned out working, so i pulled the BDF of my card from there and tried attaching it using qvm-pci, which of course didn’t work:

qvm-pci attach net-macanon dom0:00_xx.x --persistent

quite a few lines of codes went through but the last one had an error that i think aborted the whole thing, sorry if i can’t provide all of the terminal lines but it seems i can’t copy to global clipboard from dom0 terminal, so i have to copy them all by hand. anyways here’s the line with the error:

File "/usr/lib/python3.8/site-packages/qubesadmin/base.py", line 87, in _parse_qubesd_response
  raise qubesadmin.exc.QubesDaemonAccessError(
qubesadmin.exc.QubesDaemonAccessError: Got empty response from qubesd. see journalctl in dom0 for details.

i checked journalctl as it said but i can’t really find anything, of course i also don’t know anything so you probably would find something, the problem is, as i said, that i can’ find a way to copy text from dom0 terminal to other VMs so i can’t show the journalctl text right now, i tried everyting but i can’t seem to find a way to copy and pasting the text.

All i can find on journalctl is one thing: AssertionError. it comes up everytim i try to do qvm-pci and presents itself like this:

File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 191, in on_device_list_pci
  yield PCIDevice(vm, None, libvirt_name=libvirt_name)
File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 140, in __init__
assert dev_match
AssertionError

this lines have some other lines behind them, they are all similar. it-s accessing some files in qubesadmin and when it gets to this specific file it just aborts everything. the whole thing in journalctl has this line before it:

unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.pci.Available' dest=b'dom0' argb'' len(untrusted_payload)=0
traceback (most recent call last):
~and here starts the list of files that are accessed and that ends with the previously cited lines~

one thing i found was that this same error appeared when trying the attachment of my net card too. so it was the cause of the abort of both qvm-pci and the attempt of attachment of my net card. seems like qubes can’t read what devices are there, but it can read them using lspci… i’m really lost.

another thing i can say is that this problems have persisted through multiple installations, probably about 3. all of them done with a fresh iso of qubes.
if it can help i am on an asus f415 i think, the one with 11th gen i3.

i apologise for my probable errors in writing this post but i’m quite tired and english isn’t really my first language.

If anyone could help me i would be really really grateful, i can’t seem to find any info about this and i’m worried there probably isn’t anything to do and will probably be stuck without any mac spoofing for life ;_;
thank you in advance, i feel like i still forgot some info that would probably be helpful, but they don’t come to my mind, i’ll update later if they do. oh qubes version is 4.1 rc2. 4.0 installation wouldn’t even start so i had to stick with this.

Thanks

found how to copy dom0 clipboard, it was actually pretty easy. so here are the various logs:
This is what happens in terminal when i try to attach the net card:

[user@dom0 ~]$ qvm-pci attach net-macanon dom0:00_14.3 --persistent
Traceback (most recent call last):
  File "/usr/bin/qvm-pci", line 5, in <module>
    sys.exit(main())
  File "/usr/lib/python3.8/site-packages/qubesadmin/tools/qvm_device.py", line 291, in main
    args = parser.parse_args(args, app=app)
  File "/usr/lib/python3.8/site-packages/qubesadmin/tools/__init__.py", line 409, in parse_args
    subaction.parse_qubes_app(self, namespace)
  File "/usr/lib/python3.8/site-packages/qubesadmin/tools/qvm_device.py", line 200, in parse_qubes_app
    dev = vm.devices[devclass][device_id]
  File "/usr/lib/python3.8/site-packages/qubesadmin/devices.py", line 282, in __getitem__
    for dev in self.available():
  File "/usr/lib/python3.8/site-packages/qubesadmin/devices.py", line 235, in available
    self._vm.qubesd_call(None,
  File "/usr/lib/python3.8/site-packages/qubesadmin/base.py", line 74, in qubesd_call
    return self.app.qubesd_call(dest, method, arg, payload,
  File "/usr/lib/python3.8/site-packages/qubesadmin/app.py", line 748, in qubesd_call
    return self._parse_qubesd_response(return_data)
  File "/usr/lib/python3.8/site-packages/qubesadmin/base.py", line 87, in _parse_qubesd_response
    raise qubesadmin.exc.QubesDaemonAccessError(
qubesadmin.exc.QubesDaemonAccessError: Got empty response from qubesd. See journalctl in dom0 for details.

it asks me to go to journalctl so here is what it looks like there:

Dec 27 11:55:07 dom0 qubesd[1822]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.pci.Available' dest=b'dom0' arg=b'' len(untrusted_payload)=0
Dec 27 11:55:07 dom0 qubesd[1822]: Traceback (most recent call last):
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/api/__init__.py", line 286, in respond
Dec 27 11:55:07 dom0 qubesd[1822]:     response = await self.mgmt.execute(
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/api/admin.py", line 1217, in vm_device_available
Dec 27 11:55:07 dom0 qubesd[1822]:     devices = self.dest.devices[devclass].available()
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/devices.py", line 376, in available
Dec 27 11:55:07 dom0 qubesd[1822]:     devices = self._vm.fire_event('device-list:' + self._bus)
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/events.py", line 195, in fire_event
Dec 27 11:55:07 dom0 qubesd[1822]:     sync_effects, async_effects = self._fire_event(event, kwargs,
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/events.py", line 168, in _fire_event
Dec 27 11:55:07 dom0 qubesd[1822]:     effects.extend(effect)
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 191, in on_device_list_pci
Dec 27 11:55:07 dom0 qubesd[1822]:     yield PCIDevice(vm, None, libvirt_name=libvirt_name)
Dec 27 11:55:07 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 140, in __init__
Dec 27 11:55:07 dom0 qubesd[1822]:     assert dev_match
Dec 27 11:55:07 dom0 qubesd[1822]: AssertionError

While here is what happens in the journal when i try and execute qvm-pci:

Dec 27 11:57:50 dom0 qubesd[1822]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.device.pci.Available' dest=b'dom0' arg=b'' len(untrusted_payload)=0
Dec 27 11:57:50 dom0 qubesd[1822]: Traceback (most recent call last):
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/api/__init__.py", line 286, in respond
Dec 27 11:57:50 dom0 qubesd[1822]:     response = await self.mgmt.execute(
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/api/admin.py", line 1217, in vm_device_available
Dec 27 11:57:50 dom0 qubesd[1822]:     devices = self.dest.devices[devclass].available()
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/devices.py", line 376, in available
Dec 27 11:57:50 dom0 qubesd[1822]:     devices = self._vm.fire_event('device-list:' + self._bus)
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/events.py", line 195, in fire_event
Dec 27 11:57:50 dom0 qubesd[1822]:     sync_effects, async_effects = self._fire_event(event, kwargs,
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/events.py", line 168, in _fire_event
Dec 27 11:57:50 dom0 qubesd[1822]:     effects.extend(effect)
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 191, in on_device_list_pci
Dec 27 11:57:50 dom0 qubesd[1822]:     yield PCIDevice(vm, None, libvirt_name=libvirt_name)
Dec 27 11:57:50 dom0 qubesd[1822]:   File "/usr/lib/python3.8/site-packages/qubes/ext/pci.py", line 140, in __init__
Dec 27 11:57:50 dom0 qubesd[1822]:     assert dev_match
Dec 27 11:57:50 dom0 qubesd[1822]: AssertionError

as you can see, same thing.

The only piece of information i could find after a little digging was another post here on this forum about having the devices option in the GUI greyed out and not having access to qvm-pci, here’s the link [qubes-users] Qubes 4.1 qubes-manager "Devices" grayed out, but there aren’t any responses about the problem itself, the only response is about no-strict-reset which is another thing.

am i missing something?
thanks for the help, if anyone sees this.

Hello, created this acocunt to say that I also experienced the same issue a couple weeks back after a successful install of 4.1 rc2.

Device: MSI GE66 RAIDER 11UH

 CPU - Intel® Core™ i9-11980HK
 CHIPSET - HM570 
 GRAPHICS - NVIDIA® GeForce RTX™ 3080 Laptop GPU 16GB GDDR6
 NOTE: Attempted installation was on an m.2 ssd connected via USB-C

Details:
My attempts to install Qubes 4.1 rc2 are detailed below for possible clues starting from failing to install it to updating my bios and the install working properly and finally being faced with the error described in the OP.

1. Initial Attempts:

Initially the installation would not work at all on my device, it would get stuck with the typical EFI/Nvidia errors I cant recall exactly what they were other than getting stuck on a black screen after a few seconds but before the install.
I went ahead and adjusted the iso and for some reason there still was no change at all to the boot process. (Note: This is not my first Qubes installation and I have had to do similar adjustments to the boot options be it legacy or EFI mode for my previous lenovo device with an nvidia card) I managed to be able to pass boot options to it though through the EFI boot manager known as rEFInd. Next it seemed I ran into a kernel panic issue involving IO-APIC.

2. BIOS Update:

After looking around for a while for details about this I found that the BIOS for my device had recently been updated (mid Nov) and after updating the BIOS i tried again with a fresh 4.1 rc2 (unmodified) and it worked with no issue at all. Clear through on to the actual loading of the desktop everything worked flawlessly.

3. Current issue/OP issue:

Once loaded up, I began attempting to configure sys-net and ran into the same issue as the described in the OP. The device attachment tab in the VM properties menu (Qubes Manager>Right Click on a VM>Properties>Devices? tab) was greyed out and was not clickable. I went ahead and tried qvm-pci and the other methods described in the OP and reached the same results. This being said, the PCI devices are listed when using lspci through dom0. Whats more is that block devices are available when using qvm-devices. The qubes installation also knew I was using a usb external drive for the OS because it didn’t allow me to create a sys-usb.

Conclusion:
yes i am having the same error, I will try to install rc3 now and see if that fixes anything, also going to try to put the drive into the laptop rather than use it externally and see if that makes a difference.

monhibited: What are the specs of the system you are installing on?

hey man,
i’m on a low end laptop, cpu should be an i3 1115g4 with integrated graphics and i’m installing it on the built-in m2 ssd.

One thing that i noticed is that everyone having this issue is on 11th gen intel, could it really be the cause of this? i don’t know.
Seems there’s nothing to do anyways and hope for qubes devs to try and fix this issue while i do reinstall after reinstall…