[Guide] Intel Kaby Lake NUC7 using Clover UEFI (NUC7i7BNH, NUC7i5BNK, NUC7i3BNH, etc)

Discussion in 'Sierra Desktop Guides' started by RehabMan, May 4, 2017.

  1. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    May 4, 2017 at 2:40 PM #1
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Overview

    The purpose of this guide is to provide a step-by-step guide to install Sierra or El Capitan on the Kaby Lake Intel NUC7 series Intel NUC mini computers. My NUC7 is the NUC7i7BNH, although I expect the guide will work on other similar models.

    I installed with 8GB RAM (one stick), and an SM951/AHCI M.2 SSD. Recommend two sticks in dual-channel.

    This guide does not use Unibeast nor Multibeast, but uses automated scripts to handle most of the post-installation details.


    Some notes on the NUC7i7BNH

    The NUC7i7BNH is similar to other NUCs. This particular NUC has a single M.2 slot for SSD and support for a 2.5" SATA SSD or HDD.

    Like the previous Skylake NUC6 the NUC comes with MSR 0xE2 locked and there is no option in the BIOS to unlock it. And as with the previous generation, this NUC has soldered WiFi/BT, with no option to replace it. For networking, Ethernet is used.

    The NUC7i7BNH has an HDMI port and a Thunderbolt3 (USB-C) port. I was able to use my DP screen using a USB-C->DP cable (my monitor does not offer full resolution over HDMI).


    What you need

    - Kaby Lake Intel NUC7 series mini computer
    - macOS (or El Capitan) downloaded from the Mac App Store
    - 8GB USB stick (maybe 16GB, if your stick is one of those "small 8GB" units)
    - SATA SSD/HDD or M.2 AHCI (x2) or SATA SSD (keyed for B or B+M)
    - RAM (my unit has 8GB RAM installed)


    BIOS settings

    On my NUC7i7BNH, BIOS version 040 was installed (have not updated to 045 yet).

    The boot menu and BIOS setup can be accessed by mashing the F2 key during BIOS startup. After the main screen comes up choose "Advanced". That gets you to the main BIOS setup screens.

    To start, choose "Load Defaults" (choose from the menu or press F9 in the BIOS setup).

    Then change:
    - Boot->Boot Configuration, disable "Network Boot"
    - Power->Secondary Power Settings, "Wake on LAN from S4/S5", set to "Stay Off"

    These settings are important but are already set as needed by "Load Defaults"
    - Devices->Video, "IGD Minimum Memory" set to 64mb or 128mb
    - Devices->Video, "IGD Aperture Size" set to 256mb
    - Boot->Secure Boot, "Secure Boot" is disabled
    - Security->Security Features, "Execute Disable Bit" is enabled.

    Suggested:
    - Boot->Boot Priority->Legacy Boot Priority, disable "Legacy Boot" (it will reduce confusion)


    Preparing USB and initial Installation

    This guide assumes you're starting with nothing on your HDD/SSD (or nothing important). Make sure you backup your important files before starting.

    You can also leave Windows intact, but it can get tricky. Read here for more information: http://www.tonymacx86.com/multi-booting/133940-mavericks-windows-8-same-drive-without-erasing.html

    This guide for creating USB and installing using Clover UEFI works well: http://www.tonymacx86.com/el-capita...de-booting-os-x-installer-laptops-clover.html

    Special notes:

    - This guide requires Clover v3279 or later (I used v4061)

    - Definitely copy IntelMausiEthernet.kext to Clover/kexts/Other as having network support during post-install is not only helpful, but the rest of this guide depends on it.

    - You do not need VoodooPS2Controller.kext as it is laptop specific.

    - If you have HD515/HD520/HD530 on 10.12.5+, you may need to add Lilu.kext and IntelGraphicsFixup.kext

    - Use the 'createinstallmedia' approach. It works well, and there is little chance for pilot error. This method also gives you an OS X recovery partition.

    - Use the config_install_nuc7.plist linked by this post instead of the laptop specific config.plist files linked by the guide. Make sure you copy it to EFI/Clover/config.plist (after installing Clover). Clover will not read a file named config_install_nuc7.plist.

    For installation, config_install_nuc7.plist: https://github.com/RehabMan/Intel-NUC-DSDT-Patch/raw/master/config_install_nuc7.plist


    Post Installation

    Install Clover UEFI as described in the guide linked by the previous section (post #2). After installing Clover, and configuring it correctly (config.plist, kexts, HFSPlus.efi, etc) you should be able to boot from the HDD/SSD.

    Most everything works, but there are a few things to tidy up, drivers to install, etc. For that, we need to patch ACPI, provide a proper config.plist, and install the kexts that are required.

    Since you have IntelMausiEthernet.kext already injected by Clover, you should have internet access simply by using an Ethernet cable to your router. Plug it in and make sure you have internet access before continuing.

    Installation of the tools and patching is easy provided the scripts and tools at the repository: https://github.com/RehabMan/Intel-NUC-DSDT-Patch

    To start, the developer tools must be installed. Run Terminal, and type:

    Code (Text):

    git
     
    You will be prompted to install the developer tools. Since you have internet working, you can choose to have it download and install them automatically. Do that before continuing.

    After the developer tools are installed, we need to make a copy of the project on github.

    In Terminal:
    Code (Text):

    mkdir ~/Projects
    cd ~/Projects
    git clone https://github.com/RehabMan/Intel-NUC-DSDT-Patch nuc.git
     
    Note: All commands for Terminal that follow will assume you have set the current working directory to ~/Projects/nuc.git (unless otherwise stated).

    To change the current working directory in Terminal:
    Code (Text):

    cd ~/Projects/nuc.git
     
    Now it is time to install some more tools and all the kexts that are required...

    In Terminal:
    Code (Text):

    ./download.sh
    ./install_downloads.sh
     
    The download.sh script will automatically gather the latest version of all tools (patchmatic, iasl, MaciASL) and all the required kexts from bitbucket. The install_downloads.sh will automatically install them to the proper locations.

    To finish the setup, we need a correctly patched ACPI.

    In Terminal:
    Code (Text):

    make
    make install_nuc7
     
    The 'make' causes the patched files to be compiled (with iasl), the results placed in ./build.

    Finally, 'make install_nuc7', mounts the EFI partition, and copies the built files where they can be loaded by Clover (to EFI/Clover/ACPI/patched).

    Note: No actual patching of DSDT/SSDT is happening here. We are simply building an add-on SSDT (SSDT-NUC*.aml) which provides the necessary changes. This is because the NUC requires only minimal patching so a full patched DSDT is not needed.


    Power Management

    Everything required for CPU/IGPU power management is already installed with the steps above.
    There is no longer any need to use the ssdtPRgen.sh script.

    Be aware that hibernation (suspend to disk or S4 sleep) is not well supported on hackintosh.

    You should disable it:
    Code (Text):

    sudo pmset -a hibernatemode 0
    sudo rm /var/vm/sleepimage
    sudo mkdir /var/vm/sleepimage
     
    Always check your hibernatemode after updates and disable it. System updates tend to re-enable it, although the trick above (making sleepimage a directory) tends to help.


    Final config.plist

    Up to now, you've been using the same config.plist we were using for installation. After all the APCI files are in place (previous two steps), you're ready to use the final config.plist from the NUC repo.

    First, mount the EFI partition:
    Code (Text):

    sudo ./mount_efi.sh /
     
    Then copy the file:
    Code (Text):

    cp config_nuc7.plist /Volumes/EFI/EFI/Clover/config.plist
     
    You could also copy the file using Finder.

    After copying the config.plist from the repo to EFI/Clover/config.plist, you should customize the SMBIOS so you have a unique serial. You can use Clover Configurator to do this (use google to find/download it). DO NOT use Clover Configurator to edit your actual config.plist. Instead edit a "dummy" config.plist to create the SMBIOS data and then use copy/paste with a plist editor (I use Xcode) to copy the SMBIOS section into my active config.plist. Clover Configurator is too buggy and cannot be trusted with edits to your real config.plist.

    Note: The config.plist in the repo is using iMac14,2. It works. You could also use iMac17,1. The best match would be a Kaby Lake Macmini, but Apple has not yet produced one as I write this guide.

    Note regarding HDMI ports: The provided config-nuc7.plist is optimized specifically for my NUC which happens to have HDMI and USB-c. Your NUC may have a different configuration, and therefore may require different framebuffer patches.


    Do not stop reading

    Although most of the post-install tasks are done, continue to read this guide. It it has important information you should know about.

    Be sure to visit "Known Problems", especially the instructions in the "Audio:" section. Typically, even after completing all the above tasks, audio will not work on the first reboot. You must follow the specific instructions in that section in order to get the audio kexts in cache.

    In the case of a problem, don't bother asking about with without all files requested in "Problem Reporting".


    Updates to the patch repositories

    From time to time, updates may become available to the NUC repository. In the event of such updates, you may want to update your copies, and re-patch ACPI with the updates.

    Since you're using git, it is easy...

    In Terminal:
    Code (Text):

    git stash # to save any local changes you might have made
    git pull
    make clean
     
    Then you can follow the instructions for updating config.plist or using 'make install_nuc7' to copy the updated SSDT.

    Updates to kexts may happen at any time. You can download and install the latest versions manually (by going to their respective release sites), or by using ./download.sh, and ./install_downloads.sh.


    What works

    I have tested the following features:
    - UEFI booting via Clover
    - DP/HDMI video/audio
    - AirPlay mirroring to AppleTV
    - native USB3/USB2
    - native audio with AppleHDA [see below, "Known Problems"]
    - native power management
    - accelerated graphics for HD650 including OpenCL
    - wired Ethernet
    - Mac App Store working
    - sleep (hibernation disabled, not tested)
    - Messages/FaceTime (working on 10.10.3 even though I didn't run through the guide: http://www.tonymacx86.com/general-help/110471-how-fix-imessage.html)


    Not tested/not working

    The following features have issues, or have not been tested:
    - internal USB headers

    In theory, this unit has two internal USB headers. I did not test them, and as a result, the custom USB configuration in SSDT-USB.dsl does not have them enabled. If you enable them and discover the port numbers, please contribute and I will add the ports to the SSDT. You can boot with -uia_ignore_rmcf to cause USBInjectAll.kext to disregard the custom configuration data in the SSDT (which enables all ports).

    I don't have a 4k monitor, so I didn't test 4k DP video. Reports are that it works with certain monitors.

    I do not have many Thunderbolt-3 devices. But I did test with a USB3 adapter to a USB3 hub. Although it worked if the device was plugged in prior to booting, hotplug was not working/not reliable. Maybe a BIOS update will help. The USB-C port did work for my DP monitor.

    BT/WiFi is soldered Intel. They are not supported well on macOS/OS X.

    Although I suspect this guide will work for 10.11.6, I tested only 10.12.4.

    Monitor hotplug and dual monitors remain unreliable just as with other Skylake computers. Maybe when there is a Macmini with Skylake or Kaby Lake, Apple will fix...


    Known Problems

    Find My Mac/Locking: Find My Mac does not work properly. Don't lock your mac because it's difficult (or impossible) to unlock again.

    Audio: After installing new/updated kexts or after the initial installation, you may lose audio.

    To fix:
    - reboot without caches (hit space at Clover, select without caches)
    - rebuild cache
    Code (Text):

    sudo touch /System/Library/Extensions && sudo kextcache -u /
     
    - reboot normally (if needed, two times)

    Alternative Fix:

    Run pre-patch_hda.sh to patch your AppleHDA binary based on the patches in your current config.plist on your EFI partition. Do not use this script if you have the wrong config.plist on your EFI partition!

    If you have the wrong config.plist, the script will patch AppleHDA with the wrong patches. No backup is made, so to restore, you would need to use the OS X/macOS installer.

    Usage:
    Code (Text):

    cd ~/Projects/nuc.git
    ./pre-patch_hda.sh
     
    No Ethernet after wake: If you disable "Wake on LAN" in BIOS, DO NOT enable "Wake for Ethernet Network access" in SysPrefs->Energy Saver.

    Audio: Currently the XML files for AppleHDA have not been updated to support the internal mic on the NUC7, therefore the internal mic does not work.


    Other post-install tasks

    Bluetooth: If you get the Bluetooth Setup Assistant popup, go to SysPrefs->Bluetooth->Advanced, uncheck the boxes.

    BIOS settings for fan control: I find with the default settings, the fan runs excessively fast. Change in Cooling->CPU Fan Header to your own preferences.


    Major updates

    For example... 10.10 to 10.11.

    First step should be to update to the latest repository.

    To do so:
    Code (Text):

    git stash
    git pull
    make clean
    make
    make install_nuc7
    ./download.sh
    ./install_downloads.sh
     
    Also update Clover to the latest using the Clover installer. Be sure to fix EFI/Clover/kexts, so that only EFI/Clover/kexts/Other is existing. All version specific directories under EFI/Clover/kexts should be removed.

    Also update config.plist at EFI/Clover/config.plist to the latest content from the repo. Be sure to retain your own SMBIOS data at config.plist/SMBIOS.

    Now you can update via the App Store. Just boot the installer/updater upon restart.

    After updating, run ./install_downloads.sh again:
    Code (Text):

    ./install_downloads.sh
     
    Known issue #1: Having HDMI audio enabled on the Skull Canyon NUC causes panic/reboot in when the update/installer is booted. This can also happen during the initial installation process. There are several ways to work around this issue, I will suggest three options below:

    1) Boot with FakeID 0x1 (Clover Options, Graphics Injector, FakeID, set to 0x1). Once you boot into the system and rebuild cache, you can boot normally.

    2) Use a properly prepared USB to boot the installer. The USB does not have patched ACPI, therefore no "hda-gfx" injection, therefore no HDMI audio support, therefore no panic/reboot.

    3) Prior to attempting to boot the update/installer, you can disable "hda-gfx" injection by editing the SSDT that is in ACPI/patched. In my case, I edited the *.dsl files (commented out the relevant "hda-gfx" line from SSDT-IGPU.dsl) and used 'make install_nuc6sc' to install the updated files. After updating, I restored the "hda-gfx" injection and installed again with 'make install_nuc6sc'. You could also use your USB, or boot using the appropriate config_install*.plist.


    Problem reporting

    Problem reports should be accompanied by various files that allow your progress to be accounted for...

    In terminal,
    Code (Text):

    rm -Rf ~/Downloads/RehabMan
    mkdir ~/Downloads/RehabMan
    cd ~/Downloads/RehabMan
    patchmatic -extract
     
    Post contents of Downloads/RehabMan directory (as ZIP).

    Also, post ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

    And output from:
    Code (Text):

    kextstat|grep -y acpiplat
    kextstat|grep -y appleintelcpu
    kextstat|grep -y applelpc
    kextstat|grep -y applehda
    ls -l /System/Library/Extensions/AppleHDA.kext/Contents/Resources/*.zml.zlib
    md5 /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
     
    Also, press F4 at the main Clover screen, then compress and post the EFI/CLOVER folder in use. And please, in order to reduce the size, omit EFI/Clover/themes... especially if you have an overabundance of themes installed.

    Also post output of:
    Code (Text):

    sudo touch /System/Library/Extensions && sudo kextcache -u /
     
    Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
     
    Last edited: Jun 13, 2017
  2. rustyshelf

    rustyshelf

    Joined:
    May 5, 2017
    Messages:
    1
    May 10, 2017 at 12:20 PM #2
    rustyshelf

    rustyshelf

    Joined:
    May 5, 2017
    Messages:
    1
    Nice guide! I got my nuc7 (i5 model) working great based on this. Obviously WiFi and BT don't work but a cheap USB dongle fixed BT for me. The last problem I have is that iTunes won't play DHCP content, which I haven't been able to find a workaround for. I followed various guides for things like Shiki but iTunes still pops up a DHCP error if I try and play any HD movies I purchased from Apple. I don't suppose you've had any luck here or know of things I could try?
     
  3. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    May 10, 2017 at 2:26 PM #3
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Shiki.kext + Lilu.kext is supposed to solve the DRM problem.
    I don't use DRM protected content, so it is not an issue for me...
     
  4. ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    May 13, 2017 at 8:51 PM #4
    ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    Hello RehabMan

    first of all thanks for your guide. I got my first hackintosh with El Cap (10.11.6) running thanks to your work. The system is a NUC7i5bnh. It had BIOS Version 042 when it came out of its box and I have since upgraded it to version 046.

    The boot disk is on a Samsung 950 EVO NVMe, therefor I changed your SSDT-NUC7.aml to include the class-code spoof.
    Other than that I followed your guide (at least I think i did :) )

    Still there are two problems left that I wasn't able to solve myself.

    * Graphics
    SystemInfo.png

    As far as I understood from reading posts on the site there should be a kext loaded for the graphics.

    Also, there seems to be no audio. In the system settings panel there are no audio devices.

    Could you please take a look at my debug infos? I hope I'm not wasting your time with some really obvious mistake.
     

    Attached Files:

  5. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    May 13, 2017 at 10:58 PM #5
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    If you made the NVMe changes to SSDT-NUC, why do you have a separate SSDT_NVMe-Pcc.aml?

    I can't look in detail ATM, but seems like a potential for duplicate.

    Edit: Just checked. That is your mistake... your edit to SSDT-NUC7.aml invalidates the entire thing becuase SSDT_NVMe_Pcc.aml is loading first.

    Suggestion: Don't modify SSDT-NUC7 (use github version). You can simply add the NVMe SSDT (as you already have).
     
    Last edited: May 14, 2017
  6. ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    May 14, 2017 at 11:44 AM #6
    ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    Thanks for looking at my problem.

    I tried different ways to boot my system now.

    * the github version of SSDT-NUC7.aml with the NVMe SSDT
    * only my modified version of SSDT-NUC7

    Both result in the same behavior. The system boots with the apple on the screen and the progress bar halfway through, then the graphics scramble and the system reboots. I tried booting in verbose mode but due to the scrambled graphics I can't see where it stumbles.
     
  7. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    May 14, 2017 at 2:21 PM #7
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Read post #1, "Problem Reporting"

    Note: For initial boot, you may need to disable "hda-gfx" injection as per post #1. After you get AppleHDA in cache, you can then re-enable it.
     
  8. the_trit

    the_trit

    Joined:
    Apr 26, 2012
    Messages:
    7
    Mobo:
    Lenovo V570
    CPU:
    i5-2430M
    Graphics:
    Intel HD3000
    Mac:
    Mac mini
    Mobile Phone:
    Android
    May 15, 2017 at 1:33 AM #8
    the_trit

    the_trit

    Joined:
    Apr 26, 2012
    Messages:
    7
    Mobo:
    Lenovo V570
    CPU:
    i5-2430M
    Graphics:
    Intel HD3000
    Mac:
    Mac mini
    Mobile Phone:
    Android
    How does this gen compare to the previous in terms of fan noise? Would you consider it a worthwhile purchase over skylake?
     
  9. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    May 15, 2017 at 2:17 AM #9
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    149,147
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    I think it is similar... similar fan design, so under similar loads, similar noise levels.
    A quieter system would require a form factor redesign.
     
    obonto and the_trit like this.
  10. ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    May 16, 2017 at 6:48 PM #10
    ralle12345

    ralle12345

    Joined:
    May 5, 2017
    Messages:
    4
    Mobo:
    NUC7I5BNH
    At least graphics works now:

    systeminfo2.png

    At first I noticed in the clover options during booting that inject intel was not checked. When I checked it then intel graphics was detected and used. Inspection of the config.plist showed this line:

    https://github.com/RehabMan/Intel-NUC-DSDT-Patch/blob/master/config_nuc7.plist#L170

    When set to </true> graphics is loaded just fine.

    For the record here are the two versions of clover config that I tried. clover-notworking1.zip is the one with the github version of config.plist and my NVMe .aml and clover-notworking2.zip is the one with my patched version of your SSDT. Both result in a non-booting system with the progress-bar going half-way through and then rebooting.
     

    Attached Files:

Share This Page