Contribute
Register

(99% perfect) Sierra 10.12.6 on Thinkpad x1 carbon 5th-gen with dual-boot unchanged Win7

Status
Not open for further replies.
Joined
Oct 18, 2017
Messages
31
Motherboard
Thinkpad x1 carbon 5th gen
CPU
intel i7-7600U
Graphics
intel HD620 1920*1280
Mac
  1. MacBook
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Preface
As my first laptop hackintosh, i’d like share my work to enable Sierra 10.12.6 on Thinkpad x1 carbon 5th-gen. it can hardly call a guide but just experience sharing and guide collection. Thanks the whole community and RehabMan and others of course, basically all information can be found in this community, what i did is just search/read/follow, and repeat 100+ times:). Thus i will focus on some special experience, as well as share files i used and/or customized.

specifically 3 guides here are my reference base.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.232978/
https://www.tonymacx86.com/threads/readme-common-some-unsolved-problems-in-10-12-sierra.202316/
https://www.tonymacx86.com/threads/guide-2015-x1-carbon-yosemite.162391/


1. Task Overview

Starting Point
Thinkpad x1 carbon 5th gen, i5-6200U, HD 520, 256G NVMe, FHD, Intel I219-V enternet and intel 8260 Wifi, 2 USB-C/Thunderbolt, 2 USB-B 3.1, card reader, fingerprint, 1 mic/headphone jack
Win7 preload from corporate IT image with AD enabled and junk software, MBR, 1 partition, without RE or OEM partition (don’t ask me why corporate IT made this)

What achieved so far
- Dual-boot win7/Sierra with shrinked Win7 partition with data unchanged, to be capable run some corporate stuff
- Normal Sierra working machine with appropriate power management (6+ working hrs) with all functions good except below issues, with a repalce wifi module (BCM94352z)


Issues remaining
- card reader, fingerprint, not spending effort on it
- un-stable hand-off/hotspot
- HDMI-audio works partially, will try to find more
- Tackpoint (the one i like most) is to hard to use, but trackpad is ok


2. Preparing the SSD/partition

have to keep win7 partition due to IT policy, i used one popular partition tool in my region - DiskGenius - you can easily find similar apps
- boot with Win PE on USB, launch DiskGenius
- convert SSD to GPT, reboot
- shrink win7 partition to 90G, move to end of this SSD
- create an 200M+ EFI partition, and remaining for HPS
- sure i also back win7 partition to external HDD just in case it’s corrupted.


3. Preparing the USB installation disk
thanks great guide: https://www.tonymacx86.com/threads/guide-booting-the-os-x-installer-on-laptops-with-clover.148093/

- Download Sierra installer. we can still download Sierra from this link though it disappeared in purchased tab
https://itunes.apple.com/us/app/macos-sierra/id1127487414?mt=12

- Partition 16G+ USB with diskutil, GPT (option 2 in above guide) with “install_osx” label
- Install latest CLOVER (mine is 4259) to USB with following settings
- target “install_osx” using “change install location”
- “install for UEFI booting only”, check “OSxAptioFixDrv-64” and “EmuVariablesUefi-64” from Drivers64UEFI, EmuVaiablesUefi-64 is a must or you will meet installer error at last minute
- copy HFSPlus.efi to EFI/Clover/driver64UEFI
- prepare essentials kexts to CLOVER/kext/Other, mine has FakeSMC.ktxt, USBInjectALL.ktxt, VoodooPS2Controller.kext (no plan to use built-in ethernet so no network kext)
- using config_HD520_530_540.plist from RehabMan’s repo as working base, and change ig-platform-id to 0x12345678
- add NVMe patches otherwise installer won’t find NVmM at all. detail guide here
http://www.insanelymac.com/forum/to...vme-under-macos-sierra-is-ready/#entry2246306
- revise config.plist according to this guide
- grab IONVMeFamily.kext from any Sierra installations and copy to CLOVER/kexts/Other
- this patch is for installer only. After Sierra being installed, will switch to Rehaman’s class spoof approach. The class spoof method doesn't work for installer.
- using createinstallmedia to build the OS X installer
- BIOS settings
- VT-D disabled, DEP eanbled, secure boot disabled, lagecy boot UEFI only, CSM enabled, fast boot disabled
Now we have the installer USB with appropriate patch.
i attached my final CLOVER directory (clover_usbboot.zip) on installer USB as reference.


4. Install Sierra using USB installer

pretty straight forward process, after reboot twice, we can get a base Sierra system and arrive OS X desktop.
- Again, be sure check EmuVariablesUefi-64.efi during clover install. Without it, the installer will report error at the point “6 seconds remaining” which is really annoying.
- i only use disk utility to re-format HPS partition given i need keep win partition data un-changed. seems ok.


5. Post installation - to make Sierra bootable from laptop NVMe disk

Now we need make this laptop bootable itself without USB installer
- install clover 4259 to HDD with following settings
- target HDD
- “install for UEFI boot only”
- check “OSxAptioFixDrv-64”+”EmuVariablesUefi-64”
- install RC scripts, control panel preference as you like
- copy HFSPlus.efi to CLOVER/driver64UEFI
- copy FakeSMC.kext, USBInjectALL.kext, VoodooPS2Controller.kext to CLOVER/kexts/Other
- using config_HD520_530_540.plist from RehabMan’s repo as working base, and change ig-platform-id to 0x12345678
- using class-code spoof NVMe patch to allow Sierra access SSD, while maintain the original IONVMeFamily.kext untouched, detail guide here
https://www.tonymacx86.com/threads/...h-ionvmefamily-using-class-code-spoof.210316/
- boot the laptop to Win10 PE environment (by a Win 10 PE USB),check the NVMe SSD path in device property tag, mine is SB.PCI0.RP05.PXSX, luckily no special cases mentioned in the guide
- make a SSDT_NVMe-PCC.dsl based on template in guide with above path, compile it to aml
- from Rehabman’s patch_nvme repo, get patch_nvme.sh and patch using —spoof to get HackrNVMeFamily-10_12_6.kext
- copy SSDT_NVMe-PCC.aml to CLOVER/ACPI/patched, install HackrNVMeFamily-10_12_6.kext
Now this laptop should be able to boot itself. i attached full CLOVER package as well, just for reference


6. Post installation - Graphics
mainly its for Skylake CPU 32M DVMT-prealloc limitation, as well as booting glitch
- install both Lilu.kext and IntelGraphicsFixup.kext to S/L/E
- using config_HD520_530_540 as working base given it already contains the DVMT patch
- boot with invalid ig-platform-id 0x12345678 in config.plist, after entering OS X, rebuild cache by “kextcache -i /“, then change ig-platform-id back to 0x19160000.
- install patch for graphics glitch for 10.12 in config.plist
guides:
https://www.tonymacx86.com/threads/...lensize-patch-with-32mb-dvmt-prealloc.221506/

config_3_bootglitch.plist reflects those changes


7. Post installation - DSDT patches
this is to apply some fundamental patches, according to guide
https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
- boot laptop, with Fn+F4 pressed at CLOVER boot selection window, to dump original DSDT/SSDT to CLOVER/ACPI/origin
- disassemble those tables using command “iasl -da -dl DSDT.aml SSDT*.aml”
- there is obvious syntax errors if launch the disassembled DSDT.dsl using MaciASL, simply check and comment on those lines will get a 0 error DSL
- refs.txt mentioned in the guide seems introduce more syntax error so i didn’t choose ti
- launch MaciASL, add the RehabMan repo, or it already there
- apply below patch one by one
- [bat] Lenovo X230i (luckily it support thinkpad x1c 5th!)
- Fix _WAK Arg0 v2
- HPET Fix
- "SMBUS Fix”
- "IRQ Fix"
- "RTC Fix"
- "OS Check Fix"
- "Fix Mutex with non-zero SyncLevel"
- "Add IMEI"
- Skylake LPC
- compile to aml, copy new DSDT.aml to CLOVER/ACPI/patched
after reboot, the battery icon should appears at the menubar


8. Post installation - Backlight

There are several guides, be sure to use the latest one (the one without intelbacklight.kext)
https://www.tonymacx86.com/threads/...rol-using-applebacklightinjector-kext.218222/

- strictly follow the guide, get SSDT-PNLF.aml, AppleBacklightInjector.kext, install them to correct location
- apply AppleBacklight patch to config.plist (the one comment "change F%uT%04x to F%uTxxxx in AppleBacklightInjector.kext (credit RehabMan)”
- reopen dsdt.dsl, add a manual patch below to enable backlight adjust keys (F5, F6), compile new dsdt.aml to CLOVER/ACPI/patched
Code:
into method label _Q15 replace_content
begin
// Brightness Down\n
Notify(KBD, 0x0205)\n
Notify(KBD, 0x0285)\n
end;
into method label _Q14 replace_content
begin
// Brightness Up\n
Notify(KBD, 0x0206)\n
Notify(KBD, 0x0286)\n
end;

Be sure to test brightness function after sleep.


9. Post Installation - Native power management
Guide: https://www.tonymacx86.com/threads/guide-native-power-management-for-laptops.175801/
However, i didn’t choose the ssdtPRGen.sh approach, in stead i’m using XCPM only, means i simply generate SSDT-PluginType1.dsl and put it to CLOVER/ACPI/patched.
Also according to the guide, i chose SMBIOS to MacBookPro 13.1 (which is close to my CPU) so that assuming HWP work. though no idea how to check it. ensure xcpm_idle patch is there.

my config_4_bat_bl_power.plist reflects above #8 and #9 changes.

i had thought with this patch the laptop should be capable for power management, however, neither sleep nor working model the power consumption is far from stable - could be 50% off after 30 minute usage, and even more after 3 hrs sleep. With Rehabman’s help, i realized a correct USB configuration is critical for power management. see below #12.


10. Post Installation - Wifi
replaced original intel wifi module with bcm94352z. ~$30
guide https://www.tonymacx86.com/threads/guide-airport-pcie-half-mini-v2.104850/
my path is as follows
- module replacement, doubt the 2 antenna connection cable positions (grey/black) but finally found it’s irrelevant (at least per my personal experience)
- install FakePCIID.kext + FakcePCIID_Broadcom_WiFi.kext, the latest version
- install BrcmFirmwareRepo.kext and BrcmPatchRAM2.kext to S/L/E to enable BT. the method to install BrcmFirmWareData.kext to kexts/Other doesn’t work in this machine, no idea why.
- according to config-bcm94352-120.plist, adding related patches to CLOVER/config.plist, includes 5G/Handoff, ROW/Wifi Contry Code, Airport Extreme, BT4LE-Handoff-Hopspot

Now the Wifi and BT are working. Handoff/Hotspot are not that stable, discussed in this thread: https://www.tonymacx86.com/threads/...le-handoff-hotspot-and-unstable-sleep.236509/

two more things
- DPCI Manager shows Wifi Adapater is built-in, but en1. By remove /Library/Preferences/SystemConfgiuration/NetworkInterfaces.plist and reboot now the wifi becomes en0
- though never use (mini ethernet port, can hardly find appropriate cable), it’s better to enable the built-in ethernet with latest IntelMausiEthernet.kext. To save power consumption?

config_5_bcm94352z.plist reflects above changes for reference.


11. iCloud/iMessage/FaceTime/Airdop/Handoff

a super simple and clear guide here
https://www.tonymacx86.com/threads/an-idiots-guide-to-imessage.196827
though Handoff is not that stable, all other appleid related functions - iCloud, iMessage, AirDrop, FaceTime etc. - perform well
config_6_iMessage.plist is the final config i use.


12. Post Installation - USB configuration
Guide
https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
https://www.tonymacx86.com/threads/guide-10-11-usb-changes-and-solutions.173616/

According to the guide, to eject all USB ports for investigation,
- renane EHCx->EH0x looks like not necessary given no EHC found at beginning
- add port limit patch in config.plist
- install USBejectAll.kext
- FakePCIID_XHCIMux.kext is also not necessary given no USB2 only port in this laptop

Then the USB configuration of this laptop is
- HS01/SS01, HS02/SS02 for normal USB2/USB3 ports
- HS07 for bluetooth
- HS08 for internal camera

Based on this, SSDT_UIAC.dsl generated and copied to CLOVER/ACPI/patched
And more important, with this patch, the power consumption is back to normal - just like a real laptop - sleep more than 6hrs with 3% drop.
Sure we should turn off hibernation by pmset.
and remove the port limit in config.plist.

i’m not sure those 2 USB-C/Thunderbolt ports, whether need config them as USB port as well. but anyway i don’t have any USB-C device now so leave this as an open question.
config_7_usbejectall_portlimitpatch.plist as reference.


13. Post Installation - USB power ejection

here is another guide for propoer USB power ejection
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra-and-later.222266/
though i followed the guide carefully, at last, i found it’s hard to find appropriate values for those property settings.
- this laptop has EC, ensure AppleBusPowerControllerUSB is load
- add _SB.USBX device to SSDT-UIAC.aml mentioned in #12 to inject USBX and provide power properties (though the real values are not sure)


14. Post Installation - AppleHDA
previously i simply borrow an VoodooAppleHDA to enable sound. Now it’s the time for more native one.
There are numerous guides on the web to patch AppleHDA, i found HDApatcher. pretty straight forward. need to learn hidden rational. though it always good to learn the hidden rational..
https://github.com/Mirone/AppleHDAPatcher
Finally i use aDummyHDA.kext + correpsonding config.plist patches to enable HDA, and it works fine.

config_8_applehda.plist as reference.


15. Post installation - HDMI Audio

it’s not finished yet. Just share my current status. starting with guide
https://www.tonymacx86.com/threads/...o-sandy-ivy-haswell-broadwell-skylake.189495/
what i have done, according to the guide checklist
- all the reanmes
- hda-gfx=“onboard-1” under HDEF/IGPU
- layout-id=3 (same as #14) under HDEF
- framebuffer patch, the HDMI ports goes to port #1
- no FakePCIID used

However, for 2 HDMI devices testing, HDMI audio is ok at first time plug. When un-plug, the main display went off. i post my question here
https://www.tonymacx86.com/threads/...broadwell-skylake.189495/page-58#post-1627430
will keep udate.

config_8_1_hdmiaudio_notcomplete.plist as reference.



16. Dual-Boot
Almost forget windows…Actually its also straight-forward given the GPT and UEFI boot. FAQ guide actually gave methods
- modify EFI adding Windows boot manager
- RegEdit within windows to keep clock sync between Windows and OS X


======================================

That’s all my summary so far. Even though it’s not flawless, i am using this machine now as my serious primary working laptop. thanks this great community and Rehabman and others of course.

If you find any error and/or inappropriate settings pls do not hesitate to tell me. :)

two .zip attached, one is CLOVER on my usb boot (installer), one is CLOVER on this real laptop. Just for reference. i didn’t attach any existing tools/configs/files you can find repos of guides, since download them from correct repo is always the safer way.
 

Attachments

  • CLOVER_sierra_usb_installer.zip
    1.5 MB · Views: 624
  • CLOVER_sierra_thinkpadx1c.zip
    1.5 MB · Views: 788
Last edited by a moderator:
Hi @chaihaixin
Im new to this Hackintosh, and i have Lenovo X1 5th Gen
How does your work? Have you changed any HW?

yes i replaced the wifi module to a BCM94352z. then everything looks ok, so far.
 
yes i replaced the wifi module to a BCM94352z. then everything looks ok, so far.

Yours does not whitelist components?
I replaced my card with a DW1830 and there is no Wifi... not even under Windows.
It seems that the BIOS has a WLAN whitelist of some sort.
Sad....
 
Yours does not whitelist components?
I replaced my card with a DW1830 and there is no Wifi... not even under Windows.
It seems that the BIOS has a WLAN whitelist of some sort.
Sad....
you will find BIOS/Post error if met whitelist issue..
 
you will find BIOS/Post error if met whitelist issue..

Hm. Thanks! There is no error on boot - so must be what RehabMan suggested, that it is either defective or seated wrong.
 
Hi, thank you for the super guide.
I also have this rig and will receive my replacement WiFi/BT card soon (took the same one, BCM94352z, too).

Did you make any progress on your build?

Specifically I am asking about things that did not work at the time of the first post.

Second question, out of curiosity:
Did you try to make High Sierra run on this hardware?
I have tried, sticking loosely to your guide, but replacing diverse patches and modules with high sierra compatible ones, but still
no success, cant make it boot beyond the Lan module initialization, it freezes and gives the panic screen after a short while.
 
Hi, thank you for the super guide.
I also have this rig and will receive my replacement WiFi/BT card soon (took the same one, BCM94352z, too).

Did you make any progress on your build?

Specifically I am asking about things that did not work at the time of the first post.

Second question, out of curiosity:
Did you try to make High Sierra run on this hardware?
I have tried, sticking loosely to your guide, but replacing diverse patches and modules with high sierra compatible ones, but still
no success, cant make it boot beyond the Lan module initialization, it freezes and gives the panic screen after a short while.

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/

I will put it all together, but i dod not want to hijack this thread with a problem Report, it is a nice guide and should stay exactly that! During the weekend I will go through the process with HS again and open a new Thread or find a more appropriate one if already exists ;)
 
Status
Not open for further replies.
Back
Top