AMD Ryzen 5 5560U Passthrough

pjgm

New Member
Sep 6, 2024
4
0
1
I have recently bought a Beelink SER5 with a 5560U and I have been trying to passthrough its iGPU to a Windows 11 VM.

After some research I found this Ryzen 7000 series github guide which I carefully followed.
In the end I was able to boot into windows but no matter what I tweaked I was unable to get over the apparently very common code 43. I was unable to troubleshoot further on windows as i couldn't get more detail to what was the root cause of the failure (event viewer only shows very generic error messages).

Steps I followed up until now

Discovering PCI IDs & device numbers

Bash:
# lspci -nn | grep -e 'AMD/ATI'
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c3)
04:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
This means that, in my case:

GPU PCI ID: 0000:04:00.0
GPU device numbers: 1002:1638
Audio PCI ID: 0000:04:00.1
Audio device numbers: 1002:1637

Enable IOMMU
Tried different options but right now this is what I have in /etc/default/grub
Bash:
GRUB_CMDLINE_LINUX_DEFAULT="quiet iommu=pt initcall_blacklist=sysfb_init video=efifb:off"

/etc/modules
Bash:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
vendor-reset

/etc/modprobe.d/vfio.conf
Bash:
options vfio-pci ids=1002:1638,1002:1637
softdep radeon pre: vfio-pci
softdep amdgpu pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci

After rebooting and running lspci -nnk:
Bash:
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c3)
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:0123]
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu
04:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

Windows VM
/etc/pve/qemu-server/101.conf
Bash:
agent: 1
args: -cpu 'host,-hypervisor,kvm=off'
balloon: 0
bios: ovmf
boot: order=sata0;ide2;net0
cores: 6
cpu: host
efidisk0: local-lvm:vm-101-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:04:00.0,pcie=1,romfile=vbios_7xxx.bin
hostpci1: 0000:04:00.1,pcie=1,romfile=AMDGopDriver.rom
ide2: none,media=cdrom
machine: pc-q35-9.0
memory: 9000
meta: creation-qemu=9.0.2,ctime=1725607606
name: Windows11
net0: e1000=BC:24:11:E4:DC:75,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
sata0: local-lvm:vm-101-disk-1,size=100G
scsihw: virtio-scsi-single
smbios1: uuid=6bbb64ce-4fef-4936-8d55-049dadf10b54
sockets: 1
tpmstate0: local-lvm:vm-101-disk-2,size=4M,version=v2.0
vmgenid: 4343811c-4c0d-46f6-acd8-f625b133cc3d
vga: none

After this I had no issues following the next steps:
  • Extracted the VBIOS
  • Installed the virtIO drivers
  • installed the official AMD drivers and used the RadeonResetBugFix mentioned in the guide

The only thing I could not get working was the initial VM setup using seabios - I am simply not able to boot.
Using OVMF however seems to not be a problem.

I have also read here that I might need a ghost hdmi adapter? I still haven't tried to connect a monitor yet but might give it a go tomorrow.

Any suggestions on how to achieve this would be greatly appreciated.
I will provide as much information as possible and will do my best to follow up with my findings.
If all fails I also don't mind giving ubuntu a shot first if that helps to debug the root cause.

Thank you!
 
Last edited:
hi @pjgm, I just started using Proxmox a couple weeks ago and I followed the same guide as you. It took me a few times, but eventually I got it to work. Moreover, I've installed using this process a couple times now successfully. The guide I wrote is step by step with screenshots, so you can see exactly what I did. It's for the Beelink SER5 5800H, but I think it should work just fine for you as long as you have the required files. Good luck!

https://forum.proxmox.com/threads/guide-ryzen-5800h-igpu-passthrough-hdmi-windows11-htpc.153405/

Also SeaBIOS I think is for Win10. You need UEFI for Win11.
1725723899783.png
 
Last edited:
  • Like
Reactions: pjgm
Thanks a lot @jun3280! It seems like we are in the same boat, I've started using proxmox a few days ago with this new mini pc.
I reviewed your guide (amazing job btw) and I was able to find the missing pieces.
In my case:
  • I didn't have the RadeonResetBugFixService installed correctly
  • Reverted back my /ect/default/grub changes to simply quiet iommu=pt
  • My iGPU was not set to "Primary GPU". I must have changed this back while trying different things to get this to work
  • I used AMDGopDriver_5800H.rom as it seems to work perfectly well with my machine
To "stress test" this I've tried to play some 4k youtube videos and I noticed a lot of dropped frames. However this does not appear to be a problem in firefox.
At this point I believe it should be simply software configuration issues and I'm glad I got passthrough to work :)
 
Thanks a lot @jun3280! It seems like we are in the same boat, I've started using proxmox a few days ago with this new mini pc.
I reviewed your guide (amazing job btw) and I was able to find the missing pieces.
In my case:
  • I didn't have the RadeonResetBugFixService installed correctly
  • Reverted back my /ect/default/grub changes to simply quiet iommu=pt
  • My iGPU was not set to "Primary GPU". I must have changed this back while trying different things to get this to work
  • I used AMDGopDriver_5800H.rom as it seems to work perfectly well with my machine
To "stress test" this I've tried to play some 4k youtube videos and I noticed a lot of dropped frames. However this does not appear to be a problem in firefox.
At this point I believe it should be simply software configuration issues and I'm glad I got passthrough to work :)

Awesome @pjgm ! Great to hear you figured it out. I'm really impressed with the minibox and Proxmox. I haven't really noticed issues watching videos on this machine, but perhaps I'm not stressing it the way you are. I tried watching some 4K Netflix through Chrome and it seemed fine to me. The 4k video I tested in Youtube looks fine as well. You can see how my box is performing, as well as what Windows 11 is seeing.

What youtube video are you testing?
 

Attachments

  • prox_4k_60.jpg
    prox_4k_60.jpg
    262.8 KB · Views: 12
  • Like
Reactions: pjgm
It was just a random 4k 60fps LG demo.

But again, I believe all is working well from the hardware side, it should be just a matter of software tweaks.

My use case is also a bit different from yours - I'm connecting via RDP which will always add some latency.
Not a big deal for me as I will be only windows when I really can't avoid it and won't be using it as my daily driver!
 
It was just a random 4k 60fps LG demo.

But again, I believe all is working well from the hardware side, it should be just a matter of software tweaks.

My use case is also a bit different from yours - I'm connecting via RDP which will always add some latency.
Not a big deal for me as I will be only windows when I really can't avoid it and won't be using it as my daily driver!
Regardless, that's great to hear that you got it working.

I was adamant about getting the pass through working so I could use the minibox as an HTPC. Pretty happy everything works well.

For you - since you're running just RDP, did you ever consider running an INTEL based chip like 12th - 13th gen, as it is my understanding the igpu can be virtualized and shared amongst a number of different VMs? I don't believe you can output via HDMI though if the igpu is shared though (I haven't been able to get any confirmation).

see here :
https://3os.org/infrastructure/proxmox/gpu-passthrough/igpu-passthrough-to-vm/
https://www.derekseaman.com/2024/07...u-vt-d-passthrough-with-intel-alder-lake.html
 
  • Like
Reactions: pjgm
For you - since you're running just RDP, did you ever consider running an INTEL based chip like 12th - 13th gen, as it is my understanding the igpu can be virtualized and shared amongst a number of different VMs
That's interesting, I didn't know that. I may have to revaluate my choice and understand if it makes sense to go with Intel.