[SOLVED] iGPU passthrough with amd 7950x

PXMX1001

New Member
Nov 23, 2024
13
1
3
Hi,

I am trying to passthrough my igpu on my amd 7950x. The igpu will not passthrough and I keep getting the error in the picture below. The VM starts however I do not see the output on the monitor. Please let me know how I can fix this to passthrough my iGPU. Intel was so much easier. I also tried following this guide below:

Guide:
https://github.com/isc30/ryzen-7000-series-proxmox

Grub:
Code:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"
GRUB_CMDLINE_LINUX=""

/etc/modprobe.d/vfio.conf
Code:
options vfio-pci ids=1002:164e,1002:1640
softdep radeon pre: vfio-pci
softdep amdgpu pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci

Config:

Code:
args: -cpu 'host,-hypervisor,kvm=off'
balloon: 1024
bios: ovmf
boot: order=scsi0
cores: 5
cpu: x86-64-v2-AES
efidisk0: local-lvm:vm-101-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:6c:00.0,pcie=1,rombar=0,romfile=vbios_7950x.bin,x-vga=1
hostpci1: 0000:6c:00.1,pcie=1,rombar=0
machine: q35
memory: 14336
meta: creation-qemu=8.1.2,ctime=1705698968
name: alienware-server
net0: virtio=BC:24:11:27:CB:77,bridge=vmbr0,firewall=1
net1: virtio=BC:24:11:05:50:72,bridge=vmbr0,firewall=1,tag=30
numa: 0
onboot: 0
ostype: l26
scsi0: local-lvm:vm-101-disk-1,iothread=1,size=300G
scsi1: /dev/disk/by-id/ata-ST2000DM001-1ER164_Z4Z8GSSY,serial=Z4Z8GSSY,size=195>
scsi2: /dev/disk/by-id/ata-ST2000DM008-2FR102_ZFL4FDTZ,serial=DD5641988389A,siz>
scsihw: virtio-scsi-single
smbios1: uuid=c3ee898a-b875-41d1-9bd7-d10a96c65272
sockets: 1
usb0: host=5-5
usb1: host=5-4
vga: none

1732476182157.png
 
Last edited:
Adding this command to initramfs is what allowed me to passthrough my iGPU. If anyone knows why let me know lol. I will post my full configuration below to help someone in the future.


options vfio_iommu_type1 allow_unsafe_interrupts=1
 
Grub:

Code:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"
GRUB_CMDLINE_LINUX=""


/etc/modprobe.d/vfio.conf
***Adding the allow unsafe interrupts allowed me to passthrough the iGPU***

Code:
options vfio-pci ids=1002:164e,1002:1640
options vfio_iommu_type1 allow_unsafe_interrupts=1
softdep radeon pre: vfio-pci
softdep amdgpu pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci

Config:

Code:
balloon: 2048
bios: ovmf
boot: order=virtio0
cores: 8
cpu: host,hidden=1
efidisk0: local-lvm:vm-201-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:6c:00.0,pcie=1,romfile=vbios_7950x_2.bin
hostpci1: 0000:6c:00.1,pcie=1,romfile=AMDGopDriver.rom
machine: pc-q35-8.1
memory: 25600
meta: creation-qemu=8.1.2,ctime=1705801403
name: alienware-wingame
net0: e1000=BC:24:11:98:82:59,bridge=vmbr0,firewall=1,tag=40
numa: 0
ostype: win11
scsihw: virtio-scsi-single
smbios1: uuid=f305ddf0-7ffd-4217-a4e7-2f4b6e19bebc
sockets: 1
usb0: host=5-5
usb1: host=5-4
vga: none
virtio0: local-lvm:vm-201-disk-3,iothread=1,size=399480M

1732586654207.pngiGPU primary gpu, rom bar, and pcie express

1732586685919.png
Audio: Just pcie express
 
Last edited:
Next I have to figure out to keep the iGPU from turning off when the screen goes to sleep. It wont resume. Also it only allows me to send to one vm for each reboot of the server. It is also only working with a windows 11 virtual machine. It will freeze when booting ubuntu.

Fixes: (Not completed and requesting help)
1) keep the iGPU from turning off when the screen goes to sleep
2) It is also only working with a windows 11 virtual machine. It will freeze when booting ubuntu.
 
Next I have to figure out to keep the iGPU from turning off when the screen goes to sleep. It wont resume. Also it only allows me to send to one vm for each reboot of the server. It is also only working with a windows 11 virtual machine. It will freeze when booting ubuntu.

Fixes: (Not completed and requesting help)
1) keep the iGPU from turning off when the screen goes to sleep
2) It is also only working with a windows 11 virtual machine. It will freeze when booting ubuntu.
1--> I just disabled option to "sleep" on proxmox host so I prevent turning off igpu or make some weird behavior.
2--> I am still figuring out how... :(