January 4, 2024

Hackintosh Sonoma Wi-Fi fix

Environments


Tools


Steps

  1. Mount your Mac EFI partition, open config.plist using OCAuxiliaryTools (or any other plist edit tool you like)

  2. Copy IOSkywalkFamily.kext and IO80211FamilyLegacy.kext to EFI > OC > Kexts

  3. In OCAuxiliaryTools, go to Kernel > Add, the above two kexts we just added should appear here, if not you can add them manually.

    image-20240105195808097

    Be aware of the sequence! These are really matter otherwise you will encounter a white Apple logo without a progress bar when booting. It should be in the same sequence below:

    1. IOSkywalkFamily.kext
    2. IO8021FamilyLegacy.kext
    3. IO8021FamilyLegacy.kext/Contents/Plugins/AirportBrcmNIC.kext
  4. Set the MinKernal for both of them to 23.0.0

  5. Next, go to Kernel > Block. Add a new line and enter the following:

    Identifier: com.apple.iokit.IOSkywalkFamily

    (Optional) Comment: Allow IOSkywalk Downgrade

    Enabled: true

    Strategy: Exclude

    MinKernal: 23.0.0

    image-20240105200402102

  6. Go to Misc > Security, and set SecureBootModel to Disabled.

  7. Go to NVRAM > Add > 7C436110-AB2A-4BBB-A880-FE41995C9F82, add amfi=0x80 in boot-args, and remember to use space to separate the boot-args.

    Change the csr-active-config value to 03080000.

    amfi=0x80: amfi=0x80 is a bitmask that disables AMFI completely. The value 0x80 is equivalent to AMFI_ALLOW_EVERYTHING. with AMFIPass.

    AMFI: AMFI is the macOS kernel module that enforces code-signing and library validation. Rationale: Apple Mobile File Integrity (AMFI) validates that application code is validated. Impact: Applications could be compromised with malicious code.

    csr-active-config 03080000: used in OpenCore Legacy Patcher, is a “soft” SIP disable.

    image-20240105201001539

  8. Save the config.plist and click OC Validation at the top. If no error shows, quit OCAuxiliaryTools. Unmount your EFI partition.

  9. Restart your PC. During the restart, Reset NVRAM (If you cannot find Reset NVRAM, it was hidden by default. Click Space in the OC selector and it should pop up). After Reset NVRAM, restart your PC.

  10. After booting up, open OpenCore-Patcher. Select Post-Install Root Patch > Start Root Patching > Yes

    image-20240105202116893

    image-20240105202153137

    image-20240105202231522

  11. After the patching, restart your PC. During the restart, Reset NVRAM. After Reset NVRAM, restart your PC.

  12. Your Wi-Fi should be working now.


What’s more?

Because we disable the AMFI in the boot-args, apps based on Electron may not work properly. To fix this, add ipc_control_port_options=0 in boot-args.

image-20240105203455107


For the virtual machine that may not work properly issue, there is a fix that adds AMFIPass.kext and replaces the boot-args amfi=0x80 to -amfipassbeta. I tried but it was not working for me, so if you like, you can give it a try.


Last words

Although this is a way we can get our Wi-Fi back on Sonoma, but still, this is not a proper solution and has some drawbacks as well such as the virtual machine may not working properly, some apps that are based on Electron can not working (Eg. BaiduDisk). Think about these influences before you proceed.



References

About this Post

This post is written by Andy, licensed under CC BY-NC 4.0.

#Hackintosh#Sonoma#Broadcom