updated to PVE 9.0 then GPU passthrough stopped working on Windows

Thank you.

I believe the following options are not available for q35

-set device.hostpci0.x-igd-lpc=on

https://github.com/qemu/qemu/blob/master/docs/igd-assign.txt

For #2, "x-igd-lpc=on" option copies the IDs of host LPC bridge and host bridge
to guest. Currently this is only supported on i440fx machines as there is
already an ICH9 LPC bridge present on q35 machines, overwriting its IDs may
lead to unexpected behavior.

I think the difference is only in the following settings, but I will try after reinstalling.

-set device.hostpci0.bus=pcie.0
 
Last edited:
I tried it but I didn't understand it, so I can't tell you what to do...

I only did the following, but I'm not sure if it's correct.
The contents that should be specified in the args listed are correct in my environment.
* I also included options that I thought were unnecessary,

Also, since it is a package distributed by an external party, it is up to you to decide whether to use it or not. I tested it in a testing environment.

If you don't know how to undo it, it's best not to use it.
Even if asked, I cannot answer, and even if someone tells me about the risks, I cannot do anything.

<https://github.com/lixiaoliu666/pve-anti-detection/releases>

wget ~/pve-qemu-kvm_10.0.2-4_amd64.deb
apt reinstall ./pve-qemu-kvm_10.0.2-4_amd64.deb
qm set <vmid> -args '-cpu host -set device.hostpci0.bus=pcie.0 set device.hostpci0.addr=0x02.0 -set device.hostpci0.x-igd-gms=0x2 -set device.hostpci0.x-igd-opregion=on -set device.hostpci0.x-igd-lpc=on'
reboot
qm set <vmid>
 
pve8 is only 2 years from release and there is one more year until eol.

pve9 has just been released and still has many glitches.

If you don't need to use pve9's features, it would be wise to keep it because pve8 has stability.

Just someone has to find the glitches in pve9...

I hope to get the functionality back that is in pve8, but it will probably rank lower than other critical issues
 
Last edited:
just check this solution with pve-anti-detection. Still getting error 43, but maybe I do something wrong.
 
@uzumo @dakralex

There is another post https://forum.proxmox.com/threads/igd-passtrhough-working-intel-uhd-770.172333/post-802844

which make use of custom rom, change machine type to i440fx and use as legacy driver. This makes error 43 gone from Windows 11 VM.

Just want to know if any clue from the team to fix this in Q35 machine or any progress on it? Do I need to file this bug to somewhere so I can get the progress for the fix?

Thanks

I didn't realize it was on the ROM side, so this was a good learning experience.

It works on Q35, but blocks appear on the screen, making it unusable.
Disabling and re-enabling the device in Windows will restore normal screen display.

I believe the fundamental issue lies with qemu10, so perhaps we should register it on Bugzilla.

However, I'm not good at either English or Linux, so I don't know if it would get across even if I submitted it, so I can't do it.

Code:
qm set 629 -args '-set device.hostpci0.bus=pcie.0 -set device.hostpci0.addr=0x02.0 -set device.hostpci0.x-igd-gms=0x0 -set device.hostpci0.x-igd-opregion=on'
qm set 629 -hostpci0 0000:00:02.0,romfile=12-n100-q10.rom

Code:
pnputil /disable-device /class Display /bus PCI /connected && pnputil /enable-device /class Display /bus PCI /connected

Error: Fixed the reversal of disable and enable.
 
Last edited:
I didn't realize it was on the ROM side, so this was a good learning experience.

It works on Q35, but blocks appear on the screen, making it unusable.
Disabling and re-enabling the device in Windows will restore normal screen display.

I believe the fundamental issue lies with qemu10, so perhaps we should register it on Bugzilla.

However, I'm not good at either English or Linux, so I don't know if it would get across even if I submitted it, so I can't do it.

Code:
qm set 629 -args '-set device.hostpci0.bus=pcie.0 -set device.hostpci0.addr=0x02.0 -set device.hostpci0.x-igd-gms=0x0 -set device.hostpci0.x-igd-opregion=on'
qm set 629 -hostpci0 0000:00:02.0,romfile=12-n100-q10.rom

Code:
pnputil /enable-device /class Display /bus PCI /connected && pnputil /disable-device /class Display /bus PCI /connected
THis one, you need to setup 0x2

Code:
-set device.hostpci0.x-igd-gms=0x0
 
  • Like
Reactions: uzumo
We modified the procedure based on the steps you created.
After making several adjustments to the virtual machine, the iGPU worked on the pc-q35 instead of the pc-i440fx. Thank you.

I removed “-set device.hostpci0.x-igd-lpc=on” because it prevented booting.

The issue of the screen filling with blocks was indeed resolved by disabling/enabling the device, so it's usable for now.

I think adding a startup option to disable/enable it would be a good idea.

* I don't fully understand the specification, but I changed device.hostpci0.x-igd-gms=0x0 to 0x2. (It worked with 0x0, but...)

Code:
sed -i '/GRUB_CMDLINE_LINUX_DEFAULT=/c GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on iommu=pt"' /etc/default/grub

mv 12-n100-q10.rom /usr/share/kvm/

cat << EOF > /etc/modules
vfio
vfio_iommu_type1
vfio_pci
EOF

qm set 629 -args '-set device.hostpci0.bus=pcie.0 -set device.hostpci0.addr=0x02.0 -set device.hostpci0.x-igd-gms=0x0 -set device.hostpci0.x-igd-opregion=on'
qm set 629 -hostpci0 0000:00:02.0,romfile=12-n100-q10.rom
qm set 629 -cpu host,hidden=1
qm set 629 -bios ovmf
qm set 629 -machine pc-q35-9.2+pve1
nano /var/lib/vz/snippets/intel_igpu_reset.sh

---
#!/bin/bash
phase="$2"
echo "Phase is $phase"
if [ "$phase" == "pre-start" ]; then
    # Unbind gpu from i915
    echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/unbind 2>/dev/null
    sleep 5
elif [ "$phase" == "post-stop" ]; then
    # Unbind gpu from vfio-pci
    sleep 5
    echo "0000:00:02.0" > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null
    sleep 2
    # Bind i915
    echo "0000:00:02.0" > /sys/bus/pci/drivers/i915/bind 2>/dev/null
    sleep 2
fi
---

chmod +x /var/lib/vz/snippets/intel_igpu_reset.sh
qm set 629 -hookscript local:snippets/intel_igpu_reset.sh

update-initramfs -u -k all
proxmox-boot-tool refresh
update-grub
reboot

* This procedure does not require adding or editing configuration files under /etc/modprobe.d/.

To restore the display to normal, add the following to the Windows 11 startup script.

Code:
pnputil /disable-device /class Display /bus PCI /connected && pnputil /enable-device /class Display /bus PCI /connected

Error: Fixed the reversal of disable and enable.
 
Last edited: