Lenovo T460 macOS with Clover Guide
- Updated to Clover 4063
- Updated AppleALC (1.1.2a) to do all the kext patching of SKLGraphicsFramebuffer and AppleHDA - no GFX FakeID needed anymore
- Added patchmatic and skylakeFB patch/unpatch tools/scripts
- Cleaned up stuff
- Tweaks for config.plist and added config.noSKL.plist - no need for SSDT-IGPU
Various Tweaks over Last months
-- TrackPoint scroll with cut/paste
-- adding T560 support by barrrrt
-- which include Belyaev's Sierra TrackPad preference pane mods
-- cap locks fix
Attached is a current zip file with a complete Clover /EFI and kext pack for the Lenovo T460
The current file bundle is tested on Sierra. The zip file is attached to the bottom of this post.
Note: I never got the GFX fully working on El Capitan.
- Full Clover file set - config.plist etc.
- Includes all custom kexts
- Includes custom DSDT/SSDT scripts and patches
- Utility scripts
Caveat: My system is a T460 with i5-6300U, Intel HD Graphics 520, 1920x1080 touch screen. If you have a different system model, then extract the ACPI files and use the included scripts to create a set of files consistent with your system type and BIOS version. See below for details.
Credits: RehabMan, Shmilee, vusun123, TimeWalker, Mieze from which, much of their work and help is/was was used to get the T460 to this point.
Devices and aspects working:
- Ethernet - Intel I219LM is enabled via IntelMausiEthernext.kext
- WiFi/BT - substitute the Intel WiFi/BT with a compatible Broadcom or Atheros chip
- Audio - ALC293 codec implemented via AppleALC.kext (old AppleHDA_ALC293 and CodecCommander kexts are not needed)
- PS2 - ClickPad + TrackPoint + all 3 buttons - using a modified VoodooPS2Controller to support new layouts - and added some custom Fn key maps based on 440/450 dsdt
- USB - implemented via custom SSDT + USBInjectAll kext. All USB3/USB2 ports are intel-based and work - 3 external USB and internal Camera, BT, etc
- Sleep/Wake - the sleepwatcher package and custom sleep/wake scripts are used to help with sleep/wake for BT and PS2 devices.
Note: have not tried to implement the SD card reader - no driver found.
The ACPI (DSDT/SSDT) modifications are handled by combination of Clover on-the-fly patches, custom/direct patches to DSDT and the "hot-patch" method. Here are the key files: The (sample) custom DSDT in the zip is extracted from a T460 on BIOS v1.22.
ssdt - (not included) and can be created for your CPU - will define C/P states via Pike's script ssdtPRGen.sh SSDT-CPU - generic - for HWP support - (no longer needed) Clover 4016+ will generate SSDT with HWPEnabled and PStates true
In the DSDT.T460 directory, there are the samples and scripts to create your own custom DSDT. The DSDT in the zip may work but its best to just match your system. The create_patch_DSDT.bash script will create a patched DSDT starting from the original ACPI files located the ACPI-Tables folder. The final DSDT is patched via patchmatic using the files in patch-files folder. Follow these steps:
Note: I assume the directory /usr/local/bin exists and is in your environment variable PATH
sudo cp -a * /
Start by extracting your original ACPI files by hitting F4 after you boot up with Clover. It will save the files to EFI/CLOVER/ACPI/origin.
Copy these original .aml files - just the ones with names starting with DSDT and SSDT - to a directory called ACPI-Tables in the DSDT.T460 directory of the expanded zip file.
To create the source .dsl files, run this procedure:
/usr/local/bin/iasl -dl -da SS*.aml DSDT.aml
Using the original DSDT.dsl in the ACPI-Tables directory as the source, create a custom patched DSDT.dsl by:
Now there is a new custom DSDT.dsl in this same directory as the result of the patching script.
Compile and install this newly create patched DSDT.dsl along with the other SSDT*.dsl files into the ESP.
Run this script:
New Installation - Steps and Details
The ACPI (DSDT/SSDT) modifications are handled by combination of Clover on-the-fly patches, custom/direct patches to DSDT and the "hot-patch" method. Here are the key files:
The (sample) custom DSDT in the zip is extracted from a T460 on BIOS v1.22.
BIOS settings: - Use Defaults settings, but check these items: - Disable Secure Boot Terms: The ESP is created automatically as the first (hidden) partition by the Disk Utility when the GPT option is selected for partitioning a disk.
- Update to latest BIOS
- Set Config / Serial ATA (SATA) / SATA = AHCI
- Set Security / Memory Protection / Execution Prevention = Enabled
GPT = GUID Partition Table
MBR = Master Boot Record
ESP = EFI System Partition
- Use Defaults settings, but check these items:
- Disable Secure Boot
The ESP is created automatically as the first (hidden) partition by the Disk Utility when the GPT option is selected for partitioning a disk.
Part 1 - OS Installation
Create macOS USB installer Put Clover installation on USB Boot Clover from USB Installer and select Install macOS Part 2- Post OS Installation and Setup Convert the Logical volume to Physical volume Note: This kext is not needed on the USB installer. b ) Install the kexts Note: macOS may already have configured the ethernet, so this step may be unnecessary but it will not hurt anything either for a fresh installation. Remove the USB and Reboot with Clover from the HD Notes on Custom Kexts All the kexts listed below are contained in the zip file. The origin is listed below if you wish to download them as well. I recommend you use the _kext-install.command script to properly copy all kexts to the /Library/Extensions directory. Also included are the old alternate audio kexts in ALC293 directory: WiFi Replacement These kexts and procedure are used with Broadcom WiFi/B. Replace the Intel WiFi with suitable supported card such as a BCM94352Z (Dell DW1560) with proper M.2 form-factor. To install the SleepWatcher scripts, which will help with WiFi on Sleep/Wake use this process to install the scripts into / of your HD Reboot and check that SleepWatcher is running via "ps -ef | grep sleep". Install these kexts for a Broadcom chip.
This procedure is for a new macOS installation using a USB Installer. If you are upgrading from an older working version of OS X (say El Capitan) already on your HD, skip down to Part 2, Step 3 to update your ESP. You must replace or merge in the changes from the EFI/CLOVER files to your HD ESP before you perform the upgrade.
Later, this same file set will be installed on the HD for UEFI boot.
- In Sierra, use the Erase option to change from MBR to GPT/GUID scheme.
- Name the partition USB, the install process will rename it, but this matches the script below
- Use format: macOS Extended (Journaled)
Note: if you have a larger USB (say 16GB) you can split into 2 8GB partitions, so you can have 10.12 and 10.11 installers on the same USB key
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
a ) Manually mount the ESP of the USB and copy the entire EFI directory.
b ) Expand the Zip to ~/Downloads/T460-distribute (this set is called the Zip below)
c ) Copy the EFI directory to the ESP directory of the USB
For example, assuming the USB is disk1:
sudo mkdir /Volumes/ESP-USB
sudo mount -t msdos /dev/disk1s1 /Volumes/ESP-USB
cp -a ~/Downloads/T460-distribute/EFI/ /Volumes/ESP-USB/EFI
Note: run "diskutil list" on the command line to find your USB and HD disk devices
Dual BOOT tip:
If you plan to dual boot Windows from the same HD - DO NOT make the 2nd partition NTFS or ExFAT with the Disk Utility app.
Make them both macOS Extended (Journaled) to keep a PMBR vs MBR.
Size the 2 partitions appropriately - but later you will delete/reformat the 2nd partition for Windows. I recommend gpt which can make an NTFS partition without converting the PBMR.
go to /Volumes/ESP-USB/EFI/CLOVER
Rename ACPI to ACPI.T460
Rename ACPI.T560 to ACPI
Make sure the HD/SSD drive is formatted using:
Scheme: GUID Partition Map (GPT),
Partition Name: macOS,
Format: mac OS Extended (Journaled)
Note: *should NOT be needed* but If you get a KP from AppleIntelSKLGraphicsFramebuffer, then use the Clover Options Menu and to select the alternate configuration file: config.noSKL.plist. This injects a bogus graphics device ID 0x12345678.
• When the installer screens shows: "To pair a Bluetooth keyboard, turn it on and wait for your computer to connect to it.”
Hit the Space Bar to get past this step
• When installer seems to hang at: "About a second remaining”
Don’t Panic, this "second" may take about 10 minutes or more to finish.
Just wait for the installer to reboot the computer and continue the installation. The whole install process takes about 1 hour to complete.
• On the first boot from the HD when asked: "How Do You Connect?”
Select: “My computer does not connect to the Internet”And set up the network later after installation the NIC driver kext. And your Intel WiFi will not work. Period.
On startup, hit F12 and select USB - You boot Clover from the USB, but now select the newly installed disk/partition to start macOS.
Note: *should NOT be needed* but if you get a KP from AppleIntelSKLGraphicsFramebuffer, then use the Clover Options Menu and select config.noSKL.plist. See step 7 below to fix this problem. AppleALC.kext + Lilu.kext will patch the Graphics Framebuffer to avoid a DVMT check KP.
Note: You may see 3 Volumes instead of the expected 2 on the HD - macOS + Recovery HD - make sure you pick the volume that is NOT labelled Recovery HD. See step 3 below to convert the logical volume which will eliminate the abstraction and confusion.
Note: This will boot up macOS with Clover injecting the custom kexts from the USB (for now).
In Terminal run:
sudo diskutil corestorage revert /
Now the make the HD bootable with Clover. Transfer the Zip file contents to the new HD. Then use a similar process as used for the USB.
Note: I assume the Zip is in ~/Downloads/T460-distribute/
a ) NVRAM
Since we are using Clover's EmuVariable method to simulate NVRAM, Clover looks for the file nvram.plist to get its persistent values - which is stored in the ESP now. Install the "root" utilities and clover scripts and files from Utilities folder to your HD. This step is important as it installs the "rc scripts" to save the nvram contents to a file upon reboot. Using a LogoutHook is more reliable than the CloverDaemon which often fails during shutdown. If you reinstall Clover from a pkg, then rerun the script. In a Terminal run:
b ) ESP
The ESP contents on the HD are now to be made exactly like the ESP used for the USB installer above.
Mount the HD ESP and copy over the EFI items. You can follow the same procedure used for the USB installer.
Note: If you previously installed Windows, be careful to not lose the EFI/Microsoft contents by following the procedure outlined below.
For example, assuming the main drive is disk0:
sudo mkdir /Volumes/ESP
sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
cp -a ~/Downloads/T460-distribute/EFI/ /Volumes/ESP/EFI
c ) Custom DSDT
Using the procedure outlined above in the ACPI Files section, create and replace the custom DSDT in EFI/CLOVER/ACPI/patched
a ) For 10.12.4+: Create a custom AppleBackLightInjector kext
Since this method replaces the IntelBacklight.kext (which is still included as an optional kext) - manually remove that kext if present. Now create a custom Backlight Injector that matches your LCD Panel. The script will update the kext in the ../../EFI/CLOVER/kexts/Other directory - which is the unzipped package location. Run this procedure script:
sudo ./createAppleBacklightInjector.bash T460
Install the custom kexts from the Zip kexts directory to the /Library/Extensions directory by running:
This step loads the ethernet kext and resets network device order to have ethernet as en0 (seems to help with AppStore and iMessage etc)
Run this set of commands:
sudo kextload /Library/Extensions/IntelMausiEthernet.kext
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
Note: For this boot session, you may want to hit the spacebar on your selection (macOS) to set verbose mode to watch for any issues.
- If you have a Docking Station, you can use LayoutID 28 for HDMI, Speaker, Mic, Headphones, ExtMic + extra LineOut for Dock Out
- or optionally use LayoutID 29 to remove the extra LineOut option if it is not wanted.
- has extra framebuffer patching as compared to the AppleALC distribution on GitHub.
1. Requires matching SSDT-HDEF with layoutID=28 or 29. The AppleALC kext defines the patches for AppleHDA and AppleIntelSKLGraphicsFramebuffer.kex in lieu of Clover.
2. Keep original/unmodified AppleHDA.kext in /S/L/E and add the AppleALC.kext and Lilu.kext to /Library/Extensions for full audio support (and critical patching)
- AppleHDA_ALC293.kext (v9278.56) - custom kext adapted from an ALC292.kext and based on 10.12.3 AppleHDA. This kext requires the HDA kext patching via Clover.
- CodecCommander_ALC293.kext - TimeWalker's kext - with ALC293 added - OPTIONAL - used to resolve missing input/outputs or sleep/wake issues.
This version has extra T460/T560 definitions in the Info.plist files.
Re-coded to support 3 real buttons as well ClickPad Right/Left edge click buttons.
- A Custom package is included in the Utilities folder so you can install HWMonitor.app - it just selects these 2 Plugins Sensors: ACPI and CPU.
- Two Custom SMC keys are added to Kozlec's standard FakeSMC - FNum (to find the Fan) and ACID (for AC power and eliminate powerd syslog messages every 30 seconds).
sudo ./createAppleBacklightInjector.bash T460
sudo cp -a * /
Create macOS USB installer
Put Clover installation on USB
Boot Clover from USB Installer and select Install macOS
Part 2- Post OS Installation and Setup
Convert the Logical volume to Physical volumeThe full installer likes to make a logical volume. So for simplicity, I recommend one to revert the root volumes to a regular volume.
Note: This kext is not needed on the USB installer.
b ) Install the kexts
Note: macOS may already have configured the ethernet, so this step may be unnecessary but it will not hurt anything either for a fresh installation.
Remove the USB and Reboot with Clover from the HD
Notes on Custom Kexts
All the kexts listed below are contained in the zip file. The origin is listed below if you wish to download them as well. I recommend you use the _kext-install.command script to properly copy all kexts to the /Library/Extensions directory.
Also included are the old alternate audio kexts in ALC293 directory:
These kexts and procedure are used with Broadcom WiFi/B. Replace the Intel WiFi with suitable supported card such as a BCM94352Z (Dell DW1560) with proper M.2 form-factor. To install the SleepWatcher scripts, which will help with WiFi on Sleep/Wake use this process to install the scripts into / of your HD
Reboot and check that SleepWatcher is running via "ps -ef | grep sleep".
Install these kexts for a Broadcom chip.