Contribute
Register

[SUCCESS] Gigabyte Designare Z390 (Thunderbolt 3) + i7-9700K + AMD RX 580

CaseySJ

Moderator
Joined
Nov 11, 2018
Messages
13,981
Motherboard
Gigabyte Z490 Vision D
CPU
i5-10400
Graphics
RX 580
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac Pro
Classic Mac
  1. Quadra
Mobile Phone
  1. iOS
** Mini-Guide: Enable Native NVRAM in Clover **
Please do NOT quote this guide in its entirely. Post a link instead.

Real Macs read and write data in NVRAM during many different phases of operation. Some of them are:
  • When booting the computer, NVRAM identifies the Startup Disk.
  • When booting the computer, Apple's boot loader also checks if previous session had crashed. If so, it displays a message saying "Your computer was restarted because of a problem".
  • When rebooting or shutting down, information is written or updated in NVRAM.
  • When there's a system crash, a background process stores kernel panic information into NVRAM.
  • When you're running the macOS installer (which is not MacOS), it reads and writes information to NVRAM to select the right intermediate startup disks.
  • FaceTime and Messages store various "keys" in NVRAM.
  • Information about paired Bluetooth devices is also stored in NVRAM. This allows Apple Magic Mouse and Magic Keyboard to connect via Bluetooth before macOS is booted.
  • Lots of other little details are stored in NVRAM.
NVRAM is used by:
  • Apple boot loader (boot.efi) -- this is not macOS. It's an EFI boot loader.
  • macOS installer -- this is not macOS either
  • macOS updater -- this is not macOS either
  • macOS
When we use EmuVariableUefi to emulate NVRAM, it stores NVRAM data in a file called nvram.plist in the EFI partition of the boot disk. But it requires Clover's "rc" scripts to read/write that file. However:
  • Apple boot loader cannot read/write that file
  • macOS installer cannot read/write that file
  • macOS updater cannot read/write that file
So we don't get all the functionality of NVRAM with just EmuVariableUefi and RC scripts. But with native NVRAM, all components of the system can access NVRAM any time they need to.
  • Make a full backup of your system.
  • If you're using OsxAptioFix2Drv-free2000.efi in the CLOVER/drivers/UEFIfolder, please switch to OcQuirks/FwRuntimeServices or OcQuirks/OpenRuntime:
    • If running Mojave, follow this guide.
    • If running Catalina, delete OsxAptioFix2Drv-free2000.efi and replace it with the three files below that are available in the Catalina Mini-Guide.
      • OcQuirks.efi, OcQuirks.plist, OpenRuntime.efi
  • MSR 0xE2 must be unlocked for native NVRAM. See procedure here.
    • VarOffset is 0x5C1 for BIOS F6, F7, F8, and F9b. If you're on an earlier version, please go through the full procedure to determine the VarOffset.
    • At the grub prompt, type:
      • setup_var_3 0x5c1 to see current value, which should be 0x01 (indicating "ON").
    • Then unlock MSR by typing:
      • setup_var_3 0x5c1 0
    • Confirm the new value by typing:
      • setup_var_3 0x5c1
    • If the value is 0x00 (indicating "OFF"), it's done. Type reboot and remove the flash drive.
  • Copy SSDT-NVRAM.aml (attached) to CLOVER/ACPI/patched.
  • Remove EmuVariableUefi from CLOVER/drivers/UEFI (or CLOVER/drivers64UEFI for older versions of Clover).
  • Remove Clover RC scripts (if installed) by typing these commands in Terminal: (be very careful)
    • sudo rm /etc/rc.boot.d/10.save_and_rotate_boot_log.local
    • sudo rm /etc/rc.boot.d/20.mount_ESP.local
    • sudo rm /etc/rc.boot.d/70.disable_sleep_proxy_client.local.disabled
    • sudo rm /etc/rc.shutdown.d/80.save_nvram_plist.local
    • sudo rm /etc/rc.clover.lib
  • In your config.plist, you may now uncheck the following in Kernel and Kext Patches:
    • KernelPM
    • AppleIntelCPUPM
      Screen Shot 2020-01-27 at 5.18.13 AM.png
  • Reboot and log back in before testing NVRAM below.
To test native NVRAM:
  • Open Terminal and type sudo nvram TestVar=Hello. Enter password when prompted.
  • Reboot and log back in.
  • Open Terminal again and type sudo nvram -p | grep TestVar. If you see TestVar Hello then you have working NVRAM!
Update:
  • Fixed confusion between 0x01 and 0x00.
  • Added BIOS F9b.
  • Added requirement to switch from OsxAptioFix2Drv-free2000 to OcQuirks/FwRuntimeServices.
 

Attachments

  • SSDT-NVRAM.aml
    121 bytes · Views: 627
Last edited:
Joined
Apr 1, 2011
Messages
351
Motherboard
Gigabyte z390 Designare
CPU
i9-9900K
Graphics
RX 5700 XT
Mac
  1. iMac
  2. MacBook
  3. MacBook Air
  4. MacBook Pro
  5. Mac mini
  6. Mac Pro
Mobile Phone
  1. iOS
** Confirmed: Native NVRAM in Clover **

...
Just curious what the real advantage here is with native NVRAM? Other than making this closer to a real MAC, are there other advantages (boot time, consistency, stability)? Thanks,
 
Joined
Sep 5, 2012
Messages
109
Motherboard
Gigabyte GA-Z390X Designare
CPU
i9-9900K
Graphics
Radeon VII
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. iOS
Just curious what the real advantage here is with native NVRAM? Other than making this closer to a real MAC, are there other advantages (boot time, consistency, stability)? Thanks,
Easy to answer:
1)The less extra kexts, efi´s and scripts you need the better the system stability.
2) The more you know about your System, the better it works

I don't build a hackintosh because it's cheaper but because I am interested in and proud if it works. That's what's always in my mind when I do my real work on my build. Every time I boot the system to mix a song, cut a video or even write my bills, I think "Great - now it has native NVRAM because WE found it"
 
Joined
Dec 16, 2018
Messages
51
Motherboard
Gigabyte Z390 Aorus Pro
CPU
i9-9900K
Graphics
RX 580
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. iOS
Dear @CaseySJ , I believe there's a little mistake in your Native NVRAM guide.
By default, MSR 0xE2 CFG Lock is 0x1 (it means it's locked, turned on).
In order to unlock MSR we actually need to change it to 0x0 (lock is removed, turned off).

So, when we confirm value change, we should see 0x0 instead of 0x1.
Just want to avoid confusion and any potential problems people may face with this very advanced mod.
 

CaseySJ

Moderator
Joined
Nov 11, 2018
Messages
13,981
Motherboard
Gigabyte Z490 Vision D
CPU
i5-10400
Graphics
RX 580
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac Pro
Classic Mac
  1. Quadra
Mobile Phone
  1. iOS
Dear @CaseySJ , I believe there's a little mistake in your Native NVRAM guide.
By default, MSR 0xE2 CFG Lock is 0x1 (it means it's locked, turned on).
In order to unlock MSR we actually need to change it to 0x0 (lock is removed, turned off).

So, when we confirm value change, we should see 0x0 instead of 0x1.
Just want to avoid confusion and any potential problems people may face with this very advanced mod.
You're absolutely right. :)

So much for waking up at 3:00am every morning and trying to get some work done before work!
 
Joined
Jun 13, 2012
Messages
117
Motherboard
Gigabyte Z390 Designare
CPU
i9-9900K
Graphics
Vega 64 | R9 270X
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac Pro
Mobile Phone
  1. Other
here's something interesting...
May be of use to some video editors out there.

I recently updated [on MOJAVE 10.14.6]
LILU and WEG from 1.4.0 and 1.3.5
to
1.4.1 and 1.3.6 respectively.

I immediately noticed a slow down in my system.

I have a vega64 in slot 1
and
R9 270X in slot 2

my 4k monitor is plugged into the Vega with displayport
my 1080 ref monitor is plugged via HDMI to the r9 270x in slot 2


I noticed this slowdown while I was generating optimized media in Davinci Resolve16 [4k mon] and playing a youtube video in the 1080p monitor

DaVinci crawled
youtube playback was choppy and after a while stopped showing an image

HW Monitor showed 0% utilisation for the Vega and around 32% for the 270x

So I reverted back to 1.4.0 and 1.3.5
and everything is back to normal-
Generating optimized media is fast and youtube plays back correctly

activity on the HWMonitor is consistent with Vega being the primary card utilised
and the 270X minimally used.

Hopefully this helps one of you guys out there!

UPDATE:
moved to Catalina 10.15.3 with NVRAM and the latest WEG+LILU work correctly here
 
Last edited:
Top