HP Z840 Hackintosh Big Sur(11.6.1) with OpenCore

DISCLAIMER

The use of Hackintosh as a production environment may result in unexpected losses and may cause damage to hardware devices. This article is intended only as a case study for Hackintosh users and the author does not guarantee that the configuration will work perfectly in all cases. Use of Hackintosh is at your own risk, please evaluate it before taking action.

In 2021 Apple announced a new generation of MacBook Pro. Are there any new x86-based notebooks? NO. Until Apple bring new Intel 12th-gen CPU with the MacBook or Mac Mini, we need at least one x86 box that can run Docker or other virtualization.

This article does not go into detail about each step of the process. Using Hackintosh is a process that requires a lot of data searching and testing, so please try harder. In the future, This post will continue to add details so that more people can use it as a reference.

According to the official OpenCore guidelines, there is a Kext that may cause some applications to crash when using TrackPad. The crashing process is named com.apple.NSScrollingConcurrentVBLMonitor. If this occurs, modify config.plist and remove CpuTscSync.kext from Kernel > Add.

In 2023, I spent three days on a vacation upgrading the system. This EFI is still working properly on macOS Monterey (12.6.7). And thanks to Alvin for his comment. I haven’t found any problems with the SMBIOS iMacPro1,1,so if any audience is experiencing similar issues, please refer to Alvin’s comment to make changes. I followed Alvin’s guide to adjust the Intel NIC, and since I don’t use a wired network, I can’t reproduce the crash. I have run additional tests. I tried to install Ventura with a full hard disk clone backup and the system did not load correctly. My assumption is that some specific patches are required. Instead, the system was able to enter Recovery Mode and start FileVault’s password entry screen normally. Then it will be stuck on EB#LOG:EXITBS:START when loading OS. According to the OpenCore documentation this is a Kernel issue. But all my tries have been failed. If you’re looking to try the latest version of macOS, be sure to remember that it’s risky and backup your data.

Make Apple Silicon great

1. Success report & known issues

Success report

Success key Features

  • AirDrop
  • WiFi
  • USB: After USB Mapping
  • FileVault
  • Auido
  • Bluetooth
  • iService
  • LSI SAS Controller

Known issues

  1. Sidecar not working: According to some feedback from Reddit Hackintosh threat, Sidecar relies on the iGPU to work, but the Xeon family does not have an iGPU component.
  2. After enabled FileVault, the Bluetooth keyboard cannot be used in the unlock screen when the operating system is booting.
  3. About This Mac menu does not display the CPU model number properly.

2. Tl;dr

  1. Download macOS and create an USB installer
  2. Gathering OpenCore/kext/efi files
  3. Build custom SSDTs files
  4. Create config.plist
  5. Post-install fixes
  6. Enjoy Hackintosh

3. Hardwards Specifications

Components Model
CPU 2x 14-Core Intel Xeon E5-2697 v3, 2600 MHz
GPU #1 MSI Radeon RX Vega 64 Air Boost 8G
GPU #2 NVIDIA Quadro M4000
SSD CT1000MX500SSD1
Motherboard Hewlett-Packard HP Z840 Workstation
Motherboard Chipset Intel Wellsburg C612, Intel Haswell-E
BIOS Version M60 v02.57
Wired network adapters #1 Intel(R) Ethernet Connection (2) I218-LM
Wired network adapters #2 Intel(R) I210 Gigabit Network Connection
Wireless network adapters Fenvi T919 BCM94360CD
Bluetooth Fenvi T919 BCM94360CD
Storage Controller #1 Intel(R) C600+/C220+ series chipset SATA AHCI Controller
Storage Controller #2 Intel(R) C600+/C220+ series chipset sSATA AHCI Controller
Storage Controller #3 LSI Adapter, SAS2 2308 Mustang
USB2 Controller #1 Intel Wellsburg PCH - USB 2.0 EHCI Host Controller 1
USB2 Controller #2 Intel Wellsburg PCH - USB 2.0 EHCI Host Controller 2
USB3 Controller #3 Intel Wellsburg PCH - USB 3.0 xHCI Host Controller

4. Prepare Installer USB

There is a very detailed Installer USB guide on the official OpenCore site1, and there are no special notes in this section, so you can refer directly to the tutorial.

As for the official CAUTION, there is a problem with XhciPortLimit after macOS 11.3 that may break the Hackintosh from booting2. The root cause of this problem is USB Mapping, and with XhciPortLimit activated, only up to 15 USB buses can be enabled, which causes the problem that some of the USB ports may not be used correctly. Therefore, I followed OpenCore’s advice and installed with version 11.2.3 first, then map the USB buses and finally disabled the XhciPortLimit option. For security purpose, I have upgraded the macOS to the latest version. (Now: 11.6.5)

The following figure shows the result of my USB Map, the actual situation be different on each device, just for reference.

Latest macOS Installer:

https://apps.apple.com/us/app/macos-big-sur/id1526878132?mt=12

5. Gathering OpenCore basic files

There are not many OpenCore base files3, and the customization section only needs to focus on ACPI, Plist, Drivers and Kext.

Files Description
BOOT\BOOTx64.efi Base OpenCore
OC\ACPI*.aml ACPI
OC\config.plist Plist
OC\Drivers*.efi Firmware Drivers
OC\Kexts*.kext Kernel Extension
OC\OpenCore.efi Base OpenCore
OC\Resources* OpenCore Resources
OC\Tools* OpenCore Tools

5.1 Firmware Drivers

First of all, look at the Firmware Drivers section marked as 2 in the picture, where a total of 4 EFI files are introduced as the core drivers for OpenCore’s UEFI environment. Only two files are required for OpenCore, the other two files can be adjusted according to the actual needs of the device.4

Files Description
HfsPlus.efi Required Drivers
OpenRuntime.efi Required Drivers
NvmExpressDxe.efi (Optional) Mandatory for NVMe harddisk
OpenCanopy.efi (Optional) Mandatory for OpenCore’s GUI UEFI

5.2 Kernel Extension

Kernel extension is a kernel injection extension used by macOS to patch the kernel so that the driver can be used correctly.5

Please note that the Kext file is a queue structure in the Plist file, which may cause unexpected results if the loading order is not the same. Also, the EFI screenshots and files I have provided may differ from this table, and some of the Kext files used for testing do not actually exist in the EFI archives provided.

Order Files Description
1 Lilu.kext Required Extension. A kext to patch many processes, required for AppleALC, WhateverGreen, VirtualSMC and many other kexts.
2 VirtualSMC.kext Required Extension. Emulates the SMC chip found on real macs.
3 WhateverGreen.kext Required Extension for GPU.
4 SMCSuperIO.kext Patches for monitoring fan speed.
5 AppleALC.kext Support for the majority of on-board sound controllers.
6 NVMeFix.kext Support for NVMe drivers.
7 RTCMemoryFixup.kext Fix RTC override issue. Mandatory for HP Z840! The details will be explained later.
8 AstekFusion2Family.kext Support for HP on-board LSI/SAS controller.
9 AstekFusion2Adapter.kext Support for HP on-board LSI/SAS controller.
10 AirportBrcmFixup.kext Patches for non-Apple/non-Fenvi Broadcom cards.
11 BrcmBluetoothInjector.kext Patches for Broadcom USB Bluetooth devices.
12 BrcmFirmwareData.kext Patches for Broadcom USB Bluetooth devices.
13 BrcmPatchRAM3.kext Patches for Broadcom USB Bluetooth devices.
14 AirPortBrcm4360_Injector.kext Patches for Broadcom USB Bluetooth devices.
15 AirPortBrcmNIC_Injector.kext Patches for Broadcom USB Bluetooth devices.
16 FakePCIID_Intel_GbX.kext Patches for Intel Ethernet devices.
17 FakePCIID_Broadcom_WiFi.kext Patches for Broadcom WiFi devices.
18 XHCI-unsupported.kext Inject all USB ports for the installed Intel EHCI/XHCI chipset automatically.
19 IntelMausi.kext Intel Ethernet LAN driver for macOS.
20 RestrictEvents.kext Patches for Lilu extension compatibility issues.
21 AppleMCEReporterDisabler.kext Disables AppleIntelMCEReporter which may cause panic on startup
22 FakePCIID.kext Allow returning Fake PCI ID from IOPCIDevice
23 USBPorts.kext USBMap. This Kext should be disabled before USBMap is conducted
24 CPUFriend.kext A Lilu plug-in for dynamic power management data injection. The details will be explained later.
25 CPUFriendDataProvider.kext A Lilu plug-in for dynamic power management data injection. The details will be explained later.

5.3 ACPI/SSDT

The SSDT is an ACPI decriptor table. The description of the override can let macOS to believe that the hardware is a real Macs.

The official pre-compiled SSDT files provided in OpenCore seem to have some unknown errors when used in practice6. Because of this, I have followed all the official guidelines here, compiled them manually7, and prepared the following SSDT by referring to the Hackintosh configuration files of several X99 SSDTs8.

OpenCore official does not require SSDT to be loaded sequentially. However, in the actual testing process, it seems that loading in an irregular order may cause some unexpected issues.

Order Files Description
1 SSDT-EC.aml Required for Haswell-E platform
2 SSDT-EHCx-DISABLE.aml Fixing Embedded Controller
3 SSDT-ETH.aml Fixing Intel Ethernet devices
4 SSDT-GPU-DISABLE.aml (Optional) Disable Nvidia GPU
5 SSDT-HPET.aml Required for Haswell-E platform
6 SSDT-PLUG.aml Required for Haswell-E platform
7 SSDT-RTC0-RANGE.aml Required for Haswell-E platform
8 SSDT-SBUS-MCHC.aml Fixing SMBus support
9 SSDT-UNC.aml Required for Haswell-E platform
10 SSDT-X99-Vega64.aml Required for AMD Vega64 GPU
11 SSDT-EC-USBX.aml Required for Haswell-E platform
12 SSDT-DTPG.aml Required for X299 System.
13 SSDT-USBX.aml Required for Haswell-E platform

6. config.plist

After you have prepared all the above files, you can start editing the Plist file. Most of the content is directly referenced from the official OpenCore definition9, and only some settings that require special attention will be described here.

6.1 ACPI/Patch & Kernel/Patch

There are several ACPI patches related to performance and USB-on-X99 here.

Due to the use of Xeon v3 series CPUs, some of the instruction sets are officially blocked by Intel, so the core frequency is locked at 2.6GHz. many forums have mentioned how to unblock the instruction sets to get the full performance out of the processor.

The following is for reference:

Many motherboards with X299/X99/C600+/C220+ architecture have different definitions of USB in the ACPI. This requires an ACPI fix in order for the USB to be recognized correctly.

The following is for reference:

6.2 NVRAM

There is one option in NVRAM that requires special attention on the HP workstations. OpenCore overrides some of the information in the BIOS NVRAM, resulting in a POST 502 error every time you reboot.

HP POST 502 Error

The OpenCore official recommendation is to use the dichotomous method for sector-by-sector troubleshooting, but there are actually 3 different sectors that can cause the problem. To remediate this issue, adding the rtcfx_exclude to the boot-args. Please make sure the RTCMemoryFixup.kext is loaded.

With this RTC patch, the clock function in macOS will not be read correctly from the BIOS after a power failure. As a result, the time may not match the reality when booting. However, with a network, NTP will soon synchronize the time.

NVRAM Boot Args

boot-args:

-v darkwake=0 keepsyms=1 npci=0x2000 alcid=11 alcdelay=1000 rtcfx_exclude=58-59,B0-B3,D0-DF brcmfx-driver=1

6.3 Platform Info

The SMBIOS10 information has been removed from the config.plist file provided and needs to be re-generated by referring to the official OpenCore guidelines11.

The HP Z840 uses SMBIOS iMacPro1,1. I also modified the ProcessorType and ROM content, this modification was due to the known problem mentioned earlier, the CPU model number was not displayed correctly in About This Mac. But it doesn’t seem to help to slove the problem. Considering that it is not a very important setting, I didn’t take any action to fix it.

SMBIOS Platform Info

7. Post-Install Patch

7.1 USB Mapping

After the installation is complete, USB Mapping is required to fix the problem that some USB ports are not recognized. To simplify this process, I used Hackintool12 to create the USBMap file, which can be found in the official instructions. If necessary, I will update this post again to provide more information on how to do this.

8. Appendix

EFI