terminatorul / NvStrapsReBar

Resizable BAR for Turring GTX 1600 / RTX 2000 GPUs
MIT License
556 stars 12 forks source link

not working #14

Closed AliZf1d closed 9 months ago

AliZf1d commented 9 months ago

rebar doesn't get enabled and when put any number beside 65,64, I get efi error

image

image

UEFIPatch says this:

image

MMTool doesn't work for me. when I try to insert it says "file size exceeds the volume size"

terminatorul commented 9 months ago

Can you show your GPU-Z .txt report file, and your modified LocalPciGpu.h header ?

AliZf1d commented 9 months ago

Can you show your GPU-Z .txt report file, and your modified LocalPciGpu.h header ?

Could you help me farther? how can I get those files

terminatorul commented 9 months ago

Download CPU-Z from cpuid.com here: https://www.cpuid.com/softwares/cpu-z.html

Openc CPU-Z, go to the about page, and click Save Report (.TXT) button: image

Reply back here and attach the resulting file to the message.

For the other file LocalPciGpu.h, you should find it at this location if you followed the build instructions:

"%UserProfile%\edk2\NvStrapsReBar\ReBarDxe\include\LocalPciGpu.h"

AliZf1d commented 9 months ago

LocalPciGpu.h: https://www.mediafire.com/file/gcssifcb5f32glu/LocalPciGPU.h/file Report: ALIZPC.txt

terminatorul commented 9 months ago

Notice the github project page says you should modify the values in LocalPciGpu.h file, to match your computer hardware.

So please manually change the your LocalPciGpu.h to replace the following lines with the values you see here.

You will have to re-build the project by following the build instructions, and re-flash your motherboard again, with the new NvStrapsReBar.ffs driver. Also re-enable Above 4G Decoding and disable CSM in UEFI setup, after flashing the motherboard.

#define TARGET_GPU_PCI_VENDOR_ID        0x10DEu
#define TARGET_GPU_PCI_DEVICE_ID        0x1F06u

#define TARGET_GPU_PCI_BUS              0x29u
#define TARGET_GPU_PCI_DEVICE           0x00u
#define TARGET_GPU_PCI_FUNCTION         0x00u

// PCIe config register offset 0x10
#define TARGET_GPU_BAR0_ADDRESS         UINT32_C(0xFB00'0000)               // Should fall within memory range mapped by the bridge

#define TARGET_GPU_BAR1_SIZE_SELECTOR   _8G                                 // Desired size for GPU BAR1, should cover the VRAM size

// Secondary bus of the bridge must match the GPU bus
// Check the output form CPU-Z .txt report

#define TARGET_BRIDGE_PCI_VENDOR_ID     0x1022u
#define TARGET_BRIDGE_PCI_DEVICE_ID     0x1483u

#define TARGET_BRIDGE_PCI_BUS           0x00u
#define TARGET_BRIDGE_PCI_DEVICE        0x03u
#define TARGET_BRIDGE_PCI_FUNCTION      0x01u

// PCIe config register offset 0x20
#define TARGET_BRIDGE_MEM_BASE_LIMIT  UINT32_C(0xFC00'FB00)                 // Should cover the GPU BAR0

// PCIe config register offset 0x1C
#define TARGET_BRIDGE_IO_BASE_LIMIT   0xE1E1u
AliZf1d commented 9 months ago

sorry for asking a lot, could you teach me how to do these parts? I have no idea ho to do the first one and I can't find Secondary bus equal to the GPU bus, all the numbers are different!(I'm totally a noob)

AliZf1d commented 9 months ago

I can only find offset 0F which is 15 not 16

terminatorul commented 9 months ago

Video tutorial here, many thanks to @UnidentifiedTag for it: https://www.youtube.com/watch?v=ldnC18u8FI0

But that part is already done by me, and I sent you the resulting values in LocalPciGpu.h header (see above)

AliZf1d commented 9 months ago

Thanks for your time and effort it worked. Do I need all the apps that I installed for building images and etc?

UnidentifiedTag commented 9 months ago

No you can delete the apps but keep the executable (.exe) you made, because if you cmos reset it’s the only way to turn on rebar again. also keep NVIDIA Profile Inspector as you’ll need that to apply rebar to you’re programs. everything else can go…

AliZf1d commented 9 months ago

Another thing I forgot to ask, I clean reinstalled my gpu driver but it still wouldn't show rebar enabled in Nvidia control panel, but everywhere else it says it's enabled

UnidentifiedTag commented 9 months ago

We would appreciate you running nvidia-smi -q -d memory and sharing the output from the console/terminal with us, along with including CPU: Motherboard model: Motherboard chipset: Graphics card model: GPU chipset: GPU PCI VendorID:DeviceID (check GPU-Z): GPU PCI subsystem IDs (check GPU-Z): VRAM size: New BAR size (GPU-Z): New BAR size (nvidia-smi): NVIDIA driver ver:

Along with you’re Cupid and gpuz screen shots so we can expand our database of known working systems

@terminatorul will assistant you with NVIDIA control panel

AliZf1d commented 9 months ago

image image image image image

UnidentifiedTag commented 9 months ago

Congratulations and thank you for sharing the screenshots, looks to be working to me, please close the case unless something is wrong?

for a test I would try 3DMark PCI Express feature test, you run the test with rebar disabled, either by the executable (.exe) or Nvidia profile inspector and then enable it in both, you should see a noticeable difference in score with it on. I believe nvidia control panel will be buggy, so by testing you will know for sure, with games you might only see 3fps difference but with 3d mark pci express feature test you will see a large difference in numbers so you get a concrete answer while a game might lead you guessing.

terminatorul commented 9 months ago

@AliZf1d NVIDIA Control Panel does not show ReBAR for this card, sorry. Because NVIDIA only supports ReBAR for RTX 3000 line of GPUs, and newer.

NvStrapsReBar is an unofficial UEFI mod, that does not modify the Control Panel from NVIDIA

AliZf1d commented 9 months ago

Hi I tried the 3d mark test you mentioned but it didn't have a huge difference just 3-4%, Does changing the number in NvStrapsReBar.exe make a difference?

edit: I tried 0x0000000060000000 value for rBAR size limt in nvidiaProfileInspector and it got a lot better! what numbers can I put here beside these :

  1. 0x000000000C800000 (Returnal, Diablo 4)
  2. 0x0000000060000000 (Deathloop)
  3. 0x0000000040000000 (Red Dead Redemption 2)
  4. 0x0000000012C00000 (The Riftbreaker)
UnidentifiedTag commented 9 months ago

You can edit the numbers manually by pressing on them in Nvidia profile inspector and change the numbers, they are just pre sets, you should set the same rebar size you set by the executable (.exe)

@terminatorul recommends you set each game manually, I find that the global setting works. try both. lots of different things to try.

Please share the numbers you got from 3d mark. The before and after and I’ll let you know if it’s expected or not, you should be able to share the url of you’re results from 3d marks website, saying it’s 3% difference is meaningless as what am I basing that on? Single digits or multiple digits long numbers?

AliZf1d commented 9 months ago

how the number works? for example I put 65 in "NvStrapsReBar.exe". what should I put in NvidiaProfileInspector?

3DMark PCI Express feature test ReBar off:

ReBar on (0x0000000060000000 (Deathloop)) :

I tested ReBar on Fortnite it worked better with: 0x000000000C800000 (Returnal, Diablo 4)

terminatorul commented 9 months ago

In my short tests, game titles tend to peak (reach best performance) with an rBAR size in Profile Inspector of 1.5 GiB (in hexadecimal), and this is what NVIDIA puts in their profiles by default.

But not all games do that, there enough games that benefit from larger BARs, usually close to the maximum BAR size of the GPU.

If you want to run a PCI bandwidth comparison, like you did above, make sure you disable ReBAR using NvStrapsReBar.exe (so not only in the Profile Inspector), to start a fair comparison.

AliZf1d commented 9 months ago

Could you teach me how to convert the numbers for nvidia inspector? for example 1.5gb that you mentioned

UnidentifiedTag commented 9 months ago

how the number works? for example I put 65 in "NvStrapsReBar.exe". what should I put in NvidiaProfileInspector?

3DMark PCI Express feature test ReBar off:

  • Bandwidth: 13.18 GB/s
  • best fps: 15.18
  • worst fps: 12.75

ReBar on (0x0000000060000000 (Deathloop)) :

  • Bandwidth: 14.72 GB/s
  • best fps: 17.43
  • worst fps: 14.78

I tested ReBar on Fortnite it worked better with: 0x000000000C800000 (Returnal, Diablo 4)

These are good gains, if you were overclocking this would be like hitting the silicon lottery, what you call small gains are actually massive! You are benefiting from this project, rebar is working correctly please mark the case as resolved

AliZf1d commented 9 months ago

These are good gains, if you were overclocking this would be like hitting the silicon lottery, what you call small gains are actually massive! You are benefiting from this project, rebar is working correctly please mark the case as resolved

Yeah that was my bad, I mentioned it in edit of my comment, I changed the rBAR size limt in nvidiaProfileInspector and it got a lot better. for example "0x0000000060000000 (Deathloop)" this value is the best one for me in 3dmark. and could you teach me how to convert the numbers for nvidia inspector? for example 1.5gb to put in rBAR size limt section

terminatorul commented 9 months ago

Does changing the number in NvStrapsReBar.exe make a difference?

No, it shouldn't, as long as you got the expected BAR size of 8 GiB

edit: I tried 0x0000000060000000 value for rBAR size limt in nvidiaProfileInspector and it got a lot better! what numbers can I put here ... ?

that is the BAR size you want the game to see (from the NVIDIA driver), written in bytes and converted to hexadecimal.

1.5 GiB means 1024 1024 1024 * 3 / 2.

You can use Windows Calculator (select programmer mode) to convert numbers to hexadecimal:

image

AliZf1d commented 9 months ago

Thank you so much