Post Install
!!!!! Notes !!!!!
I am listing some important steps so I don't have to repeat them too much.
- Add kexts to /Library/Extension aka /L/E. (Keep /System/Library/Extension pristine, don't add kext there) While you can add kexts to Clover/kexts/Other, it is not recommended for post installs. Read guide under "Installing Kexts" for reasons why.
- Once FakeSMC.kext is added to /L/E, Clover will stop injecting kext from Clover/kexts/Origin if InjectKexts=Detect in config.plist (by default).
- After adding or removing kext from /L/E, be sure to update the kext cache. Use Kext Utility, let it run, or use code
- When editing plist, use Xcode as much as possible. Some people don't recommend clover configurator (not sure why), but it makes comparing between different plist much easier. Also, the general consensus is not to edit config.plist with a text editor.
- It is easy to get confused between using decimal, ASCII, hex etc. when populating ACPI and config.plist with values. Always check to see what values to use.
- To report errors, use gen_debug. It ensures that you don't miss out important files. Before running gen_debug, when starting up with clover, at the clover screen, press Fn+F4 to generate the .asl files in CLOVER/ACPI/origin.
Wifi and Bluetooth
Add FakePCIID.kext and FAKEPCIID_Broadcom_WiFi.kext. Download
here
Add BrcmFirmwareData.kext and BrcmPatchRAM2.kext. Download
here.
If Bluetooth isn't working, patch USB first.
DSDT/SSDT patching
Follow this
guide. I will be using static patches because it is faster to implement.
Hot patching will take more time to implement, but easier for others to use. More information on the syntax can be found
here.
- Download MaciASL and iasl.
- Extract .aml files. While in the clover bootloader, press Fn+F4 (I tried F4, Ctrl+F4 and Fn+F4 just in case.) This creates a folder CLOVER/ACPI/origin that contains all the .aml files.
- Following the guide, extract the files using
Code:
iasl -da -dl DSDT.aml SSDT*.aml
In my case, I was getting error on Line 267, error 6126, "syntax error, unexpected PARSEOP_NAME". To fix, just comment out the One.
Code:
Name (SS1, 0x00)
Name (SS2, 0x00)
Name (SS3, One)
// One
Name (SS4, One)
// One
- Apply the following patches. They can be found in MaciASL by clicking the Patch icon next to Compile (I don't know exactly why we need some of the patches, so I'm following the guide blindly.)
- "Fix _WAK Arg0 v2"
- "Fix Mutex with non-zero SyncLevel" (Needed for battery status)
- "OS Check Fix" Choose Windows 10. (Important for many fixes)
- "RTC Fix"
- "IRQ Fix"
- "SMBUS Fix"
- "HPET Fix"
- There will be additional patches needed to solve other issues. See below, or search for "MaciASL" within page to locate the patches.
- Once the DSDT.dsl is happily patched, compile again to make sure that there are no errors.
- Save the DSDT.dsl file as DSDT.aml using the Save As function in MaciASL.
- Add DSDT.aml to the Clover/ACPI/patched folder.
Note: In BIOS, under config/display, you can set total graphics memory to 256gb or 512gb. The DSDT.aml files extracted from either configuration are different and cannot be used interchangeably.
Trackpad and other inputs
Add the Voodoo-PS2-Controller.kext. Download
here
Add SSDT-Thinkpad_Clickpad.aml to the patched folder in clover. Download the .dsl
here, and convert it to .aml using MaciASL.
TBD: I may implement VoodooI2C and VoodooI2CHID since people using the
dell 9360 prefer the I2C implementation.
Trackpoint is overly sensitive with VoodooPS2, I don't recommend using it unless the trackpad fails randomly.
The touchscreen works somewhat, but it doesn't support multitouch. In fact, the only functionality is touch -> left click.
Battery Status
Apply the
[sys] Fix Mutex with non-zero SyncLevel patch on MaciASL.
Apply the
[bat] Lenovo x230i on MaciASL.
Add
ACPIBatteryManager.kext.
Note: For the batter patch, someone has gone through the whole process listed
here and written the patch for Lenovo x230i. It happens to work on some of the modern Thinkpads that share similar batteries. A hot patch guide is available
here.
Screen Brightness Control
Follow this
quick guide. There are essentially 3 steps to enable brightness control (slider in sys pref/display)
- a single pre-built AppleBacklightInjector.kext
- a patch for AppleBacklight in config.plist/KernelAndKextPatches/KextsToPatch
Code:
<dict>
<key>Comment</key>
<string>change F%uT%04x to F%uTxxxx in AppleBacklightInjector.kext (credit RehabMan)</string>
<key>Name</key>
<string>com.apple.driver.AppleBacklight</string>
<key>Find</key>
<data>RiV1VCUwNHgA</data>
<key>Replace</key>
<data>RiV1VHh4eHgA</data>
</dict>
It can be found in config_patches.plist from https://github.com/RehabMan/OS-X-Clover-Laptop-Config.
- Update (Mojave): <46257554 25303478 00> to <46257554 25303478> instead.
- SSDT-PNLF.aml to activate the AppleBacklight.kext
To enable brightness control with the keys, patch with this code:
Code:
into method label _Q15 replace_content
begin
Notify(\_SB.PCI0.LPCB.KBD, 0x0405)\n
end;
into method label _Q14 replace_content
begin
Notify(\_SB.PCI0.LPCB.KBD, 0x0406)\n
end;
Note that I had to use ...LPCB.KBD for the X1 Yoga 3rd Gen instead of .
..LPCB.PS2K or
...LPC.KBD. The right code can probably be found in the DSDT.dsl for an arbitrary laptop.
Extra: The code is derived from this
guide. Do note the log keeping is a little buggy, so there are some steps that needs updating. Basically, for an arbitrary laptop, you need to find out what EC method is called by the brightness keys. Using
ACPIDebug:
- Patch DSDT.dsl with debug.txt on MaciASL (copy the code in debug.txt directly to the patch window)
- Install ACPIDebug.kext
- apply "Add DSDT Debug Methods" patch on MaciASL
- apply "Instrument EC Queries" patch on MaciASL.
- Monitoring system.log on console.app produces nothing, so read this thread, and this thread.
- Capture the log into kernel.log
Code:
log stream --predicate "processID == 0" --level debug >> /tmp/kernel.log
While capturing, press the brightness keys. Terminate the process with Ctrl+C. In the kernel.log file, you should see _Q15 and _Q14 when less brightness and more brightness is pressed respectively.
Sound
Add
AppleALC.kext and
Lilu.kext.
In config.plist, under Devices, in the Audio field, inject 11. The X1Y3 uses ALC285 (In IOreg, look for AppleHDACodecGeneric, and the corresponding vendorcodecID. Mine is 0x10ec0285, which corresponds to ALC285), which matches id 11 (see
AppleALC's codec support).
Note: I encountered a problem when I used an older Lilu.kext with a newer AppleALC.kext, so for the best compatibility, download the latest files.
Note2: Sound sometimes disappears after disconnecting from HDMI. Nothing a restart won't fix.
USB
You can follow this
guide for completeness sake. I followed
LukaJankovic's instruction for simplicity and it so happened to work.
- Add USBInjectAll.kext. Download here.
- Add FakePCIID.kext and FakePCIID_XHCIMux.kext
- Patch com.apple.driver.usb.AppleUSBXHCI to remove limit. Find the right patch from config_patches.plist. Add the patch to KernelAndKextPatches/KextsToPatch on config.plist. This is a temporary solution.
- Add the following ACPI patch in config.plist. Alternatively, copy it using xcode from a similar config.plist.
Code:
<dict>
<key>Comment</key>
<string>change EHC1 to EH01</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
RUhDMQ==
</data>
<key>Replace</key>
<data>
RUgwMQ==
</data>
</dict>
<dict>
<key>Comment</key>
<string>change EHC2 to EH02</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
RUhDMg==
</data>
<key>Replace</key>
<data>
RUgwMg==
</data>
</dict>
<dict>
<key>Comment</key>
<string>change XHCI to XHC</string>
<key>Disabled</key>
<false/>
<key>Find</key>
<data>
WEhDSQ==
</data>
<key>Replace</key>
<data>
WEhDXw==
</data>
</dict>
- Create custom SSDT-UIAC.aml using this guide. Note: I had the issue of SS01 and SS02 from USB-C appearing under XHC@0 in IOreg. See post #28 for how to handle HS03 HS04 and SS01 SS02 for the USB-C ports.
- Once SSDT-UIAC.aml is created, you don't need Port Limit removal patch any longer. Remove it from config.plist, and check IOreg under XHC to see if only the correct ports with the right USB connector values are showing up.
Graphics, DVMT, HiDpi (not 100%)
I have yet to solve it 100%, but at least I have something.
Graphics after installation
After installing MacOS and booting using ig-platform-id = 0x12345678, rebuild the kext, and change ig-platform-id back to 0x591b0000 or 0x59160000. Keep FakeID IntelGFX = 0x59168086. These values can be found in
config_HD615_620_630_640_650.plist. (I used config_HD615_620_630_640_650_spoof.plist before and Im trying without skylake spoof now.)
DMVT realloc workaround
Read this
guide. The guide recommends against using the minStolenSize patch (
deprecated). Nevertheless, the minStolenSize patch can be found in
config_deprecated.plist (see
thread), and I have added the relevant patches involving com.apple.driver.AppleIntelKBLGraphicsFramebuffer to my config.plist. Add the "0x59160000/etc, 32MB BIOS, 19MB framebuffer 9MB cursor bytes (credit RehabMan)" patch as well.
HiDpi (not fully working, missing resolutions)
Copying the HiDpi guide from
Luka, and using RehabMan's
guide:
- Install Lilu.kext and WhateverGreen.kext
- Enable HiDPi using
Code:
sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true
- Look for DisplayVendorID by opening IOreg and looking for display0. In my case, AppleBacklightDisplay is under display0. DisplayProductID is 0x0, and DisplayVendorID is 0x2889.
- If you have the same DisplayVendorID(2889) and DisplayProductID(0) as me you can use the display override file I've provided here (1600x900 HiDPi, 1920x1080 HiDPi, 1366x768 HiDpi).
- If not you can use this tool to generate one yourself
- Place the display override file in /System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-XXXX/DisplayProductID-XXXX. (Don't add it to /System/Library/Displays/Overrides/...) Remove .plist extension when copying.
- If the resolutions aren't showing in system preferences, try RDM
In my case, only resolution 1366x768 showed up in RDM as HiDpi as a result of the override. The ideal resolution for me is 1600x900 but unfortunately, I couldn't get HiDpi to work. My guess is it must have something to do with DVMT prealloc and
ig-platform-id. See
post. This is the list of possible ig-platform-id for Skylake Spoof.
191e0000 19160000 19260000 19270000 191b0000 193b0000
19120000 19020001
19170001 19120001 19320001 19160002 19260002 191e0003 19260004 19270004
193b0005 191b0006 19260007
Turns out, only the first 6 ig-platform-id works and they didn't solve the problem.
(NEW) Fixing Black Screen when connected to external display
One issue I had was the laptop rebooting when connected to an external display via USB-C. To solve the problem, first enable all USB ports. (I undid the USB SSDT patch and used the port limit patch instead).
After the USB fix, the laptop would connect fine, but upon disconnecting, the laptop's screen will turn black.
Fix the EDID of the laptop. Read this
thread, and
post for a brief guide. Follow the instructions on the
fixEDID page:
- Download FixEDID and DarwinDumper.
- DarwinDumper will appear unsafe to chrome. I downloaded it with Safari instead. If Mac fails to run the program, open the package, go to MacOS, and use shell to run the program.
- Once DarwinDumper generates the Display bin files, use FixEDID to make a kext using the .bin file.
- Place the kext in /Library/Extensions.
- Run Kext Utility and
- Reboot.
And after all this, only one of the USB-C port (Bottom left) works.
Power Management and Sleep (not working well)
Power management is working fine. BUT, when the laptop is in 'sleep' (closing the lid, or selecting the sleep option from apple menu), the battery drains as though the computer is on idle. This has to do with Lenovo using Si03 for sleep instead of S3 sleep, which lets the laptop function more like a phone that runs in the background and wakes instantly, but reduces battery life significantly. See
post #25. One solution is to wait for the BIOS update, assuming it is in the works. The other solution that the Linux users have tried is to patch ACPI following this
guide.
Following this
guide, I disabled hibernation and that's it.
Code:
sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage
sudo pmset -a standby 0
sudo pmset -a autopoweroff 0
I did not apply the Custom SSDT.aml using ssdtPRGen.sh patch since my CPU is after Haswell. The guide mentions that the patches are already reflected in the config.plist such as:
- config.plist/KernelAndKextPatches/KernelPm=true (Haswell+)
- config.plist/KernelAndKextPatches/KernelLapic=true (for those with Local APIC panic)
- appropriate System Definition (SMBIOS) for your CPU (config.plist/SMBIOS)
I enabled HWP using this
guide. It is a simple process of opening config.plist with Clover Configurator, and enabling HWP under CPU.
I also applied
[usb] USB3 _PRW 0x6D (Instant wake) to DSDT.dsl on MaciASL.
Dual Boot
Follow RehabMan's
guide,
Here are my steps:
- Load installer. Using Disk Utility, format 1tb drive into 2 partitions
- Mac Os Extended (Journaled) aka HSF+ Journaled, GUID Partition for High Sierra
- MsDOS(FAT) for Windows
- Install Mac onto the Mac partition
- Install Windows onto the Win Partition. (Format the partition in Win installer first. To create a bootable drive, use the win10 media creation tool on a PC )
- Change win10 registry so that both mac and windows share the same time. See guide.
rename bootmgfw.efi:
- Boot off the UEFI: partition of your flash drive macOS installer
- Boot macOS drive
- Open Clover Configurator
- Select Mount EFI on left column
- Click Mount Partition for the drive macOS and Windows is installed on
- Click Open Partition
- Navigate to EFI/Microsoft/Boot/
- Rename bootmgfw.efi to bootmgfw-orig.efi
- Restart and UEFI: (your_drive_name) should be an available boot device
If the mac drive doesn't show up.
- Mount the EFI partition of your boot drive using Clover Configurator again
- Open the EFI and navigate to EFI/BOOT/
- Copy BOOTX64.efi
- Navigate to EFI/Windows/Boot
- Paste BOOTX64.efi here
- Rename BOOTX64.efi to bootmgfw.efi after pasting
- Restart and boot off Windows Boot Manager and you’ll notice it redirects to Clover instead of booting Windows (Pretty cool huh?)
Undervolting (Not working)
Tried using
voltage shift and it didn't respond. Not sure why. Also, since the BIOS is locked, I don't know of another way to alter the voltage unfortunately.
Run Apps from Anywhere is now missing
Apply this code in terminal
Code:
sudo spctl --master-disable
Performance/Benchmark
Geekbench
Idle
Load
Accessories
I use the
UGREEN hub for ethernet, additional USB-A, ethernet, HDMI, VGA, SD and MICRO SD card reader, and an additional USB-C port with power delivery. I also use the
Cable Matters DVI adapter to connect to the older korean 2560x1440 27inch monitors that require dual-link DVI.