Hackintosh in 2018

macOS Mojave 10.14.1 on Coffee Lake

I assembled myself a desktop PC after winning a Core i7-8086K in the giveaway event. As a macOS user for years, I've been wondering if I could put more use into it other than gaming. So I started to try installing a macOS on it.

Preparation

The Original Setup

Here is the setup with cost in CN¥ (¥17250 in total): - Intel Core i7-8086K - free - ASRock Z370 Taichi - 1500 - G.Skill DDR4-3200 (C14) 8 GB * 2 - 1700 - ASUS DUAL RTX2080 O8G - 6500 - SAMSUNG 970 EVO 500 GB * 2 - 2000 - CORSAIR H100i v2 - 800 - CORSAIR RM650x - 850 - NZXT H440 Matte Black - 500 - DELL S2417DG - 2900 - JBL Flip 4 - 500

For other external devices, I already had these so there's no extra cost: - Apple Keyboard - SteelSeries Sensei RAW

Specifications

Here are the specs with details: - Intel Core i7-8086K (8th Gen Coffee Lake) - Intel UHD 630 Graphics (built-in) - ASRock Z370 Taichi - Intel Z370 Chipset - Realtek ALC1220 (Audio) - Intel I219-V (Ethernet) - Intel I211-AT (Ethernet) 1 - Intel AC 3168 (Wi-Fi & Bluetooth) 2 - Broadcom BCM943602CS (Wi-Fi & Bluetooth) - ASMedia ASM3142 (USB 3.1 Gen 2) - ASMedia ASM1074 (USB 3.1 Gen 1) - G.Skill DDR4-3200 (C14) 8 GB * 2 (with XMP on) - ASUS DUAL RTX2080 O8G 3 - SAMSUNG 970 EVO NVMe SSD 500 GB * 2 4

For install media, I bought a SanDisk CZ800 128 GB (200 CN¥). And I have a 15″ MacBook Pro (Mid 2015) to do all the pre-install work.

Need-to-knows Before Installation

There are two keys to installing macOS on a PC: - Use a bootloader to load the system - Let the system recognise the hardware​

We use Clover EFI Bootloader to do both and Clover Configurator to configure it.

Here's an example of installing macOS Mojave 10.14.1.

Pre-install

Download macOS and Create Install Media

First, download macOS Mojave from App Store.

While downloading, erase the USB disk with Disk Utility. Note that the scheme should be "GUID Partition Map" and the format should be "Mac OS Extended (Journaled)".

Then, use the command line tool to create install media as followed (note that the volume name should be changed if you use a different volume name):

$ /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Install\ macOS\ Mojave/

Install Clover EFI Bootloader

Download the latest version of installer and install. During installation, select location to your install media volume and click "Customize". Choose these options: - Clover for UEFI booting only - Install Clover in the ESP - UEFI Drivers - VBoxHfs-64 - ApfsDriverLoader-64 - AptioMemoryFix-64

We are using a UEFI motherboard so that we should install Clover for UEFI booting. And Clover should be installed in the ESP (EFI System Partition) used for booting the system. VBoxHfs-64 and ApfsDriverLoader-64 are EFI drivers for Clover to recognize partitions of HFS or APFS format. AptioMemoryFix-64 is used to fix memory problems on UEFI firmware, for example, AMI Aptio used by my ASRock Z370 Taichi.

Configure Clover and Install Kexts

To configure Clover, mount the ESP under "Mount EFI" section. Then, load /EFI/CLOVER/config.plist.

First, deselect and delete everything you see in the Clover Configurator for a clean install.

Must-have Kernel Extensions

Kexts (kernel extensions) should be put under the corresponding directories in /EFI/Clover/kexts.

FakeSMC is a must. Its sensor plugins are recommended.

Lilu is needed for other patches coming in the form of kernel extensions.

Intel Core i7-8086K CPU

Core i7-8086K is an 8th Gen Coffee Lake CPU. So FakeCPUID is not needed. All we've got to do is add a "change HECI to IMEI" patch (find 48454349 replace 494D4549) to DSDT and check FixHeaders under "ACPI" section to fix mach reboot problems. Halt Enabler for preventing shut down and reboot problems is not needed in my case, however YMMV. Additionally, Generate PStates and Generate CStates are recommended for Turbo Boost. And dart=0 boot flag should be checked to disable VT-d if it's enabled in the BIOS, just like the old times.

Intel UHD 630 Built-in iGPU

For Coffee Lake, setting ig-platform-id or -disablegfxfirmware boot flag is no longer needed. Instead, we need to add "change GFX0 to IGPU" (find 47465830 replace 49475055) and "change PEGP to GFX0" (find 50454750 replace 47465830) patches to DSDT. Make sure the former is patched before the latter or something very wrong is going to happen.

On the other hand, IntelGraphicsFixup is obsolete, too. It's replaced by WhateverGreen.

Realtek ALC1220 Audio

First, add "change HDAS to HDEF" patch (find 48444153 replace 48444546) to DSDT.

Use AppleALC to enable native HD audio. Add alcid=layout-id (alcid=11 works for me) boot flag to enable it. Supported codecs can be looked up in the wiki. There might be more than one layout for each codec. Try each of them to find the best one working.

Additionally, AFGLowPowerState should be used if there are noises when idling and ResetHDA should be used if there is no sound after a cold boot. They are both under "Devices/Audio" section.

Intel I219-V Ethernet

Use IntelMausiEthernet for Intel I219-V.

Broadcom BCM943602CS Wi-Fi & Bluetooth

I bought a Broadcom BCM943602CS Airport card and plugged it in using a PCIe adaptor. Note that the Bluetooth module needs to be connected to an onboard USB 2.0 header to work. Also, certain x16 full-length PCIe slots on some motherboards work only with graphics cards (mine is one of them).

If you already have a certain type of device recognised but not functional. You need to disable it. In my case, my Intel Bluetooth​ device needs to be disabled for the Broadcom one to work. You can find the port name with IORegistryExplorer. It's usually under one of the USB hubs. It's HS09 for me. Then, add uia_exclude=port-name (mine is uia_exclude=HS09) boot flag to disable it.

The Airport card should be fully functional without any hacks.

Coffee Lake and Third-party (ASMedia) USB

First, add a USB port limit kext patch (each version of macOS has a different method to patch it, this only works on 10.14.1): - Name: com.apple.driver.usb.AppleUSBXHCI - Find 83FB0F0F 838F0400 00 - Replace 83FB0F90 90909090 90

Then, use USBInjectAll to make every USB controller fully functional.

Additionally, FixOwnership option under "Devices/USB" section would be needed if you cannot enable XHCI handoff in the BIOS.

SAMSUNG 970 EVO NVMe SSD

NVMe is natively supported by 10.14.1 and TRIM is enabled by default. So there is nothing we need to do.

Generate SMBIOS

In the "SMBIOS" section, use the drop-down menu to pick a model with specs similar to the PC. Mobile option is related to power management. For laptops, it should be checked. Trust option should be used when memory is not recognised correctly.​ Click "Check Coverage" to check if the serial number is being used by a real Mac to avoid conflict.

This step should make App Store, iCloud, iMessage, FaceTime services fully functional.

Install

From here, we are all done. Plug in the USB disk and boot from the UEFI partition on it. Choose "Install macOS Mojave" in Clover's GUI. Press space to use extra boot flags if you need them. For example, '-v' for verbose if you encounter any errors. Press enter to boot.

First, erase the whole disk with Disk Utility. Note that the scheme should be "GUID Partition Map" and the format should be "APFS". Then, close Disk Utility. Choose "Install macOS Mojave" and follow the steps.

Post-install

After installation, repeat the steps to install Clover EFI Bootloader to your system partition. Copy and paste /EFI/BOOT and /EFI/CLOVER from your install partition to the corresponding location in your system partition. Then, we have a fully functional bootable macOS installed.

Set Timeout to 0 under "Boot" section in Clover Configurator to boot directly to macOS without Clover's GUI.

Known-Issues

  • Not all sensors are working
  • No fan controls
  • Screen flickers between first and second stages of booting
  • Intel Power Gadget displays 0 GHz GFX frequency
  • There's a small delay when shutting down or restarting

Some says the iGPU issues can be fixed by an Intel Framebuffer patch. I've looked into it but no luck yet.


  1. I only need one (actually none) of the cabled ethernet controllers, so the other one is ignored. 

  2. There are no existing solutions for Intel Wi-Fi & Bluetooth product. So I bought an Airport card from a dissembled Mac instead. 

  3. There is no support for 20 series yet. Primary GPU should be set to onboard for using macOS. 

  4. One for Windows, one for macOS.