[WORKING] Amd RX 9070xt support

Hiroi

Member
Oct 15, 2021
17
3
8
21
Hi, I know this is kind of a long shot. But does anyone know when support for the rx 9070xt would come? I did compile the 6.13 kernel and got the linux firmware but it can't be passed through.

This is pretty low priority I would imagine. But heads up would be appreciated.

Thank you!
 
  • Like
Reactions: Bigrob55
I actually followed those steps I did compile the latest kernel manually, and I did get the linux firmware files from git. There is no way to get mesa 25 working on proxmox right now, I did try to compile it from source but proxmox's versions of the tools required are too old, and you get stuck in dependency hell.
I still couldn't get the GPU to ge recognized.
 
I hadn't thought about installing the requirements on Proxmox itself, I went ahead and did all the firmware/mesa/etc on the VM that I was wanting to pass the card to. Proxmox does see the card, so I assumed I didn't need to do anything there, but maybe I'm wrong?

I'm on kernel 6.11 on Proxmox, for what it's worth with a regular 9070.
 
I hadn't thought about installing the requirements on Proxmox itself, I went ahead and did all the firmware/mesa/etc on the VM that I was wanting to pass the card to. Proxmox does see the card, so I assumed I didn't need to do anything there, but maybe I'm wrong?

I'm on kernel 6.11 on Proxmox, for what it's worth with a regular 9070.
Do you mean it worked passing through to a linux vm with all the firmware pre installed?
 
No, I haven't gotten it to pass-through yet. I was able to get the VM to boot though, with the GPU "passed through", I just got no video, but could SSH in etc.

I've been waiting to try and find a ROM file for my version of the 9070, but no luck yet. I might try doing the firmware/mesa stuff on Proxmox. Again, I just assumed those steps needed to be done on the endpoint VM rather than the host.
 
I think proxmox can't pass it through correctly since it can't detect it properly. Even though i assumed proxmox would just pass through the device.

People did get it to work in VMs using libvirt so i tend to think the problem is with proxmox here.
 
I found a way to use the GPU! It's not perfect, but it survives reboots and shutdowns of the VMs

Basically, I used this to unbind the gpu: https://forum.level1techs.com/t/vfio-pass-through-working-on-9070xt/227194.
NOTE: For this to work you need to remove amdgpu from /etc/modprobe.d/blacklist.conf and also remove it from /etc/modprobe.d/vfio.conf.
This will make proxmox use the amdgpu driver, which you can then correctly unbind and pass it through to a VM.

This works well if you need to reboot the VM, if you need it to work for another VM or after vm shutdown, use the following commands:

Bash:
#Unbind vfio driver:
echo "0000:2f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
#Bind the amdgpu driver:
echo "0000:2f:00.0" > /sys/bus/pci/drivers/amdgpu/bind
#Use the unbind script from the provided link

Don't forget to change the IDs for the PCI!

It's a bit janky, but it can be put into a script as a temporary workaround, I will update this when I will make it.
 
I found a way to use the GPU! It's not perfect, but it survives reboots and shutdowns of the VMs

Basically, I used this to unbind the gpu: https://forum.level1techs.com/t/vfio-pass-through-working-on-9070xt/227194.
NOTE: For this to work you need to remove amdgpu from /etc/modprobe.d/blacklist.conf and also remove it from /etc/modprobe.d/vfio.conf.
This will make proxmox use the amdgpu driver, which you can then correctly unbind and pass it through to a VM.

This works well if you need to reboot the VM, if you need it to work for another VM or after vm shutdown, use the following commands:

Bash:
#Unbind vfio driver:
echo "0000:2f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
#Bind the amdgpu driver:
echo "0000:2f:00.0" > /sys/bus/pci/drivers/amdgpu/bind
#Use the unbind script from the provided link

Don't forget to change the IDs for the PCI!

It's a bit janky, but it can be put into a script as a temporary workaround, I will update this when I will make it.

Holy shit, that's progress! Great find!

The video is coming through the DP on the GPU, but it's not recognizing the GPU? I haven't tested a game yet, trying a couple reboots first.

1741652097468.png


/edit
I've tested 3 reboots of the VM, each time running the `unbind` script and the VM boots normally! I'll probably look into adding that script as a hookscript to run before the VM starts and continue testing.

POE2 ran flawlessly at 90-100fps on a crowded screen. This is fantastic!
 
Last edited:
I have made the following script in order to make the GPU work well for every time I want to start my VMs. It will give an error because it can't reset the gpu, but you can ignore that since we are unbinding and binding it manually.
Bash:
#!/bin/bash

# Unbind the GPU from the vfio-pci driver (used for passthrough)
echo "0000:2f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null
sleep 2  # Wait to ensure the operation completes

# Bind the GPU back to the amdgpu driver for use by the host
echo "0000:2f:00.0" > /sys/bus/pci/drivers/amdgpu/bind 2>/dev/null
sleep 2  # Allow time for the driver to initialize

# Stop the display manager (GDM) to free up the GPU
systemctl stop gdm
sleep 2  # Pause to ensure GDM is fully stopped

# Unbind the GPU from the amdgpu driver before resizing resources
echo "0000:2f:00.0" > /sys/bus/pci/drivers/amdgpu/unbind
sleep 2  # Short wait to ensure the unbind operation completes

# Resize the GPU's BAR2 memory region (useful for PCI passthrough)
echo 3 > /sys/bus/pci/devices/0000:2f:00.0/resource2_resize
sleep 2  # Give the system time to apply the change

# Start the Proxmox virtual machine with ID 106
/usr/sbin/qm start 106
echo "VM Started!"  # Print a message confirming that the VM has started

All you need to do is change the VMID, this is for one of my VMs.
Since I start my VMs and PC remotely from my phone, this integrates pretty well with my setup. You might want to look into running the script at VM startup if it works better for you.

I will update the title to [WORKING] but I won't put this on Solved since it's basically a temporary workaround until the proxmox team implements this natively.
 
  • Like
Reactions: Degrowth
I went a slightly different route, as I haven't messed with the BAR2 stuff yet.

This is all I have in my script to run before starting the VM.
Code:
#!/bin/bash

echo "0000:03:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
sleep 2
echo "0000:03:00.0" > /sys/bus/pci/drivers/amdgpu/bind
sleep 2

Appreciate the help on this, I'm stoked to have my 9070 (non-xt :( ) working!
 
First post on this forum, I just wanted to say I am so excited that you all are paving the way and making the path a little less bumpy for Linux noobs such as myself. (last week I did not even know what "grep", "grub", "lspci" or "nano" were...) :D

Hopefully it is ok to piggy back on this post to ask if was there a single guide that you followed to get your RX 9070 up and running?
Thus far, I have followed a patchwork of instructions which have lead me to where I currently can see my RX 9070 XT in the "lspci" list.

Shown as:
Code:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 48 [RX 9070/9070 XT] [1002:7550] (rev c0)

Though when I spin up my Win10 VM via NoVNC and look at the Windows Device manager I do not see another video other than the on I have setup with VirtIO GPU.

Let me know your thoughts.

Here is a snippet to help in explaining what I have setup as a current VM:

1741723221915.png