I followed the instructions on Kurio0’s GitHub, didn’t see the note in here to insert the ffs before PciHostBridge entry. Instead I inserted it at the very end of the volume. Do you think it matters? Am going to go ahead and try flashing again after inserting it there.
I’m using a 3080 (VBIOS is up to date and supports ReBar)
Gigabyte Z170x Gaming 7, 4G Decoding is on, 6700k cpu
After flashing, what is the best possible way to determine that ReBar is now supported, before I even run ReBarState and set any values?
I placed the driver before PciHostBridge and flashed my bios. I see the following in HWINFO, but whatever I put into ReBarState.exe doesn’t seem to do anything. I don’t get a popup in HWINFO saying anything has changed. I saw something about leaving CSM Support enabled? Open to trying some things if anyone here has ideas.
Thanks for your quick response. It turns out ReBarState.exe does work, it just requires a reboot on my system for the changes to show. I am able to see the Resizable BAR1 Supported Size increasing. I am able to increase it up on 1GB on my setup. 2GB or more leads to a black screen on post, requiring a reset of the BIOS by clearing the CMOS.
I didn’t actually look at HWINFO before flashing my BIOS, so I’m not actually sure if doing that changed anything. Would it have said no Resizable BAR Support if I didn’t insert the module?
I just tried testing to see if I could notice any performance improvement, but it’s hard to be certain. Elden ring has a pretty noticeable 10% increase if you force ReBar on for the game on an Nvidia card. To do so you need to use Nvidia Profile Inspector, which I did on this system now. The thing is, NVCP still reports Resizable Bar: No. So if the Nvidia driver can’t detect that it’s available, it makes me think it will continue use the standard 256MB BAR Size, even though I am able to successfully increase it. I wonder if that would be something worth looking into, surely we need the Nvidia driver to recognize the modifications we have made? Not sure if the AMD driver picks it up on your end
Same problem on my system but with 4GB and several others it relates to the BIOS not being able to handle Large BARs I have no idea how to fix it. The hardware itself is capable of doing it
Would it have said no Resizable BAR Support if I didn’t insert the module?
It shows as long as your GPU supports even if BIOS doesn’t.
The thing is, NVCP still reports Resizable Bar: No
My guess is that Nvidia needs the full BAR size to work. AMD doesn’t though and shows it enabled and performance improvements with 2GB BAR
It needs to be figured out how to patch the UEFI PCI driver to work with Large BARs (above 2GB) which I have no idea how to do. Also make sure 4G decode is enabled because that cause it to not work too.
Interesting, I think you may be right about that Nvidia limitation with it looking for a specific size, or a large enough size for it to say Yes. I pulled up GPU-Z which lists everything as good, and also sees the 1GB BAR Size I was able to set
Well it would def be awesome if we could figure out how to increase the size in the BIOS if the hardware supports it. On the other hand Nvidia users can probably make use of this now, if only it worked with smaller maximum BAR sizes (according to your idea)
Precision X1 says it’s on too, only NVCP says No.
I’m pretty confident it works. Just that with a 1GB BAR Size, the increase isn’t as impressive
I think Z170 board BIOS has a feature where they force the GPU BARs to be in the 32-bit range which makes anything above 1GB not work. Are you sure CSM is off ?
Yep, confident CSM is indeed off. I could try turning it back on, but I understand that would likely have a negative effect if anything. I did a bit more testing and am confident ReBar is indeed working even though NVCP says “No” but the other apps like GPU-Z and Precision X1 say “Yes”. On Elden Ring, I used nvidia profile inspector to either enable/disable ReBar support for the game and compared at the same location. When enabling ReBar support for the game, GPU usage increases to 99% instead of 98%, power usage on the GPU incrases by about 20w, and the FPS is increased by around 4% in my test scene. I have another machine with native support for ReBar and a similar GPU (3090 instead of a 3080), so when I get a chance I’ll do the same comparison and see if a platform with native support and a larger BAR size shows a larger increase than 4% with the 1GB bar size. In the past I had measured about 8% to 9% from turning ReBar on but that was in a different scene.
I’m really glad to see that it all does indeed work. The question remaining now is how much more performance is being left on the table due to the 1GB Bar size limit we reached on my Z170X Gaming 7 mobo
I tried placing the DXE driver both at the end of the volume and above PciHostBridge. I also applied the PciBus patch for Haswell(with MMTool replace method). The motherboard is an Asus Z97i-plus. However, re-bar is still not available. ReBarState can’t find the variable and is not able to write any value.
@valip
The ReBarDxe driver does not create a variable. You have to run ReBarState enter a value to create the variable, reboot and it should work.
I think these Z97 boards have a problem writing variables. I’ve seen 3 different people say Z97 board can’t write variables. I saw one person with an X99 board have the same issue from having Windows installed in legacy mode with CSM on but I don’t think that’s the issue you have.
If you can create an issue on GitHub would be better to help solve this issue. What error code does ReBarState say ?
I get
Failed to write ReBarState UEFI variable
GetLastError: 5
I tried linux and it succeeds. However, after reboot rebar is still disabled.
Here’s what I see on Linux(I get the same thing after reboot)
ReBarState variable doesn't exist / Disabled. Enter a value to create it
...
Enter ReBarState Value
0: Disabled
Above 0: Maximum BAR size set to 2^x MB
32: Unlimited BAR size
9
Writing value of 9 / 512 MB to ReBarState
Successfully wrote ReBarState UEFI variable
If I run again before reboot
Enter ReBarState Value
0: Disabled
Above 0: Maximum BAR size set to 2^x MB
32: Unlimited BAR size
9
Writing value of 9 / 512 MB to ReBarState
Failed to remove old variable
Failed to write ReBarState UEFI variable
No, it prompts again that the variable doesn’t exist. BTW, how can I verify that the module loads? If I disable 4G decode and CSM, I’m still able to boot fine. I though this module will cause black screen if these are not configured properly. Or is this only after rebar is enabled?
He takes the NvramSmi module from an older working BIOS and uses it on the new one. The problem is that NvramSmi has a variable whitelist in it. Maybe I will add a patch to the UEFIPatch later so it’s easier if it works for you
I’ll try the NvramSmi replacement approach. If I can’t find an old enough bios for the same board, do you think a module from a different board(also Asus Z97) would work?
Replacing NvramSmi with an older version does work. I can enable rebar. I played with different sizes and found that it works up to 1GB. At 2GB it gets stuck at post, at 4GB and 8GB I can boot into Windows but I can only get output from the integrated GPU. The discrete GPU is detected by HWInfo(not by GPU-Z though ) and does show the configured bar size.
@valip
Can you show a screenshot of Device Manager showing the Resources tab of it (with 8GB BAR) ? I think BIOS isn’t assigning the GPU a BAR address. Did you try the other UEFIPatches ?
Also send a screenshot of Device Manager View → Resources By Type showing Large Memory
Hi, i have successfully enabled ReBAR on my X79-UP4 motherboard, but sadly i can`t go past 1gb size, entering more just results in a black screen. Is there a way to get more, also is there a way to enable Above 4G decode on this board, or check if its even on?
CSM is Disabled in bios i think. (Under Windows 8 features, CSM module is set to run “Never”)