[WORKING] Amd RX 9070xt support

Code:
root@tomiwebpro:~# lspci -nn | grep -i amd
02:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch [1002:1478] (rev 24)
03:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479] (rev 24)
only two pcie switches, which I think is not the vga device, how to resolve this? Many thanks!
What is the output of lspci -nnks 04:00? Have you tried running update-pciids to update the PCI(e) informational database?
 
What is the output of lspci -nnks 04:00? Have you tried running update-pciids to update the PCI(e) informational database?
After I ran update-pciids :
Code:
root@tomiwebpro:~# lspci -nnks 04:00
root@tomiwebpro:~# lspci -nnks 03:00
03:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479] (rev 24)
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch [1002:1479]
        Kernel driver in use: pcieport
root@tomiwebpro:~# lspci -nnks 02:00
02:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch [1002:1478] (rev 24)
        Subsystem: Sapphire Technology Limited Navi 10 XL Upstream Port of PCI Express Switch [1da2:1478]
        Kernel driver in use: pcieport
root@tomiwebpro:~#

There was no output for 04:00
 
Did you plug in the power cables to GPU? What is the PSU rating/capacity? Can you boot any other operating system (from DVD or USB) and does it show the GPU?
Yes I did plug in GPU power, PSU is a 1000W jump started only for the gpu, I'll check it for other systems tomorrow with another computer
 
Does it work properly in Windows with that computor?

I had a similar situation and the problem was that it was not recognized by BIOS.

The rx 9070 series requires a Bios update to be recognized, but my too old computor (x10srm-tf) did not have this.

It was not an OS or other problem, but a BIOS problem with the motherboard

I solved this problem by replacing the motherboard/CPU/memory.
 
Does it work properly in Windows with that computor?

I had a similar situation and the problem was that it was not recognized by BIOS.

The rx 9070 series requires a Bios update to be recognized, but my too old computor (x10srm-tf) did not have this.

It was not an OS or other problem, but a BIOS problem with the motherboard

I solved this problem by replacing the motherboard/CPU/memory.
That might be the case for me, but all the motherboard I have are x99 and h61 based, I hope there is still legacy support for older motherboards, I would have to check with my friend's computer 12100F then.
 
@kprinssu Thank you. No longer having issues when rebooting. The VM seems to crash (internal-error status in proxmox) when I run games though.
I have confirmed that when I start the game it stops with the same error.

internal-error

Intel Core Ultra 265k
Asrock Z890 Pro RS WiFi White
Hellhound Spectral White AMD Radeon RX 9070 XT 16GB GDDR6

rarely works fine.
The logs are shown attached.

Any advice would be appreciated.
 

Attachments

  • IMG_3067.jpeg
    IMG_3067.jpeg
    24.6 KB · Views: 6
  • IMG_3068.jpeg
    IMG_3068.jpeg
    493 KB · Views: 5
  • IMG_3065.jpeg
    IMG_3065.jpeg
    314.8 KB · Views: 5
Can you give this script a go? There are certain edge cases where the VM may shutdown (e.g. manually shutting the VM via a command within the VM) which causes the hook not to run. When the VM starts, the script belo, will always unbind the vfio kernel module and bind the amdgpu module.

Code:
#!/bin/bash

phase="$2"
if [ "$phase" == "pre-start" ]; then
     echo "vmGPU: Running pre-start hook"
     # Unbind gpu from vfio-pci
     sleep 5
     echo "0000:0f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null
     sleep 2
     echo "vmGPU: unbound vfio kernel module"

     # Bind amdgpu
     echo "0000:0f:00.0" > /sys/bus/pci/drivers/amdgpu/bind 2>/dev/null
     sleep 2

     echo "vmGPU: bound amdgpu kernel module"
elif [ "$phase" == "post-stop" ]; then
    echo "vmGPU: Running post-stop hook"
    # Unbind gpu from vfio-pci
    sleep 5
    echo "0000:0f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null
    sleep 2
    echo "vmGPU: unbound vfio kernel module"

    # Bind amdgpu
    echo "0000:0f:00.0" > /sys/bus/pci/drivers/amdgpu/bind 2>/dev/null
    sleep 2
    echo "vmGPU: bound amdgpu kernel module"
fi
I think I figured out my issue. Where would you add the bar resize line (echo 3 > /sys/bus/pci/devices/0000:0f:00.0/resource2_resize) in this script?
 
I think I figured out my issue. Where would you add the bar resize line (echo 3 > /sys/bus/pci/devices/0000:0f:00.0/resource2_resize) in this script?
In my experience this need to be done without any driver bound to the device. I (would) do it in the pre-start phase after unbinding any current driver (which might be vfio-pci but could also be the actual device driver).
 
@uzumo Disabling Resizable Bar and 4G decoding in the BIOS settings fixed my issue

Thank you

I may have solved this in another way.

I had foolishly gone with 6.14.

I had this problem with kernel 6.14, but when I pinned to kernel 6.11, the problem stopped earlier.

The rebar is still working with it enabled.

apt policy proxmox-kernel-6.11
apt update
apt install proxmox-kernel-6.11
proxmox-boot-tool kernel pin 6.11.11-2-pve
reboot
 

Attachments

  • IMG_3212.jpeg
    IMG_3212.jpeg
    322.1 KB · Views: 4
  • IMG_3213.jpeg
    IMG_3213.jpeg
    48.6 KB · Views: 4
Thank you

I may have solved this in another way.

I had foolishly gone with 6.14.

I had this problem with kernel 6.14, but when I pinned to kernel 6.11, the problem stopped earlier.

The rebar is still working with it enabled.

apt policy proxmox-kernel-6.11
apt update
apt install proxmox-kernel-6.11
proxmox-boot-tool kernel pin 6.11.11-2-pve
reboot
Thanks @uzumo , I'll give this a shot.
Can you also share the hookup script you're using for your VM?
 
Thanks @uzumo , I'll give this a shot.
Can you also share the hookup script you're using for your VM?
The scripts made by kprinssu are the best.

Can be used as is.

nano rx9070_reset.sh

code_language.shell:
#!/bin/bash

phase="$2"

echo "Phase is $phase"

if [ "$phase" == "pre-start" ]; then

    # Unbind gpu from amdgpu

    echo "0000:0f:00.0" > /sys/bus/pci/drivers/amdgpu/unbind 2>/dev/null

    sleep 2

    # Resize the GPU's BAR2 memory region (useful for PCI passthrough)

    echo 3 > /sys/bus/pci/devices/0000:0f:00.0/resource2_resize

    sleep 2

elif [ "$phase" == "post-stop" ]; then

    # Unbind gpu from vfio-pci

    sleep 5

    echo "0000:0f:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null

    sleep 2

    # Bind amdgpu

    echo "0000:0f:00.0" > /sys/bus/pci/drivers/amdgpu/bind 2>/dev/null

    sleep 2

fi

cd /var/lib/vz/
mkdir snippets
cd snippets
cp /root/rx9070_reset.sh ./
chmod +x rx9070_reset.sh
qm set <vmid> --hookscript local:snippets/rx9070_reset.sh

0000:0f:00.0 needs to be changed.
 
Last edited:
  • Like
Reactions: NoobSaidiop