Got my Ryzen 4750G APU iGPU to pass-through to QEMU/KVM VM, but display output is pixelated garbage after AMD (APU) Radeon driver install (from AMD or Windows Update)?

Hi,

After much trial and error, I finally got my AMD Ryzen 4750G APU to pass through its iGPU to a Windows 10 VM in both Unraid and Proxmox (both Qemu/KVM). Thsi involved the ACS override patch in the kernel (pcie_acs_override=downstream,multifunction) as well as clearnign the EFI frame buffer (video=efifb:off), I also had to boot to my hypervisor in UEFI mode, but my guest had to be in SeaBIOS mode on a Q35 machine.

One issue I’ve been struggling with is that as soon as I install from AMD’s site (or let Windows 10 install automatically) any AMD Radeon drivers for the iGPU, the video output becomes a complete mess (see pic attached below). If I “disable device” for the iGPU in Device Manager (thanks to RDP, no way I could use a display connected via HDMI/DP), video output returns to normal. If I run DDU to uninstall all AMD drivers, everything returns to normal as well.

I have seen reports that AMD may now be checking to see if we run their GPUs in a VM and this could cause issues. Two posts that come to mind are:

1- https://www.reddit.com/r/VFIO/comments/kdx5pl/working_amd_drivers_for_gpu_passthrough_newer/

2- https://www.reddit.com/r/VFIO/comments/gtufa5/latest_2051_driver_broke_vm_gpu_passthrough_on/

I have followed the suggestions as best I could, setting my vendor_id to something random, turning on the kvm hidden_state, and even ioapic driver=‘kvm’ – all to no avail. I also tried the following, so Windows doesn’t think it’s in a VM anymore, with no success:

I have also tried with AMD drivers 20.9.1 (Sept 2020) and 20.45.36 (Feb/Mar 2021), in addition to the AMD Pro 20.Q4 (which wouldn’t even install since APUs aren’t supported) which was suggested in one of the posts I linked above.

I was hoping to get some input here as to what I could try next? I feel like I’m so close, and would love to make a guide on what I did to get this running, as several users on different forums seem to be wanting to do the same, whether it’d be on Proxmox or Unraid. At this point, without AMD drivers, the system is usable, but refresh rate seems to be ~30hz (based on visual appearance) or less, and I’m hoping official drivers can fix that.

I’ve attached my Unraid VM config below for reference, it reads as a Qemu config just formatted as XML.

Thanks in advance!

Example image: https://i.imgur.com/1EMWDJo.png

VM config: https://pastebin.com/BJy9F2AP

1 Like

I was planing to do the exact same thing, so I am just trying to up vote this issue. Engagement :slight_smile:

1 Like

Thank you!

Something else I noticed is that despite the screen output looking like a pixelated mess, the mouse cursor still looks fine and moves as it should when I move my mouse/trackpad. I have tried with different VBIOS versions (3 versions from 3 different motherboard BIOS versions) as well as a VBIOS extracted from within the host environment as well, all to no avail.

Interesting topic; thanks for starting this.

I’ve been trying to do something similar, but passing through the primary slot GPU [not the APU], so I could keep the APU gfx / desktop for a Linux desktop [on the host], and pass through the GPU.

Lots of online searching, and about 20 hours invested so far, and lots of near misses - including getting the correct lspci output in a Ubuntu 20.10 guest - but not able to fire up the 2nd monitor yet…

I’ll have another go this weekend [after I verify my setup / settings work on a non-APU system with two GPUs]…

System:

  • ASRock B550M-HDV [latest BIOS]
  • Ryzen 4650G APU
  • Vega 56 and/or RX 580 GPU
  • Host - Ubuntu 20.10 [5.11.8 kernel, and latest AMDGPU firmware and Mesa via PPA]
  • Guests - Windows 10 and Ubuntu 20.10 [Q35, and UEFI/OVMF and SeaBIOS]

Any new about this question? I encountered the same problem using 4750G

I have passing a dGPU to a VM working. I haven’t tried to use the APU in a guest VM.

System:

  • Ryzen Pro 4750G APU
  • Gigabyte X570 I AORUS PRO WIFI - Bios F30 (F32 has bad IOMMU groups, F33g doesn’t respect the initial GPU setting to iGPU so vfio-pci binding locks up at boot)
  • GeForce GTX 1650 Super
  • Host - Linux Mint 20.1 (5.12.0-051200rc7-generic, kisak-mesa, latest linux-firmware.git)
  • Guest - Windows 10 (Q35, UEFI/OVMF)

Haven’t tried this setup with an AMD dGPU yet…

I am running nested virtualisation in the Win10 guest, as we need VS2019 and docker-desktop for our work projects. Thanks to the removal of the code 43 issue I have been able to unhide the VM state which may have helped here.

1 Like

Just to update for documentation.
I also have passthru with a dGPU to a VM working.

System:

  • Ryzen 7 5700G APU

  • Gigabyte X570 I AORUS PRO WIFI - Bios F33h (Everything works, initial gpu setting as well, csm off)

  • AMD RX 6900xt

  • Host - Manjaro Test Branch(5.13 for amd iommu fix as 5.12-4 wasnt working yrmv)

  • Guest - Windows 10 202h (Q35, UEFI/OVMF)

I have only partially hidden the vm, using in my libvirt conf, as well as some poorly configured sysinfo.

I’d say I’m near native performance, missing a few optimizations that I’ve forgotten since my last x570 build, like allowing my cpu to boost. I also need to reinstall my dual channel 64gb kit of ram instead of using a 16gb stick that I got in the 5700g prebuilt. Though said kit is currently in the old x570 rig i gave to my brother, who is on vacation, a few more sad weeks of running out of ram for me ayy.
EDIT:formatting

2 Likes

Hi, has anyone experienced the AMD reset bug with the dGPU passthrough?