ReBAR Support

@Iwan_Timmer thank you for the very detailed explainer!

I guess my only remaining question is: how to do that exactly? How to run an “EFI shell”? Google is not very helpful…

@Kieran_Levin since ReBAR is apparently supported, can we have the BIOS option in the next update?

AFAIK that’s a big feature for eGPU users.

The thing I don’t understand is … if it’s by default on auto, does that not mean it should work?

Maybe we’re looking for a kernel parameter which forces ReBAR for Linux?

Sorry, I’m new to eGPUs and ReBAR, so this may be a stupid question.

@Iwan_Timmer After you set that value did GPU-Z show “Resizable BAR enabled in BIOS” as “Yes”? I did it with a slightly different combination of software but ultimately I changed the value to 1 and GPU-Z still shows “Resizable BAR enabled in BIOS” as “No”

1 Like

If I try to open the 12th gen 3.06 firmware.cap, it says Invalid UEFI volume. Anything else I need?

Also, if the default is ‘Auto’… then why is it not smart enough to know that that should mean enabled :wink:

@WolfgangBlub I used this to extract the part of the bios file with the rebar option: Releases · LongSoft/UEFITool · GitHub

Then I used this to convert it into human readable text files: Releases · LongSoft/IFRExtractor-RS · GitHub

Then I searched each text file for rebar and found the settings.

This is what i found in the 12th 3.06 bios:
0xE2E45: OneOf Prompt: “PCIE Resizable BAR Support”, Help: “Enable/Disable PCIE Resizable BAR Support”, QuestionFlags: 0x10, QuestionId: 0x7CA, VarStoreId: 0x2, VarOffset: 0x42B, Flags: 0x10, Size: 8, Min: 0x0, Max: 0x2, Step: 0x0 { 05 91 5D 14 5E 14 CA 07 02 00 2B 04 10 10 00 02 00 }
0xE2E56: OneOfOption Option: “Auto” Value: 2, Default, MfgDefault { 09 07 90 13 30 00 02 }
0xE2E5D: OneOfOption Option: “Enabled” Value: 1 { 09 07 91 13 00 00 01 }
0xE2E64: OneOfOption Option: “Disabled” Value: 0 { 09 07 92 13 00 00 00 }

In addition to what is in this thread I also used this post on Reddit: https://www.reddit.com/r/eGPU/comments/wx5g0f/my_adventure_in_the_attempt_of_enabling_rebar_on/

The person who posted that has the same result as me though, the option is set to enabled in the bios now but still says it is not in CPU-Z, I don’t know enough about how it works to have any idea why.

I just realized this with my Razer Core X and AMD RX 6600:

lspci -vvv gives me:

        Capabilities: [200 v1] Physical Resizable BAR
                BAR 0: current size: 8GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB
                BAR 2: current size: 2MB, supported: 2MB 4MB 8MB 16MB 32MB 64MB 128MB 256MB

Notice how the BAR 0 is maximum, but the BAR 2 is minimum. I’ll investigate.

@Anachron is this before or after setting the ReBAR option in the BIOS?

That’s before,- I don’t really trust the modification just yet.

Is this expected?

Hi, with a Razer Core X and a Radeon 570 (MSI RX 570 ARMOR 8G OC), I’ve got this result :

Capabilities: [200 v1] Physical Resizable BAR
	BAR 0: current size: 8GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB

No BAR 2 for me.

The BIOS is not patched.

OS : Ubuntu 22.10, mainline kernel 6.2.2

Just to add another data point: I’m on an 11th gen mainboard on bios 3.10 with an Intel ARC A770 GPU.

I applied the patch mentioned by @Lee_Holbrook (by running setup_var_cv SaSetup 0x431 1 0x01 ) and successfully activated ReBAR support on Manjaro Unstable with Linux 6.2.6. This gave a noticeable fps improvement and finally make Blender on a 4k monitor responsive.

lspci -vvv reports:

         Capabilities: [420 v1] Physical Resizable BAR
                BAR 2: current size: 16GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB

I have been running it like this 5 days without any new instability. This method also seems to survive reboots.

1 Like

After the BIOS patch (intel 12th gen):

	Capabilities: [200 v1] Physical Resizable BAR
		BAR 0: current size: 32GB, supported: 256MB 512MB 1GB 2GB 4GB 8GB 16GB 32GB
		BAR 2: current size: 256MB, supported: 2MB 4MB 8MB 16MB 32MB 64MB 128MB 256MB

Update: ReBar is enabled as per GPU-Z

@Jean-Marc_Le_Roux thanks for the update!

What was it before? Was Bar 2 2MB?

I am not even sure yet what this Bar is used for.

Not sure. I just know it was disabled on Windows.

OK so GPU-Z says the resizable BAR is enabled:

image

but “Resizable BAR enabled in BIOS” says “No”:

1 Like

Okay, figured it out:

BAR 0 means available space when ReBAR is on … and BAR 2 when ReBAR is off
So when ReBAR is not enabled, the CPU only gets access to a limited VRAM portion of the GPU.

Okay interesting, the tool’s BLOB release files work, but when building from source it can’t open the file… sigh
Now, why is this not available in the BIOS settings? Given how far back for older boards some vendors are making this available this makes me very sad.
Also, coreboot? :frowning:

1 Like

Is this BIOS variable flip/patch doable on 13th gen boards? I just got mine and I’m looking into enabling rebar as well.

I have exactly the same experience with my ARC A750 eGPU and an 11th Gen Framework… I jumped through the hoops to get that tool running (did nobody mention that you’ve got to get a UEFI Shell up somehow, too - and learn to use it (hint: it’s like DOS - FS0: is the USB stick, cd to the path, run it like a program, etc)? haha). Admittedly I didn’t get a “Before”, but in the After, it’s got a half-opinion - says it’s disabled in BIOS, but enabled in the specs.

Maybe it’s just confused by Thunderbolt?

BTW, the ARC A750 worked wonderfully (Satisfactory in DX12 at least locked at 60fps - the ARC is full of quirks and in DX11 it was struggling at 20fps, and Vulkan was a corrupt garbage fire) even before ReBAR tweak was applied.

2 Likes

@Tristan_Charpentier

Hi Tristan, regarding your post about using the A770 on an 11th Gen Framework; may I ask…

  1. What eGPU enclosure are you using?
  2. Have you tried gaming on Manjaro? What is the performance like?