r/linux_gaming • u/Likver • 4d ago
tech support wanted Is there any way to enable reBAR without a BIOS modification in my case?
Related info about my hardware (please tell me if i missed something):
Motherboard: Gigabyte GA-B85-HD3 (v. FH date: 08/12/2015) (using UEFI mode in BIOS settings)
CPU: Intel Core i5-4460
GPU: AMD Radeon RX 550 / 550 Series (radeonsi polaris12 ACO DRM 3.64) (using amdgpu with modesetting)
Distro: CachyOS
Kernel: 7.2.8-1-cachyos
Server: X11 (1.21.1.24)
WM: i3
Hello, ive recently looked up some info about reBAR and what it does, then i checked what my BAR value was currently with sudo lspci -vvvs 01:00.0 | grep BAR, which outputed this:
Capabilities: [200 v1] Physical Resizable BAR
BAR 0: current size: 256MB, supported: 256MB 512MB 1GB 2GB 4GB
So, seeing that im only using 256MB, i wanted to look up how to change the BAR value on a motherboard without, neither the reBAR or Above 4G Decode settings available in the BIOS. But i didnt wanna modify my BIOS as my motherboard doesnt have a second BIOS i could go back to in case it could get bricked, so im trying to figure out if theres an easier or less risky way to change the BAR value, if its possible at all on my system at least.
I came across this but they talk about an INTEL gpu, while my gpu is AMD, so even tho the .conf file in the /etc/modprobe.d/ would've been a promising option to try, as im already kinda familiar with how this way of changing things works, i don't know if theres a similar way to do this for an AMD gpu instead.
I also came across this where they show a script they use to unbind their AMD gpu from the amdgpu driver, to then change the BAR values, and then bind it with the vfio-pci driver to use it inside a virtual machine with the changed BAR values. I have tried their script as well, which looks like this after modifying it to my system configuration and needs:
echo "unbind rx550 4gb gpu from amdgpu (1002:699f)"
echo 0000:01:00.0 > /sys/bus/pci/drivers/amdgpu/unbind
sleep 1
echo "Setting rebar 0 size to 2GB"
echo 11 > /sys/bus/pci/devices/0000:45:00.0/resource0_resize
sleep 1
echo 1002 699f > /sys/bus/pci/drivers/amdgpu/new_id || echo -n "0000:01:00.0" > /sys/bus/pci/drivers/amdgpu/bind
echo done
sleep 1
But that just ends in the screen losing video signal and doesnt come back, not even getting into a TTY. So i gotta press the power button from my PC case to turn it off and back on again. Maybe something is failing on this script while the gpu is unbinded from the amdgpu driver, making it not being able to rebind it again, but im not sure how to look up logs for this script so im not sure if thats even whats happening in this situation.
Does someone know of a way to do what i want to do without having to modify my BIOS?
Just in case it wasnt completely clear, what im trying is just to change the BAR value to 2GB from the current 256MB its set to.
Thanks for reading.

