Performance for Free: Unlocking Resizable Bar for unsupported AMD GPUs (Polaris, VEGA, Radeon VII)

Discussion in 'Videocards - AMD Radeon Drivers Section' started by Romulus_ut3, Oct 21, 2022.

  1. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    AMD decided to introduce the ability to utilize Resizable Bar (if you're on the intel platform) or Smart Access Memory aka SAM (if you're on an AMD platform) for their RDNA lineup of graphics card. Initially, only the RX 6000 series of cards were supported, which was later extended to RX 5000 series of cards. While their older range of graphics card like the Radeon VII, VEGA or Polaris didn't support this feature, at least not in official capacity.

    As with the nature of a community full of enthusiasts, people figured out how to get this feature working on officially unsupported graphics cards from AMD via registry tweaks.

    Some Common Misconceptions

    A lot of people seem to have all sorts of misconceptions when it comes to this feature, especially when using it on unsupported AMD GPUs. I have seen some absolutely bizarre claims, ranging from:
    • SAM aka Smart Access Memory (which is essentially the same thing as Resizable Bar on intel platforms, SAM being a pure marketing label from AMD, just like intel markets SMT as Hyperthreading, thank you 0xCats <3) having "magical(!?) under the hood properties" which makes SAM better than Resizable Bar (yes, your guesses are as good as mine with this one) because AMD's marketing slides said so, aka the "All AMD Advantage"
      upload_2022-10-21_13-20-43.png
    • REBAR/SAM having no performance effect or even having negative performance scaling when used with unsupported AMD graphics cards (the negative performance scaling is true in some instances even for supported cards too, so...)
    • Quoting he said she said driver modder said (and I am very certain said modder didn't say such a thing) that SAM requires a minimum of 8GB of VRAM to activate (!?)
    And various other BS claims with no merit to back them up whatsoever.

    The purpose of this thread is to dispel myths and provide you with directions on how to make Resizable Bar or SAM available on AMD Graphics card that do not officially support it and clarify when and where you can benefit from this and providing you with the options to do this safely, especially those of you who do not wish to install modded drivers. And to top it all, you're going to get some free performance!

    Requirements

    • A System capable of enabling Resizable Bar,
      (If you're on an intel system that doesn't officially support REBAR, not to worry, there is a guide in the making to get this working on those old Ivy Bridge, Haswell, etc. platforms so that they can make use of this too)
    • The latest AMD GPU drivers,
    • A Polaris/VEGA/Radeon VII Graphics card.
    The Workaround

    It's a very simple fix, basically, AMD's Driver Control Panel changes the values of some registry keys if you have an AMD Graphics card that is capable of utilizing Resizable Bar. But for unsupported Graphics cards, you're going to need to use a "Legacy" setting for you to get the option to toggle it on and off under the performance Tab.

    To enable Resizable Bar on an unsupported AMD GPU, use this registry file:

    REBAR Legacy On.reg ~ pixeldrain

    If you do not trust a random registry file from an unknown user on the internet, that's okay, here's the code for it so you can verify and create your own registry file to enable this tweak:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
    "KMD_EnableReBarForLegacyASIC"=dword:00000001
    "KMD_RebarControlMode"=dword:00000001
    "KMD_RebarControlSupport"=dword:00000001
    

    Simply copy and paste this into a notepad, save the file as a .reg file, open/add it to your current registry and you're set.

    Once you've done this, simply restarting your PC (in theory, restarting the driver should work too?!) you should see the Resizable Bar/Smart Access Memory option being available and enabled on your unsupported Graphics Card, just like this:

    upload_2022-10-21_14-8-10.png

    And to disable/revert the changes, use this registry file:

    REBAR Off.reg ~ pixeldrain

    Here's the code for the registry file above so you can verify and create your own version of the registry file to switch REBAR OFF:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
    "KMD_EnableReBarForLegacyASIC"=-
    "KMD_RebarControlMode"=dword:00000000
    "KMD_RebarControlSupport"=dword:00000000
    

    Performance: What to expect?

    Enabling this option won't magically turn your Polaris, VEGA or Radeon VII GPU as good as their newer counterparts, however, Resizable Bar/SAM will help you in games where you're CPU bound. Here's an example:

    Game Title: Cyberpunk 2077

    Settings used:

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]


    The footage you see was captured using FSR 2.1 mod, with the preset set to "Quality" but you can get gains even when using native resolution. One thing that I noted is that using ReLive to capture footage while ReBar is on causes a performance hit, which doesn't seem to happen with ReBar set to off. But that's probably due to the GPU being more taxed while ReBar is enabled and has no processing power to spare for the additional video encoding workload. When not capturing gameplay using ReLive, the performance figures from having Rebar On is actually slightly higher (51~52 FPS) at this very exact spot.

    Here are some native resolution comparisons:

    Resizable Bar On:
    [​IMG]

    Resizable Bar Off:

    [​IMG]
    Not all games will show gains from having this enabled on these GPUs, in fact there are games where you won't see any gains at all, or you can come across negative scaling too, and a lot will depend on your system's specs. If you've a really fast CPU and an older GPU, chances are you're already GPU bound in most newer titles, and therefore you may not see a lot of gains.

    But those of you who are using the likes of the RX 400/500, VEGA or the Radeon VII range of cards on older CPUs like Ivy Bridge, Haswell, or Ryzen Zen1/Zen2 can benefit from this.

    You're essentially gaining free performance with this registry tweak, and if you do come across some sort of stability issue, you can simply disable it. There's no harm in trying this out.

    Credits:

    • The Amernime Modded driver author(s)/team for directing me towards the registry. I couldn't have gotten the Legacy mode working without them.
    • @Kuri0 for helping me enable Resizable Bar on my potato home rig with his brilliant REBAR DXE solution.
    • And some random naysayers on various discord servers/tech forums, who served as the motivation for creating this thread.

    I'll update this thread with more benchmarks/numbers and of course, your feedback will be very much appreciated. Thank you and have a nice day.
     
    Last edited: Oct 23, 2022
  2. srdjan1995

    srdjan1995 Master Guru

    Messages:
    218
    Likes Received:
    47
    GPU:
    ASUS Dual RX 6650XT
    Do we need a B450 or newer MB for AMD? 'Cos it does not seem to be working on my asrock ab350 pro mb with r5 3600 and rx 580.
     
  3. opusss

    opusss Guest

    Messages:
    4
    Likes Received:
    0
    GPU:
    270x
    do it support apus?
     
  4. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    It worked for someone who's using an A320 and R5 3400G... so in theory, it should work for you too. Make sure that you have the following in your UEFI set to the correct values:
    • Above 4G Decoding should be enabled
    • CSM disabled
    • And Resizable Bar option should be enabled
    Then check with GPU-Z to see if it shows the following:

    [​IMG]

    Ignore the "Graphics Driver Support" and "GPU Hardware Support" and just see if the rest appears like it does in this image. If that's the case, all you've to do is use the registry keys provided to enable REBAR as described above in the opening post.

    Yes, it works on APUs, but you'll still need a dedicated GPU for this. It makes no sense to enable this on the integrated VEGA GPUs as they don't have any VRAM of their own.
     
    Last edited: Oct 21, 2022
    HD64G and srdjan1995 like this.

  5. mylipho15

    mylipho15 Ancient Guru

    Messages:
    1,638
    Likes Received:
    1,501
    GPU:
    RX 580
    Legacy ASIC SAM on Polaris gpu only works with 8gb of vram, like rx 470/570 and rx 480/580, other polaris card less than 8gb of vram cannot work.
     
    HD64G and Romulus_ut3 like this.
  6. t0bimaru

    t0bimaru Member

    Messages:
    15
    Likes Received:
    16
    GPU:
    RTX 2070 8GB 115W
    Is this soon to be possible for RTX2XXX series on Intel? I'm currently sitting with this...

    Screenshot 2022-10-22 133840.png
     
  7. user1

    user1 Ancient Guru

    Messages:
    2,746
    Likes Received:
    1,279
    GPU:
    Mi25/IGP
    just a heads up, on the linux side polaris doesn't support full vram bar sizes in hardware afaik, There was/is a patch in the works to get partial bar support (increasing the default bar size from 256mb to whatever the vbios reports) last time I checked but I don't know if its been merged. So be advised that it may not work properly on those cards yet if its not implemented on the windows side of things
     
  8. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    [​IMG]

    [​IMG]

    Full 8GB memory of the RX 580 available on Linux on an Ivy Bridge CPU, whereas on Windows, without using a modified motherboard BIOS, you can't have Resizable Bar working on a 3rd gen intel CPU/platform (which is limited to only 2GB right now). So..I am not sure what the message is?
     
    Last edited: Oct 23, 2022
    Deleted member 282649 likes this.
  9. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    Unfortunately, Resizable Bar for pre RTX 3000 series is up to nvidia. They have to implement it at a firmware (VBIOS) level, and their VBIOS modding is very much locked, so.. not much hope there.
     
    t0bimaru likes this.
  10. user1

    user1 Ancient Guru

    Messages:
    2,746
    Likes Received:
    1,279
    GPU:
    Mi25/IGP
    very well could mean that the patch was not merged. since that would be the default behaviour of the original rebar support added to linux,

    also afaik ivy bridge does physically support the greater than 4gb mmio address space (above 4g decoding) and resizeable bar, just depends on whether the bios supports it or not.
     

  11. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    Hah, this is quite odd. I was able to confirm this thanks to some testing from a couple of user/enthusiast reports too... yet another artificial limitation, because I can use Resizable Bar on a 4GB card on intel systems just fine.
     
  12. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    Yeah, this is an artificial limitation, one we are able to bypass somewhat.
     
  13. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    [​IMG]

    We were able to confirm that SAM does work on 4GB Polaris cards after all. A huge thanks to 0xCats for confirming this.
     
  14. srdjan1995

    srdjan1995 Master Guru

    Messages:
    218
    Likes Received:
    47
    GPU:
    ASUS Dual RX 6650XT
    It does enable it now, but my PC goes insane... Everything breaks basically. Can it be because I am on an Insider Build of Win 11? It's build 25227.
     
  15. mylipho15

    mylipho15 Ancient Guru

    Messages:
    1,638
    Likes Received:
    1,501
    GPU:
    RX 580
    Yeah, using RebarUEFI workaround with/or custom vbios flash fixed that. But if you using Legacy ASIC without that, it simply not works. Tested on RX 460/560, and RX 470/570 with only 4GB of vram
     
    Last edited: Oct 23, 2022

  16. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    No, this worked on a stock Motherboard BIOS with stock VBIOS. It was a clean windows installation, and besides AMD's latest 22.10.2 drivers, the only tweaks that were applied were the registry keys. As you can see, RX 470 4GB is working just fine, no glitches, no stutters, no freezes. This is from an entirely different system, with an entirely different video card, I don't have access to any AMD systems right now.

    Curi0's solution is for enabling REBAR on systems like old intel ones that doesn't support REBAR at a motherboard level due to artificial limitations. However, that solution isn't required for getting 4GB cards to work with SAM.

    Some hardware combinations (and motherboard manufacturers) have twitchy BIOS/UEFI support, which can cause funky behavior when Resizable Bar is enabled. In cases like these, there's very little you can do, except for updating the motherboard BIOS (which may or may not be a good idea depending on your platform/BIOS update situation) so it maybe best to let go. But you can experiment a bit with a clean install of Windows (has to be GPT/UEFI of course) on a stable build to see if the issues go away.

    A clean installation of the OS helped a non-working case to a perfectly working case, as described in just the reply above you. So.. it is worth a shot. If you have a spare storage that you can test your OS on, that'd be great.
     
    Last edited: Oct 23, 2022
    srdjan1995 likes this.
  17. mylipho15

    mylipho15 Ancient Guru

    Messages:
    1,638
    Likes Received:
    1,501
    GPU:
    RX 580
    As i said before, It depends. Not all 4GB polaris is lucky, My Sapphire RX 580 4GB with B550 Chipset can't work by just enabling Legacy Asic Mode, resulting missing access to any Graphics API like DirectX, OpenGL, and Vulkan which make GPU unusable. Tried Rebar UEFI still don't work, tried reflashing using another vbios also still don't work. Only previous card i've using "PowerColor RX 580 8GB" tricked Legacy ASIC works fine.

    Already activated all rebar feature, CSM disabled
     
  18. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    I guess that's just plain unlucky on your part, some motherboard BIOSes seem to be a bit finicky when it comes to Resizable Bar support. Some have reported mouse becoming laggy, etc. but for most people, it works just fine. I'll be getting more results soon, hopefully we can figure something out.

    But the 4GB Polaris card you see worked on 100% unaltered BIOS (both motherboard and the VBIOS) and all it took was a clean windows installation and the registry tweaks.
     
  19. Zabotrian

    Zabotrian Member

    Messages:
    15
    Likes Received:
    6
    GPU:
    Asus Strix Vega64
    I don't know why but that RebarUefi hack doesn't work for me (I have skylake based CPU). Rebar setting not showing in bios neither in SCEWIN. Nevertheless good finding.
     
  20. passenger

    passenger Master Guru

    Messages:
    486
    Likes Received:
    95
    GPU:
    Sapphire RX580 8GB
    With MSI B450 Tomahawk Max & Sapphire RX580 8GB Pulse this Rebar hack doesn't work.
     

Share This Page