From b784774c6f85050f856ef607f36cd7870fd98911 Mon Sep 17 00:00:00 2001 From: Tyler Nguyen Date: Thu, 5 Jul 2018 18:06:00 -0500 Subject: [PATCH] Added new patch files --- .../3_manual,optional-X1C6_S3_DSDT.patch | 243 ++++++++++++++++++ ACPI/patch-files/3_system_OSYS_win10.txt | 12 + ACPI/patch-files/3_usb_prw_0x6d_xhc_skl.txt | 65 +++++ ACPI/patch-files/README.md | 1 + README.md | 25 +- 5 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 ACPI/patch-files/3_manual,optional-X1C6_S3_DSDT.patch create mode 100755 ACPI/patch-files/3_system_OSYS_win10.txt create mode 100755 ACPI/patch-files/3_usb_prw_0x6d_xhc_skl.txt create mode 100644 ACPI/patch-files/README.md diff --git a/ACPI/patch-files/3_manual,optional-X1C6_S3_DSDT.patch b/ACPI/patch-files/3_manual,optional-X1C6_S3_DSDT.patch new file mode 100644 index 0000000..76bf258 --- /dev/null +++ b/ACPI/patch-files/3_manual,optional-X1C6_S3_DSDT.patch @@ -0,0 +1,243 @@ +--- dsdt.dsl 2018-03-03 14:47:12.279105691 +0100 ++++ dsdt.dsl 2018-03-03 14:26:30.606427931 +0100 +@@ -18,9 +18,8 @@ + * Compiler ID "INTL" + * Compiler Version 0x20160527 (538314023) + */ +-DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000000) ++DefinitionBlock ("", "DSDT", 2, "LENOVO", "SKL ", 0x00000001) + { +- External (_GPE.TBNF, MethodObj) // 0 Arguments + External (_PR_.BGIA, UnknownObj) + External (_PR_.BGMA, UnknownObj) + External (_PR_.BGMS, UnknownObj) +@@ -40,19 +39,15 @@ + External (_PR_.PDTS, UnknownObj) + External (_PR_.PKGA, UnknownObj) + External (_PR_.POWS, UnknownObj) +- External (_PR_.PR00, DeviceObj) + External (_PR_.PR00.LPSS, PkgObj) + External (_PR_.PR00.TPSS, PkgObj) + External (_PR_.TRPD, UnknownObj) + External (_PR_.TRPF, UnknownObj) +- External (_SB_.GGIV, MethodObj) // 1 Arguments +- External (_SB_.GGOV, MethodObj) // 1 Arguments + External (_SB_.IETM, DeviceObj) + External (_SB_.IETM.DPTE, UnknownObj) + External (_SB_.PCI0.B0D4.NPCC, PkgObj) + External (_SB_.PCI0.CTCD, MethodObj) // 0 Arguments + External (_SB_.PCI0.CTCN, MethodObj) // 0 Arguments +- External (_SB_.PCI0.GFX0, DeviceObj) + External (_SB_.PCI0.GFX0.AINT, MethodObj) // 2 Arguments + External (_SB_.PCI0.GFX0.ALSI, UnknownObj) + External (_SB_.PCI0.GFX0.CBLV, UnknownObj) +@@ -71,109 +66,81 @@ + External (_SB_.PCI0.HDAS.PS3X, MethodObj) // 0 Arguments + External (_SB_.PCI0.HIDW, MethodObj) // 4 Arguments + External (_SB_.PCI0.HIWC, MethodObj) // 1 Arguments +- External (_SB_.PCI0.ISP0, DeviceObj) +- External (_SB_.PCI0.LPCB.EC__.HKEY.DYTC, MethodObj) // 1 Arguments + External (_SB_.PCI0.LPCB.H_EC.XDAT, MethodObj) // 0 Arguments + External (_SB_.PCI0.PAUD.PUAM, MethodObj) // 0 Arguments +- External (_SB_.PCI0.PEG0, DeviceObj) +- External (_SB_.PCI0.PEG0.PEGP, DeviceObj) + External (_SB_.PCI0.PEG0.PG00.PEGP, DeviceObj) +- External (_SB_.PCI0.PEG1, DeviceObj) + External (_SB_.PCI0.PEG1.PG01.PEGP, DeviceObj) +- External (_SB_.PCI0.PEG2, DeviceObj) + External (_SB_.PCI0.PEG2.PG02.PEGP, DeviceObj) + External (_SB_.PCI0.PTDP, UnknownObj) + External (_SB_.PCI0.RP01.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP01.PXSX, DeviceObj) +- External (_SB_.PCI0.RP01.PXSX.WGST, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP01.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP02.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP02.PXSX, DeviceObj) + External (_SB_.PCI0.RP02.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP02.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP03.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP03.PXSX, DeviceObj) + External (_SB_.PCI0.RP03.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP03.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP04.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP04.PXSX, DeviceObj) + External (_SB_.PCI0.RP04.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP04.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP05.PON_, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP05.PWRG, UnknownObj) +- External (_SB_.PCI0.RP05.PXSX, DeviceObj) + External (_SB_.PCI0.RP05.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP05.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP05.RSTG, UnknownObj) + External (_SB_.PCI0.RP05.SCLK, UnknownObj) + External (_SB_.PCI0.RP06.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP06.PXSX, DeviceObj) + External (_SB_.PCI0.RP06.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP06.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP07.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP07.PXSX, DeviceObj) + External (_SB_.PCI0.RP07.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP07.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP08.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP08.PXSX, DeviceObj) + External (_SB_.PCI0.RP08.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP08.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP09.PEGP.NVST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP09.PON_, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP09.PWRG, UnknownObj) +- External (_SB_.PCI0.RP09.PXSX, DeviceObj) + External (_SB_.PCI0.RP09.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP09.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP09.RSTG, UnknownObj) + External (_SB_.PCI0.RP09.SCLK, UnknownObj) + External (_SB_.PCI0.RP10.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP10.PXSX, DeviceObj) + External (_SB_.PCI0.RP10.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP10.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP11.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP11.PXSX, DeviceObj) + External (_SB_.PCI0.RP11.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP11.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP12.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP12.PXSX, DeviceObj) + External (_SB_.PCI0.RP12.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP12.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP13.PON_, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP13.PWRG, UnknownObj) +- External (_SB_.PCI0.RP13.PXSX, DeviceObj) + External (_SB_.PCI0.RP13.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP13.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP13.RSTG, UnknownObj) + External (_SB_.PCI0.RP13.SCLK, UnknownObj) + External (_SB_.PCI0.RP14.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP14.PXSX, DeviceObj) + External (_SB_.PCI0.RP14.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP14.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP15.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP15.PXSX, DeviceObj) + External (_SB_.PCI0.RP15.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP15.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP16.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP16.PXSX, DeviceObj) + External (_SB_.PCI0.RP16.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP16.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP17.PON_, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP17.PWRG, UnknownObj) +- External (_SB_.PCI0.RP17.PXSX, DeviceObj) + External (_SB_.PCI0.RP17.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP17.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP17.RSTG, UnknownObj) + External (_SB_.PCI0.RP17.SCLK, UnknownObj) + External (_SB_.PCI0.RP18.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP18.PXSX, DeviceObj) + External (_SB_.PCI0.RP18.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP18.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP19.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP19.PXSX, DeviceObj) + External (_SB_.PCI0.RP19.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP19.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP20.PON_, MethodObj) // 0 Arguments +- External (_SB_.PCI0.RP20.PXSX, DeviceObj) + External (_SB_.PCI0.RP20.PXSX.WGST, MethodObj) // 0 Arguments + External (_SB_.PCI0.RP20.PXSX.WIST, MethodObj) // 0 Arguments + External (_SB_.PCI0.SAT0.NVM1.VLPM, UnknownObj) +@@ -192,20 +159,15 @@ + External (_SB_.PCI0.XHC_.RHUB.PS0X, MethodObj) // 0 Arguments + External (_SB_.PCI0.XHC_.RHUB.PS2X, MethodObj) // 0 Arguments + External (_SB_.PCI0.XHC_.RHUB.PS3X, MethodObj) // 0 Arguments +- External (_SB_.SGOV, MethodObj) // 2 Arguments +- External (_SB_.TBFP, MethodObj) // 1 Arguments + External (_SB_.TPM_.PTS_, MethodObj) // 1 Arguments + External (_SB_.UBTC.NTFY, MethodObj) // 0 Arguments + External (_TZ_.ETMD, IntObj) + External (_TZ_.TZ00, DeviceObj) + External (_TZ_.TZ01, DeviceObj) +- External (ADBG, MethodObj) // 1 Arguments + External (ALSE, UnknownObj) +- External (BNUM, UnknownObj) + External (BRTL, UnknownObj) + External (CFGD, UnknownObj) + External (DIDX, UnknownObj) +- External (DX2H, MethodObj) // 2 Arguments + External (GSMI, UnknownObj) + External (IGDS, UnknownObj) + External (LHIH, UnknownObj) +@@ -215,29 +177,6 @@ + External (M32L, UnknownObj) + External (M64B, UnknownObj) + External (M64L, UnknownObj) +- External (MBGS, MethodObj) // 1 Arguments +- External (MMRP, MethodObj) // 1 Arguments +- External (MMTB, MethodObj) // 1 Arguments +- External (ODV0, IntObj) +- External (ODV1, IntObj) +- External (ODV2, IntObj) +- External (ODV3, IntObj) +- External (ODV4, IntObj) +- External (ODV5, IntObj) +- External (ODV6, IntObj) +- External (ODV7, IntObj) +- External (ODV8, IntObj) +- External (ODV9, IntObj) +- External (ODVA, IntObj) +- External (ODVB, IntObj) +- External (ODVC, IntObj) +- External (ODVD, IntObj) +- External (ODVE, IntObj) +- External (ODVF, IntObj) +- External (ODVG, IntObj) +- External (ODVH, IntObj) +- External (ODVI, IntObj) +- External (ODVJ, IntObj) + External (PC00, IntObj) + External (PC01, UnknownObj) + External (PC02, UnknownObj) +@@ -256,9 +195,6 @@ + External (PC15, UnknownObj) + External (PTTB, UnknownObj) + External (SGMD, UnknownObj) +- External (STDV, IntObj) +- External (TBTD, MethodObj) // 1 Arguments +- External (TBTF, MethodObj) // 1 Arguments + + Name (MBUF, Buffer (0x4000){}) + OperationRegion (MDBR, SystemMemory, 0xAB52C018, 0x00004008) +@@ -415,9 +351,7 @@ + Name (SS1, 0x00) + Name (SS2, 0x00) + Name (SS3, One) +- One + Name (SS4, One) +- One + OperationRegion (GNVS, SystemMemory, 0xAB54E000, 0x0767) + Field (GNVS, AnyAcc, Lock, Preserve) + { +@@ -13824,8 +13758,7 @@ + If ((DerefOf (Arg0 [0x00]) == 0x01)) + { + ADBG (Concatenate ("POFF GPIO=", ToHexString (DerefOf (Arg0 [0x02])))) +- \_SB.SGOV (DerefOf (Arg0 [0x02]), (DerefOf (Arg0 [0x03]) ^ +- 0x01)) ++ \_SB.SGOV (DerefOf (Arg0 [0x02]), (DerefOf (Arg0 [0x03]) ^ 0x01)) + } + + If ((DerefOf (Arg0 [0x00]) == 0x02)) +@@ -27559,6 +27492,13 @@ + 0x00, + 0x00 + }) ++ Name (\_S3, Package (0x04) // _S3_: S3 System State ++ { ++ 0x05, ++ 0x05, ++ 0x00, ++ 0x00 ++ }) + Name (\_S4, Package (0x04) // _S4_: S4 System State + { + 0x06, +@@ -34795,4 +34735,3 @@ + } + } + } +- diff --git a/ACPI/patch-files/3_system_OSYS_win10.txt b/ACPI/patch-files/3_system_OSYS_win10.txt new file mode 100755 index 0000000..e5d4f36 --- /dev/null +++ b/ACPI/patch-files/3_system_OSYS_win10.txt @@ -0,0 +1,12 @@ +#Maintained by: RehabMan for: Laptop Patches +#system_OSYS_win10.txt + +# Cause the DSDT to simulate "Windows 2015" 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 2015" is a better choice than "Windows 2006" + +into_all method code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2015\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2015"))) end; + diff --git a/ACPI/patch-files/3_usb_prw_0x6d_xhc_skl.txt b/ACPI/patch-files/3_usb_prw_0x6d_xhc_skl.txt new file mode 100755 index 0000000..1d84138 --- /dev/null +++ b/ACPI/patch-files/3_usb_prw_0x6d_xhc_skl.txt @@ -0,0 +1,65 @@ +#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; + diff --git a/ACPI/patch-files/README.md b/ACPI/patch-files/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ACPI/patch-files/README.md @@ -0,0 +1 @@ + diff --git a/README.md b/README.md index a5a63de..fef2d09 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ # x1c6-hackintosh -READMEs, Clover configurations, patches, and notes for a Thinkpad X1 Carbon 6th Gen Hackintosh +# MacOS on Thinkpad X1 Carbon 6th Generation + +## What doesn't work: +MicroSD Card Reader [DISABLED at BIOS Level] - not needed +Fingerprint Reader [DISABLED at BIOS Level] - not needed +TrackPoint nub is unstable [DISABLED at BIOS Level] - tluck's fork of VoodooPS2Controller may fix this problem, but I have yet to try it. +Hand-off is unstable - not needed + +## Underlying minor issues that needs to be examined in the future: +USB Power Property Injection - unsure of real values +Battery life optimization - currently average 6-7 hours of regular usage +With the exeption of volume and brightness, function keys do not properly work - DSDT patches and testing in progress +Performance optimization + +## Hardware Replacements: +### WiFi and Bluetooth: +Replace factory Intel wifi module with a MacOS compatible one. Make sure that the card is of M.2 form factor. I replaced it with a Broadcom BCM94352Z. + +### M.2 Hard Drive Replacements: +Replace factory Samsung PM981 with preferably a SATA M.2 SSD, as it is more power efficient and plays nicer with APFS than an NVMe M.2 SSD. + +## Contacts: + +