This is a copy of the rather popular ReBarUEFI DXE driver. ReBarUEFI enables Resizable BAR for older motherboards and chipsets without ReBAR support from the manufacturer. NvStrapsReBar was created to test Resizable BAR support for GPUs from the RTX 2000 (and GTX 1600, Turing architecture) line.

Apparently for the GTX 1000 cards (Pascal architecture) the Windows driver resets the computer during boot if the BAR size has been changed, so GTX 1000 cards still can not enable ReBAR. The Linux driver does not crash, but does not pick up the new BAR size either.

Do I need to flash a new UEFI image on the motherboard, to enable ReBAR on the GPU?

Yes, this is how it works for Turing GPUs (GTX 1600 / RTX 2000). (some ideas to get it working without UEFI modding have circulated, but may not be technically possible and nothing is implemented.)

It's ususally the video BIOS (vBIOS) that should enable ReBAR, but the vBIOS is digitally signed (NVIDIA vBIOS is also encrypted) and can not be modified by modders and end-users (is locked-down). The motherboard UEFI image can also be signed or have integrity checks, but in general it is thankfully not as locked down, and users and UEFI modders often still have a way to modify it.

For older boards without ReBAR, adding ReBAR functionality depends on the Above 4G Decoding option in your UEFI setup, which must be turned on in advance, and CSM must be disabled.

Usage

Download latest release, or build the project using the build instructions. This should produce two files:

  • NvStrapsReBar.ffs UEFI DXE driver
  • NvStrapsReBar.exe Windows executable

After download or build you need to go through the following steps:

  • Update the motherbord UEFI image to add the new NvStrapsReBar.ffs driver (see below)
  • Enable ReBAR in UEFI Setup if the motherboard supports it. Otherwise enable "Above 4G Decoding" and disable CSM
  • Run NvStrapsReBar.exe as Administrator to enable the new BAR size, by following the text-mode menus. If you have a recent motherboard, you only need to input E to Enable ReBAR for Turing GPUs, then input S to save the new driver configuration to EFI variable. For older motherboards without ReBAR, you also need to input P and set BAR size on the PCI side (motherboard side).
  • Reboot after saving the menu options.
  • For older motherboards without ReBAR, if you want to load default UEFI settings again, or disable Above 4G Decoding / enable CSM, you need to disable ReBAR first in NvStrapsReBar.exe. Or you can manually set back the current year in UEFI Setup.
  • Same issue if you make hardware changes like adding or changing a GPU: you have to disable ReBAR first. The reason is NvStrapsReBar depends on the GPU BAR0 address to enable ReBAR, and system firmware changes the allocated address for BAR0 when hardware is changed or settings in UEFI Setup are changed.

Updating UEFI image

Download the latest release of NvStrapsReBar, or build the UEFI DXE driver and the Windows executable using the instructions on the building page.

The resulting NvStrapsReBar.ffs file needs to be included in the motherboard UEFI image (downloaded from the montherboard manufacturer), and the resulting image should be flashed onto the motherboard as if it were a new UEFI version for that board. See the original project ReBarUEFI for the instructions to update motherboard UEFI. Replace "ReBarUEFI.ffs" with "NvStrapsReBar.ffs" where appropriate.

For all the details and instructions on working with the UEFI image, and patching it if necessary (for older motherboards and chipsets).

Enable ReBAR and choose BAR size

After flashing the motherboard with the new UEFI image, you need to enable ReBAR in UEFI Setup. For older motherboards without ReBAR, enable "Above 4G Decoding" and disable CSM. Then you need to run NvStrapsReBar.exe as Administrator.

For older motherboard without ReBAR support, enablging ReBAR depends on Above 4G Decoding. So if you accidentaly turn it off later and can not POST, you need to clear CMOS. Remember to disconnect from wall power before you clear CMOS (bad things happened to my motherboard otherwise). Users report the Clear CMOS button present on some motherboards may still keep the current date and time for some boards. The current date has to be reset to recover the board. So if needed, you should short the Clear CMOS pin headers (with a screwdriver that is metallic, and the metal is not painted / coated), or by removing the battery for 1 to 5 minutes. Another way is to move the GPU to a different PCI slot, or replace it with a different model, if you have an extra. If you can enter UEFI Setup, you can manually set back the year to a value before 2024, reboot, and restore the year after.

NvStrapsReBar.exe prompts you with a small text-based menu. You can configure 2 value for the BAR size with this tool:

  • GPU-side BAR size
  • PCI BAR size (for older motherboards without ReBAR)

Newer boards can configure PCI BAR size, so you only need to set the GPU-side value for the BAR size. If not, you should try and experiment with both of them, as needed.