Home

Awesome

GA-Z77X-D3H Monterey Hackintosh 🍎

⚠️⚠️ Warning: Abandonware Ahead ⚠️⚠️

This project is no longer actively maintained. In January 2022 I have upgraded from my Z77 Ivy Bridge Hackintosh to an Z590 Rocket Lake Hackintosh. See more at https://github.com/nickw444/opencore-efi-z590.

🖥 Hardware Details

ComponentDetails
MoboGA-Z77X-D3H
GFXGV-RX580GAMING-8GD
Intel HD4000
AudioVia VT2021
NetworkAtheros AR8151 v2.0
BCM943602CS (Identified as BCM94360CD) AirPort Extreme (0x14E4, 0x133)
BluetoothBCM943602CS
USBIntel USB2/3 7 series chipset
VIA VL800 (lower 4 ports on rear), Unsupported

My setup

⚠️⚠️ Warning ⚠️⚠️

This is the EFI configuration for my very specific combination of hardware. It comes with absolutely no guarantees whatsoever.

It is extremely unlikely that this configuration will even work for you, even if your hardware combination is very similar. Please use it as a learning/reference resource only.

EFI, in git?

For my sanity, I have revisioned my /Volumes/EFI/EFI directory under git. This allows me to easily diff any changes I have made and easily roll back at any point in time.

However, typically the EFI partition is a tiny, around 200MB in size. This does not work well when there is a .git directory living inside, as every revision of binary files will be stored in here, easily filling up the space.

As a workaround, it is possible to place the .git directory across different mount-points by instead creating a file, .git and pointing it to the real .git location with the following directive:

gitdir: /Users/nickw/repos/opencore-efi/.git

Secret Management

With this repository being publicly shared on GitHub, there are going to be things I do not wish to share, such as SystemUUID, SystemSerialNumber, and MLB.

I have implemented a simple shell script, oc-private.sh to implement git clean and smudge filters to transparently remove and re-add secrets when staging and unstaging files.

The hooks can be installed by running

./resources/bin/oc-private.sh install

❓ Guides

✅ Past Success for similar board

💤 Sleep/Wake

After installing Monterey, sleep was completely broken, even after re-mapping USB ports. I narrowed this down to being due to the iGPU (HD4000) being enabled, but unsupported by Monterey. This can be solved by either:

<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
<dict>
        <key>disable-gpu</key>
        <data>AQAAAA==</data>
</dict>

Troubleshooting

jq -r 'map(.timestamp | match("\\d+\\-\\d+\\-\\d+\\s+\\d+:\\d+") | .string ) | .[]' | uniq

log show --start "2019-05-02 12:00:00" --end "2019-05-02 18:00:00"  --style json | jq -r 'map(.timestamp | match("\\d+\\-\\d+\\-\\d+\\s+\\d+:\\d+") | .string ) | .[]' | uniq

✔️ Post Setup Checks

Things to check post-setup/upgrade

🥾 Bootloader

OpenCore used as boot loader (Clover replacement). Bootloader config is revisioned via git: https://gitlab.com/nickw444/opencore-efi (this repo)

🖥 Hardware

BIOS Settings

Saved configurations can be found in resources/bios-config/

Diffable Settings:

BIOS Features
Peripherals
Power Management

🔊 Audio

Works OOB with AppleALC using inject=5

⌨️ USB

USBInjectAll (UIA) was previously used to inject ports using custom SSDT. However it is now possible to inject ports using a simple injector kext instead of using UIA.

The injector kext can be found in OC/Kexts/USBMap.kext. This injector kext was created with USBMap via this guide.

Quirks:

Other Resources:

Port Mapping

PCI/ACPI Map

├── EHC1 (Bus servicing internal USB2 headers)
│   └── PRT1 (Internal Hub, location 0x1d100000)
│       ├── PRT5 (Front Panel P3)
│       ├── PRT6 (Front Panel P4)
│       ├── PRT7 (Front Panel P5 - Card Reader)
│       └── PRT8 (Front Panel P6 - Card Reader USB)
├── EHC2 (Bus servicing back panel USB2)
│   └── PRT1 (Internal Hub, location 0x1a100000)
│       ├── PRT3 (Back Panel P4)
│       ├── PRT4 (Back Panel P3)
│       ├── PRT5 (Back Panel P2)
│       └── PRT6 (Back Panel P1)
└── XHC
    ├── HS01 (Front Panel P1 USB2 - Spliced internally, for BT Controller - see below)
    ├── HS02 (Front Panel P2 USB2)
    ├── SS01 (Front Panel P1 USB3)
    ├── SS02 (Front Panel P2 USB3)
    ├── SS03 (Back Panel P3 USB3)
    └── SS04 (Back Panel P4 USB3)

USB Map

The above listed ports/locations are found by temporarily using USBInjectAll (with EHCX -> EH0X remap) to inject all ports to find their location IDs. These IDs can then be worked into the aformentioned injector kext.

🕸 Ethernet

Card is Atheros AR8151 v2.0. Compiled my own version of AtherosL1cEthernet.kext against High Sierra frameworks. Works in Mojave and Monterey.

🖥 Intel GPU HD4000

HD4000 is no longer supported in Monterey, and thus must be disabled, else risk problems with sleep. This can be done by:

<key>PciRoot(0x0)/Pci(0x2,0x0)</key>
<dict>
        <key>disable-gpu</key>
        <data>AQAAAA==</data>
</dict>

Before Monterey Current ig-platform-id: 0x01620007. iGPU is being used as secondary with dGPU as primary.

Known IDs

AAPL,ig-platform-idMemory (MB)PipesPortsCommentNotes From Testing
0x016600009634
0x016600019634
0x016600026431No DVI
0x016600036422
0x016600043231No DVI
0x016200053223
0x01620006000No displayPanic on wake from sleep without agdpmod=vit9696
0x01620007000No displayPanic on wake from sleep without agdpmod=vit9696
0x016600086433
0x016600096433
0x0166000a3223
0x0166000b3223

Official Docs

Other Docs

🔌 CPU Power Management

📶 Bluetooth / WiFi w/ Broadcom Card

BCM943602CS: 802.11ac 3x3, (1.3Gbps / 5GHz) + Bluetooth 4.1. The module will be applied in MacBook Pro computers (2015)

Bluetooth USB connection must be connected to XHC bus and marked as internal (DSDT type 255), otherwise this will cause random wake as soon as machine goes to sleep. Recall all USB ports on the back panel are routed via EH02 via a hub, so we cannot use that, and instead must splice the internal USB (source)

What worked for me in the same fenvi is making sure that the connector type for the internal usb header is set to internal port. I used fbpatcher to do it. 1

Previously used a USB3 20 pin splitter to splice, but this caused issue with USB detection from the FP ports. Instead a splice was made directly in the cable from the case. May need to "unsplice" if a replacement mobo has better internal USB support.

Bluetooth Firmware Issues

This didn't seem necessary for getting BT support for Catalina, however I recall that once the firmware is loaded once the issue goes away. The issue may re-appear when returning back from Windows (which clobbers the firmware), and therefore BrcmPatchRAM might need to be re-introduced.

Add device ID so the firmware is loaded at boot (Source):

        <key>0a5c_21ff</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>com.no-one.BrcmPatchRAM2</string>
            <key>DisplayName</key>
            <string>Broadcom BCM20702 Bluetooth 4.0 +HS USB Device</string>
            <key>FirmwareKey</key>
            <string>BCM20702A1_001.002.014.1443.1463_v5559</string>
            <key>IOClass</key>
            <string>BrcmPatchRAM2</string>
            <key>IOMatchCategory</key>
            <string>BrcmPatchRAM2</string>
            <key>IOProviderClass</key>
            <string>IOUSBHostDevice</string>
            <key>idProduct</key>
            <integer>8703</integer>
            <key>idVendor</key>
            <integer>2652</integer>
        </dict>

The thing I'd check is the Vendor and drvice IDs to ensure they're exactly right. For the BCM94360CD (the three-antenna for WiFi, one antenna for BT4.0 design), the Bluetooth controller needs to be 05ac:828d and the WiFi needs to be 106b:0111 (those are technically sub vendor and device IDs, I guess because the main vendor and device IDs of 14e4:43a0 refer to the underlying Broadcom chip itself). Apparently there are other Broadcom 4360 chipset-based cards with different sub product IDs like 0136 that get sold and aren't the exact right models and thus don't wind up unlocking every feature properly.

Source

Fenvi T-919 is the easy answer, it’s a Broadcom BCM94360-based card that should support native functionality in macOS. You will need a driver for it for Windows. You could also get an adapter and an Apple official BCM94360 card (a 2-antenna -CS or -CS2 from a MacBook Air, or a 4-antenna -CD from an iMac) and just use the Bootcamp drivers in Windows (not sure about Linux, sorry).

Source

Handoff Stopped Working

Log in and out of icloud on all your devices. After that, wait a couple hours / days and literally do nothing, it'll start working out of thin air. Happened to countless users including me with a native Fenvi t919.

Source