GPU Passthrough AMD RX 5500 XT: Code 43 and strange Host messages

mcflym

Renowned Member
Jul 10, 2013
195
9
83
Hi,

I'm trying to passthrough my AMD RX 5500 XT to an Win10 VM.

The VM is throwing Error Code 43 in the VM-device manager and my host posts the following message on VM-bootup:

error.jpg

Is it OK that the video/audio iommu group is different (38/39)?:
iommu.jpg

My config:
Code:
bios: ovmf
bootdisk: virtio0
cores: 2
efidisk0: vm:100/vm-100-disk-1.qcow2,size=128K
hostpci0: 83:00,pcie=1,rombar=0,romfile=asrock_5500xt.rom,x-vga=1
ide0: local:iso/virtio-win-0.1.173.iso,media=cdrom,size=385062K
ide2: local:iso/Win10_1909_German_x64.iso,media=cdrom
machine: q35
memory: 16384
name: steamserver
net0: virtio=26:30:D9:A5:C8:CD,bridge=vmbr1,firewall=1
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=e535ec56-6a6c-4bb2-96de-07153b730869
sockets: 1
virtio0: vm:100/vm-100-disk-0.raw,size=50G
vmgenid: 851444f3-f91e-4313-947c-9e07a5fd400a

/etc/modprobe.d/vfio_pci.conf:
Code:
options vfio_pci ids=1002:7340,1002:ab38

/etc/modprobe.d/kvm.conf:
Code:
options kvm ignore_msrs=1
options kvm report_ignored_msrs=0

/etc/modprobe.d/amdgpu.conf:
Code:
softdep amdgpu pre: vfio vfio_pci

/etc/initramfs-tools/modules:
Code:
vfio
vfio_iommu_type1
vfio_virqfd
options vfio_pci ids=1002:7340,1002:ab38
vfio_pci ids=1002:7340,1002:ab38
vfio_pci
amdgpu

dmesg | grep IOMMU:
Code:
[    0.000000] Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA
[    2.486345] pci 0000:c0:00.2: AMD-Vi: IOMMU performance counters supported
[    2.486404] pci 0000:80:00.2: AMD-Vi: IOMMU performance counters supported
[    2.486439] pci 0000:40:00.2: AMD-Vi: IOMMU performance counters supported
[    2.486466] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[    5.596027] pci 0000:c0:00.2: AMD-Vi: Found IOMMU cap 0x40
[    5.596031] pci 0000:80:00.2: AMD-Vi: Found IOMMU cap 0x40
[    5.596033] pci 0000:40:00.2: AMD-Vi: Found IOMMU cap 0x40
[    5.596035] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    5.599494] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[    5.599569] perf/amd_iommu: Detected AMD IOMMU #1 (2 banks, 4 counters/bank).
[    5.599646] perf/amd_iommu: Detected AMD IOMMU #2 (2 banks, 4 counters/bank).
[    5.599722] perf/amd_iommu: Detected AMD IOMMU #3 (2 banks, 4 counters/bank).

lspci -nn:
Code:
83:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:7340] (rev c5)
83:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38][CODE]

grub:
[CODE]GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Proxmox Virtual Environment"
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
GRUB_CMDLINE_LINUX=""

lspci -vnn | grep -iP "vga|amdgpu|nvidia|nouveau|vfio-pci":
Code:
        Kernel driver in use: vfio-pci
83:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:7340] (rev c5) (prog-if 00 [VGA controller])
        Kernel driver in use: vfio-pci
        Kernel driver in use: vfio-pci
c2:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 41) (prog-if 00 [VGA controller])
 
Is there any chance that this will be working or should I try an Nvidia Card although there will be issues with code 43 too?

fyi: The GPU and Audio is now in the same iommu group. Of course that changed nothing regarding the issue :)
 
Last edited:
I don`t have error 43 with my rx5500 card with proxmox . It is working, however, this gpu is not resetting itseld. I had put an lsi based hba card into proxmox hardware, which killed my proxmox capability of wake up from sleep (s3 state). And that means I cannot use the resetting script anymore which put the pc into suspend mode and wakes it back with resettting the gpu. So everytime I use windows I had to reboot proxmox host. It is quite annoying.
 
I am have the same issues with my 5500 xt; even getting similar console output. I had a rx 560 that worked flawlessly. This one is code 43. Or when I do get it too "work" the amd software says no driver installed. Also have to do a full server reboot to get my windows vm to boot with the card.
This is going to be a struggle.
 
Last edited:
I don`t have error 43 with my rx5500 card with proxmox . It is working, however, this gpu is not resetting itseld. I had put an lsi based hba card into proxmox hardware, which killed my proxmox capability of wake up from sleep (s3 state). And that means I cannot use the resetting script anymore which put the pc into suspend mode and wakes it back with resettting the gpu. So everytime I use windows I had to reboot proxmox host. It is quite annoying.
https://github.com/gnif/vendor-reset
 

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!