AMD APU passthrough. Is it even possible?

Hi,

I aim to build a cheap and silent PC based on AMD’s gen2 Ryzen 4300G (or 4600G). I don’t want to have discrete graphics at all. Is it possible to passthrough Ryzen’s integrated graphics to a virtual machine?

1 Like

Not sure if that’s possible, but I know that Intel has GVT-g which works like SRIOV in that it divides up your igpu in multiple smaller GPUs and passes them to your VM. It’s really awesome

I know this is like the only reason besides QuickSync to go Intel… But it’s sth to consider

1 Like

Thanks.

Am I understand well, the only way to have gen2 Ryzen guaranteed to works with graphics passthrough is discrete graphics + expensive motherboard on X570 chipset? This really pushes me to an Intel-based PC which I don’t want for other reasons.

If passing the integrated GPU is possible I don’t know, have not read of anyone who tried it. But it might be considering they are also going over PCIe (just on chip) as far as I know.

If it isn’t possible then yea, discrete graphics (but can be cheap depending what you need), but expensive X570? No, why?

If you’re using an APU you can pass-through the first slot so the IOMMU groups don’t matter as much.
And in fact, running an APU on the more expensive boards is mostly pointless anyway since they tend to not even have a display output. You can do that with a cheap(-ish) B450 or B550, probably even one of the A-chipset boards.

Also depends what you want to do in the VM if you even need a GPU there.

I’m gonna say no. If you want a passthrough, you need something that isn’t used. even if you don’t have a monitor attached, the OS will still be outputting some sort of signal which uses the main gpu.

Just find a cheap used pci-e gpu for passthrough.

Unless you run headless of course and just want the GPU in the VM :slight_smile:

1 Like

Yeah you’re kind of right in the sense, that the kernel always trys to bind itself to the main GPU and makes a GPU passthrough hard.

But it is entirely possible to do so, I myself was using my RX5700 in my R1600 Server with GPU passthrough enabled. After disabling the GPU by using cmdline arguments it working great (or at least as great as Navi can work with the reset bug). The only problem was that I then wasn’t able to debug anything due to the fact that I don’t have any GPU to display the boot process to. But this can easily be remedied by either using USBtty and setting grub to display to that or just creating a backup boot entry that has the vfio stuff removed.

So tldr it works but it ain’t great

@modzilla - I have the same question as OP, and was wondering what your hypervisor setup was?

I ordered a M75q Tiny Gen2 from Lenovo for a great deal ($460 all-in), and it comes with the newer Ryzen “Renoir” 7 4750GE APU. I’d like to pass through its integrated GPU (Radeon RX Vega-based) to a Windows VM, ideally in Proxmox VE, although I may be flexible on hypervisor choice for the lab.

How did you go about disabling your only GPU in the kernel, and I imagine future kernel/hypervisor updates could revert the change?

Thanks!

You might be confusing my setup with something else. I used to pass through an external GPU (5700) to a VM with KVM + Qemu.

I don’t think passing through the iGPU is that straight forward. That’s why GVT-g and GVT-d exist. But if you’d like to try it nevertheless have a look at the passthrough post! The have articles about all the things you’ll need!

Updates won’t break anything, except when there are bugs in qemu KVM or the (vfio) PCI driver of course.

It might make more sense to pass the gpu through to a lxc container in Proxmox for example. That’ll at least definately work :wink:

@modzilla - Thanks for the reply! My mistake, I misunderstood the post. I was referring to passing through iGPU in a AMD Renoir APU to a Proxmox VM. Can you please refer me to the post you’re referring to?

I also checked the output of lspci on a 4750G APU system and it looks something like this (see below). What concerns me is how the iGPU VGA controller is on the same bus & device as some other CPU components, it seems. So I’d have to pass through the entire device which may also pass through audio (don’t care), USB controllers, and the encryption controller… hmm… I will also post this in the passthrough post you’re referring to once I can find it! :slight_smile:

06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev d1)
06:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1637]
06:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
06:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639]
06:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639]
06:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor [1022:15e2] (rev 01)
06:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3]

I do not know how important the bus ID is in this regard. What does the IOMMU identification script say?

#!/bin/bash
shopt -s nullglob
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
    echo "IOMMU Group ${g##*/}:"
    for d in $g/devices/*; do
        echo -e "\t$(lspci -nns ${d##*/})"
    done;
done;

@anon27075190 - thanks for the tip. I’ve attached my IOMMU groups below, but it looks like the iGPU is in the same group as several other integrated devices. I guess I can use the ACS override patch to force it into its own group?

IOMMU Group 0:
	00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
IOMMU Group 1:
	00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
	00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge [1022:1634]
	00:02.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge [1022:1634]
	01:00.0 Network controller [0280]: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] [8086:24fb] (rev 10)
	02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
IOMMU Group 2:
	00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge [1022:1632]
	00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635]
	00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus [1022:1635]
	03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir [1002:1636] (rev d8)
	03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1637]
	03:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
	03:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639]
	03:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 [1022:1639]
	03:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3]
	04:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 81)
IOMMU Group 3:
	00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 51)
	00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
IOMMU Group 4:
	00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0 [1022:1448]
	00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1 [1022:1449]
	00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2 [1022:144a]
	00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3 [1022:144b]
	00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4 [1022:144c]
	00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5 [1022:144d]
	00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6 [1022:144e]
	00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7 [1022:144f]

Indeed to further test this you certainly need the ACS override patch. Regardless of that, I still don’t know if it will work out.

@anon27075190 - Thanks. I got iGPU passthrough (with audio over HDMI) working on the 4750G “Renoir” APU in Proxmox VE (Windows 10 guest). I hope to make a guide, just thinking where’s the best place to publish it, as many users from different forums have had the same struggles as me (proxmox and unraid).
In any case, still working on getting it fine-tuned, as it seems to be limited to ~24-30hz refresh rate (based on visual estimates with naked eye), and the AMD Radeon graphics do show up in W10 Device Manager, but with the Code 43 message. So I feel like there’s something there still which needs to be worked out to get full hardware acceleration (and hopefully 60hz+ UI/video/gaming experience)

Technically yeah, but just install windows at that point, because in the long run you’re losing if not just doing a really long overcomplicated install.

So after installing AMD drivers, the Code 43 went away, but instead I got a pixelated mess on-screen and only the mouse cursor is visible & responsive.

I made another post about it here, and attached a photo, hopefully someone can help out:

1 Like

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.