Contribute
Register

[Guide] Sierra on HP Spectre x360 native Kaby Lake Support

Status
Not open for further replies.
Joined
Jan 2, 2017
Messages
67
Motherboard
HP Spectre x360 (Clover) Board:827E
CPU
i5-7200U
Graphics
Intel HD 620, 1920 x 1080
This guide will walk you through the process of creating a Hackintosh out of a HP Spectre x360 (Kaby Lake Edition)

For reference: here is my current configuration:

---------------------------------------------------
UEFI BIOS F.34

i5-7200U

Intel HD 620 Graphics

512 GB SK hynix PC300 NVME

8 GB 1867 DDR3 RAM

Swapped wifi card: BCM94352Z (DW1560)
---------------------------------------------------


What's working:
  • Power management (idles down to 700 MHz with patched IOPlatformPlugin)
  • Webcam
  • Backlight with Brightness Keys
  • Audio and Microphone
  • USB Type A port
  • Trackpad
  • Sleep
  • Native NVME support
What's not working:
  • USB C Ports (I have no USB C devices to test with, see "Enabling USB C ports at the end of this guide for directions on how to turn them on)
  • Touchscreen
A note on battery life: You can expect around 5-6 hours of battery life after following this guide, which is not nearly as much as Windows. I have made all customizations I know of to lower power consumption, but if you find more please mention them in this thread.

So, let's start with the required tools:
  • two 16 GB usb drives
  • A working hackintosh or real Mac
Now, let's dive right in!


Step 1: Creating USB installers:

To create a working system, you’ll need a windows USB installer, some form of linux live CD (I use XUbuntu 17.04), and obviously a bootable copy of the Mac OS Sierra Installer. The windows media creation tool makes creating a bootable windows installer dead simple, so I’’ll just cover the process to create a bootable usb stick with a linux and Sierra partition

Creating a Combo Sierra Installer/ Linux Live CD

The live CD portion (note: if you only need the PreLoader.efi file you can skip this portion and download the attached binary)

Take your usb disk, and partition it into two partitions, the first formatted as Mac OS Extended (Journaled) and the second as ExFat. Make the first a bit larger than the second. Ensure that your partitioning scheme is GUID
  • Download Unetbootin (https://unetbootin.github.io)
  • Download your preferred flavor of linux
  • Open Unetbootin, and select your linux ISO file and the correct disk identifier
  • Make sure you picked the right disk, then click OK. Unetbootin will write a bootable image of your ISO to the disk

Creating a Mac OS USB
The createinstallmedia command is pretty well documented elsewhere, so if that is your preferred method, look around​

For those using a hackintosh to create install media, I would highly suggest following the disk utility portion of this guide: http://www.macworld.com/article/236...otable-os-x-10-10-yosemite-install-drive.html. It’s the only way I have been able to create a non corrupt installer.​


Installing Clover

I used the latest release of clover (at the time of writing r4128)​

Select the USB drive as your installation destination, and customize with the following options:
  • Install for UEFI booting only
  • Install Clover in the ESP
  • Under Drivers64UEFI:
    • EmuVariableUefi-64
    • OsxAptioFixDrv-64
  • Install RC Scripts on target volume
Then, replace the “CLOVER” folder on your USB’s EFI partition with the attached folder inside CLOVER.zip.

At this point use Clover Configurator (http://mackie100projects.altervista.org/download-clover-configurator/) to generate SMBIOS Data. Open up the config.plist inside of my CLOVER folder, and navigate to SMBIOS.
  • Click on the Magic Wand and select the MacBook Pro from the dropdown menu
  • Select MacBook Pro Retina (14,1) from the dropdown list of models
  • click "shake" several times on the Week of Manufacture and Unit Number values, then click OK
  • Check the serial number at https://checkcoverage.apple.com. You should be told: "We're sorry, but this serial number isn't valid. Please check you information and try again"
  • Copy the Serial Number into the board serial number field, then add five random uppercase letters after it. These letters can be anything but should not be copied from somewhere
  • Now launch terminal and enter the following command:
Code:
uuidgen
  • Run the command several times, then once you are satisfied, copy one of the generated UUIDs into the SmUUID Field.
  • These steps should generate a valid serial number for your hackintosh.

Now you should have a bootable Sierra and Linux Live CD USB​


Step 2: Format Disk to 4k sectors and partition:



In this step, we will format the disk to 4k sectors, and repartition it for use with OS X and Windows.

Note this will erase your ENTIRE DISK!! If you have any important data BACK IT UP

With that disclaimer, lets hop back into the guide

Now is a good time to disable secure boot, so go ahead and do that before you boot into Linux

Formatting your disk to 4k sectors

You will want to insert your linux live CD, and press F9 while booting to get to the boot loader selection menu, where you should be able to select the entry corresponding to your linux drive (These entries are usually named after the drive, not the boot loader, so you may accidentally pick OS X the first time, if so just reboot and try again)​

Once booted into linux, connect to wifi and install the following packages:
  • nvme-cli
  • smartmontools.
Now go into your terminal and enter the following:
Code:
sudo fdisk -l
Make note of the device path for your nvme drive (mine is /dev/nvme0n1)
now enter
Code:
sudo smartctl -a path-to-your-nvme-drive
(replacing path-to-your-nvme-drive with your device path)

the output should contain something similar to this
Code:
Supported LBA Sizes (NSID 0x1)

Id Fmt  Data  Metadt  Rel_Perf

0 +     512       0         0

1 -    4096       0         0
The two lines show us our drive supports 512 byte and 4096 byte (4k) sectors. (If this table isn’t showing up in output, try updating smartmontools)

The “+” shows us we are currently using the 512 byte format

To switch formats, issue the following command (replacing 1 with the Id column of the 4096 byte sector size)

Code:
nvme-format -l 1 path-to-your-nvme-drive
(replacing path-to-your-nvme-drive with your device path)

THIS COMMAND WILL FORMAT YOUR DRIVE, WIPING THE ENTIRE PARTITION TABLE!

Once the command runs, verify it worked by issuing:
Code:
sudo smartctl -a path-to-your-nvme-drive
(replacing path-to-your-nvme-drive with your device path)

Your output should now have a plus sign by the 4096 line and not the 512 one, like this:
Code:
Supported LBA Sizes (NSID 0x1)

Id Fmt  Data  Metadt  Rel_Perf

0 -     512       0         0

1 +    4096       0         0

Now, reboot into the Sierra installer. You should see the drive in disk utility. Format is as a GUID drive, with two HFS+ (Journaled) partitions. We will reformat one of these partitions in the windows installer, but if we create this partition as MS-DOS FAT or ExFAT will will write a hybrid MBR to the disk, causing Windows installation to fail.

Now install Mac OS Sierra onto your hard drive.​


Step 3: Install Windows and Easy UEFI:

Installing Windows shouldn’t be too difficult. You’ll need to format the empty partition you didn’t install Mac OS onto to NTFS while in the windows installer.

Once windows is installed, download and install EasyUEFI:http://www.easyuefi.com/index-us.html

Step 4: Install Clover onto your internal drive:

Boot into OS X, and install clover onto the internal drive. Check the following options:
  • Install for UEFI booting only
  • Install Clover in the ESP
  • Under Drivers64UEFI:
    • EmuVariableUefi-64
    • OsxAptioFixDrv-64
  • Install RC Scripts on target volume
  • Install Clover Preference Pane
Then, replace the “CLOVER” folder on your NVME's EFI partition with the CLOVER folder from your USB's EFI partition
Step 5: Get the Linux PreLoader.efi File (required to boot from internal partition):

HP has a bug in their firmware implementation that prevents Clover from loading OS X correctly. It has to do with providing mouse support, which causes HP to load some sort of diagnostic mode. Using the file PreLoader.efi to chain load clover is a workaround for this issue.

Getting the file
Boot up your linux live usb, and install the package efitools
Navigate to /usr/share/efitools/efi/PreLoader.efi to ensure the file we'll need got installed.​


Mounting the EFI partition
Run the command
Code:
sudo fdisk -l
and make note of the partition identifier for the partition labeled as EFI System (mine is /dev/nvme0n1p1). Ensure this partition is on the internal disk and is not your USB EFI partition.

make a directory to mount the volume at with the command
Code:
sudo mkdir /mnt/EFI
Mount the volume with the command
Code:
sudo mount partition-identifier-here /mnt/EFI
(replacing partition-identifier-here with the partition identifier of your EFI System Partition)

now run the command
Code:
sudo cp /usr/share/efitools/efi/PreLoader.efi /mnt/EFI/EFI/CLOVER/

Now, rename the clover efi binary to loader.efi with the command
Code:
sudo mv /mnt/EFI/EFI/CLOVER/CLOVERX64.efi /mnt/EFI/EFI/CLOVER/loader.efi</code>

Step 6: Add a boot entry for Clover:

The process to workaround HP’s firmware bug involves loading PreLoader.efi, which will then look for a file in the same directory called “loader.efi”. If secure boot is disabled, PreLoader.efi will chain load the file called loader.efi without any other configuration. We rename CLOVERX64.efi to loader.efi to take advantage of this. Here, we’ll use EasyUEFI to create a menu entry for Clover. We’ll also disable the windows boot entry, since this tends to reduce the frequency with which HP’s firmware decides to reset the boot order.

Here are the steps:
  • Open EasyUEFI, and click on the button labeled “Manage EFI Boot Option”
  • Click on the plus button alongside the list of boot entries to add a new entry
  • Select “Linux or Other OS” in the Type menu
  • Add a description for the boot loader entry, such as “Clover PreLoader”
  • Select the EFI partition on your disk
  • Now click the browse button, and browse to the CLOVER folder and select PreLoader.efi as the file
  • Click OK to add the entry. Use the up and down arrows to set the priority of the boot entry if you’d like
Now, select the Windows boot entry and click the red circle. The status should change to “Disabled”, which will prevent you from booting windows instead of clover on accident (note this step is entirely optional)​


Step 7: Disable Hibernation and configure HWP:

HWP configuration can be done by running the frequency vectors script (https://github.com/Piker-Alpha/freqVectorsEdit.sh) and selecting the MacBookPro14,1 model

Disable Hibernation with the following commands:

Code:
sudo pmset -a hibernatemode 0
sudo pmset -a autopoweroff 0
sudo pmset -a standby 0
sudo rm /private/var/vm/sleepimage
sudo mkdir /private/var/vm/sleepimage

Step 8: Patch DSDT and compile SSDTs

Note: this step is required. I have not included my DSDT or SSDTs in the CLOVER.zip file to discourage anyone from trying to use precompiled DSDTs. They may not work perfectly with your bios revision or hardware and you'll always get better results by dumping your own DSDT and SSDTs and patching them.

At this point, you should have a booting system, minus battery status, proper power management, and brightness control.

If you are not already familiar with DSDT patching please read rehabman’s guide:https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/

For each of the DSDT patches I followed a guide to create, I will add a link to the guide used in case you need to recreate the patch

DSDT Patches:

Battery Patch (guide: https://www.tonymacx86.com/threads/guide-how-to-patch-dsdt-for-working-battery-status.116102/):

Code:
#16 bit replacements

into device label EC0 code_regex BFCC,\s+16, replace_matched begin FCC0,8,FCC1,8, end;

into method label GBIF code_regex \^\^PCI0.LPCB.EC0.BFCC, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.FCC0,^^PCI0.LPCB.EC0.FCC1), end;

into method label UPBI code_regex \^\^PCI0.LPCB.EC0.BFCC, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.FCC0,^^PCI0.LPCB.EC0.FCC1), end;



into device label EC0 code_regex MCUR,\s+16, replace_matched begin CUR0,8,CUR1,8, end;

into method label UPBS code_regex \^\^PCI0.LPCB.EC0.MCUR, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.CUR0,^^PCI0.LPCB.EC0.CUR1), end;

into method label GBCO code_regex \^\^PCI0.LPCB.EC0.MCUR, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.CUR0,^^PCI0.LPCB.EC0.CUR1), end;



into device label EC0 code_regex MBRM,\s+16, replace_matched begin BRM0,8,BRM1,8, end;

into method label UPBS code_regex \^\^PCI0.LPCB.EC0.MBRM, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.BRM0,^^PCI0.LPCB.EC0.BRM1), end;



into device label EC0 code_regex MBCV,\s+16, replace_matched begin BCV0,8,BCV1,8, end;

into method label UPBS code_regex \^\^PCI0.LPCB.EC0.MBCV, replaceall_matched begin B1B2(^^PCI0.LPCB.EC0.BCv0,^^PCI0.LPCB.EC0.BCv1), end;



into device label EC0 code_regex SMW0,\s+16 replace_matched begin MW00,8,MW01,8 end;

into method label SMRD code_regex \(SMW0, replaceall_matched begin (B1B2(MW00,MW01), end;

into method label SMWR code_regex SMW0\) replaceall_matched begin B1B2(MW00,MW01)) end;



#8 to 16 bit method

into method label B1B2 remove_entry;

into definitionblock code_regex . insert

begin

Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n

end;



#buffer replacements

into device label EC0 code_regex (SMD0,)\s+(256) replace_matched begin SMDX,%2,//%1%2 end;

into method label SMWR code_regex Store.\(Arg3,.SMD0\) replaceall_matched begin WECB (0x04,256,Arg3) end;

into device label EC0 code_regex (FLD1,)\s+(128) replace_matched begin FLDA,%2,//%1%2 end;

into method label SMRD code_regex \(FLD1 replaceall_matched begin (RECB(0x04,128) end;



into device label EC0 code_regex (FLD2,)\s+(192) replace_matched begin FLDB,%2,//%1%2 end;

into method label SMRD code_regex \(FLD2 replaceall_matched begin (RECB(0x04,192) end;



into device label EC0 code_regex (FLD3,)\s+(256) replace_matched begin FLDC,%2,//%1%2 end;

into method label SMRD code_regex \(FLD3 replaceall_matched begin (RECB(0x04,256) end;





# utility methods to read/write buffers from/to EC

into method label RE1B parent_label EC0 remove_entry;

into method label RECB parent_label EC0 remove_entry;

into device label EC0 insert

begin

Method (RE1B, 1, NotSerialized)\n

{\n

    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n

    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n

    Return(BYTE)\n

}\n

Method (RECB, 2, Serialized)\n

// Arg0 - offset in bytes from zero-based EC\n

// Arg1 - size of buffer in bits\n

{\n

    ShiftRight(Add(Arg1,7), 3, Arg1)\n

    Name(TEMP, Buffer(Arg1) { })\n

    Add(Arg0, Arg1, Arg1)\n

    Store(0, Local0)\n

    While (LLess(Arg0, Arg1))\n

    {\n

        Store(RE1B(Arg0), Index(TEMP, Local0))\n

        Increment(Arg0)\n

        Increment(Local0)\n

    }\n

    Return(TEMP)\n

}\n

end;

into method label WE1B parent_label EC0 remove_entry;

into method label WECB parent_label EC0 remove_entry;

into device label EC0 insert

begin

Method (WE1B, 2, NotSerialized)\n

{\n

    OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n

    Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n

    Store(Arg1, BYTE)\n

}\n

Method (WECB, 3, Serialized)\n

// Arg0 - offset in bytes from zero-based EC\n

// Arg1 - size of buffer in bits\n

// Arg2 - value to write\n

{\n

    ShiftRight(Add(Arg1,7), 3, Arg1)\n

    Name(TEMP, Buffer(Arg1) { })\n

    Store(Arg2, TEMP)\n

    Add(Arg0, Arg1, Arg1)\n

    Store(0, Local0)\n

    While (LLess(Arg0, Arg1))\n

    {\n

        WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n

        Increment(Arg0)\n

        Increment(Local0)\n

    }\n

}\n

end;


Brightness Key Patch (guide: https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/):

Code:
#Edit methods _Q10 and _Q11 to interface with KBC0 (or PS2K in some systems),

into method label _Q10 replace_content

begin

// Brightness Down\n

    Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n

end;

into method label _Q11 replace_content

begin

// Brightness Up\n

    Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n

end;

OS Check Patch (note this patch has been modified to spoof windows 10, which seems to improve battery life): Credit RehabMan

Code:
#Maintained by: RehabMan for: Laptop Patches

#system_OSYS_win10.txt

# Cause the DSDT to simulate "Windows 2017" when running under "Darwin" (OS X).

# This can fix various DSDT related problems for code within the DSDT

# that is conditional on the operating system version.

# Sometimes "Windows 2017" is a better choice than "Windows 2006"

into_all method code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2017\”\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2017"))) end;

Skylake LPC patch (as soon as a Kaby Lake version of this patch is available you should use that): Credit RehabMan

Code:
#Maintained by: RehabMan for: Laptop Patches

#misc_Skylake-LPC.txt

# inject "compatible" with recognized series-100 LPC device-id

into method label _DSM parent_adr 0x001F0000 remove_entry;

into device name_adr 0x001F0000 insert

begin

Method (_DSM, 4, NotSerialized)\n



{\n



    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n



    Return (Package()\n



    {\n



        "compatible", "pci8086,9cc1",\n



    })\n



}\n



end;

USB Patch (usb_prw_0x6d): Credit RehabMan

Code:
#Maintained by: RehabMan for: Laptop Patches

#usb_prw_0x6d_xhc_skl.txt



# remove _PRW methods to prevent instant wake



# delete any existing XHC1 device

into device label XHC1 name_adr 0x00140000 remove_entry;



# if _PRW objects are methods

into method label _PRW parent_adr 0x00140000 remove_entry;

into method label _PRW parent_adr 0x00140001 remove_entry;

into method label _PRW parent_adr 0x001F0003 remove_entry;

# some other LAN cards use 0x00190000

into method label _PRW parent_adr 0x00190000 remove_entry;

into method label _PRW parent_adr 0x001F0006 remove_entry;



# if _PRW methods are stuffed into a separate scope

into method label _PRW parent_label _SB.PCI0.EHC1 remove_entry;

into method label _PRW parent_label _SB.PCI0.EHC2 remove_entry;

into method label _PRW parent_label _SB.PCI0.XHC remove_entry;

into method label _PRW parent_label \_SB.PCI0.EHC1 remove_entry;

into method label _PRW parent_label \_SB.PCI0.EHC2 remove_entry;

into method label _PRW parent_label \_SB.PCI0.XHC remove_entry;



# if _PRW objects are names

into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x00140001 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x001F0003 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x001F0006 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;

# some _PRW have three entries in the Package

into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x00140001 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x001F0003 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x001F0006 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;



# seems to work better if _PRW is present, but returns 0 (original was 3) for sleep state

# Note: These are methods because some Skylake DSDT call _PRW as a method for no reason

into device name_adr 0x00140000 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;

into device name_adr 0x00140001 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;

into device name_adr 0x001F0003 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;

into device name_adr 0x00190000 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;

into device name_adr 0x001F0006 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;



# Insert Apple USB properties into USB 3.0 XHC

into method label _DSM parent_adr 0x00140000 remove_entry;

into device name_adr 0x00140000 insert

begin

Method (_DSM, 4, NotSerialized)\n

{\n

    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n

    Return (Package()\n

    {\n

        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n

        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n

        "AAPL,current-available", 2100,\n

        "AAPL,current-extra", 2200,\n

        "AAPL,current-extra-in-sleep", 1600,\n

        "AAPL,device-internal", 0x02,\n

        "AAPL,max-port-current-in-sleep", 2100,\n

    })\n

}\n

end;

Custom SSDTs (compile these in MaciASL)

SSDT-PNLF (Required for Backlight): Credit RehabMan

https://github.com/RehabMan/OS-X-Clover-Laptop-Config/bl…

SSDT-USBX (enables USB power management): Credit RehabMan

Code:
// USB power properties via USBX device

DefinitionBlock("", "SSDT", 2, "hack", "USBX", 0)

{

    Device(_SB.USBX)

    {

        Name(_ADR, 0)

        Method (_DSM, 4)

        {

            If (!Arg2) { Return (Buffer() { 0x03 } ) }

            Return (Package()

            {

                // these values from iMac17,1

                "kUSBSleepPortCurrentLimit", 2100,

                "kUSBSleepPowerSupply", 5100,

                "kUSBWakePortCurrentLimit", 2100,

                "kUSBWakePowerSupply", 5100,

            })

        }

    }

}

//EOF


SSDT-PluginType1 (This enables HWP and native power management): Credit RehabMan

https://github.com/RehabMan/OS-X-Clover-Laptop-Config/blob/master/hotpatch/SSDT-PluginType1.dsl

SSDT-UIAC (note this will disable the USB 3/Thunderbolt ports, please read below if you’d like to know how to modify this patch to enable them):

Code:
// SSDT-UIAC.dsl

//

// This SSDT can be used as a template to build your own

// customization for USBInjectAll.kext.

//

// This SSDT contains all ports, so using it is the same as without

// a custom SSDT.  Delete ports that are not connected or ports you

// do not need.

//

// Change the UsbConnector or portType as needed to match your

// actual USB configuration.

//

// Note:

// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)

// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)

// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)

//



DefinitionBlock ("", "SSDT", 2, "hack", "UIAC-ALL", 0)

{

    Device(UIAC)

    {

        Name(_HID, "UIA00000")



        Name(RMCF, Package()

        { 

            "8086_9d2f", Package()

            {

                "port-count", Buffer() { 18, 0, 0, 0 },

                "ports", Package()

                {

                    "HS01", Package()

                    {

                        "UsbConnector", 3,

                        "port", Buffer() { 1, 0, 0, 0 },

                    },

                    "HS05", Package()

                    {

                        "UsbConnector", 3,

                        "port", Buffer() { 5, 0, 0, 0 },

                    },

                    "HS07", Package()

                    {

                        "UsbConnector", 3,

                        "port", Buffer() { 7, 0, 0, 0 },

                    },

                },

            },

        })

    }

}

//EOF

BCM94352Z Wifi

Per the laptop read first FAQ, you will need FakePCIID.kext and FakePCIID_Broadcom_WiFi.kext: https://github.com/RehabMan/OS-X-Fake-PCI-ID

As well as BrcmPatchRAM2.kext and BrcmFirmwareRepo.kext: https://github.com/RehabMan/OS-X-BrcmPatchRAM

All these kexts must be installed to /System/Library/Extensions, using a program like Kext Wizard or manually

You also need the patch documented below:

Code:
<dict>

                <key>Comment</key>

                <string>AirPortBrcm4360 - fcvo, 10.12.x (credit the-darkvoid)</string>

                <key>Disabled</key>

                <false/>

                <key>Find</key>

                <data>

                gflSqgAAdSk=

                </data>

                <key>MatchOS</key>

                <string>10.12.x</string>

                <key>Name</key>

                <string>AirPortBrcm4360</string>

                <key>Replace</key>

                <data>

                gflSqgAAZpA=

                </data>

</dict>


Optional Post Installation Configuration

If you’d like more multitouch support, the VoodooPS2 kext generates keyboard events for 3 finger gestures. Simply go to the shortcuts tab in keyboard preferences, select the shortcut you want to map a gesture to, and then once the system is waiting for you to set a key combination perform the gesture you want to map to this shortcut to send the right key event

Better NVME support can also be obtained by using the IONVMeFamily.kext from Mac OS High Sierra Beta. You can obtain this kext by downloading the beta, and mounting BaseSystem.dmg (directions on doing this are available in this guide:http://www.macworld.com/article/236...otable-os-x-10-10-yosemite-install-drive.html. Note this is experimental but seems to enable better NVME support in my experience. You can find the kext in /System/Library/Extensions once BaseSystem.dmg is mounted.

For further HWP configuration, read this post:http://www.insanelymac.com/forum/to...peed-shift-enable-with-full-power-management/

If iMessage is still not working, look at the tonymac guide to fix iMessage:https://www.tonymacx86.com/threads/an-idiots-guide-to-imessage.196827/


Getting USB C Ports Working

I’m reasonably sure USB C ports should work with USBInjectAll.kext, the only reason they won’t out of the box is that SSDT-UIAC tells USBInjectAll to only inject the USB A port and the USB addresses to make the webcam and bluetooth (on the BCM94352Z) work. Take a look at the readme for USBInjectAll.kext (https://github.com/RehabMan/OS-X-USB-Inject-All) to understand how this SSDT injects properties. You can use IORegistryExplorer to test what addresses correspond to the USB C ports and then modify my SSDT-UIAC to include those ports. If you find out which addresses these ports use, please post the information so that others can gain support for USB C.
 

Attachments

  • CLOVER.zip
    2.1 MB · Views: 956
  • PreLoader.efi.zip
    40 KB · Views: 611
Last edited:
:clap::clap::clap: :thumbup::thumbup:

awesome guide man... your guide combines lots of useful information which is spread in multiple posts and threads.

I think it will be good idea to attach the PreLoader.efi to the post. If someone wants to use the hackrnvme kext and not want to format their drive, they will not need the linux live USB step.

Will update my clover from your guide and share my feedback.
 
:clap::clap::clap: :thumbup::thumbup:

awesome guide man... your guide combines lots of useful information which is spread in multiple posts and threads.

I think it will be good idea to attach the PreLoader.efi to the post. If someone wants to use the hackrnvme kext and not want to format their drive, they will not need the linux live USB step.

Will update my clover from your guide and share my feedback.

Thanks man! I'll go ahead and edit the post

*Edit PreLoader.efi is now attached
 
Last edited:
My laptop configuration is not same as yours. I have 15" x360 with i7 7500u.

My DSDT does not compile after decompilation. I had to apply following patches:
Fix PARSEOP_ZERO Error" agressive" mode
Comment Out External ‘BNUM’ Ref

1. The OS check patch did not match any text in my DSDT. I did not have Windows 2017 in it. My guess it first occurrence of Windows should match windows 2015 in my case and replace that with windows 2015 and Darwin.

Here is the entire section with windows in it:
Code:
       Method (_INI, 0, Serialized)  // _INI: Initialize
        {
            Store (0x07D0, OSYS)
            If (CondRefOf (\_OSI))
            {
                If (_OSI ("Linux"))
                {
                    Store (0x03E8, OSYS)
                }

                If (_OSI ("Windows 2001"))
                {
                    Store (0x07D1, OSYS)
                }

                If (_OSI ("Windows 2001 SP1"))
                {
                    Store (0x07D1, OSYS)
                }

                If (_OSI ("Windows 2001 SP2"))
                {
                    Store (0x07D2, OSYS)
                }

                If (_OSI ("Windows 2001.1"))
                {
                    Store (0x07D3, OSYS)
                }

                If (_OSI ("Windows 2006"))
                {
                    Store (0x07D6, OSYS)
                }

                If (_OSI ("Windows 2009"))
                {
                    Store (0x07D9, OSYS)
                }

                If (_OSI ("Windows 2012"))
                {
                    Store (0x07DC, OSYS)
                }

                If (_OSI ("Windows 2013"))
                {
                    Store (0x07DD, OSYS)
                }

                If (_OSI ("Windows 2015"))
                {
                    Store (0x07DF, OSYS)
                }
            }

2. Skylake LPC patch adds a _DSM method. I already had a _DSM method in DSDT. I guess I need the rename _DSM to XDSM before I apply the skylake patch.

I was able to boot without any error. Only I problem I see is that I see the display at 40hz only. I guess it needs to be 60 hz. can you check what is your display refresh rate for laptop screen?
 

Attachments

  • Screen Shot 2017-07-31 at 1.13.46 AM.png
    Screen Shot 2017-07-31 at 1.13.46 AM.png
    219.2 KB · Views: 592
My laptop configuration is not same as yours. I have 15" x360 with i7 7500u.

My DSDT does not compile after decompilation. I had to apply following patches:
Fix PARSEOP_ZERO Error" agressive" mode
Comment Out External ‘BNUM’ Ref

1. The OS check patch did not match any text in my DSDT. I did not have Windows 2017 in it. My guess it first occurrence of Windows should match windows 2015 in my case and replace that with windows 2015 and Darwin.


2. Skylake LPC patch adds a _DSM method. I already had a _DSM method in DSDT. I guess I need the rename _DSM to XDSM before I apply the skylake patch.

I was able to boot without any error. Only I problem I see is that I see the display at 40hz only. I guess it needs to be 60 hz. can you check what is your display refresh rate for laptop screen?

My display is reporting 60hz, however I do not have any display reported on the PCIe bus. That was my mistake not to mention the compiling fixes in the guide, I had to fix the BNUM Ref as well, and I believe that the patch is supposed to remove that duplicate DSM method but does not due to a bug in Maciasl.
 
My display is reporting 60hz, however I do not have any display reported on the PCIe bus.
The other display is nvidia 940m. I still need to work on creating SSDT to disable/turn-off that.

That was my mistake not to mention the compiling fixes in the guide, I had to fix the BNUM Ref as well, and I believe that the patch is supposed to remove that duplicate DSM method but does not due to a bug in Maciasl.

Which patch is supposed to remove the duplicate DSM methods ? Skylake LPC ?
 
Which patch is supposed to remove the duplicate DSM methods ? Skylake LPC ?

Skylake LPC should remove the _DSM method it replaces, per this line:

Code:
into method label _DSM parent_adr 0x001F0000 remove_entry;

Not sure why it doesn't but I experienced the same bug

Out of interest, what kind of battery life are you getting? Battery is the one issue I haven't quite worked out on this computer, and if you've got any ideas on what might improve it I'm all ears
 
My configuration is almost the same as your configuration, except SSD. Thank you for your detailed note sharing. If the video guide is better.:thumbup:
 
Awesome guide!! its great to have all these informations in one place. :clap:

Btw, my USB-C to DisplayPort 4k@60hz Adapter works without problems.
Has anybody audio working via Displayport or HDMI?
 
Last edited:
I can not get this damn command to work:

"nvme-format -l 1 path-to-your-nvme-drive"

path is the same as yours. running xubuntu here, command seems to be "nvme format" not "nvme-format".
Running that gets me "NVME Admin command error:INVALID_FORMAT(210a)
 
Status
Not open for further replies.
Back
Top