Radeon 5700 Passthrough VM Restart Error on Proxmox

Fukuringa

New Member
Jan 27, 2025
7
0
1
Hello. I'm using a Radeon 5700 connected to Proxmox.
However, once this assigned VM is stopped, I cannot restart it without rebooting the host machine itself, as it displays the following error.
If you know a way to restart the VM without having to reboot the host machine every time, please let me know.

error writing '1' to '/sys/bus/pci/devices/0000:0a:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:0a:00.0', but trying to continue as not all devices need a reset
swtpm_setup: Not overwriting existing state file.
kvm: ../hw/pci/pci.c:1633: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
stopping swtpm instance (pid 966489) due to QEMU startup error
TASK ERROR: start failed: QEMU exited with code 1

The following is vmconfig.
agent: 1
bios: ovmf
boot: order=sata0;net0
cores: 8
cpu: host
efidisk0: local-lvm:vm-507-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:0a:00,pcie=1,x-vga=1
machine: pc-q35-9.0
memory: 8192
meta: creation-qemu=9.0.2,ctime=1759991634
name: GPU
net0: virtio=BC:24:11:4F:66:0C,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
sata0: local-lvm:vm-507-disk-1,cache=writethrough,discard=on,size=64G
scsihw: virtio-scsi-single
smbios1: uuid=a9ee5442-17c5-4636-9830-f2011900e183
sockets: 1
tpmstate0: local-lvm:vm-507-disk-2,size=4M,version=v2.0
vmgenid: c359e7e1-ea1d-4540-bb1c-061958158521

I am Japanese and use translation tools, so there may be some awkward phrasing. If you have any questions or need further details, please feel free to contact me.
 
Did you install and enable vendor-reset: https://github.com/gnif/vendor-reset ? If not, you might wan to look into it (lots of threads on this forum and the internet) for properly resetting Radeon 5700 GPUs.
x-vga=1 (Primary GPU) is for NVidia and should usually not be enabled for AMD GPUs.
Thank you for your advice.
I installed vendor-reset, but it still hasn't fixed the issue.
I also tried applying it after rebooting using commands like
`echo vendor-reset >> /etc/modules-load.d/vendor-reset.conf`, but it didn't work.

I would greatly appreciate it if you could tell me how to fix this.
Please let me know if you need any additional i

root@server05:~# dmesg | grep -i vendor
[ 2.948724] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.08
[ 2.971000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.08
[ 2.980540] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.08
[ 2.980919] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.08
[ 3.371537] usb 3-3: New USB device found, idVendor=04e6, idProduct=5810, bcdDevice= 2.00
[ 3.672703] usb 1-3: New USB device found, idVendor=046e, idProduct=5500, bcdDevice= 1.10
[ 3.977331] vendor_reset: loading out-of-tree module taints kernel.
[ 3.977335] vendor_reset: module verification failed: signature and/or required key missing - tainting kernel
[ 4.006981] vendor_reset_hook: installed
[ 4.128873] usb 1-6: New USB device found, idVendor=0511, idProduct=023f, bcdDevice= 1.00

root@server05:~# lspci -nnk -s 0a:00.0
0a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] [1002:731f] (rev c4)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Reference RX 5700 XT [1002:0b36]
Kernel driver in use: vfio-pci
Kernel modules: amdgpu


error writing '1' to '/sys/bus/pci/devices/0000:0a:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:0a:00.0', but trying to continue as not all devices need a reset
swtpm_setup: Not overwriting existing state file.
kvm: ../hw/pci/pci.c:1633: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
stopping swtpm instance (pid 26973) due to QEMU startup error
TASK ERROR: start failed: QEMU exited with code 1