[SOLVED] iGPU passthrough with amd 7950x

Hello, in my homelab I have successfully passed through a 5600G and a 1050ti to two separate virtual machines on the same proxmox node, once I'm off work I'll post the configs here but in my case my iGPU did need the romfile or else I would boot into the VM and dmesg would complain about missing firmware. Both VMs are Debian 12
 
  • Like
Reactions: zimm
Hello, in my homelab I have successfully passed through a 5600G and a 1050ti to two separate virtual machines on the same proxmox node, once I'm off work I'll post the configs here but in my case my iGPU did need the romfile or else I would boot into the VM and dmesg would complain about missing firmware. Both VMs are Debian 12
That would be amazing. Would like to know more about your environment as well. What hardware are you running, what changes did you make to your BIOS (if any), did you create your own romfile, did you combine the audio in with the GPU romfile (if you created your own) to get around ACM limitations and IOMMU grouping? There is so much contradicting information out there I've just about given up trying to get it to work. Also Debian 12.
 
Hello so I got some information, took me a while because I've been sick just working on getting better.

Now the following information assumes you know how to regenerate initramfs, update grub and the usual things that you go through with PCIe Passthrough.

So my Grub file contains the following, i've read other posts on here that amd_iommu=on does nothing and that seems to be true as I don't even have it in my grub file and passthrough works fine

Code:
iommu=pt initcall_blacklist=sysfb_init pcie_acs_override=downstream,multifunction

I have this file /etc/modprobe.d/blacklist.conf

Code:
blacklist nouveau
blacklist nvidia*
blacklist amdgpu
blacklist radeon

In this file /etc/modules

Code:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

And in this file /etc/modprobe.d/vfio.conf

Code:
options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1
options vfio-pci ids=1002:1638,1002:1637,1022:15df,1022:1639,1022:15e3 disable_idle_d3=1 disable_vga=1

Now for the 1050ti it was easy just add options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1 and it passes through without a problem.
For the 5600G for it to even appear in lspci I had to boot proxmox while having a HDMI source plugged in, so I just have one of those 1080p/4k HDMI dummy dongles off amazon and that works out well.

I found I have to passthrough more than just the iGPU to make it work in a virtual machine as there are a fair few other modules part of the IOMMU group, see here the kernel modules with vfio-pci

Code:
0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c9)
        Subsystem: ASUSTeK Computer Inc. Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu
0b:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Subsystem: ASUSTeK Computer Inc. Renoir Radeon High Definition Audio Controller [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel
0b:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
        Subsystem: ASUSTeK Computer Inc. Family 17h (Models 10h-1fh) Platform Security Processor [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: ccp
0b:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
        Subsystem: ASUSTeK Computer Inc. Renoir/Cezanne USB 3.1 [1043:87e1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
0b:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
        Subsystem: ASUSTeK Computer Inc. Renoir/Cezanne USB 3.1 [1043:87e1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
0b:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3]
        Subsystem: ASUSTeK Computer Inc. Family 17h/19h/1ah HD Audio Controller [1043:87fb]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

Heres the 1050ti

Code:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)
        Subsystem: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:11bf]
        Kernel driver in use: vfio-pci
        Kernel modules: nvidiafb, nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1)
        Subsystem: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:11bf]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

Now with the 5600G I needed to dump the romfile so I found this guide https://github.com/isc30/ryzen-gpu-passthrough-proxmox.

Find the section called Create a vbios.c file in the host (proxmox) with the following contents: and expand it.

Make the vbios.c file on your proxmox host and paste the C code into there and save it.

compile the c file
Code:
gcc vbios.c -o vbios

then execute
Code:
./vbios
and it will create your integrated gpu vbios as a .bin file in my case it created vbios_1002_1638.bin

move it to /usr/share/kvm/vbios_1002_1638.bin

So now onto the Virtual Machine itself, before passing through the iGPU, I install a Desktop Environment, ensure it can autologin with the user profile and turn off power management so the VM never goes to sleep and never turns off the screen, ensure I can ssh into the machine and install Sunshine Server (I just followed the wiki for installation guide) for accessing the VM after the GPU has been passed through as well as Moonlight on my raspberry pi.

1752728097321.png

I pass through the RAW Device 0000:0b:00.0 which is 5600G.

My VM is 109, in this file /etc/pve/qemu-server/109.conf

Code:
hostpci0: 0000:0b:00.0,pcie=1,romfile=vbios_1002_1638.bin,x-vga=1

Add the romfile and save and exit.

1752728192957.png
This is how my debian 12 is configured as VM fully.

Now when you boot it this way you lose console access so I log into the server via SSH and install the graphics drivers and LACT and reboot.

When booted I connect to the VM via Moonlight and start the desktop

1752728545692.png

1752728557417.png

And finally on LACT I can see the GPU is recognised and in action

1752728586345.png
1752728593108.png
1752728598947.png

I hope this helps somewhat, so far I've only gotten the GPU to work but not the Audio yet.
 
Last edited:
  • Like
Reactions: zimm
Hello so I got some information, took me a while because I've been sick just working on getting better.

Now the following information assumes you know how to regenerate initramfs, update grub and the usual things that you go through with PCIe Passthrough.

So my Grub file contains the following, i've read other posts on here that amd_iommu=on does nothing and that seems to be true as I don't even have it in my grub file and passthrough works fine

Code:
iommu=pt initcall_blacklist=sysfb_init pcie_acs_override=downstream,multifunction

I have this file /etc/modprobe.d/blacklist.conf

Code:
blacklist nouveau
blacklist nvidia*
blacklist amdgpu
blacklist radeon

In this file /etc/modules

Code:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

And in this file /etc/modprobe.d/vfio.conf

Code:
options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1
options vfio-pci ids=1002:1638,1002:1637,1022:15df,1022:1639,1022:15e3 disable_idle_d3=1 disable_vga=1

Now for the 1050ti it was easy just add options vfio-pci ids=10de:1c82,10de:0fb9 disable_vga=1 and it passes through without a problem.
For the 5600G for it to even appear in lspci I had to boot proxmox while having a HDMI source plugged in, so I just have one of those 1080p/4k HDMI dummy dongles off amazon and that works out well.

I found I have to passthrough more than just the iGPU to make it work in a virtual machine as there are a fair few other modules part of the IOMMU group, see here the kernel modules with vfio-pci

Code:
0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c9)
        Subsystem: ASUSTeK Computer Inc. Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu
0b:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller [1002:1637]
        Subsystem: ASUSTeK Computer Inc. Renoir Radeon High Definition Audio Controller [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel
0b:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
        Subsystem: ASUSTeK Computer Inc. Family 17h (Models 10h-1fh) Platform Security Processor [1043:8809]
        Kernel driver in use: vfio-pci
        Kernel modules: ccp
0b:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
        Subsystem: ASUSTeK Computer Inc. Renoir/Cezanne USB 3.1 [1043:87e1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
0b:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1 [1022:1639]
        Subsystem: ASUSTeK Computer Inc. Renoir/Cezanne USB 3.1 [1043:87e1]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
0b:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3]
        Subsystem: ASUSTeK Computer Inc. Family 17h/19h/1ah HD Audio Controller [1043:87fb]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

Heres the 1050ti

Code:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)
        Subsystem: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:11bf]
        Kernel driver in use: vfio-pci
        Kernel modules: nvidiafb, nouveau
01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1)
        Subsystem: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:11bf]
        Kernel driver in use: vfio-pci
        Kernel modules: snd_hda_intel

Now with the 5600G I needed to dump the romfile so I found this guide https://github.com/isc30/ryzen-gpu-passthrough-proxmox.

Find the section called Create a vbios.c file in the host (proxmox) with the following contents: and expand it.

Make the vbios.c file on your proxmox host and paste the C code into there and save it.

compile the c file
Code:
gcc vbios.c -o vbios

then execute
Code:
./vbios
and it will create your integrated gpu vbios as a .bin file in my case it created vbios_1002_1638.bin

move it to /usr/share/kvm/vbios_1002_1638.bin

So now onto the Virtual Machine itself, before passing through the iGPU, I install a Desktop Environment, ensure it can autologin with the user profile and turn off power management so the VM never goes to sleep and never turns off the screen, ensure I can ssh into the machine and install Sunshine Server (I just followed the wiki for installation guide) for accessing the VM after the GPU has been passed through as well as Moonlight on my raspberry pi.

View attachment 88103

I pass through the RAW Device 0000:0b:00.0 which is 5600G.

My VM is 109, in this file /etc/pve/qemu-server/109.conf

Code:
hostpci0: 0000:0b:00.0,pcie=1,romfile=vbios_1002_1638.bin,x-vga=1

Add the romfile and save and exit.

View attachment 88104
This is how my debian 12 is configured as VM fully.

Now when you boot it this way you lose console access so I log into the server via SSH and install the graphics drivers and LACT and reboot.

When booted I connect to the VM via Moonlight and start the desktop

View attachment 88105

View attachment 88106

And finally on LACT I can see the GPU is recognised and in action

View attachment 88107
View attachment 88108
View attachment 88109

I hope this helps somewhat, so far I've only gotten the GPU to work but not the Audio yet.
 
Fantastic write up, thank you!

I've only tried passing the iGPU by itself and the iGPU and audio devices together, the two devices in your list with "AMD/ATI". When I checked IOMMU grouping, all six devices would be in separate groups. This could be a limitation of my motherboard which is an Asrock B650D4U-2L2T/BCM. Asrock just sent me a beta BIOS version that I hope to try this weekend.

You're config looks basically the same as mine with the exception of the romfile and the passing of the 6 devices, instead of just the iGPU and audio. For your audio not working, have you tried using the AMDGopDriver ( https://github.com/isc30/ryzen-gpu-passthrough-proxmox)? You can create a single bin with your dump and these drivers to passthrough.
 
I haven't even attempted Audio passthrough because all I use the VM is to view my security cameras that have no audio anyway, so for my purposes I don't need it, but I would assume that GopDriver would work if you followed those Github instructions.

The motherboard I use is an ASUS Prime B550M-K with the Bios version 3702, infact I only own ASUS motherboards and I've had great success in passing through PCI with that brand.