Cannot unbind PCI device: No such device

Hi, I wanted to create an HVM with GPU pass trough. My machine has an AMD iGPU and an NVIDIA RTX 2060. I want to pass the 2060 to my HVM. I already set the iGPU as my default GPU in BIOS.

Running lspci returns:

...
03:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2060] (rev a1)
03:00.1 Audio device: NVIDIA Corporation TU104 HD Audio Controller (rev a1)
03:00.2 USB controller: NVIDIA Corporation TU104 USB 3.1 Host Controller (rev a1)
03:00.3 Serial bus controller: NVIDIA Corporation TU104 USB Type-C UCSI Controller (rev a1)
...

I then added the following to GRUB_CMDLINE_LINUX in /etc/default/grub

rd.qubes.hide_pci=3:00.0,3:00.1,3:00.2,3:00.3

After running “sudo grub2-mkconfig -o /boot/grub2/grub.cfg” and restarting I got the following error:

4.165702) dracut-cmdline(351): //lib/dracut/hooks/cmdline/02-qubes-pciback.sh line 93: echo: write error: No such device
4.168528) dracut-cmdline(351): //lib/dracut/hooks/cmdline/02-qubes-pciback.sh line 93: echo: write error: No such device
4.170033) dracut-cmdline(351): //lib/dracut/hooks/cmdline/02-qubes-pciback.sh line 93: echo: write error: No such device
4.171525) dracut-cmdline(351): //lib/dracut/hooks/cmdline/02-qubes-pciback.sh line 93: echo: write error: No such device
4.185119) dracut: FATAL: Cannot unbind PCI devices.
4.185143) dracut: Refusing to continue

I also tried it with only “rd.qubes.hide_pci=3:00.0” but still got the same results.

Any help would be appreciated.

Perhaps running qvm-pci and using the values from that will work.

Try do add it like this

rd.drive.pre=xen-pciback xen-pciback.hide=(0000:03:00.0)(0000:03:00.1)(0000:03:00.2)(0000:03:00.3)

also add iommu=on in GRUB_CMDLINE_XEN_DEFAULT
then sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

and

sudo dracut -fecho 'options xen-pciback hide=(0000:03:00.0)(0000:03:00.1)(0000:03:00.2)(0000:03:00.3)' | sudo tee /etc/modprobe.d/xen-pciback.conf
sudo dracut -f