[SOLVED] GPU Passthrough - not working - RX580 and strange Screen behaviour

k1ngstire1

Member
Sep 5, 2019
7
1
8
32
Hello,

i did a lot of research over hours and hours and tried to fix it, but i can not get it working.

I had Proxmox 6.2 before and did a full clean install to 7.4-1. Before my AMD RX580 did work without any problems in VMs.

So after i installed fresh and tried to passthrough i had no screen at all.
After turning CSM off in the BIOS, i thought i had the solution. I got a Screen output after starting the VM, hell yes!

But i dont get further than the booting screen. The screen "hangs" at this point:

err.jpg

Just about a minute later, the screen looks like this:

err2.jpg

It is not really freezing, i can tap on my Keyboard (Enter Key) and the screen changes a bit, like more "abstract lines". The Keyboard is not passthroughed to the VM.


I have to mention that the Windows VM does start up. I can remote connect to it, but ill get Error 43 at the Device Manager for my RX580.

Also i have to mention that i tried a different Card (AMD RX5700XT, same behaviour)


This is what i blacklisted:

echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf echo "blacklist amdgpu" >> /etc/modprobe.d/blacklist.conf

this is in my grub file:

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"

my args in the .conf file

args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off' cpu: host,hidden=1,flags=+pcid

I found this in my syslog:

While booting up:

May 1 19:55:09 pve kernel: [ 1761.248547] vfio-pci 0000:12:00.0: BAR 0: can't reserve [mem 0xd0000000-0xdfffffff 64bit pref]

Also after a few minutes of running VM:

May 1 19:52:10 pve QEMU[3654]: kvm: vfio_region_write(0000:12:00.0:region0+0x1dc118, 0xff0a0a0aff0b0b0b,8) failed: Device or resource busy


Any ideas? I just want to have it running again, so bad. :D
 
May 1 19:55:09 pve kernel: [ 1761.248547] vfio-pci 0000:12:00.0: BAR 0: can't reserve [mem 0xd0000000-0xdfffffff 64bit pref]
Looks like your need this work-around because nofb nomodeset video=vesafb:off,efifb:off don't work anymore (and are even invalid). Search for "BAR can't reserve mem" for similar threads.

EDIT: If you are using vendor-reset (which can reset the RX580 properly for passthrough) then you need to activate it since kernel 5.15 (which is a kernel feature not a bug).
 
Last edited:
  • Like
Reactions: k1ngstire1
Looks like your need this work-around because nofb nomodeset video=vesafb:off,efifb:off don't work anymore (and are even invalid). Search for "BAR can't reserve mem" for similar threads.

EDIT: If you are using vendor-reset (which can reset the RX580 properly for passthrough) then you need to activate it since kernel 5.15 (which is a kernel feature not a bug).
Thank you so much!

I was searching the hell out of google and this forum but i i could not find this.
The workaround you linked did not work for me but the previous post did the trick.

Finally i can go to bed.

Thanks again
 
That's weird. Double check with cat /proc/cmdline if initcall_blacklist=sysfb_init is active.
Seems like its active. This is the output:

BOOT_IMAGE=/boot/vmlinuz-5.15.107-1-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on initcall_blacklist=sysfb_init

Edit: Sorry, my fault. I only needed to install proper Drivers.
 
Last edited:
Seems like its active. This is the output:

BOOT_IMAGE=/boot/vmlinuz-5.15.107-1-pve root=/dev/mapper/pve-root ro quiet amd_iommu=on initcall_blacklist=sysfb_init
And you're still getting errors like " BAR 0: can't reserve [mem 0xd0000000-0xdfffffff 64bit pref]"? I can't explain it.
Alternatively, upgrade to the latest optional kernel, install the pve-headers of the same version. install vendor-reset and you don't need any work-arounds (and also don't blacklist amdgpu and don't early bind the GPU to vfio-pci and don't forget to activate vendor-reset for this GPU).
 
And you're still getting errors like " BAR 0: can't reserve [mem 0xd0000000-0xdfffffff 64bit pref]"? I can't explain it.
Alternatively, upgrade to the latest optional kernel, install the pve-headers of the same version. install vendor-reset and you don't need any work-arounds (and also don't blacklist amdgpu and don't early bind the GPU to vfio-pci and don't forget to activate vendor-reset for this GPU).
Sorry, was my fault. I needed to install proper drivers.
With the other Workaround i had screen before installing drivers, but that's absolutely fine now.

I don't need the vendor-reset for my Card (RX580). But for RX5700XT (Navi) i need it.
Thank you for your help!
 
  • Like
Reactions: leesteken

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!