Contribute
Register

The Dell OptiMac Big Sur/OpenCore Thread

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
1597233990750.png


1606320264408.png
Dell Optiplex 7020/9020 Desktops

1597235690294.png


macOS 11 Big Sur

This is a separate "cousin" thread to the main Golden Build thread for the Dell Optiplex 7020/9020 desktops. That focuses primarily on macOS Mojave/Catalina and Clover. There is a massive amount of useful info in there that applies to your Dell Optiplex so make sure to read it first. The buyer's guide, beginning section of the Golden Build, will help you choose the best graphics card and show you other compatible hardware available for your build.

In this thread, we'll focus on the topics of OC (OpenCore) and Big Sur installation on your Dell Optiplex. Post all your relevant questions and discoveries about using OpenCore and installing / troubleshooting of Big Sur.


A Note to the Early Adopters
Most importantly, if your Catalina or Mojave based OptiMac install is in a production machine do not upgrade to Big Sur yet. Big Sur, in it's early stages, is not stable enough for everyday use to get your work done. Wait at least until the 11.3 update before making the full transition to the latest macOS 11 Big Sur. If you have a 4K monitor and use HD4600 Intel graphics, the 4K resolution @60Hz will not work on the current Big Sur 11.2 version.

Install Big Sur to a clean, separate SSD or HDD to experiment with it first. I'd also advise that you keep using Clover with Mojave or Catalina if you currently have that installed now. When you are ready to upgrade to Big Sur and use it full time, then switch to using OpenCore. In my testing I've found that a clean install of Big Sur using OC will give you the best results. Clover r5123+ has been modified for use with Big Sur. It makes setting up your config.plist more complicated than simply using OpenCore so avoid it for now. This thread will not support Clover users.


Important Tip #1 OpenCore is a Boot Manager like Clover. It's not simply an improved version of Clover. The code was written by the Acidanthera team as a fresh start to improve upon what Clover can do. You will need to learn many new terms and techniques to have success with OC. (See attached reference manual). Your existing Clover config.plist will not work with OC. You'll need to create a new custom one for OC that works with your specific Optiplex hardware. You'll need to learn how to use the OC snapshots feature of the ProperTree app by CorpNewt. A great tool that makes the whole task of creating your working config.plist much simpler.

Don't be in a hurry to start using OC, study first so that you understand what you are doing. It's going to be a steep learning curve for beginners and even experienced hackintoshers. Using the approach of copy/pasting another person's EFI folder doesn't help you to learn much of anything. When eventual problems occur, your efforts will pay off. You will be able to solve them (OC problems) yourself more easily if you understand the unique features and options of OpenCore. At first the sheer number of Quirks to learn about can appear overwhelming. Don't worry, I'll point out the most important ones that you need to change to be able to boot macOS Big Sur.

Important Tip #2 Use the Late 2014, iMac15,1 SMBIOS to download and install Big Sur. Late 2013 iMac14,1 and 14,2 have been dropped from support in Big Sur. I plan on using 15,1 with my i7-4790 based system. The Late 2014 Retina iMacs had an optional Haswell refresh 4790K CPU so that is the best fit. It will also work well with first gen Haswell CPUs from 2013 such as the i5-4570 and i7-4770. The i5-4590 and i5-4690 also work with iMac 15,1.

Screen Shot 3.jpg


Haswell Refresh CPUs from early 2014 shipped in the Late 2014 27" iMac models.

Important Tip #3 All the Hackintosh related kexts and drivers by Acidanthera will be tested for their compatibility with the OC Bootloader exclusively. This means they may no longer work properly with Clover, unfortunately.

It makes sense that we migrate to OC for macOS Big Sur and future releases by Apple for the very best function and compatibility of our hackintoshes. Since 10.7 Lion, the prelinkedkernel has been the default way for real Macs to boot. This contained a very minimal amount of kexts to get a mac booted. This same bundle is what OpenCore uses to inject kexts, and was hoped to last quite some time. With macOS Big Sur, a huge change happened where Apple no longer makes it the default form of booting. Acidanthera has solved this problem. Make sure to use at least OpenCore 0.6.3 or newer with the public release of Big Sur.

Big Sur Graphics Card Support
It seems that some brands of GT 710 DDR3 are no longer OOB supported by Big Sur. If you have one you'll need to test it. You may get a black screen on boot up. The Quadro K600 (GK107) still works OOB. If you have a GT 710 that works or doesn't work for you, be sure to post your results. If you have a CPU with HD4600 iGPU that is your best choice for basic graphics support. Use DP adapted to HDMI if your monitor has no DP inputs.

For all new Dell 7020/9020 OptiPlex Owners
If you are installing macOS for the first time on your Dell, make sure your BIOS is flashed and configured properly. If it already is, go on to post #2 and skip the rest here. Also see step #2 of the Dell OptiMac Golden Build guide.

BIOS flashing and setup

For new OptiMac owners that haven't installed Catalina or Mojave yet, make sure you are using the latest BIOS. If your Optiplex didn't come with Windows pre-installed, see the following:

Flash your BIOS to A18 for the 7020 models and A25 for the 9020 Optiplex models. See the Golden Build thread for all the details on how to do this via Windows or by using a FAT32 USB. After the flash is complete boot into the BIOS with the F2 key and Load Defaults and click OK then Exit. Your Dell will reboot. Press F2 again to enter the BIOS. The four absolutely mandatory BIOS settings to change are listed below. If your BIOS is not set this way, installing macOS Big Sur will likely fail.

General
Boot Sequence -> Boot List Option -> UEFI

System Configuration

Sata Operation -> AHCI
Serial Port -> Disabled

Secure Boot

Secure Boot Enable -> Disabled (automatically disabled when you load defaults)

This Spoiler shows you all the other suggested BIOS changes.
Click on it to see what other changes you may need to make.
Summary of BIOS Setting Changes

General

Boot Sequence -> Boot List Option -> UEFI
Advanced Boot Options -> check box- Enable Legacy Option ROMs
UEFI Boot Path Security -> Set to Never

System Configuration
Integrated NIC -> Enabled
Serial Port -> Disabled
Sata Operation -> AHCI

Video
Primary Display -> Auto (For HD4600 Nvidia or AMD)

Secure Boot
Secure Boot Enable -> Disabled

Power Management
Deep Sleep Control -> Disabled

Virtualization Support (i5 and i7 CPUs only)
VT for Direct I/O -> Disabled (see below if you need it enabled)

Unlocking CFG and Disabling VT-d (VT for Direct I/O)
CFG Lock prevents macOS from writing to a certain region in your BIOS. macOS does this writing for power management and other reasons. If it can't access those areas, it will not boot. This is why we'll need to boot into a modified GRUB shell and perform this CFG unlock manually before installing Big Sur. See post #6 below for instructions on how to do this.

The VT-d setting is accessed via the Dell BIOS user interface. You should have already done this step as shown above. If you do want to leave VT-d enabled for use with Windows, then set: Kernel -> Quirks -> DisableIoMapper to True in your OpenCore config.plist.

To start learning more of the OpenCore basics please see the Dortania OC Guide for Haswell systems on github.io.
 

Attachments

  • OpenCore Ref.Manual.zip
    620.3 KB · Views: 390
Last edited:

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android

Getting Started with Big Sur

1. Download macOS 11

These are the Mac models that will let you download Big Sur and create your USB installer. Whether you use a hackintosh or a Mac your SMBIOS (system definition) needs to meet these minimum specs to be eligible.

MacBook __ 2015 and Later MacBook Air __ 2013 and Later
MB Pro __ Late 2013 and Later Mac Pro __ 2013 and Later
Mac mini __ 2014 and Later iMac __ 2014 and Later
iMac Pro __ 2017 and Later

If your hackintosh is using iMac 14,2 (Late 2013), you'll need to change it to at least iMac 15,1 for the download.
If your Mac is older than these make sure to use gibMacOS to download Big Sur directly from Apple's servers.


2. Create the USB Installer

As with Catalina, you'll need a minimum of a 16GB USB flash drive if you're going to use macOS to make your Big Sur installer. 32GB USBs also work. Anything larger, make a small partition of at least 16GB but less than 32 for building the installer. Big Sur should be in Applications.

You'll need to use createinstallmedia method after you've formatted the USB as Mac OS Extended (Journaled) and GUID partition table via Disk Utility. You can name the drive simply USB. Now open up Terminal and then copy/paste the following there and press return. Enter your password and return again.

Code:
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --nointeraction

3. Create your Custom OpenCore EFI Folder

Once you've installed Big Sur to the USB, the next task is to create the custom OpenCore EFI folder and then copy/paste that to the EFI partition of the USB after completing all edits. This is where you'll need to use a sample config.plist and modify it specifically for your hardware. It's best to be using at least High Sierra 10.13.6 or newer on your Mac/Hackintosh when following the Dortania guide or using OC-Gen-X to make your new EFI folder. Every Mac made in 2010 or later should be able to run High Sierra with no problems. The 2009 iMac will also be an option.

I'd highly suggest that you read through the following Dortania Guide to get a general idea of what is needed for a Haswell system booting via OpenCore. Their guide is not complete enough to get your Dell fully working and booting normally. If you are an OpenCore/Hackintosh beginner, it's best that you follow the preferred method below.

OpenCore Bootloader and the Dortania Guide

Start here
: https://dortania.github.io/OpenCore-Install-Guide/installer-guide/opencore-efi.html

1. Download the standalone OpenCore Bootloader package installer from the official downloads section.
2. Apply necessary kexts, SSDTs and make the required edits (Haswell specific) to the config.plist using ProperTree.

Preferred Method - Dell Optiplex 7020/9020 Specific Instructions
For those that want a Multibeast Like GUI to create their EFI folder, there is a handy app called OC Gen-X created by Pavo that you can use. https://github.com/Pavo-IM/OC-Gen-X/releases Always use the newest release. You must use at least High Sierra 10.13.6 or newer to run the OC-Gen-X app. No support for Sierra or older macOS versions.


1. Open OC Gen-X and select System Type -> Intel Consumer -> Haswell

2. Select the Kext tab and leave the two default choices as they are

3. Under VirtualSMC Plugins select the SMCProcessor kext

4. Under Graphics select the Whatevergreen kext

5. Select AppleALC for Audio

6. For your Ethernet kext select IntelMausi

7. Firmware Drivers - leave the defaults checked

8. SMBIOS - iMac15,1 (Serials and SMUUID will be entered later)

9. BootArgs - Enter -v to boot verbose keepsyms=1 and debug=0x100

10. Generate your EFI folder

Your brand new OC EFI folder will appear on your desktop. Leave it there for now.

11. Copy and paste the ACPI files (attached below) into the newly created ACPI folder in the OC folder.

Here's how your ACPI folder should look with all five SSDTs:
ACPI folder.png


12. Copy and paste the 2 extra kexts into the kexts folder. Also attached below.

13. If you have a MT 7020/9020 you can use the kext attached below which enables the internal USB 2.0 port HS13. It's called Dell MT.USBPorts.kext. I have HS13 set to internal for those that will connect a Wifi/BT card. I've attached a pic below of the MT board so you can see where the internal USB 2.0 header resides.

SFF and USFF owners should use the USBports kext in the "2 extra kexts" folder below. Those have no HS13.

14. Add modGRUBShell.efi to the tools folder

4. Adding patches and setting Quirks in the newly created Config.plist

Config.plist editing. Use the PlistEdit Pro app and the free trial or you can use ProperTree if you prefer. I find it much easier to make these edits using the PlistEdit Pro app. It's worth paying for if you need to use it longer than 1 month.

Screen Shot.jpg


Add the three specialized ACPI patches for the HPET, RTC and TIMR to the ACPI -> Patch section. They are included in the example config.plist so you can transfer those into your config.plist you've created. The example config.plist is attached below. See the video above for instructions of how to copy them to the new config.plist.

Refer to the above OC EFI video to see all the changes to make in the .plist.

Using a "Headless" iGPU
The video doesn't show how to run your Intel iGPU headless. If you do use an AMD or Nvidia card and don't plan on using the iGPU at all (i.e. no display connected) you can delete the whole Devices/Properties PciRoot (0x0)/Pci(0x2,0x0) section. WhateverGreen should then automatically configure it as a compute device. It can then do video encoding / decoding to speed up rendering. You will also need to change the BIOS and make the dGPU the primary video card for encoding / decoding to work. Running iGPU headless is the fastest way to render, especially if you are using an older Nvidia Kepler 700 series graphics card.

5. Taking the OC Snapshot with ProperTree

Once everything is set then it's time for the OC snapshot. Demonstrated in the video also.

1. Now open up your new config.plist with ProperTree (attached below)
(right click on ProperTree.command and open it up with terminal)

2. Click on the File menu in the menu bar then OC Snapshot (Cmd +R).

Screen Shot 1.jpg


3. You locate your OC folder on your desktop and select it. Click Choose.
Choose OC Folder.png


That is the first snapshot. After that, click on OC Clean Snapshot.

After the snapshot is properly taken, then check the config.plist to make sure all the kext and ACPI entries are there.

Screen Shot 2021-02-04 at 1.28.35 PM.png


Under Kernel -> Add you should see 8 kext entries or more if you have added other kexts that you require.

Kernel:Add.png


Once all your config.plist edits are done copy the finished OpenCore Custom EFI folder to the EFI partition of the USB installer you just created with Big Sur. You'll have to mount the hidden EFI partition of the USB first. I use EFI Agent app by the creator of Hackintool. https://github.com/headkaze/EFI-Agent/releases

You're not completely ready to install yet. Proceed to step #5 below and unlock CFG along with some other UEFI/BIOS mods. If you don't unlock CFG you won't even reach the installer.

OpenCore Basics

ACPI

  • SSDT-EC.aml - Fix for EC (Embedded Controller) on Catalina and above
  • SSDT-PLUG.aml - Allows for native CPU power management​
  • SSDT-SBUS-MCHC.aml - Allows AppleSMBusPCI/Family/Controller​
  • SSDT-USBX.aml - USB power config​
Drivers
  • AudioDxe.efi - Boot chime
  • HFSPlus.efi - Reading HFS partitions
  • OpenCanopy.efi - GUI, boot picker
  • OpenRuntime.efi - NVRAM, memory management, etc.
Kexts
  • AppleALC.kext - Onboard Audio
  • IntelMausiEthernet.kext - NIC (Intel based)
  • Lilu - Various fixes and system enhancements
  • USBPorts.kext - USB Mapping (you can edit these details in USB section)
  • VirtuaSMC.kext - Apple SMC emulator
  • WhateverGreen.kext - Various fixes for graphics and system devices
  • SMCDellSensors.kext - Optional - Lets you see fan speeds in Fan Control apps.
 

Attachments

  • ProperTree-master.zip
    471.4 KB · Views: 258
  • modGRUBShell.efi.zip
    3 MB · Views: 337
  • ACPI files.zip
    2.5 KB · Views: 154
  • Dell MT.USBPorts.kext.zip
    1.7 KB · Views: 93
  • Mintower Schematic.jpg
    Mintower Schematic.jpg
    183.6 KB · Views: 138
  • SFF Port map pics.zip
    219 KB · Views: 74
  • 2 extra kexts.zip
    21.9 KB · Views: 117
  • Example config.plist.zip
    3.8 KB · Views: 118
Last edited:

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
6. Unlock CFG and Increase DVMT to 64MB

You will need to remove the CFG lock in the BIOS/UEFI before you attempt the install. Find the instructions here. Unlock CFG in the BIOS

It's also important to perform the other mods to enable EHCI handoff and to set the XHCI mode to enabled for optimal USB port function. Make sure to do those at the same time that you unlock CFG via ModGRUBShell.efi
You'll find all of the setup_var offsets to change in the text file available to download and print out.

Increasing DVMT to 64MB is important as it will help the integrated HD4600 graphics perform better. If you have a 4K monitor or even if you don't and plan to get one later on, increase the DVMT to 64MB. Note that 4K is currently not working normally via HD4600 graphics with Big Sur. It should be fixed eventually.

7. Install macOS 11 Big Sur

This process
is primarily the same as installing Catalina or previous versions though it will take longer. I don't suggest an unattended install. You can certainly take 10-15 minute breaks while it's happening. The monitor may go black at times due to the length of the install. Simply move your mouse around to get the display to come back.

Kernel Panics
It's likely that you'll have a few kernel panics before you reach the installer. If so, you'll want to edit your config.plist until you find the Quirk or other setting that is preventing you from booting. Each time you edit your config.plist, save it and then Reset NVRAM first before trying to boot from the USB again.

1611915016289.png

You will notice a longer pause of about 20-30 seconds at validate_root_image: line of the verbose output. This is normal and not a kernel panic. It should proceed if you just wait a little bit.

Once you've reached the installer, completed the macOS install and started to create your new admin account, make sure you don't sign in with your Apple ID. This is important as you'll create unique serial numbers later on and add them to your config.plist. You'll also need to have the SMUUID string and ROM filled in, which is your ethernet port's MAC address. (MAC = Media Access Control)

20210103_141135_2_copy.png

After you've got Big Sur installed and booting with no problems you will want to remove both debug and -v from your boot-args to get faster boot times. To find your boot-args string for editing, Platform info -> Generic.

To set your SMBIOS and generate unique Serials and the SMUUID: https://github.com/corpnewt/GenSMBIOS
Don't use iMac 14,1 or 14,2. Use iMac15,1 as it works with iGPU only or with a dGPU and iGPU combination.


Check with Apple's warranty support page to make sure no Mac already uses your new Serial numbers before you commit them. Here's what you should see if the serial you created is unique (Not associated with an Apple built Mac computer).

Screen Shot 1.jpg

We actually want to use an Invalid Serial. If the website informs you in red letters that the number is invalid, then you are OKAY to use it. :thumbup:

Enter all the values into your config.plist under Platform info -> Generic. You can use your Ethernet MAC address for the ROM. Go to System Prefs -> Network -> Advanced -> Hardware to find your MAC address. Copy/paste and then remove all the colons once it's in your config.plist.

Screen Shot 3.jpg


You can now copy and paste the EFI folder to your System drive's EFI partition. Then reboot. The USB is no longer needed to boot into Big Sur.

If you'd like to have an OpenCore GUI at the boot screen: Click here to see how to do that

Multibooting with Windows or Linux

With OpenCore 0.6.6 and newer, we are now able to launch OpenCore directly from our firmware without needing a launcher (Bootstrap.efi or BOOTx64.efi) as an intermediary. This allows us to add OpenCore to our motherboard's boot menu and prevent issues where either Windows or Linux try to overwrite the EFI/BOOT/BOOTx64.efi path. This can happen when installing or updating Windows and therefore breaks OpenCore's ability to boot. Here's the LauncherOption setting you'll need to prevent this from happening. It's always best to physically disconnect the macOS boot drive before installing or updating Windows anyway. This adds another layer of security for your macOS EFI.

Screen Shot 1.jpg


If you are not multibooting and only use macOS then leave the LauncherOption set to disabled.
 

Attachments

  • Example config.plist.zip
    3.8 KB · Views: 237
Last edited:
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
How to enable 4k for the HD4600 iGPU in OpenCore

Summary: The following information is a supplement the OpenCore (OC) Install Guide and provides the specific framebuffer settings for the Optiplex's Haswell processor and HD4600 iGPU. This is not required if you're not using 4k, but can be used on non-4k systems. Correctly identifying these values in the OC config.plist under DeviceProperties allows macOS to properly use the iGPU and enables things like native 4k support and dual monitor support via the two rear DisplayPorts. I use ProperTree to add/change values in my config.plist.

I've tested this extensively on my i5 4590, Dell Optiplex 7020 SFF, using OpenCore (0.60), on Catalina 10.15.6. Please also note that I'm using SMBIOS15,1 for Big Sur Compatibility and that this info should work for both Catalina and Big Sur.

Configuring DeviceProperties in OpenCore
If you are following the OpenCore Install guide to prepare your config.plist you should already have the following values under DeviceProperties:
  • AAPL, ig-platform-id set to 0300220D and device-id set to 12040000
  • These are the OpenCore defaults for this desktop processor and iGPU in the guide
Next, you'll want to make sure you can enable additional patches by adding the following if you haven't already done so:
  • framebuffer-patch-enable set to 01000000 (i.e., enabled)
Next, we'll supply the specific framebuffer values by adding the following properties to the config.plist under DeviceProperties:

Key Type Value
framebuffer-unifiedmem Data 00000080
framebuffer-stolenmem Data 00000004
framebuffer-fbmem Data 00000003


or, paste the following directly:

Code:
<dict>
    <key>framebuffer-unifiedmem</key>
    <data> AAAAgA==
    </data>
    <key>framebuffer-stolenmem</key>
    <data>
    AAAABA==
    </data>
    <key>framebuffer-fbmem</key>
    <data>
    AAAAAw==
    </data>
</dict>

What these values do:
  • The first value framebuffer-unifiedmem with data 00000080 increases the video memory to 2gb which I have found helpful on a dual-monitor setup. This is optional.
The next two values are the framebuffer settings specific to the Optiplex 7020/9020 since the OC install guide does not provide them (and they were surprisingly hard to identify):
  • framebuffer-stolenmem sets the framebuffer stolen memory. It's best to match the value of this data to your BIOS DVMT:
    • If you've set your BIOS DVMT to 64mb use the value 00000004.
    • If for some reason you have your DVMT set at 96mb, use the value 00000006 instead.
  • framebuffer-fbmem with data 00000003 sets the Framebuffer memory size to 48MB.
Other important points to note:
  • Full 4k is only possible using a DisplayPort to DisplayPort cable
  • For 4k to work properly you may need to use the DisplayPort port closest to the VGA connector.
    • On this port, your 4k monitor will be recognized as an internal Retina display, this is expected behaviour.
  • Dual monitor setups require both monitors connected by DP to DP cables
  • I'm using dual monitors (i.e., 27" 4k and a vertical 24" 1080p) both are connected via DisplayPort and working fine with the above setup.
Credits:
@nicksoph, @0xd1ab10, @trs96
I've cross-posting this summary from a collection of posts/findings from a number of users in the Optiplex 4k thread to make it easier for folks on OpenCore to get 4k working without having to go digging.

Edits:
Edited to simplify information for beginner users and remove tangential information.
 
Last edited:
Joined
Jun 5, 2020
Messages
35
Motherboard
Optiplex 7020 SFF
CPU
i5 4590
Graphics
HD4600
Unlocking the CFG

Dell hides the CFG Lock setting in the BIOS which means we have to unlock it manually. Unlocking the CFG is needed for MacOS to boot and run properly. Before we begin it's absolutely critical to be on the proper BIOS firmware.

BIOS
  • 7020 requires the A18 BIOS
  • 9020 requires the A25 BIOS
  • See the Golden Build thread for details on how to do this via Windows or by using a Dell DDDP USB.
  • I ended up installing windows first on the old HDD and running the Dell Bios updater tool (link points to 7020, A18 tool).
Modding the BIOS to unlock the CFG

One way to do so is to boot into a modified grub shell, which is basically a command line that allows us to manually change hidden values. This is done by replacing specific values called offsets at specific locations in the BIOS firmware (which is why we need the specific BIOS version). Luckily someone has already done the work to find the locations of these offsets for us.

Note: If you absolutely need to be on a different BIOS version than listed above, you'll need to manually find these locations by extracting your BIOS. Full details here.

Adding ModGrubShell as a bootable option to your OpenCore picker

OpenCore (OC) includes an option to select what you want to boot (which is useful for dual booting, etc.). The easiest thing to do is add modgrubshell.efi to your OC picker list.
  • Download the latest modgrubshell.efi and put it in your EFI/OC/Tools folder
  • Next open up your config.plist using ProperTree, and add the following to Misc/Tools
Code:
<array>
    <dict>
        <key>Arguments</key>
        <string></string>
        <key>Auxiliary</key>
        <false/>
        <key>Comment</key>
        <string>modGRUBShell.efi</string>
        <key>Enabled</key>
        <true/>
        <key>Name</key>
        <string>modGRUBShell.efi</string>
        <key>Path</key>
        <string>modGRUBShell.efi</string>
    </dict>
</array>

Disable the CFG Lock
  • Boot from your installer USB, in the OpenCore picker select modGRUBShell.efi and press enter.
  • Enter exactly the following setup_var 0xDA2 0x0 to disable the CFG Lock.
  • The default values is 0x1, if for some reason you want to reset this you would enter setup_var 0xDA2 0x1
Optional, change the DVMT pre-allocation while you're here
The default DVMT pre-allocation is 32 mb on these systems, MacOS prefers 64 mb to prevent graphical issues. There are other ways to patch the DVMT pre-alloc, but you can change this value while you're here:
  • Enter exactly the following setup_var 0x263 0x2 to change the DVMT pre-allocation from 32mb to 64mb
  • The default value is 0x1 for 32mb, if for some reason you want to reset this enter setup_var 0x263 0x1
That's it!
You can now proceed to the macOS installer
 

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
Important Note: If you have been directed here from the original 4K OptiMac thread, this post will show you how to increase DVMT pre-allocation to 64MB. A requirement for powering a 4K/60Hz display via HD4600 graphics. The CFG unlock is not mandatory when using Mojave or Catalina. If you do plan to upgrade to Big Sur later on, you can also unlock CFG at this time. Then you'll be ready to install macOS 11 when the time comes.

Changing the Dell OptiPlex Hidden BIOS/UEFI Settings
CFG-Lock is a setting in your BIOS that allows for a specific register (in this case the MSR 0xE2) to be written to. By default, most motherboards lock this variable, with many (including Dell) even hiding the option outright in the GUI. Why we care about it is that macOS normally writes to this variable, but will only be able to, when CFG Lock is set to disabled.

I've created a chart which includes the offsets that are specific to the Dell Optiplex 7020 A18 BIOS and 9020 A25 BIOS.
For only the USFF, SFF and MT form factors. These do not apply to the 2 Dell Optiplex 3020 form factors or to the micro sized 9020M models. To discover the offset values for the 3020 or 9020M you'll have to extract the BIOS and search for them on your own. This guide doesn't got into specifics of those other models, only the following:

Screen Shot 8.jpg
____
Screen Shot 4.jpg


Do not attempt to use these with any other Dell Optiplex models or with other BIOS versions.

Step #1: Print out the file (attached below) before making the changes via a modified Grub shell you've booted to from a USB. I've used larger fonts so you can see the numbers easily and not enter any wrong values. Again, take your time, enter the correct numbers to make the changes.

The first two (CFG Unlock + DVMT) are mandatory if you want to install Big Sur and potentially use a 4K monitor via DP output and HD4600. The last 5 help improve USB 2.0 and 3.0 port functioning and are highly recommended.

Step #2: Boot into a modified grub shell by using your Big Sur Installation USB you created previously.

modGrubShell.png


See post #7 below to view screenshots of what it's like to use the modified grub shell to make these changes.
1609071971822.png

It's mandatory that you enter them accurately. We'll use CFG unlock and change DVMT to 64MB in this example.
Code:
setup_var 0xDA2 0x0
Here you'll see a space after setup_var and another after DA2. Make sure to leave those spaces in when you enter the offset. Also note that there are only Zeros and no letter Os in all of the offset values.
Code:
setup_var 0x263 0x2
To change the DVMT pre-allocation. Again a space after setup_var and also after the number 3. I'd highly suggest you also make the other five changes to your UEFI using the setup_var command as shown in the attached chart below.

Screen Shot 6.jpg


For those that are still on Mojave or Catalina and just want to unlock CFG and increase the DVMT to 64MB so they can get a 4K monitor to work. I'm attaching an example "barebones" OC EFI folder with modGRUBShell.efi already in the OC Tools folder. Has only VirtualSMC kext, OpenRuntime.efi and a few other essential drivers and SSDTs to make it bootable on an OptiMac. Not to be used as the EFI for an installation of Big Sur with OpenCore. It's not a fully functional EFI for that purpose. Boot with that on a USB EFI partition and make your DVMT change.
Follow these directions to add it to the EFI partition of any USB flash drive (can be as small as 2GB) that you've partitioned GUID and formatted macOS Extended (Journaled). Then you can easily boot to a GRUB shell and unlock CFG as well as change the DVMT pre-allocation to 64MB.
  1. Insert the USB drive​
  2. Open /Applications/Utilities/Disk Utility
  3. Highlight the USB drive in left column (Note: in the Catalina version of Disk Utility, you must first select View / Show All Devices before you can see the USB drive there​
  4. Click Erase button
  5. For Name: type USB (You can rename it later)
  6. For Format: choose Mac OS Extended (Journaled)
  7. Click Done
CREDITS: datasone for modGrubShell.efi - JimLee1996 for DVMT/CFG Lock BIOS research - zearp for the offset values related to EHCI and XHCI BIOS/UEFI settings - nicksoph for all his research into 4K and HD4600 on the Dell Optiplex 7020/9020. Everyone that has posted in the OptiMac thread and shared their experiences.
 

Attachments

  • OptiMac 7020 9020 Hidden UEFI.zip
    1.4 KB · Views: 386
  • EFI w:mod.Gr.Shell.zip
    3.3 MB · Views: 171
Last edited:

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
BIOS/UEFI modding from a Modified GRUB Shell
IMPORTANT: When you follow the CFG unlock procedure or change other offset values you can permanently damage your motherboard (make the computer unbootable) by entering the wrong values.​
You assume all responsibility for the results of making these changes via modGRUBShell.efi.​
For Dell Optiplex 7020/9020 USFF/SFF/MT only (Not other models or the 9020 Micro)

Here's some screenshots to show you what to expect when booting from the USB.

First you'll see the prompt: grub>

Then enter: setup_var (type your offset here)

In this example we'll disable the CFG Lock.
Now press the return key and you should see this:

IMG_20200821_134834777 2.jpg


When you disable CFG lock and make any other changes, it will usually say "GUID does not match expected GUID."
This is completely normal and nothing to worry about. The important line is just above the grub> _ prompt:
setting offset 0xda2 to 0x00 This means you have had success in changing the CFG lock setting to disabled.
  • MSR 0xE2 (CFG) will definitely be relocked whenever the motherboard firmware (BIOS) is updated or re-flashed.
    • In this case, unlock CFG by booting from the USB disk and repeating the steps shown above.
  • MSR 0xE2 will likely be relocked whenever CMOS Reset is performed.
    • After each CMOS Reset, boot from the USB disk and to check if the value of 0xDA2 is still 0x0
Change the DVMT pre-allocation to 64MB:

IMG_20200821_135110026.jpg


Setting DVMT to 64MB successful. This enables 4K video output when using the onboard DP outputs.

After some more testing I've decided to recommend all of the USB related UEFI changes as well. Enable EHCI Handoff, set XHCI to enabled and route all the EHCx ports to XHCI as well as disabling EHCx altogether.

Follow the exact same procedure as shown above. Disabling the EHCx ports will only cause problems when booting legacy. If you want to dual boot with Windows 10 you should be installing that OS UEFI anyway. Makes this a non-issue.

Once you've made all the changes you'd like to, type in reboot and hit the enter key.

Now you should be able to start installing macOS Big Sur.
 
Last edited:
Joined
Feb 8, 2012
Messages
26
Motherboard
Dell Optiplex 9020
CPU
i7 4790
Graphics
HD 4600
Mac
  1. iMac
Mobile Phone
  1. iOS
Nice guide.
After following all steps above and proceeding the first part of the install (15 minutes, reboot and more 40 minutes) when It loads Big Sur for finish all, Im gotting this screen.
Any tips?
 

Attachments

  • photo5100480342577490033.jpg
    photo5100480342577490033.jpg
    303.5 KB · Views: 233

trs96

Moderator
Joined
Jul 31, 2012
Messages
19,110
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
Nice guide.
After following all steps above and proceeding the first part of the install (15 minutes, reboot and more 40 minutes) when It loads Big Sur for finish all, Im gotting this screen.
Any tips?
Did you reset NVRAM before the install attempt ?
 
Joined
Jul 14, 2017
Messages
25
Motherboard
Dell 9020 MT
CPU
i7-4770
Graphics
HD 4600
Mac
  1. iMac
Mobile Phone
  1. Android
Nice guide.
After following all steps above and proceeding the first part of the install (15 minutes, reboot and more 40 minutes) when It loads Big Sur for finish all, Im gotting this screen.
Any tips?

It takes more than 10min at Forcing CSRuntime, after that everything goes smoothly.
 
Top