Boot macOS with OC 0.7.5 and resizable BAR enabled

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
Since OC 0.7.5 final release should be arriving later today a short guide how to have resizable BAR enabled with macOS.

Shortly about resizable BAR. Each PCIe device has a "window" which the CPU can access the devices memory at once. The default is 256 MB, since VRAM has grown from Megabytes to Gigabytes since PCIe has been introduced, this Window has gotten small and makes it inefficient for todays GPUs. This is where resizable BAR comes in, which has been a feature in PCIe for years, but was largely ignored until AMD announced Smart Access Memory. With resizableBAR, the OS can negotiate a bigger window to access the full VRAM at once. But since macOS does not support that, it could not be enabled when booting macOS.

OC 0.7.5 now has a quirk to fix the BAR for macOS only (ResizeAppleGpuBars) and for other OS (ResizeGpuBars). To leave it to the OS -1 can be set on both, which is what we do for ResizeGpuBars since Windows/Linux can handle it. For MacOS on the other hand we can set ResizeAppleGpuBars to 8 (2 power 8 = 256MB) which is what macOS works best with (when rBAR is disabled). macOS can actually supports a BAR up to 1 GB (ResizeAppleGpuBars = 10), but for many this breaks sleep.
For macOS it's recommended to set ResizeAppleGpuBars = 0, 8 would usually work but apparently can cause high GPU memory usage, 9 or 10 can break sleep without any real performance gain.

TLDR:
  1. Update to OC 0.7.5
  2. Enable resizable BAR in BIOS
  3. Set ResizeAppleGpuBars = 0
  4. Set ResizeGpuBars = -1
  5. Enjoy SAM on Windows :)
(As usual, test this config with a USB stick first).
 
Last edited:

misterrm

New member
Joined
Oct 27, 2021
Messages
28
Hello,

Are there any new fixes in 0.7.5 release? I wonder if we could try Monterey on MSI x570 motherboards or the issue is not fixed yet.
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
That issue has not much to do with OpenCore, and I don't think they can/will do something about that.
 

RyzeCooker

Donator
Donator
Joined
May 3, 2020
Messages
245
Does anyone know why there currently are no DEBUG and RELEASE versions of 0.7.5 available? :unsure:
 
Last edited:

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
It usually takes a little time between the tag being published and the artifacts becoming available.

Edit But 4 hours are quite unusual, maybe problems with the build system?
 
Last edited:

DaddyB

New member
Joined
May 10, 2021
Messages
16
Since OC 0.7.5 final release should be arriving later today a short guide how to have resizable BAR enabled with macOS.

Shortly about resizable BAR. Each PCIe device has a "window" which the CPU can access the devices memory at once. The default is 256 MB, since VRAM has grown from Megabytes to Gigabytes since PCIe has been introduced, this Window has gotten small and makes it inefficient for todays GPUs. This is where resizable BAR comes in, which has been a feature in PCIe for years, but was largely ignored until AMD announced Smart Access Memory. With resizableBAR, the OS can negotiate a bigger window to access the full VRAM at once. But since macOS does not support that, it could not be enabled when booting macOS.

OC 0.7.5 now has a quirk to fix the BAR for macOS only (ResizeAppleGpuBars) and for other OS (ResizeGpuBars). To leave it to the OS -1 can be set on both, which is what we do for ResizeGpuBars since Windows/Linux can handle it. For MacOS on the other hand we can set ResizeAppleGpuBars to 8 (2 power 8 = 256MB) which is what macOS works best with (when rBAR is disabled). macOS can actually supports a BAR up to 1 GB (ResizeAppleGpuBars = 10), but for many this breaks sleep.

TLDR:
  1. Update to OC 0.7.5
  2. Enable resizable BAR in BIOS
  3. Set ResizeAppleGpuBars = 8
  4. Set ResizeGpuBars = -1
  5. Enjoy SAM on Windows :)
(As usual, test this config with a USB stick first).
Thanks for this! It's been quite a while since I upgraded my own config - I've been too reliant on AG since I found his incredible work. Is there an easy way to copy 0.7.4 config to 0.7.5 ?
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
Check the Differences.pdf and add the new fields manually. And Please don't do full quotes, just makes it harder to read the thread.
 

atanvarno

Donator
Donator
Joined
May 2, 2020
Messages
141
Is there an easy way to copy 0.7.4 config to 0.7.5 ?
I usually use any kind of merge tool that can visually display differences in text files. Then compare Docs/Sample.plist from the version I have to version I'm upgrading to. Then open your config.plist and add/adjust as needed.

From 0.7.4 to 0.7.5, there are just two differences and it's two new keys for resizable BAR: ResizeGpuBars and ResizeAppleGpuBars. Everything else is the same thus one of the easiest transitions ever.
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
As the project matures, we already see fewer (major) changes each release. Many of the surrounding kexts aren't now updated each month anymore.
 

Aluveitie

Donator
Donator
Joined
May 2, 2020
Messages
856
vit9696:
Do not set ResizeAppleGpuBars to anything but 0 if you have resize bar enabled BIOS. 9 and 10 will cause sleep wake crashes, and 8 will cause excessive memory usage on some GPUs without any useful benefit. It shall always be 0. It does not matter which GPU you have, they all support this feature since early 2010s, just give no performance gain.
Source
 

atanvarno

Donator
Donator
Joined
May 2, 2020
Messages
141
Set "Resizable BAR" to Enabled in ASRock X570 BIOS and macOS Big Sur boots quite well with ResizeAppleGpuBars=0.

I doubt I will see any performance benefit with RX-570 in Windows but hey - if it doesn't hurt, let it be on.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
1,855
@atanvarno It won't affect the RX570. If you download GPU-Z and go to the Advanced Tab then resizable bar it'll show enabled but the device being unsupported.
 

atanvarno

Donator
Donator
Joined
May 2, 2020
Messages
141
It won't affect the RX570. If you download GPU-Z and go to the Advanced Tab then resizable bar it'll show enabled but the device being unsupported.
Played some games last night and checked this - yep, all like you said. I did not expect any benefit, 570 is way older than SAM but it's nice to know I can leave another option in the BIOS on without any side-effects on macOS.

Still waiting for the mythical MSRP purchase of Ryzen 6000 card.
 

Shaneee

The AMD Guy
Staff member
Administrator
Joined
Mar 13, 2020
Messages
1,855
Played some games last night and checked this - yep, all like you said. I did not expect any benefit, 570 is way older than SAM but it's nice to know I can leave another option in the BIOS on without any side-effects on macOS.

Still waiting for the mythical MSRP purchase of Ryzen 6000 card.

Leaving it enabled is future proofing ;) Hoping to get my 6800 tommorrow after the first one I got was DOA.
 

DaddyB

New member
Joined
May 10, 2021
Messages
16
I usually use any kind of merge tool that can visually display differences in text files. Then compare Docs/Sample.plist from the version I have to version I'm upgrading to. Then open your config.plist and add/adjust as needed.

From 0.7.4 to 0.7.5, there are just two differences and it's two new keys for resizable BAR: ResizeGpuBars and ResizeAppleGpuBars. Everything else is the same thus one of the easiest transitions ever.
Can I use my working 0.7.4 config and manual add the RBAR lines?
 
Top Bottom