Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nonkronk/b275627a274d461003e07674e2321521 to your computer and use it in GitHub Desktop.
Save nonkronk/b275627a274d461003e07674e2321521 to your computer and use it in GitHub Desktop.
Enable AMD RX 6600XT Resizable Bar on Unraid 6.12

Enable AMD RX 6600XT Resizable Bar on Unraid 6.12

  • Add to UserScripts:

    # Change the PCI address and GPU ID accordingly (Unraid GUI -> Tools -> System Devices)
    echo -n "0000:0d:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
    echo 13 > /sys/bus/pci/devices/0000\:0d\:00.0/resource0_resize
    echo 3 > /sys/bus/pci/devices/0000\:0d\:00.0/resource2_resize
    echo -n "1002 73ff" > /sys/bus/pci/drivers/vfio-pci/new_id || echo -n "0000:0d:00.0" > /sys/bus/pci/drivers/vfio-pci/bind
  • Change the top line of XML from the following to the VM's XML:

    <domain type='kvm'>

    to:

    <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  • Add qemu argument (after the </device> line, before the </domain> line):

        <qemu:commandline>
            <qemu:arg value='-fw_cfg'/>
            <qemu:arg value='opt/ovmf/X-PciMmio64Mb,string=65536'/>
        </qemu:commandline>
  • Reboot and turn on these settings on BIOS:

    Above 4G Decoding: Enabled
    Resizable BAR: Enabled
    
  • Check whether the feature is enabled

    lspci -vvvs "0d:00.0" | grep BAR

    it should output:

            Capabilities: [200 v1] Physical Resizable BAR
                BAR 0: current size: 8GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB
                BAR 2: current size: 8MB, supported: 2MB 4MB 8MB 16MB 32MB 64MB 128MB 256MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment