GPU Passthrough Error

Squid1917

New Member
Dec 16, 2025
11
2
3
Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
kvm: ../hw/pci/pci.c:1815: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.


Trying to passthrough my 9060 XT to a vm to run game server and anytime i try to start the vm i get that error

Code:
agent: 1
bios: ovmf
boot: order=scsi0;net0;hostpci0
cores: 4
efidisk0: local-lvm:vm-118-disk-0,efitype=4m,size=4M
hostpci0: 0000:03:00
localtime: 1
machine: q35
memory: 8192
meta: creation-qemu=10.1.2,ctime=1765913879
name: sunshine
net0: virtio=02:02:A7:20:D4:EA,bridge=vmbr0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-118-disk-1,discard=on,size=32G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=4fc50ec7-ba20-4c01-857d-c1e13ea9e3b8
tablet: 0
tags: 
vga: clipboard=vnc
vmgenid: 786e90b3-4a54-47ef-ade5-7e31945abaca
 
i should preface this by saying i also have kde installed as i use it as a workstation as well. i plugged the gpu in the output went from onboard graphics to gpu. went into bios switched primary output to cpu. logged into proxmox web ui went to my vm. hardware -> add device -> pci device -> raw device, selected my gpu enabled 'all functions' and 'primary gpu' saved rebooted pc. vm didnt start to i tried to manually start via the qm start command which gave that output.
 
i should preface this by saying i also have kde installed as i use it as a workstation as well

Thats literally the first time of me using Proxmox for 10 years to hear someone doing that to Proxmox. Lol :D

The most i can help you is referencing you to this thread where someone achived a solution for a similiar problem.
 
Tried everything in there and still not working.

Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset

that just keeps erroring out
 
  • Like
Reactions: fstrankowski
Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
This is not uncommon as many devices don't reset properly and does not have to be a problem.

If your GPU does not reset properly (which is most likely the case) then you need to make sure nothing touches the GPU during the Proxmox boot process (use another GPU to boot from or use the initcall_blacklist=sysfb_init work-around that will make troubleshooting very difficult as it also removes the Proxmox host console) and early bind it to vfio-pci. You can then probably use the GPU in a VM once and need to reboot the whole Proxmox after you shutdown the VM.

Alternatively, use a GPU that does reset properly or one that has a known work-around, which I don't know for the 9060XT, unfortunately. Someone appears to have it working here (but maybe it's a different brand, which can matter): https://forum.proxmox.com/threads/hdmi-audio-passthrough-with-rx9060xt.167893/#post-788403
 
  • Like
Reactions: fstrankowski
I have a cpu with onboard graphics, if you can point me to a guide to make sure nothing touches the gpu during boot.
Set the motherboard BIOS to boot with the integrated graphics. Make sure it shows output (like the motherboard logo and boot loader) on a display connected to the integrated graphics, and to show nothing on a display connected to the 9060XT.

Also, early bind vfio-pci to the 9060XT so no driver is bound to it: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_host_configuration . You might also need a
softdep amdgpu pre: vfio-pci to force vfio-pci before amdgpu, and maybe similar for snd_hda_intel. I don't own your GPU and I don't have time now to search for a guide that matches your hardware.
 
did that followed the wiki now when i try to start the vm

Code:
Phase is pre-start
/var/lib/vz/snippets/rx9060xt_reset.sh: line 7: /sys/bus/pci/drivers/amdgpu/unbind: No such file or directory
/var/lib/vz/snippets/rx9060xt_reset.sh: line 10: echo: write error: Device or resource busy
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
kvm: vfio: Unable to power on device, stuck in D3
kvm: vfio: Unable to power on device, stuck in D3
Phase is post-start
 
did that followed the wiki now when i try to start the vm

Code:
Phase is pre-start
/var/lib/vz/snippets/rx9060xt_reset.sh: line 7: /sys/bus/pci/drivers/amdgpu/unbind: No such file or directory
/var/lib/vz/snippets/rx9060xt_reset.sh: line 10: echo: write error: Device or resource busy
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
kvm: vfio: Unable to power on device, stuck in D3
kvm: vfio: Unable to power on device, stuck in D3
Phase is post-start
Obviously, your hookscript has problems in the pre-start phase. Looks like it is trying to do stuff to the GPU. Maybe disable the hookscript for now?
The "stuck in D3" indicated that the GPU does not reset properly.
Are you sure that the GPU is not used during the boot process? Is vfio-pci (and not amdgpu) loaded before starting the VM (lspci -nnk)? Did you reboot the Proxmox host before starting the VM?
 
Last edited:
ive disbled the hookscript for now.
Code:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 44 [RX 9060 XT] [1002:7590] (rev c0)
        Subsystem: Tul Corporation / PowerColor Device [148c:2437]
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 48 HDMI/DP Audio Controller [1002:ab40]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 48 HDMI/DP Audio Controller [1002:ab40]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

is the output of lspci -nnk

stuck with the same error. ran the start command just after a reboot. do you need any file contents to aid

Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
kvm: vfio: Unable to power on device, stuck in D3
kvm: vfio: Unable to power on device, stuck in D3
 
/var/lib/vz/snippets/rx9060xt_reset.sh: line 7: /sys/bus/pci/drivers/amdgpu/unbind: No such file or directory

It appears the steps are mixed up.
Additionally, the GPU requires a monitor connection (even a dummy one).

The hookscript will not function without a driver that can be reset.

You're messing things up by mixing up the steps. You're probably disabling amdgpu, but that's not the only issue.

If you've already performed other steps, installing Proxmox fresh should work.
 
Last edited:
Couple of questions

How do I backup the containers to a usb stick (the actual data inside the container aswell as the config file)

Once I do a fresh install what will I need to do so that I can pass through the gpu.

also if the vm is going to be used for sunshine. how am i going to create a dummy display
 
Last edited:
Will try thanks. Not worried about sound as I wont be using the gpu with hdmi physical out. Will be used by remote gaming with sunshine/steam link. So the display will be virtual.
 
  • Like
Reactions: fstrankowski
How do I backup the containers to a usb stick (the actual data inside the container aswell as the config file)

I cannot provide guidance on methods such as backing up a virtual machine's virtual disk to a USB drive.

There may be a way to do that, but I cannot be held responsible if you report data loss.

If you cannot resolve the issue yourself, remove the existing SSD, install a new SSD, and perform a fresh installation.

After that, you can apply the configuration differences (removing unnecessary settings) back to the original SSD.

Once I do a fresh install what will I need to do so that I can pass through the gpu.

For new installations in PvE, only execute the following:


also if the vm is going to be used for sunshine. how am i going to create a dummy display

This kind of physical adapter

But I think you should test it on the monitor first until it works.

https://www.ebay.com/shop/dummy-plug-hdmi?_nkw=dummy+plug+hdmi

I haven't tried it on Linux, so I don't know how to run it on Linux.
Once the PVE and virtual machine settings are complete, the rest is a Linux issue and should be resolved on the Linux side.
It works fine on Windows 11.
 
Last edited:
even in a new pve still same error
Code:
error writing '1' to '/sys/bus/pci/devices/0000:03:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:03:00.0', but trying to continue as not all devices need a reset
 
Is there any other issue besides that error?
It also appears on VMs that are functioning normally.

Even if it doesn't work on Linux, That's not something you should be telling me, is it?
 
Last edited:
never mind fixed it by compiling
https://github.com/piotrminkina/vendor-reset/tree/issue/kernel-6.12.x-build

And adding my gpu id the xxxx:xxxx to the device table.
then setting the reset method from bus to device-specific (this has to be done every time i start the vm so i just made a hookscript

now i only have the

kvm: ../hw/pci/pci.c:1815: pci_irq_handler: Assertion `0 &lt;= irq_num &amp;&amp; irq_num &lt; PCI_NUM_PINS' failed.
error which only happens after i start vm stop vm then try to start the vm again without rebooting host.
 
Last edited: