Passing through AMD GPU + USB Controller to Windows 10 Guest = Code 12 on every second boot

deafsquad

Member
Mar 30, 2012
9
1
23
i successfully passed through my AMD Radeon 7700 and it works flawless if its the only pcie device that is passed through, when i reboot the guest after a successfull boot with two pcie devices, the gpu is not initialized and generates code 12 in windows device manager, usb controller on the other hand always works.

with the following trick i can make it work for both devices for one boot again
it looks like i need to increment the hostpci id of the gpu every time the machine gets rebooted, at least that fixed it now multiple times, i tried toggeling between two id's but that only worked once. in the last try i needed to change hostpci2 to hostpci3 and it worked again after i tried to reuse hostpci0 without success.

hostpci1: 09:00.3,pcie=1
hostpci2: 08:00,pcie=1,x-vga=on

kernel entries look the same with or without code12

kernel: [153860.997286] vfio-pci 0000:09:00.3: enabling device (0000 -> 0002)
kernel: [153861.055944] vfio-pci 0000:08:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
kernel: [153860.997286] vfio-pci 0000:09:00.3: enabling device (0000 -> 0002)
kernel: [153861.055944] vfio-pci 0000:08:00.0: vfio_ecap_init: hiding ecap 0x19@0x270

when booting with only one pcie device it always works, i could script the incrementation before starting the guest but there seems to be a ressource issue when passing multiple devices to windows on the second bootup at least for the gpu side.

Any idea if i could try something differently, at least i can somehow reproduce and test it. I am currently on legacy bios, not sure if this could lead to this behaviour, i was very happy it worked immediately on setup so i thought not to go through the hassle and try to convert my windows installation to uefi and maybe get other problems attached to that.
 
Last edited:
  • Like
Reactions: nlegger

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!