[SOLVED] NEED HELP to setup gpu passthrough/iommu/AMD 6500XT for gaming/f@h INTEL Alder Lake

Alright, I'm guessing you have 16GB of RAM total?

Here's a list of things to do:
  • Shutdown your VM.
  • Change VM settings to 12GB of RAM and 1 socket, 12 cores. (Just giving a little more to Proxmox.)
  • Then edit your /etc/pve/qemu-server/100.conf file.
    • set balloon: 0
    • set cpu: host
    • set hostpci0: 0000:03:00,pcie=1,x-vga=1
    • delete the args line entirely
The run these commands:
Code:
update-grub
rm -rf /etc/modprobe.d/iommu_unsafe_interrupts.conf
rm -rf /etc/modprobe.d/kvm.conf
update-initramfs -u
shutdown -r now
Done, it's still lagging/freezing each few sec
 
Alright, I'm guessing you have 16GB of RAM total?

Here's a list of things to do:
  • Shutdown your VM.
  • Change VM settings to 12GB of RAM and 1 socket, 12 cores. (Just giving a little more to Proxmox.)
  • Then edit your /etc/pve/qemu-server/100.conf file.
    • set balloon: 0
    • set cpu: host
    • set hostpci0: 0000:03:00,pcie=1,x-vga=1
    • delete the args line entirely
The run these commands:
Code:
update-grub
rm -rf /etc/modprobe.d/iommu_unsafe_interrupts.conf
rm -rf /etc/modprobe.d/kvm.conf
update-initramfs -u
shutdown -r now
Still code 43 same as before
 
Try this:
  • shutdown VM
  • run echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
  • run echo 1 > /sys/bus/pci/rescan
  • startup VM
If that doesn't work, dump the text from the following commands:
  • dmesg | tail -100
  • tail -100 /var/log/syslog
1655333814061.png

It works but GPU is disabled in Folding@Home I got issues with the AMD software shown here....
 
Try this:
  • shutdown VM
  • run echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
  • run echo 1 > /sys/bus/pci/rescan
  • startup VM
If that doesn't work, dump the text from the following commands:
  • dmesg | tail -100
  • tail -100 /var/log/syslog

Screenshot (110).pngScreenshot (111).pngScreenshot (112).png
 
It works but GPU is disabled in Folding@Home I got issues with the AMD software shown here....
Oooh, not sure about that one... Sounds like an uninstall/re-install thing for the drivers.

If the reset fixed the error 43, you'll need to get that command configured to run when you launch your VM.

Best approach is a hookscript:
Code:
#!/bin/bash

if [ $2 == "pre-start" ]
then
    echo "gpu-hookscript: Resetting GPU for Virtual Machine $1"
    echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
    echo 1 > /sys/bus/pci/rescan
fi

Use these commands to deploy it:
Code:
#create snippets folder
mkdir /var/lib/vz/snippets

#create script with content above
nano /var/lib/vz/snippets/gpu-hookscript.sh

#make it executable
chmod +x /var/lib/vz/snippets/gpu-hookscript.sh

#apply script to VM
qm set 100 --hookscript local:snippets/gpu-hookscript.sh
 
It works but GPU is disabled in Folding@Home I got issues with the AMD software shown here....
Actually, I think this might be because you're using both the virtual GPU and physical GPU simultaneously.

snip.png
When I check the box for "Primary GPU" like shown above, it will disable the virtual GPU.

Do you have a monitor hooked up?

NOTE: Enable RDP just so you have a way to connect if needed.
 
Actually, I think this might be because you're using both the virtual GPU and physical GPU simultaneously.

View attachment 38034
When I check the box for "Primary GPU" like shown above, it will disable the virtual GPU.

Do you have a monitor hooked up?

NOTE: Enable RDP just so you have a way to connect if needed.
Yes monitor is hooked up
 
Actually, I think this might be because you're using both the virtual GPU and physical GPU simultaneously.
View attachment 38034
When I check the box for "Primary GPU" like shown above, it will disable the virtual GPU.
NOTE: Enable RDP just so you have a way to connect if needed.
HOW? it's already like that to begin with Primary GPU is on
 
Did you get that hookscript configured? It should show an entry in the Task to start your VM:
View attachment 38037
NO????
swtpm_setup: Not overwriting existing state file.
kvm: -device vfio-pci,host=0000:03:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on: Failed to mmap 0000:03:00.0 BAR 0. Performance may be slow
TASK OK
 
NO????
swtpm_setup: Not overwriting existing state file.
kvm: -device vfio-pci,host=0000:03:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on: Failed to mmap 0000:03:00.0 BAR 0. Performance may be slow
TASK OK
Hookscript:
Code:
#!/bin/bash

if [ $2 == "pre-start" ]
then
    echo "gpu-hookscript: Resetting GPU for Virtual Machine $1"
    echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
    echo 1 > /sys/bus/pci/rescan
fi

Commands to Deploy:
Code:
#create snippets folder
mkdir /var/lib/vz/snippets

#create script with content above
nano /var/lib/vz/snippets/gpu-hookscript.sh

#make it executable
chmod +x /var/lib/vz/snippets/gpu-hookscript.sh

#apply script to VM
qm set 100 --hookscript local:snippets/gpu-hookscript.sh
 
  • Like
Reactions: Redicat
Hookscript:
Code:
#!/bin/bash

if [ $2 == "pre-start" ]
then
    echo "gpu-hookscript: Resetting GPU for Virtual Machine $1"
    echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
    echo 1 > /sys/bus/pci/rescan
fi

Commands to Deploy:
Code:
#create snippets folder
mkdir /var/lib/vz/snippets

#create script with content above
nano /var/lib/vz/snippets/gpu-hookscript.sh

#make it executable
chmod +x /var/lib/vz/snippets/gpu-hookscript.sh

#apply script to VM
qm set 100 --hookscript local:snippets/gpu-hookscript.sh
OMG! IT WORKS! AMD software opens and iam Folding!Schermafbeelding 2022-06-16 032759.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!