Working AMD drivers for GPU passthrough (newer than 20.4.2)

I run Windows Server 2016 Datacenter as my host machine and use Hyper-V DDA to passthrough my AMD RX 5700 XT to a Windows 10 gaming VM. I primarily chose the AMD card because of the all too well known Code 43 issue that NVIDIA cards have because of VM detection built into the driver. I can’t hide VM detection with Hyper-V like you can with Linux or ESXi.

My RX 5700 XT was working great with AMD Radeon drivers up to version 20.4.2. The very next driver (20.5.1) however resulted in a black screen during driver install and a mostly black screen with some pixelation after a reboot. All mainstream Radeon drivers I’ve tried since then up to version 20.11.2 have had the same issue. The only solution thus far was to revert back to 20.4.2

New developments:

Upon testing this issue further this evening I can confirm that upgrading to the “Radeon Pro 20.Q4” drivers released on 11/03/2020 are working correctly with GPU passthrough (at least on my setup). So I finally have a working driver newer than the 20.4.2 release from way back in May. I tested this in Cyberpunk 2077 and achieved the same performance I had with the older 20.4.2 drivers.

Observations:

  1. AMD does not appear to be actively blocking you from installing drivers newer than 20.4.2 in a VM. In fact, all of the newer drivers I tested seemed to install completely, it’s just that you would end up with a black screen/pixelation after the install finished.
  2. Multiple people have noted that employing the same workarounds for the NVIDIA Code 43 issues seemed to work with the new AMD mainstream drivers. In other words, hiding the fact that you are running in a VM during the driver install.
  3. Looking through the release notes from the last working driver (20.4.2) and the first newer driver that results in the issue sheds light on something I believe is the root cause of the problem. Take a look at this excerpt from the 20.5.1 driver release: " Brand new AMD Link Xinput Emulation driver (AMDXE), which will improve compatibility with current and future games. This gets installed the first time game streaming starts with AMD Link and will appear as a new Xbox 360 controller in Device Manager."
  4. In the 20.4.2 driver, AMD Link didn’t work for me at all. I’m unsure if it was working correctly for others on bare metal, but I can confirm it was a no go in a passthrough setup. I find it more than a little bit coincidental that the very next driver to release that had significant AMD Link changes is the same driver that began having these GPU passthrough blank screen issues. The next observation lends some more credence to this.
  5. The current Radeon Pro 20.Q4 drivers do not have AMD Link functionality (anywhere that I could find anyway) and sure enough, they work without issue. I can’t be certain that it is the new AMD Link updates introduced in the 20.5.1 drivers and beyond that broke GPU passthrough, but so far it seems like a safe assumption to make.

Hardware/OS tested on:

  • Microsoft Windows Server 2016 Datacenter as the host using DDA for GPU passthrough to VMs.
  • ASrock Fatal1ty X399 Professional Gaming motherboard (BIOS version 3.80).
  • AMD 2990WX ThreadRipper 32 core CPU.
  • 128GB (2x 4x16GB kits) Corsair Vengeance 3000 DDR4 RAM (CMK64GX4M4D3000C16).
  • MSI brand AMD RX 5700 XT.
  • AOC AGON FreeSync gaming monitor (AG493UCX).
  • Guest VM is Windows 10 Pro 20H2.

Conclusions/Theory:

  1. Looks like the changes to the AMD Link code in the 20.5.1 and newer drivers has broken GPU passthrough on the consumer based drivers.
  2. The Pro series drivers do not appear to have AMD Link functionality and, as such, they appear to be working correctly.
  3. AMD Link isn’t necessary with great alternatives like Parsec around.
  4. If AMD does end up implementing the new AMD Link functionality into the Pro drivers, it very well might break GPU passthrough again.
  5. These are just my observations/theories based upon my own testing, research, and success with the Pro series drivers.
4 Likes

FYI, I posted this on r/VFIO & r/AMD about a week ago but it didn’t seem to get much traction and it sounds like at least a few of you good people have stumbled upon my post over there looking for answers. Posting it here as well as a quick PSA for something to try.

1 Like

Thanks for posting here as well :slight_smile:

1 Like

I had to figure the thing with the drivers out too: Updateing AMD driver leads to VM not starting!

Good to know, that the Pro drivers also work, I will keep that in mind if someone else asks.

Hey Guys,

since i replaced my motherboard my guest OS did not run any amd drivers :frowning: even the older one. i posted more information here. i’m super frustrated that my gpu passthrough is not working anymore :frowning:

my system:
OS: Manjaro Linux x86_64
Host: MS-7C02 1.0
Kernel: 5.9.11-3-MANJARO
Uptime: 26 mins
Packages: 2085 (pacman), 3 (snap)
Shell: bash 5.0.18
Resolution: 1920x1080, 1920x1080, 1920x1080
DE: Cinnamon
WM: Mutter (Muffin)
WM Theme: Mint-Y-Dark-Teal (Mint-Y-Dark)
Theme: Mint-Y-Dark-Teal [GTK2/3]
Icons: Papirus-Dark-Maia [GTK2/3]
Terminal: tilix
CPU: AMD Ryzen 5 2600X (12) @ 3.957GHz
GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT
GPU: NVIDIA GeForce RTX 2080 Rev. A
Memory: 4493MiB / 32036MiB

Sounds like you may need to go through your BIOS and re-enable all the IOMMU / SVM options, since you changed your motherboard, none of those settings would have persisted through the replacement.

that was the first thing i did in the bios but still not working :frowning:

Hey all, just to add here, if you switch to Q35 chipset, the newer drivers should not blackscreen your machine. You could also try to hide the fact that this is a virtual machine and/or specify a vendor id under hyperv features.

Hi there,

I’m having the same issues when trying to pass through my Ryzen 4750G iGPU to a W10 VM. It works fine (albeit at a low refresh rate) before installing AMD drivers, but as soon as I install them, I get a pixelated mess and/or black screen, and only the mouse cursor is responsive and visible. Unfortunately I cannot install the “Pro” drivers since they don’t support the iGPU in the Renoir APUs.

I made another post about it on here (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)?) but no real solutions have come up yet. I’ve also tried all the classic ways of hiding the fact that it’s a VM but to no avail.

So close yet so far!!