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
. Make sure all kext are allowed.
- 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 .aml files in CLOVER/ACPI/origin.
- If you are getting kernel panic, the most common reason by far is due to graphics / framebuffer. You'll need to boot with a fresh Clover and config.plist using a fake ig-platform-id = 0x12345678, update the kext cache, change the ig-platform-id back to the right one 0x591b0000, and restart your computer. For this reason, I always keep a copy of my installer USB so that I can still boot into OS in case of kernel panic.
- Whenever you change a BIOS setting or update BIOS, ACPI changes. (ACPI lets the computer know how to control its hardware, so ACPI will change if you want certain hardware to be on or off etc.) Extract the new ACPI and repatch it. (Update: 11/20 I didn't need to repatch the ACPI for the past 2 BIOS updates. Not a best practice, but it worked for me so far.)
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.
Note: If wifi isn't working, you could try BroadcomWiFiInjector.kext with AirportBrcmFixup.kext as a replacement for FakePCIID_Broadcom_WiFi.kext. See
README.
Alternatively, use the
edimax ac1200 instead with the appropriate drivers. While it is not generally recommended in this forum due to sleep issues, it worked for me for now. Check out the dual boot section for more comments on wifi.
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.
Note: If anyone successfully port the static patches to hot patches, let me know and I will update my repo.
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. I think VoodooI2C has a different implementation.
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). In the patch, change <46257554 25303478 00> to <46257554 25303478> instead.
- Add 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: This
guide is used to determine which labels correspond to the brightness keys. Do note that the log keeping method mentioned in the guide is a little dated, so I have attached a link below to a more updated kernel logging method. You will only need to go through the process below if your laptop is significantly different from mine, and if the method described above doesn't work. The steps below will help you find out what EC method is called by your laptop's 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.
Note3: In Mojave, the method works for Kabylake but not Skylake Spoof.
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 (version, cpu) from config_patches.plist. Add the patch to KernelAndKextPatches/KextsToPatch on config.plist.
- 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>
- *****If USB works at this point, you may choose to stop here. If not, proceed to patch the ssdt.******
- 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 from the 10.13 thread for how to handle HS03 HS04 and SS01 SS02 for the USB-C ports. See the sleep section for additional information on SS03.
- 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.
- I have added a link to my version of SSDT-UIAC.dsl.
Note: Due to the way Lenovo implements USB3.0 and Thunderbolt on the USB-C ports, there are some weird problems when the screen turns black when connecting the laptop to an external display, while using the SSDT-UIAC patch. This means my patch is probably incomplete, so I'll stick to using port limit removal for now. Also, in my case, only the USB-C port closer to the bottom works consistently with external graphics.
Note2: There appears to be a separate method for patching USB (and other internal ports like wifi, BT etc.) using hackintool. The instructions can be found
here. Instead of creating an SSDT file to patch the DSDT, hackintool creates a usbports.kext file as a codeless kext.
Graphics, DVMT, HiDpi
Update (Mojave): RDM shows all the added resolutions. In High Sierra, HiDPI was limited to a max of 1366x768. I'm guessing it has something to do with the way Mojave manages buffer allocation.
Graphics after installation
After installing MacOS, boot into the OS 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.
DMVT realloc workaround
Read this
guide. While the guide recommends against using the minStolenSize patch (
deprecated), I needed it to avoid kernel panic. The minStolenSize patch can be found in
config_deprecated.plist (see
thread and
guide). I have added the relevant minStolenSize com.apple.driver.AppleIntelKBLGraphicsFramebuffer to my config.plist. Make sure the "0x59160000/etc, 32MB BIOS, 19MB framebuffer 9MB cursor bytes (credit RehabMan)" patch is added (it should be prsent by default).
HiDPI
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
Update (Mojave): Apparently, HiDPI works even without using this code.
- 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) like me you can use the display override file I've provided here (1600x900 HiDPi, 1920x1080 HiDPi, 1366x768 HiDpi).
- You may need to add IODisplayEDID value to the file (See below)
- You can use this tool or FixEDID to generate the file.
- 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.
- The resolution probably won't be visible in system preference, so download RDM to apply the resolution.
Fixing EDID (Black screen on boot, or connected to external display)
There is a chance that the DisplayProductID-XXXX file generated above will cause black screen in a variety of scenarios. It has something to do with EDID and you will need to fix it. Read this
thread, and
post for a brief guide on how to fix EDID. Be sure to remove the DisplayProductID-XXXX file before proceeding. 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, use terminal to navigate into the package, go to MacOS, and run the program.
- Get the EDID dump from Darwin. You need to have successfully booted into the OS with the right ig-platform-id, otherwise, the program will return nothing.
- Once DarwinDumper generates the Display bin files, use FixEDID to make a kext and a DisplayProductID file using the .bin file.
- Place the kext in /Library/Extensions.
- Run Kext Utility and
- Create a new DisplayProductID-XXXX file that includes the correct IODisplayEDID value according to this post.
- Use Hex Fiend to format the EDID value.
- The value obtained from Darwin Dumpter EDID.txt is the right one, except for the first byte of basic params (the 21st byte), and last checksum byte.
- The 21st byte is obtained from the DisplayProductID file from FixEDID.
- The checksum is obtained from this site or similar.
- Replace IODisplayEDID from DisplayProductID with the modified value and place it in the Override folder (see above)
- Reboot.
If everything goes well, you will see the HiDPIs from RDM's drop-down menu, and in Display setting under color, you will see the name specified in Display Product ID.
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.
Update: 01/26/2019
@bigredarthur has successfully implemented sleep. To summarize the steps from his posts
#12 #14:
1. Patch DSDT.aml using MaciASL with code from
here.
2. Patch SSDT-UIAC.aml to include SS03.
3. Set "pmset -a hibernatemode 3"
Note: Used pmset -g log to check if there is anything keeping the laptop awake under "PreventUserIdleSystemSleep".
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.
(I didn't need to do this step, but I have added it in case you are unable to boot into Mac after instaling Windows.)
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?)
Note: When using windows, there is a problem where the
laptop is unable to wake up from deep sleep. After testing, it seems like it has to do the DW1560 card since changing it back to the original Intel card solved the problem somewhat. You can avoid the issue by not updating to the latest drivers from Lenovo except for a few crucial ones like BIOS. (stick to updates from Windows only, they are more than sufficient.) It probably has something to do with modern sleep and power management on a different WLAN card that the Lenovo drivers don't know how to deal with. You could also try to install the
Lenovo drivers for the DW1560. While wifi works generally with the DW1560, it is not the most stable WLAN card when paired with the Yoga, especially after sleep. My final solution, for now, is to use the original intel and add an Edimax AC1200 USB 2.0 dongle for wifi on the MacOS. (Update) Changing the bios setting for thunderbolt worked. Laptopt is able to wake up from deep sleep now.
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 (Single Core)
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.