Jump to content

[Guide] Dell XPS 13 9360 on MacOS Sierra 10.12.x - LTS (Long-Term Support) Guide


bozma88
 Share

11 posts in this topic

Recommended Posts

Introduction

 

I managed to install MacOS Sierra 10.12.3 on this ultrabook, and I plan to keep it for a long time (min 2 years) and use it as my daily-driver machine.

 

zSyevEQ.jpg

 

 

LTS - Long-Term Support

 

My commitment is to keep this thread organised for a long time (thus the "LTS" tag), and to report on the first post every community finding that further improves system functionality, reliability and performance.

 

 

Why such a long and detailed guide?

 

Because most Hackintosh build guides are minimal and focus on copy-pasting the OP-provided Clover directory.

I want this guide to be reproducible, so I described every non-trivial step, so we can share the exact same build.

In addition, thoroughly describing everything makes the build way more upgrade-resilient and useful even with future BIOSes, hardware revisions and MacOS versions.

 

I will try to be very specific and to describe every difficult step with detail.

This is NOT to encourage laziness. Do your homework and research before asking questions here.

Here are described only the steps which I found hard to understand and are specific to this laptop (e.g. BIOS extraction for DVMT patching). I will try to explain what every patch does, because you can't be a good "Hackintosher" if you are not eager to learn.

 

I am a long-time Hackintosh modder and user but in no way I call myself an expert, so feel free to correct me.

We have many gurus on this forum and on the web and it's all their merit/credit if we came this far.

 

 

Important note:

 

I kindly ask you to post replies and comment only if you have this very laptop model: XPS 13 9360.

This is a specific guide, not a generic learning/support thread.

For all the rest, Google is your friend.

 

 

OS TO INSTALL

 

MacOS Sierra 10.12.3, Windows partitions will be wiped.

Note: wipe Windows only after completing all the steps that require its use.

 

 

MY EXACT CONFIGURATION

 

 

XPS 13 9360
i7-7500U (Kaby Lake)
FHD (1920x1080) matte screen
256GB Toshiba NVME THNSN5256GPUK SSD
Killer Wifi 1535 (2x2 mimo) <to be swapped>
8GB LPDDR3 1866MHz RAM
Bios 1.3.2
USA-International keyboard layout
Webcam (VendorID 3034, ProductID 22155)
RESULTS TO EXPECT

 

Working:

 

- CPU power management [1.0GHz @ 0.5W idle <-> 3.5GHz @ 24W+ under load, 3800|8400 GeekBench3 score]

- GPU Power management [0.0GHz (reported) idle <-> 1.05GHz under load]

- Sleep/wake [wake only by lid open or power button press]

- Shutdown

- Webcam with LED on-off switching properly working

- Microphones

- Speakers

- Headphone jack (with jack sense)

- Touchpad with semi-advanced multitouch gestures

- USB A 3.0 ports

- USB C 3.1 port (no hotplug)

- Prev/Play/Next keys

- Volume keys with OSD

- Brightness slider and OSD

- Brightness keys with smooth and full range of brightness + level persistence after reboot

- Keyboard backlighting with keyboard activation key and with custom timeout

- QE-CI (without menu bar glitches)

- Wifi 2.4GHz + 5GHz as native AirPort (BCM94352z / DW1560 swap)

- Bluetooth

- Perfect-match keyboard layout (for USA-Intl keyboards) via custom keyboard layout

- Battery / AC status

- NVME SSD with native Trim

- USB-A high-current output (1A max)

- Retina / HiDPI scaled resolutions

- Airdrop

- USB-C Power Delivery battery charging (20V@1.5A minimum)

- External video output

 

 

Not working (yet):

 

- External monitor (HDMI/DP) audio output (work in progress)

- SD card reader (a solution may appear in the next months)

- Hibernation + darkwake (have to be disabled to prevent FS corruption and sleep issues)

 

 

Unknown:

 

- BT4LE Handoff+Hotspot (they show as supported, clover patch implemented, not tested, may be country-code dependant)

- Thunderbolt via USB-C connector

- Intel Smart Sound Technology (SST) Audio DSP (unable to determine, should provide further battery savings during media playback)

- FileVault 2 (not configured, may work if proper drivers are injected, not advised)

 

 

A note on coil-whine:

 

This laptop, as all the past-gen Infinity-display XPS 13, suffers from coil-whine. It is unnoticeable until the audio amplifier powers on. At that time, very annoying whine can be heard through speakers. Luckily, with proper Audio configuration, the amplifier turns on only when there's some sound to play, and then powers-off immediately. Coil-whine is a non-issue during typical office/library workloads.

 

 

A note on CABC:

 

This laptop suffers from display CABC. It's not fixable for FHD screens, because it's embedded in display firmware that is not flashable via OS.

The only solutions seems to swap the display. The part number should be Sharp LQ133M1JW01. If I won't be able to live with CABC, I'll try the swap with a non XPS13-specific OEM display.

 

 

A note on keyboard backlighting:

 

You may want to change the default Keyboard Backlighting timeout (10s) and the way the keyboard resets the timeout when you interact with input devices. Surprisingly, you can! You need Windows installed. Download the official "Dell Feature Enhancement Pack", install it, open Control Panel->Keyboard and you'll be greeted with this tab:

 

EIDb9qL.png

 

Change it as you want. The change is permanent as a new value is written in a keyboard's controller registry.

NOTE: oddly, you can't revert to the original 10s timeout. Such a loss.

 

 

A note on SpeedShift (aka HWP aka Intel SST):

 

With vanilla SSDTs, Power Management (CPU+GPU) works beautifully but is not hardware-controlled.

We could (and we will) do better: Kaby Lake offers speedy - 2x speedier than Skylake - HWP (hardware P-states) switching, but it's currently not active in OSX nor enabled in BIOS.

A first step that will be beneficial for Windows users is to enable HWP in BIOS by using the same approach of DVMT patching: find the hidden "Intel SpeedShift" variable and enable it via EFI shell.

This will make Windows use HWP without using any third-party program (e.g. ThrottleStop). I can confirm that this works with no side-effects.

 

Regarding MacOS, I strongly advise you not to try HWP until we better understand it.

XPS line laptops is plagued with unrecoverable filesystem corruption and that seems to be triggered by changes in hibernatemode status or other deep-idle setting that may be related to HWP or other power management settings.

Don't be brave if you rely on this laptop for work, stick with my files until further notice.

 

 

A note on Wifi Country-Code:

 

For those outside the US, the super-country-code (aka local unknown) "#a" patch seems to be ideal if you want zero-issue, full speed 5GHz Wifi connectivity.

Add this to your Clover patches to remove Wifi channels regional limitations:

 

 

 

<dict>
    <key>Comment</key>
    <string>Patch CC to #a</string>
    <key>Disabled</key>
    <false/>
    <key>Find</key>
    <data>
    QYP8/3QsSA==
    </data>
    <key>Name</key>
    <string>AirPortBrcm4360</string>
    <key>Replace</key>
    <data>
    ZscGI2HrKw==
    </data>
</dict>
A note on external monitors:

 

DisplayPort/HDMI works via USB-C connector and "DP alternate mode" adapter. It's also hot-pluggable.

 

USB-C socket provides many functionalities. Among the many cables that run through a (compliant) USB-C cable, there are some lanes that work natively as USB 3.1 data lanes. These lanes can be switched to other functionalities (aka "alternate modes") if requested by an active adapter. DisplayPort alternate mode works out of the box, providing us with full external monitor functionality. You just need a cheap USB-C -> HDMI/DP adapter that supports the alternate mode.

 

0ytuRYJ.jpg

 

 

A note on USB-C charging (aka USB Power Delivery aka USB PD):

 

Here's a really good news: we can charge this laptop with increasingly-common USB PD chargers.

USB Power Delivery is a standard aimed at providing different voltages/currents on the same USB-C cable, after a digital negotiation between the host (the adapter) and the client (the laptop).

 

This laptop natively charges at 20V/2.25A, but it is able to accept less current, also supporting the 20V/1.5A profile.

That's very good because you can carry a very small wall adapter with you and still charge it, even while using it.

 

6i8fv2s.jpg

 

BE CAREFUL! FIRE HAZARD! Since USB-PD is a young standard, many adapters on the market now - even some of the most famous ones - do not negotiate the current properly and they tend to burn or overheat because they syndicate more current than they're able to deliver. Use a charger only after you are sure it is able to correctly negotiate the 20V/1.5A profile or above. Read the reviews and do your own research.

 

To check how much current your charger syndicates during the handshake, open BIOS settings and go to battery details. You'll see how much power the laptop will draw from the PSU. If that value is higher than the advertised power of the charger, throw it away immediately.

 

Note: on 30W chargers, you'll notice 5-10% reduced peak multicore performance, as "TDP-UP" CPU states will be disabled to reduce peak CPU power consumption to 15W max.

 

Another good news is that USB PD is reversible. The laptop can become the host, at maximum 5V/3A.

 

 

Upgrade-resilience:

 

You'll have to keep an eye on many things before a minor (or major) OS upgrade:

 

=> NVME patching: not caring about this may lead to unrecoverable filesystem corruption.

As per RM guide, the update has to be carried this way:

- update via App Store

- wait for RehabMan to update the patch-nvme github project

- update your copy of the patch script

- generate new kext and swap the old one

The good about this method is that you are going to use the old kext until you manually re-patch the new one, so your system should remain bootable after minor upgrades, giving you time to safely swap the new kext.

 

=> Hibernation: Check that hibernation is still disabled (0) after update: sudo pmset -g.

 

=> All the rest: Do your research and don't be the first-on-the-line to upgrade.

 

 

Further notes:

 

- Kaby Lake architecture and IPC are the same as Skylake. 10.12.x does not support Kaby Lake natively, but since it's the same architecture as SKL, a simple ID emulation makes it work. Expect (?) further speed and battery savings when Kaby Lake will be officially supported by MacOS kernel.

- DVMT patching is used instead of kext hotpatching as it's tricky to patch the framebuffer via Clover if it drops out of cache. Patching DVMT is dangerous. Do your research!

- No HWPEnabler kext nor Clover HWPEnable nor SSDRprGen are used. Paired with Macbook9,1 SMBIOS the system is snappy and CPU+GPU power management works pretty well.

- As many DELL machines, 9360 suffers from SMBIOS truncation bug, so Macbook9,1 is used. Luckily, it seems ideal.

- Current BIOS 1.2.3 seems to break operation of non-OEM SSDs in AHCI mode. Do your research as it seems impossible to downgrade this BIOS.

- New BIOS in the future = new DVMT, new DSDT patching.

- HFSPlus.efi driver is not included in attached files for obvious reasons. Do your research.

- Standby is very deep, seems to lose just 1% battery every 3 hours.

- The trackpad sensitivity and precision are horrible. The worst trackpad I ever used. But we managed to find a very good solution.

- To disable/enable the trackpad while using an external pointing device, press PrtScr key on internal keyboard (fantastic undocumented feature of RM VoodooPS2Controller).

- The webcam white LED correctly shuts down when the app using the camera is closed, thanks to a custom kext injection.

- I didn't install RM VoodooPS2Controller daemon as I don't need trackpad auto-disable when external mouse is connected.

- I prefer to leave S/L/E vanilla, so all the kext are injected via Clover. I know that some kexts don't like on-the-fly injection, but I didn't encounter issues so far. Essential Kexts are tagged with RED.

- Custom keyboard layout is created with Ukelele app, and matches Euro and Rupee symbols on ANSI-INTL English keyboards. For different layouts, create your own layout.

- Complete the iMessage configuration with proper system serials before connecting to the internet for the first time.

- With battery level below 20%, CPU package TDP will be hard-limited to exactly 15W, even with the charger connected, so performance will be slightly reduced. Do benchmarks with full battery!

- [Trivia] Dell's Fn+F7 "Unobtrusive Mode" is pretty cool.

- [Trivia] Dell's Fn+Ins puts the system into standby.

- [Trivia] The laptop can be fast-charged in ~1 hour by enabling "Fast Charging" in BIOS. Not recommended, faster battery wear will occur.

- [Trivia] The IGZO display in this laptop, compared to standard IPS ones, saves 30-40% of power while displaying moving images and up to 90% while displaying still images.

 

 

STEPS

 

Wifi+BT card swap:

 

Swap the card to a BCM94352z (Dell branded one has code DW1560).

IMPORTANT: The NGFF slot is A-keyed. Some generic BCM cards are E-keyed only and won't fit.

 

7H1GqTG.jpg

 

Be careful when disassembling the lower aluminum plate. Use some plastic prying tool or a worn-out business card.

There are some flimsy plastic hooks in the central composite chassis that can be easily broken.

Be also careful, the bottom lid is aluminum and the edges are very sharp.

My advice is to always work with antistatic gloves when touching electronics.

 

 

BIOS Settings (* optional):

 

- Sata: AHCI

- * Enable SMART Reporting

- Disable thunderbolt boot and pre-boot support

- USB security level: disabled

- * Disable USB powershare

- * Enable Unobtrusive mode

- Disable SD card reader (saves 0.5W of power)

- TPM Off

- Deactivate Computrace

- Enable CPU XD

- Disable Secure Boot

- Disable Intel SGX

- Enable Multi Core Support

- Enable Speedstep

- Enable C-States

- Enable TurboBoost

- Enable HyperThread

- Disable Wake on USB-C Dell Dock

- * Battery charge profile: Standard

- Numlock Enable

- FN-lock mode: Disable/Standard

- Fastboot: minimal

- BIOS POST Time: 0s

- Enable VT

- Disable VT-D

- Wireless switch OFF for Wifi and BT

- Enable Wireless Wifi and BT

- Allow BIOS Downgrade

- Allow BIOS Recovery from HD, disable Auto-recovery

- Auto-OS recovery threshold: OFF

- SupportAssist OS Recovery: OFF

 

 

DVMT patching:

 

This is the first thing you have to do after properly updating your BIOS to the version referred in this guide and configuring it as above.

DVMT is 32MB and has to be set to 64M otherwise SKLFramebuffer kext will panic during boot.

This machine runs an InsydeH2O BIOS. Search for the guides.

The only difference is that the BIOS cannot be extracted from official BIOS update packages. If you open BIOS update package with Phoenix tools, only a portion of the bios gets decrypted and you won't find the DXE Core section that contains the DVMT variable. You have to extract the BIOS from your machine running windows with Universal BIOS Backup Kit 2.0.

Then, you can proceed as the guides tell you.

 

 

NVME ACPI path:

 

Find your NVME ACPI path in Windows, write it down and put it aside.

This is the last step requiring Windows. You can wipe the partition.

Optionally, you can backup your Windows serial for future use. Search the web on how to do it.

 

 

DSDT - Intro:

 

- Use Clover v3974+

- Extract original DSDT and SSDT tables with Cover->F4. Do this after updating BIOS and setting up BIOS options.

- Place DSDT.and SSDT*.aml tables in a directory, use iasl -da -dl *.aml to decompile into .dsl files.

- Open DSDT.dsl with MacIasl RM1.31+ set with ACPI 6.1 compiler.

 

 

DSDT - Initial compiling fixes:

 

Change:

 

 

If (LEqual (PM6H, One))
{
    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
    Store (Zero, ECRW (If (PM0H)
            {
                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                Store (Zero, F0LN)
            }))
}
To:

If (LEqual (PM6H, One))
{
    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
    Store (Zero, ECRW)
}
If (PM0H)
{
    CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
    Store (Zero, F0LN)
}
Remove/comment lines:

External (BNUM, UnknownObj)    // (from opcode)
External (IDMN, UnknownObj)    // (from opcode)
External (IDPC, UnknownObj)    // (from opcode)
External (DLPN, UnknownObj)    // (from opcode)
The DSDT will now compile. Ignore compile warnings.

 

 

DSDT - OSX patches:

 

Patches marked with [R] are credits of RehabMan, taken from his superb Laptop Patches repo. You are encouraged to use them off the live repo. They are reported here for persistence and exact-version matching purposes.

 

[R] [syn] Rename _DSM methods to XDSM

into_all method label _DSM set_label begin XDSM end;
into_all method code_regex _DSM replaceall_matched begin XDSM end;
*Notes: this is a generic prep-patch.*

 

 

[R] [igpu] Brightness fix

 

 

into_all device label PNLF remove_entry;
into definitionblock code_regex . insert
begin
Scope (_SB)\n
{\n
    Device (PNLF)\n
    {\n
        Name (_ADR, Zero)\n
        Name (_HID, EisaId ("APP0002"))\n
        Name (_CID, "backlight")\n
        Name (_UID, 10)\n
        Name (_STA, 0x0B)\n
    }\n
}\n
end;
*Notes: this enables lid-sleep and brightness slider in MacOS. It's not enough to gain full brightness control, see "keyboard patch" and "OSIS patch" below.*

 

 

[R] [sys] Fix _WAK Arg0 v2

 

 

into method label _WAK code_regex ([\s\S]*) replace_matched
begin
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }\n
%1
end;

into method label \_WAK code_regex ([\s\S]*) replace_matched
begin
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }\n
%1
end;
*Notes: this may be unnecessary (?) in 10.12.*

 

 

[R] [sys] Fix Mutex with non-zero SyncLevel

 

 

into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
*Notes: this is a generic prep-patch.*

 

 

[R] [sys] HPET Fix

 

 

into method label _STA parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 code_regex Name\s\(_STA\,\s+0x0F\) remove_matched;
into device name_hid PNP0103 insert
begin
Name (_STA, 0x0F)\n
end;

into method label _CRS parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 insert
begin
Method (_CRS, 0, NotSerialized)\n
{\n
    Return (BUF0)\n
}\n
end;
*Notes: this is a generic prep-patch.*

 

 

[R] [sys] IRQ Fix

 

 

into device name_hid PNP0000 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0100 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0B00 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0103 code_regex IRQNoFlags\s\(\)\n\s+\{.*\} removeall_matched;
into device name_hid PNP0103 code_regex Name\s\(([^,]+),\sResourceTemplate\s\(\).*\n\s+\{((?:.|\n)*)\}\) replace_matched
begin
Name (%1, ResourceTemplate()\n
{\n
    IRQNoFlags() { 0, 8, 11, 15 }\n
%2
})\n
end;
*Notes: this is a generic prep-patch.*

 

 

[R] [sys] RTC Fix

 

 

into device name_hid PNP0B00 code_regex (IO\s\((?:\s*[^,]+,\s*(?:\/\/\s.*)?\s*\n)+\s*)(\dx\d+)(,\s*(?:\/\/\s.*)?\s*\n\s*\)) replace_matched begin %10x02%3 end;
*Notes: this is a generic prep-patch.*

 

 

[R] [sys] Skylake LPC

 

 

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;
*Notes: this is a generic prep-patch.*

 

 

[R] [sys] SMBUS Fix

 

 

into device label BUS0 parent_adr 0x001F0003 remove_entry;
into device name_adr 0x001F0003 insert
begin
Device (BUS0)\n
{\n
    Name (_CID, "smbus")\n
    Name (_ADR, Zero)\n
    Device (DVL0)\n
    {\n
        Name (_ADR, 0x57)\n
        Name (_CID, "diagsvault")\n
        Method (_DSM, 4, NotSerialized)\n
        {\n
            If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
            Return (Package() { "address", 0x57 })\n
        }\n
    }\n
}\n
end;
*Notes: this is a generic prep-patch.*

 

 

[R] [usb] usb_prw_0x6d_xhc_skl

 

 

into device label XHC1 name_adr 0x00140000 remove_entry;

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;

into method label _PRW parent_adr 0x00190000 remove_entry;
into method label _PRW parent_adr 0x001F0006 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;
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 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 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 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;

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;
*Notes: this fixes immediate wake from sleep if a mass storage USB device is attached when the computer is put to sleep. NOTICE: these properties should also enable extra-current for Apple devices. On 10.12, even if System Properties tells that no extra current is being fed to iOS devices, each USB port outputs 1A.*

 

e3HWjyp.jpg

 

 

Set OSIS to linux (credit <unknown>)

 

 

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

into_all method code_regex If\s+\([\\]?_OSI\s+\(LINX\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI(LINX))) end;
*Notes: this is needed for correct behaviour of brightness keys in combination with IntelBacklight ad VoodooPS2Controller kexts. Brightness levels are smooth and brightness can go very, very low, almost dark. NO PWM noticeable.*

 

 

Keyboard patch (credit <unknown>)

 

 

into method label SMEE replace_content
begin
        Local0 = Arg0\n
        Local0 = GENS (0x11, Zero, Zero)\n
        If ((\_SB.OSID () >= 0x20))\n
        {\n
            If ((Local0 & 0x04))\n
            {\n
                // Brightness up\n
                Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n
                Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n
                EV5 (One, Zero)\n
            }\n
            If ((Local0 & 0x02))\n
            {\n
                // Brightness down\n
               Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n
               Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n
               EV5 (0x02, Zero)\n
            }\n
        }\n
        If ((Local0 & 0x08))\n
        {\n
            Local0 = GENS (0x1D, Zero, Zero)\n
            EV16 (Local0, Zero)\n
        }\n
end;
*Notes: this is needed to make brightness keys work again after applying "OSIS Linux patch".*

 

Save patched DSDT.aml. Remember to keep original and edited DSDT.dsl in case you need to apply/revert some patches.

Put your patched DSDT.aml, and all the SSDT*.aml you find in my files archive, in CLOVER/ACPI/patched dir.

All these .aml files will be automatically loaded.

Do not copy your SSDT origin table to /patched folder! We don't drop original SSDTs, so you don't need to inject them again. Problems would arise.

 

 

POST-INSTALL

 

=> Disable hibernation:

 

 

sudo pmset -a hibernatemode 0
sudo rm /private/var/vm/sleepimage
sudo touch /private/var/vm/sleepimage
sudo chflags uchg /private/var/vm/sleepimage
BEWARE! This is a MUST and you have to check it is still disabled after every OS update (also the minor ones), and every time you tinker with SMBIOS plist values. Failing to do this can lead to unrecoverable filesystem corruption. The first time your laptop enters hibernation during sleep, unrecoverable filesystem corruption will occur.

 

 

=> Move kexts from POST-INSTALL/S-L-E to System/Library/Extensions and then fix file ownership and permissions.

 

 

=> Disable "Put hard disks to sleep" via Sysprefs->Energy Saver (optional).

 

 

=> Install correct keyboard layout and swap Alt and Cmd keys (optional):

 

- Sysprefs->Keyboard->Type->"ANSI Keyboard".

- Sysprefs->Keyboard->Modifier Keys.

- Place layout file in /Library/Keyboard layouts.

- Reboot.

- Sysprefs->Keyboard->Input Sources->Other->US International - DELL XPS 9360 layout.

- Reboot.

 

NOTE: The provided layout is only valid for this physical keyboard layout:

 

UqpKqfp.jpg

 

 

=> Enable "Install from anywhere" (optional): sudo spctl --master-disable.

 

 

=> Install internal bootloader:

 

- Install Clover r3974+ with Nvram in EFI partition and NVRAM daemon.

- Once installed, mount the hidden EFI partition and copy the CLOVER directory provided in my attachments.

- Remember what I wrote above regarding HFSPlus.efi.

- For convenience, EFIMount.app is a script that automatically searches and mounts the EFI partition.

 

 

=> Generate correct SSDT-NVMe-Pcc.aml with the NVME ACPI path you wrote down previously.

 

 

=> Generate correct HackNVMEFamily kext on a system with same OS version as the target one.

 

./patch_nvme.sh --spoof 10_12_*

 

Checksums have to match.

Place generated kext in CLOVER/kext/Other.

 

 

=> Set up iMessage.

 

 

=> Automatic updates:

 

Disable Automatic updates install via Sysprefs->App Store->Automatically check for updates.

Do your research before updating anything OS-related.

 

 

=> Make the trackpad perfect:

 

The trackpad in this laptop could be better. However, we can manage to render it a very good one.

The trackpad is managed via RehabMan's VoodooPS2Controller.kext.

This kext does not enable most of the vanilla multitouch gestures, and when operated with multiple touches it outputs keystroke combinations instead. You can do what you want with these combos, and even personalise them.

Syscl managed to tailor the kext responsiveness to our trackpad via a custom build of this kext, and even adding a consistent middle-click (3 fingers tap) functionality.

Syscl also changed the default keystrokes thrown when doing three finger swipes, making them not ideal.

Given all this, my archive contains a hybrid VoodooPS2Controller kext, with Syscl tweaks and RM's default multitouch keystrokes.

This, in combination with a nifty third-party app called "SizeUp", enables you to move windows around the screen with 3-finger swipes (in addition to keyboard combos).

 

X7gymMJ.png

 

This below is my trackpad configuration, and it works beautifully.

For optimal trackpad responsiveness, I also changed tracking and scrolling speed, also enabling dragging.

You have to dig in Accessibility settings for most of these tweaks.

 

KeZhsxn.png

hUR5nXb.png

zv1lOl9.png

6f4WFPM.png

 

Supported actions in my exact configuration:

- Left click-tap

- Right click-tap

- Vertical and horizontal scroll with two fingers swipe

- Dragging with tree fingers or drag lock

- Middle click with three fingers tap

- Window center-expand-pan with three fingers swipe

 

A few notes:

- If you see a blank tab in trackpad PrefPane instead of the native settings, reboot a few times.

- You can toggle the trackpad ON-OFF by pressing the PrtScr key.

- You need SizeUp or similar software to gain window pan and resize functionality.

 

 

=> Remove the Eject button from menu bar:

 

For some unknown reasons I find impossible to remove the Eject button from the menu bar.

Pretty raw but effective solution, since we don't have any optical disc drive, is to remove (backup it first) this file:

 

/System/Library/CoreServices/Menu Extras/Eject.menu

 

And then reboot. No more Eject disc icon.

 

 

=> Enable Retina / HiDPI scaled resolutions:

 

This laptop has a 1080p screen (and a very good one: search for IGZO display technology and you'll understand why this laptop lasts so much on battery). If you want the UI to be bigger, you can't simply feed the panel a lower resolution, it will become blurry because of pixel interpolation.

You cannot simply activate HiDPI mode, because you'd get halved 960x540 resolution.

 

Retina Macs have a cool feature called "scaled retina resolutions". Basically, the screen will be rendered off-screen at a very high resolution, and the resulting frame is then scaled-down to the screen's native resolution. That means it's still interpolated, but starting from a way bigger resolution, so it will be way more crisp.

It also means that your GPU has to:

1) Render the UI at huge resolution

2) Interpolate it down to 1080p

 

That's a lot of work. My advice is to avoid running at scaled resolutions, it bogs performances and not worth it.

use app-specific scaling (Chrome, for example, offers a "default zoom level" for web browsing).

 

Anyway, if you want to enable Retina scaled resolutions, you can use the plist included in the attached file archive.

Steps to install:

1) Enable HiDPI mode: sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true

2) Place .plist file in ~/Downloads

3) Run this command: sudo cp ~/Downloads/DisplayProductID-1449.plist /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-4d10/DisplayProductID-1449

4) Reboot

5) Install RDM (retina Display Menu) app and select a resolution among the ones with a yellow lightning icon next to it. No, you won't be able to select these new resolutions directly from Display PrefPane.

6) You are now in HiDPI mode

 

A few points to note:

- It's tailored for my display Vendor Id (4d10) and Product Id (1449). Yours may be different. Do your research

- It won't be as sharp as native Retina (doubled) resolutions

- For the curious, you can manually create the Plist file or use an online generator. Remember that the plist has to include your panel's native resolution without HiDPI flag, the target retina resolution(s) with HiDPI flag, the exact double of (each of) your target resolution(s) with HiDPI flag.

- A cool side feature is that now your display has a proper name:

 

9pUYds9.png

 

 

=> Clear caches:

 

After installing every kext and setting up every new kext patch, remember to invalidate and rebuild kext caches:

 

sudo touch /System/Library/Extensions && sudo kextcache -u /

 

And then reboot.

 

 

 

END RESULT

 

You'll get a (very) fast and reliable machine able to pull 12+ hours of real office workload on full battery.

 

Benchmarks:

 

RSgSXv7.png

 

ywqMuRX.png

m4KPG1j.png

 

YQPm2i7.png

 

Many thanks to the whole community, especially to RehabMan, whose guides, tools and repositories represent most of our current knowledge on Hackintoshes and MacOS in general.

 

---

Guide versioning scheme:

 

You'll always find the latest version of the files in the attachments.

[n].x - Major changes. Requires a full re-read of the guide and a full swap of the files.

x.[n] - Minor changes and adds-up in the guide for a better explanation. No need to update the files.

 

Guide revision: v8.12b - 20170306

Files-v8b.zip

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

While it's not actually relevant to the subject at hand I suppose, I have to say you really must love OSX/macOS to have gone through all that to get it running and plan to run it for 2 more years. ;)

 

Aside from that, very very well done guide so congrats on that and getting it functional and good luck resolving the last few aspects you're having issues with.

Link to comment
Share on other sites

Good tutorial ,

Thanks ...

 

 

While it's not actually relevant to the subject at hand I suppose, I have to say you really must love OSX/macOS to have gone through all that to get it running and plan to run it for 2 more years. ;)

 

Aside from that, very very well done guide so congrats on that and getting it functional and good luck resolving the last few aspects you're having issues with.

 

Thank you!

I've actually solved al the minor issues left, will update the guide in a few days.

Link to comment
Share on other sites

Yes, it will work, but you'll have to apply another graphics patch for QHD screens and maybe change DVMT to 96MB.

I cannot guarantee that you won; t have issues with the SSD, but a bit of research will make things work.

Link to comment
Share on other sites

  • 6 months later...
  • 9 months later...

How where you able to decipher what your original DVMT setting was in the BIOS extract? I can see the variable. But i have no idea what the "preset" variable would output in MB? 

My Dedicated Video In Device Manger for my GPU states 128MB. Im using a UHD 620. Screen output is 1920x1080

DVMT Extract.PNG

Edited by tikizondo94
Link to comment
Share on other sites

 Share

×
×
  • Create New...