Jump to content

Lenovo ThinkPad T420 with UEFI Only


K0gen
 Share

5,271 posts in this topic

Recommended Posts

verleinix - the performance of HFS seems to still be better according some benchmarks i read about. but i went with APFS on my SSD (on both my hack and real macbook)

 

superkwn - well i dont know about that. the TrackPad code logic is pretty much contained in one file - VoodooPS2SynapticsTouchPad.cpp - so one read that and then compile in DEBUG mode to print out values etc.

@tluck, I remember that happened to my another laptop also. one click opens or closes two tabs in safari at the same time. You fixed it. But I do not recall how you fixed it. 

Link to comment
Share on other sites

Help needed, i can upgrade to High Sierra cos my Sierra recovery Hd seems to be broken.

 

High sierra preparing is ok :

macOS Install Data is correct install but first rebut KO

Recovery partition can't be used in fact

 

Recovery Partition Creator 4.0.4.zip failed

Link to comment
Share on other sites

yeah I had issues with the bay drive since Sierra sometime ago, so i gave up using it. 

 

Hey tluck!

 

Haven't upgraded to high sierra yet. Does this mean I can forget using my HDD in the ultrabay slot? What is the issue you're seeing? Not working at all or just not reliable enough?

Thanks.

Link to comment
Share on other sites

Hi

I've upgraded from Sierra to High Sierra last week. Sierra setup was perfectly fine (I'm starting to think I should have kept it !)

Now the bad part (high sierra) - when the computer is awaken after a sleep, randomly (let say 1 out of 3 time) 

it goes to bios POST, clover then the multilingual error message "You need to restart your computer." 

 

setup:

- t420s with bios mod (including whitelist + vbios)

- clover lastest (4212) from github  https://github.com/tluck/Lenovo-T420-Clover

- hibernate was set 0 - it didn't changed during upgrade

$ pmset -g | grep hibernatemode
 hibernatemode        0
 

 

The only difference which shouldn't matter : clover config.plist mod & kext related to wifi/bt broadcom ; it was fine w/ sierra.

 

bdmesg output, after bad wake up:

...
0:796  0:005  - [04]: 'Macintosh HD'
0:801  0:005          AddLoaderEntry for Volume Name=Macintosh HD
0:802  0:001      Check if volume Is Hibernated:
0:802  0:000      Check sleep image 'by signature':
0:805  0:002      read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success
0:805  0:000      using default sleep image name = \private\var\vm\sleepimage
0:808  0:002      sleepimage not found -> Not Found
0:808  0:000      hibernated: no - sign
...
it search for sleepimage, which isn't there (okay as it's configured to not creating one)
 
/var/log/system.log
Oct  3 09:19:00 xs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.quicklook[34902]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Oct  3 19:42:16 localhost bootlog[0]: BOOT_TIME 1507052536 0
 
=> no output between those time (slept & failed wake-up)
 
 
 
Link to comment
Share on other sites

 

Hi

I've upgraded from Sierra to High Sierra last week. Sierra setup was perfectly fine (I'm starting to think I should have kept it !)

Now the bad part (high sierra) - when the computer is awaken after a sleep, randomly (let say 1 out of 3 time) 

it goes to bios POST, clover then the multilingual error message "You need to restart your computer." 

 

setup:

- t420s with bios mod (including whitelist + vbios)

- clover lastest (4212) from github  https://github.com/tluck/Lenovo-T420-Clover

- hibernate was set 0 - it didn't changed during upgrade

$ pmset -g | grep hibernatemode
 hibernatemode        0
 

 

The only difference which shouldn't matter : clover config.plist mod & kext related to wifi/bt broadcom ; it was fine w/ sierra.

 

bdmesg output, after bad wake up:

...
0:796  0:005  - [04]: 'Macintosh HD'
0:801  0:005          AddLoaderEntry for Volume Name=Macintosh HD
0:802  0:001      Check if volume Is Hibernated:
0:802  0:000      Check sleep image 'by signature':
0:805  0:002      read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success
0:805  0:000      using default sleep image name = \private\var\vm\sleepimage
0:808  0:002      sleepimage not found -> Not Found
0:808  0:000      hibernated: no - sign
...
it search for sleepimage, which isn't there (okay as it's configured to not creating one)
 
/var/log/system.log
Oct  3 09:19:00 xs-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.quicklook[34902]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
Oct  3 19:42:16 localhost bootlog[0]: BOOT_TIME 1507052536 0
 
=> no output between those time (slept & failed wake-up)
 
 
 

 

i got same thing, sleep mode set to 0,3,7 , all not working , have to turn off BT to make sleep/wakeup  working 

Link to comment
Share on other sites

oh thank you,

 

i've removed bluetooth in bios - and let only "FakePCIID_Broadcom_WiFi.kext" for wifi ( removed BlueTooth_Injector_T420.kext / BrcmFirmwareRepo.kext / BrcmPatchRAM2.kext ) 

Link to comment
Share on other sites

i don't fully understand the Bluetooth KP. so for now I work around it with sleepwatcher - which turns BT off before sleep and back on after sleep. I am traveling for the next week without my Hack but will post stuff when I can.

  • Like 1
Link to comment
Share on other sites

I got a peculiar problem.

I had mac os sierra on my T420, it was working fine.

Then I decided to upgrade to High sierra.

It downloaded and installed (I think)

the machine restarted , but I don't see any option to macos in CLOVER.

Only options I have are to my other OSes.

 

Anyone else had an issue like this ?  

Link to comment
Share on other sites

Got a High Sierra install functional. Everything seems to work except suspend. Shutting the lid or executing it via MacOS dims the screen but when I look on the case the LED is continuously flashing. I seem to recall the last time I had made this laptop into a Hackintosh that it would remain solid. The screen dims and it appears to go into a low power state. However I can't wake it, no keypress, movement on the mousepad or even tapping the power button will wake it. Anyone have an idea as to what it could be? I'm not very familiar with MacOS though I know my way around the terminal from my Linux usage.

Link to comment
Share on other sites

did you update the ESP with the new clover bundle? so that apfs.efi driver is there - if your HD is now apfs vs hfs?

Missed that.

Just so that others having the issue know. 

- Downloaded the zip from the main post, extracted the zip and copied the apfs.efi from the CLOVER folder to the corresponding folder on the Hard disk EFI. 

- reboot and the MACOS option appeared in CLOVER boot. 

Thanks Tluck

Link to comment
Share on other sites

@salastil. Try this

 

turning off hibernation

Run: sudo pmset -a hibernatemode 0

 

and and then turn off bluetooth before putting to sleep

Cheers, this seems to have resolved the situation. My card is capable of Bluetooth but I'm not very interested in dabbling with it as I have no devices that run Bluetooth aside from a headset. 

Link to comment
Share on other sites

I'm using W520 with Nvidia with Sierra with great success, but upgrading to High Sierra messes graphics on Nvidia. So I'll keep it at 10.12.6 for now. My T420 I have used to try Hight Sierra. Installation went fine, but have two issues at the moment. Sleep and Trackpad. Battery Meter after sleep/wake.

 

1. Sleep, when I disabled hibernation (change to mode 0) and power off bluetooth, sleep and wake works, but when wakes I get strange graphical glitches, artefacts, flickering, text disappearing while typing this post. So I'll need to reboot in a moment. I think it's a problem with the bluetooth kext.

2. Trackpad at the moment doesn't fully work, touch to click or double touch to select doesn't work. Also high Sierra doesn't find trackpad anymore. In settings it's searching for bluetooth trackpad.

After a while the trackpad has been recognised and works. The only thing that doesn't work is double tap and hold to select.

OK trackpad is sorted now. I used these command to make dragging by touching working: (I cannot enable that in pref panel)

com.apple.applemultitouchtrackpad DragLock -int 1

defaults read com.apple.applemultitouchtrackpad Dragging -int 1

 

3. When after sleep/wake switched form power source to battery, battery icon doesn't update status automatically. Only after enabling/disabling show percentage the status refreshes, bot you need to do that each time to see the current status and current battery capacity. Weird.

Link to comment
Share on other sites

Comrades, I want to thank you so much for your work on the T420 Hackbook!

Especially you tluck, for keeping things working and updated.

 

I did upgrade a Sierra clone to High Sierra and found APFS a really great improvement.

Much faster than HFS+ and a real space saver too.

On the downside, CS5.5 is not really running flawlessly any more and I do see a high battery drain.

Sleep or better wake is not working as it was in Sierra.

The bummer however is, that my routers web interface is unreachable from Safari or Firefox.

The router is kind of old I know, Fritz!Box 7270, but I need that one due to my 3.5 km bell wire to the DSLAM.

 

My SSD layout looks like this, is there something odd with it?

Preboot volume and synthesised devices, is that the way its supposed to be?

 

post-762190-0-89141500-1507799878_thumb.png

Link to comment
Share on other sites

Lenovo T420 Clover Guide

Various Releases and Tweaks over Last 6 months

 

 

  • Release v2017.09.04 on GitHub
    • Updated Clover to r4192
    • Updated ACPIBatteryManager kext - fixes Activity Monitor Energy Tab issue
    • Updated FakeSMC kext and HWMonitor.app to 1443
      • updated installer .pkg
      • tweaked default HWMonitor menu color scheme to use dark/light menu bar theme.
    • Updated Lilu 1.1.8 (from GitHub) and AppleALC (1.1.15-tluck) for Lenovo T420
    • Updated VoodooPS2Controller kext - High Sierra Support
    • Added support for High Sierra APFS
    • Updated config.plist files for High Sierra and VGA Patch
  • Release v2017.08.09 on GitHub
    • Updated to Clover r4154 - blackscreen and DualLink fixes (thanks sherlocks and syscl)
    • Recompiled latest Lilu 1.1.6 (from GitHub)
    • Updated Theme for High Sierra
  • Release v2017.07.16 Clover r4115
    • Theme and general support for High Sierra (Beta)
    • Swapped out AppleHDA_20672 for Lilu+AppleALC (custom for T420)
    • fixes issues around DualLink
    • revised config.plist for new plist EDID format
    • Added RehabMan's AppleBacklightInjector method for LCD Backlight (for 10.12.4 or later)
    • Removed IntelBackLight.kext (option for 10.12.3 or earlier)
  • Release v2017.04.03 Clover r4052 on GitHub

     

  • Updated FakeSMC.kext and HWMonitor installer pkg
  • Updated VoodooPS2Trackpad kext Info.plist - setting to ignore larger bogus jumps.
  • Revised _kext-install.command script
  • Revised VoodooPS2Controller kext

    - may fix no TrackPoint on cold-boot

    ​- based on Jakibaki's work for middle button cut/paste + TrackPoint Scroll.

  • RGB only-mode fixes:

    - updated config.plist 1600x900 EDID to be RGB mode only

    ​- updated the DSDT with an EDID with new RGB EDID

    - and updated DisplayOverides to matchFakeSMC and HWMonitor kexts/app updated to latest - see Utilities folder for full installation tool.

  • Revised the optional DSDT for explicit Temperature vs FanSpeed control:  dsdt.heat-step.aml (v3)
  • Added matched ACPIPolller.kext for support of DSDT "heat-step" method
  • Added config.plist distinctions for 10.11 and 10.12 kext patches
  • Removed EDID from 1363x768 config.plist
  • Updated VoodooPS2Controller kext with a common version at the 1.8.25 revision level.

    -- to use "Multi-Pad" PrefPane setting for Sierra

    -- TrackPad PrefPane is not blank - keyboard set to ANSII layout

    -- smooth scrolling implemented - thanks to Michael Belyaev

    -- caplocks fix 

    ​-- remove cut/paste (middle mouse) so scrolling with TrackPoint works

    -- removed custom mappings for F1-F15 for Sierra

  • Updated IntelMausiEthernet kext to latest rev
  • Changed the Bluetooth kext to be an injector style kext instead of full (dummy) kext - no longer version specific
  • Revised the ThinkPad Theme - new banner etc
  • Added DSDT for "heat-step" - An optional DSDT that needs ACPIPoller.kext or HWMonitor ACPISensors.kext for polling of ACPI to change fan speed as function of Temperature. 
  • Cleanup PNLF device in DSDT
  • Updated DisplayOverride files to add full HD (1920x1080) option for 1600x900 screens.
  • Updated theme plist file (removes F1:help text from lower left corner)
  • Changed Clover config.plist CsrActiveConfig setting to 0x43 - to fix HD3000 glitches
  • Updated AppleHDA_20672.kext  for 10.11.4+ and later changes
  • Added OsxAptioFixDrv-64.efi driver as option (disabled by default)
  • Put explicit Model MBP8,1 definition in config.plist
  • Dropping testing on Mavericks 10.9.x
  • Updated iasl tool
  • Renamed .bash files to .command (can run from Finder or command line)
  • Added VoodooPS2Daemon in Utility folder
  • DSDT mods - Added Fn+End and Fn+Home another way to control screen brightness - other misc fixes to remove PRW Methods to fix sleep
  • Changes in support of El Capitan - _kext-install.command and _post_install_network_reset.command -- these put custom kexts in /Library/Extensions vs /System/Library/Extensions
  • Revised config.plist to remove added security (SIP) in El Capitan
  • All custom/extra kexts are OS version independent (except BroadcomBluetooth) and now go in /Library/Extensions 
  • Updated to use IntelBacklight.kext instead of ACPIBacklight.kext  - Thanks to RehabMan
  • Switched to Mieze's modern Intel LAN Ethernet Kext (IntelMausiEthernet.kext v2) - replaces older v2 AppleIntelE1000e.kext - Thank you!!!
  • Switched to OsxApioFix2Drv-64.efi since it allows hibernation and works fine.
  • Added ACID SMC key in FakeSMC.kext Info.plist for AC power support for T420 on 10.10 and later - A custom install pkg is included - see the Utility folder in the Zip.
  • Added universal time registry fix for dual boot with Windows for consistent time.
  • Tweaked _kext-install.command script to fix/recreate symbolic links for custom kexts.
  • Using VBoxHfs-64.efi instead of HFSPlus-64.efi
  • Added a DSDT for T420s vs T420 (provided by pokenguyen)
  • Consolidated kexts into the Other directory vs specific version (10.11 10.10 ) since most kexts are not version specific.
  • ThinkPad Theme - minor tweaks to add Yosemite and El Capitan icons.  This theme revised and committed to Clover addition kext source tree.
  • Tweaked config to actually use NVRAM boot drive selection on startup. (Can specify startup disk in System Prefs and restart will use it.)
  • Recompiled RehabMan's VoodooPS2Controller.kext with added Lenovo T420 sections for Keyboard/TouchPad/TrackPoint
  • Added Platforms.xml file for use with Docking Station (and No-Dock default) option in AppleHDA_20672.kext
  • New custom kexts AppleHDA_20672.kext and BroadcomBluetooth_T420.kext are added. Huge thanks to vladichimescu for showing me this kext method.
  • New Clover config.plist files for on-the-fly HDA kext patching. No need to replace any kexts after updates anymore.
  • Removed EmuVariableUefi-64.efi driver to use native NVRAM (vs /nvram.plist) - see note below on how to migrate.
  • Removed drop MCFG table from config.plist files. Use at your own discretion to get Nvidia/Optimus working.
  • Added drop table DMAR so VT-d does not have to be disabled in bios

 

 

Overview

 

 

The zip file is a complete ESP/kext pack for the Lenovo T420 using Clover on macOS

  • This file set is for Sierra and El Capitan. I only test on the current OS and the previous one.
    • Full Clover ESP file set - config.plist + required custom kexts + custom DSDT
    • The zip bundle releases are posted to GitHub
  • There are 2 configuration file sets:
    • for high-res LCD (1600x900) (has EDID patch)
    • for low-res LCD  (1366x768)
  • Non-maintained Mountain Lion Kext Bundles for 10.8.4 are in post #241 and 10.8.5 in post #397
  • L420 Guide by kosakgroove

Why Clover vs Chameleon?

  • Native UEFI boot support for macOS (and Windows) on GPT disks.
  • Native Apple macOS Installers and App Store Updates. 
  • Supports Recovery HD for system recovery, iMessage, Find My Mac, etc.
  • Dynamic DSDT and Kext patching.

Caveat:

 

My system is a T420 with 1600x900 LCD and dedicated Intel HD 3000 Graphics Only.  This zip contains what is working for me on my specific model.

 

The related models - such as T420s, T420i, T520 and W520 family - may work as is or need some changes to config.plist and/or the DSDT. In the DSDT source (.dsl) file,  the changes are indicated by notes and comments. ​If your HW is the same as mine, the included DSDT and configuration files may need to be retrofitted to work for your system.

 

The guide outlines 2 phases:

(1) How to create a USB installer and install macOS,

and

(2) How to complete the OS installation to run macOS

 

 

 

New Installation Steps and Details

 

 

 

BIOS settings:

- Recommended is BIOS v1.46 (and stay on 1.46 if you want use a modded bios - but there are v1.48 and v1.49 mods now)

- Recommended: reset to defaults. Most defaults settings will work - but check these settings:

- Set Config / Serial ATA (SATA) / SATA = AHCI 

- Set Security / Memory Protection / Execution Prevention = Enabled

- Disable Discrete Nvidia/Optimus (use integrated HD 3000 only - unless you really know what you are doing!)

 

Terms:

GPT = GUID Partition Table

MBR = Master Boot Record

ESP = EFI System Partition, the ESP is created automatically as the first (hidden) partition by the Disk Utility when the GPT option is selected for partitioning a disk.

 

Note: The custom DSDT is based off BIOS v1.46 (flashed with whitelist mod or original)

 

 

Part 1 - OS Installation

 

 

 

This procedure is for a new macOS installation using a USB Installer. If you are upgrading from an older working version of macOS (say from El Capitan to Sierra) already on your HD, skip down to Part 2, Step 4 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. Re-run the _kext-install.command script to reinstall the current kexts onto your HD.

  • Download and expand (extract) the zip file contents from here: GitHub Lenovo T420 Clover Latest Release.

    This same file set will be installed on the USB and the HD for UEFI boot.

     

  • Download macOS from the App Store - they are freely available

    One can build a macOS USB installer with the standard macOS installer app downloaded from the "App Store".Download and extract the zip file from this post to build a Clover-based USB installer. This same bundle will be installed later on HD for UEFI boot

     

  • Install macOS to a GPT formatted disk using the standard Install macOS.app downloaded from the Apple Store.

Create a macOS USB installer

  • Partition an 8GB (or larger) USB formatted with GUID Partition Table (GPT)

    - use the Partition Options... menu to change from MBR to GPT

    - Name the partition USB - the install process will rename it, but it matches the script below.

    - Use format: Mac OS Extended (Journaled) (formerly OS X Extended)

     

    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

     

  • Run this command to copy the bits to the USB key:

    Note: if using an older version of macOS, replace with the corresponding app name.

  • sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
    

Put Clover installation on USB

  • Install Clover on the USB

    a ) Manually mount the ESP of the USB

    b ) If not done already, expand the downloaded Zip to ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD (this file set is the Zip)

    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/Lenovo-T420-Clover-YYYY.MM.DD/EFI/ /Volumes/ESP-USB/EFI
    
    Note: run "diskutil list" on the command line to find your USB and HD disk devices

           

  • Setup configuration files to match your LCD resolution in /Volumes/ESP-USB/EFI/CLOVER:

    Rename the configuration file config.1600x900.plist to config.plist or rename config.1366x768.plist to config.plist.

     

    For example with 1600x900 LCD:

    cd /Volumes/ESP-USB/EFI/CLOVER 
    mv config.1600x900.plist config.plist

Boot Clover from USB Installer and select Install macOS

  • Install the OS on your GPT disk on the macOS partition. 

     

    Make sure the drive is formatted using:

       Scheme: GUID Partition Map (GPT)

       Partition Name: macOS

       Format: macOS Extended (Journaled)

     

    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 "Mac OS Extended (Journaled)"

    Size the 2 partitions appropriately - but later you will delete/reformat the 2nd partition for Windows.

     

  • Click through GUI Install menus and wait for the installation to fully complete - on a spinning disk takes about 30-45 minutes. 

    Follow these Notes and Tips:

  • 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”

    You can set up the network later after installation of the NIC driver kext.

    Your Intel WiFi will not work. Period. 

 

 

Part 2 - Post OS Installation and Setup on HD

 

 

  • Boot Clover from USB 

    On startup, hit F12 and select USB boot -  but now in Clover select the newly installed disk/partition to start macOS.  

     

    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 remove the logical volume eliminates the confusion.

     

  • Complete the installation steps and login

    Note: This will boot up macOS with Clover injecting the custom kexts from the USB (for now). 

     

  • Convert the Logical volume to Physical volume

    The full installer likes to make a logical volume. So for simplicity, I recommend one to revert the root volumes to a regular volume.  Run this command: 

    sudo diskutil corestorage revert /
  • Install Clover on the HD

    Download or transfer the Zip files to the HD. 

     

    The ESP contents on the HD are now to be made exactly like the ESP used to setup the USB installer above. Manually mount the ESP of your HD on /Volumes/ESP. (See first 2 commands below.) Then you will replace the ESP installed by Clover in the previous step. Which means you copy/replace these 2 directories /Volume/ESP/EFI/CLOVER and BOOT with the ones from the Zip file. Then just as you did for the USB, the config.plist is renamed from the one that matched your LCD. For a manual mount and install of the ESP bits to disk0 follow same procedure as for the USB. If you previously installed Windows, be careful to not lose the EFI/Microsoft contents.

     

    Note: The Clover config.plist default volume name (the volume to boot automatically) is set to macOS - meaning your new volume is assumed to be named macOS

    If you use a different name, change the volume name or edit the name in config.plist to match. 

    sudo mkdir                             /Volumes/ESP
    sudo mount -t msdos /dev/disk0s1       /Volumes/ESP
    cp -a ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/EFI/ /Volumes/ESP/EFI
    
    cd /Volumes/ESP/EFI/CLOVER
    mv config.1600x900.plist config.plist
  • Install Kexts onto the HD in /Library/Extensions

     

    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) The kext install script will remove it if on 10.12.4 or later - or 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:

    cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities/Create_AppleBacklightInjector_kext/
    sudo ./createAppleBacklightInjector.command
    b )  Install the all custom kexts to your HD

    Install the custom kexts from the Zip kexts directory to the /Library/Extensions directory by running:

    cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/EFI/CLOVER/kexts/
    sudo ./_kext-install.command
  • Ethernet Device Installation

     

    This step loads the ethernet kext and resets network device order to have ethernet as en0 (seems to help with AppStore and iMessage etc)

    Note: OSX may already have configured the ethernet, so this step may be unnecessary but it will not hurt anything either for a fresh installation.

    Run this set of commands:

     

    sudo kextload /Library/Extensions/IntelMausiEthernet.kext
    sleep 10
    sudo rm       /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
  • Recommended Option: Install (copy) the DisplayVendorID-* directories 

    These are included in the Zip file and should be copied (via sudo) to /System/Library/Displays/Contents/Resources/Overrides

    sudo cp -a ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/\:System\:Library\:Displays\:Contents\:Resources\:Overrides/DisplayVendorID-* /System/Library/Displays/Contents/Resources/Overrides/
    For Yosemite or earlier versions, these files go in /System/Library/Displays/Overrides

    Note: These files provide alternate color correction and gamma curves as well as more screen sizes for select Lenovo LCD models. 

     

  • Remove the USB and Reboot to load Clover from the HD

    Note: For this first boot, hit the spacebar on your boot selection (macOS) and use verbose mode.

     

 

 

Known Issues and Random Tips:

 

 

  • "Black" Screen - hit "Pause" (or FN Home) key to increase LCD brightness - sometimes the saved value in the nvram is out of sync or zero so LCD seems to be off.

     

  • The stock Intel WiFi will not work. The common approach is use a modded BIOS 1.46 (or 1.48) and replace the WiFi with a Broadcom or Atheros chip.

     

  • Clover may present 2 options for main OS partition if using Logical Volume vs Standard Volume. Revert the logical volume as Yosemite likes to install now on the boot disk, so Clover will not get confused and present duplicate options. Just "revert" using: 

    sudo diskutil corestorage revert /
  • Enable (turn on) Bluetooth so the green light is showing on the LCD bezel (do from Windows or Ubuntu).
    • Also make sure the side switch is set to green too!
  • When using external headphones or speakers, may need to plug and unplug 1 or 2 times for recognition.

     

  • iMessage/Facetime may not register without overriding the Clover generated values with real ROM and MLB values from a real Apple Mac. Search thread for ROM to get more info.
    • ​Clover can possibly generate proper values and inject using RtVariables - use mac address -- see wiki for details.
  • Fixed: With ACPIBacklight.kext installed, boot with lid open or LCD will be black when you open it.

     

  • After installing the kexts to /L/E, sometimes the symbolic link to the actual binary file referenced in AppleHDA_20672.kext is not right. Fix this link by running this script:
  • cd /Library/Extensions/AppleHDA_20672.kext/Contents/MacOS
    sudo rm AppleHDA
    sudo ln -s /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
    
    sudo touch /System/Library/Extensions
  • Hibernation - Use OsxAptioFix2Drv-64.efi instead of OsxAptioFixDrv-64.efi UEFI driver for restart from hibernation. Suggested settings if you don't want or use hibernation:

    sudo pmset -a hibernatemode 0
    rm /var/vm/sleepimage

if you want hibernation, then set hibernate mode to 7 (mode 7 is like mode 3 but without encryption)  - may need to manually edit this value into the plist file now. 

sudo pmset -a hibernatemode 7

Note: Booting up from the hibernated image may have jumbled or blank LCD until you do a sleep/wake cycle to reset the LCD. 

 

  • Add boot option darkwake=0 if you would like to disable power nap and have the lid wake the gfx instead of hitting extra key.

     

  • TrackPoint may not be responsive on startup (random occurance) -  a sleep/wake cycle should revive it. 

 

 

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 custom kext install script to properly copy all kexts to the /Library/Extensions directory.

  • FakeSMC.kext (v6.26.1443) - Core hack mechanism. Using Kozlek's version + plugins + custom FakeSMC Info.plist
    • ​2 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).
    • 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.
  • ACPIBatteryManager.kext (v1.81.3) - RehabMan's kext configured for v3 ACPI instructions to show/track battery info on menu bar - many Info.plist items are set to False instead of True

     

  • AppleALC.kext (v1.2.0-tluck) Keep original/unmodified AppleHDA.kext in /S/L/E and use this kext to add full audio support for CX20672 (same as CX20590). Note: There are matching DSDT sections for Conexant Codec.  Also has Manwe150's fix/additions for dock ports. There are 2 layout-id profiles: (1)  ID 12 for normal laptop ports and (2) ID 13 which adds the audio ports on the Dock Station.  The "dock" version adds the second channel output called "Headphones" and a second Input which shows up as either "Line In or Built-in Microphone" - these ports are physically on the Docking Station itself. 

- IF you have a dock and want to use the extra ports, then set/inject Audio ID 13 in the Clover config.plist

- IF you DO NOT have a dock, then use everything as is (and not be confused by the extra Input/Output options!!!)

  • Lilu.kext (v1.2.0) - for use with certain kexts such as AppleALC and NightShift etc.

     

  • Bluetooth_Injector_T420.kext (1.0.0) - adds ProductID 8575 to make BT work better (provides on/off capability). 

     

  • AppleBackLightInjector.kext (0.9.1) - RehabMan's Injector method - modified for Lenovo T420 to incrementally scale brightness in 17 levels from 0 to 4882 (0x1312). Note: The template file has 2 models: T420 and T460. To create a customer Injector, run the Utilities createAppleBacklightInjector script to create a custom Panel definition specific to your LCD. It will put the new injector in the kexts/Other folder.  Install it along other kexts with _kext_install.bash script.

    [size=3]cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities/Create_AppleBacklightInjector_kext/
    sudo ./createAppleBacklightInjector.command[/size]
  • IntelMausiEthernet.kext (v.2.3.0) - Mieze's Intel LAN kext that supports TSO, EEE and other features. Put this kext in /Library/Extensions and remove or disable AppleIntelE1000e.kext

     

  • IOAHCIBlockStorageInjector.kext -  configured to make just the DVD device appear internal so iDVD player works. 

     

  • VoodooPS2Controller.kext (v1.8.28a) - New custom T420 version of RehabMans's PS2 Keyboad/TouchPad/TrackPoint

    - This version has extra T420 definitions in the Info.plist files. 

    • Tweaks to help with TrackPoint on startup
    • Jakibaki's cut/paste fix for middle button + scrolling fix.
    • if MiddeMouseScroll is set to true scrolling TrackPoint works.
    • Sierra PrefPane integration and other fixes (smoothness and caps-lock) by usr-sse2 (see this post on GitHub)
    • Modified Info.plist(s) to add LENOVO T420 override settings.
    • ​TrackPad pressure FingerZ value set to 47 - up from default of 30  - change to suite your touch in VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2TrackPad.kext/Contents/Info.plist
    • Various Default overrides such as MouseMultiplier X and Y for TrackPoint.
    • Note: VoodooPS2Controller keyboard mappings have 3 or 4 finger swipe left/right to back/forward configured for Safari browser vs space swipe
    • Optional Key Map: This map works in El Capitan. Since the NX keys are in a state of flux for Sierra - it is disabled by default now. If you would want to use this new map, edit the Info.plist file and rename the T420 key map entry. The F1-F15 key mappings are VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext/Contents/Info.key.plist:
      • F1 - LCD Brightness Down
      • F2 - LCD Brightness Up
      • F3 - Mission Control App Selector
      • F4 - Launchpad
      • F5 - 
      • F6 - 
      • F7 - Mirror Displays
      • F8 - Disable/Enable TouchPad
      • F9 -
      • F10 - Mute Volume
      • F11 - Volume Down
      • F12 - Volume Up
      • PrtSc - Scan Previous Track
      • ScrLck - iTunes Play/Pause
      • Pause - Scan Next Track
      • Insert - Eject
  • AppleIntelE1000e.kext (v2.4.14) - Ethernet (gigE) - can go in /System/Library/Extensions vs Plugins so OSX re-installations or patch updates will not delete it.

Optional:

  • IntelBacklight.kext (v1.0.10) - RehabMan's kext for smoother/enhanced LCD backlight (dimming) control. In 10.12.4 (or later) this kext does communicate with Brightness keys or System Preferences Display Slider. So remove this kext unless on a version older (less) than 10.12.4

     

  • AppleHDA_20672.kext (v999.99) Keep original/unmodified AppleHDA.kext and add this kext to /L/E for full audio support for CX20672 (same as CX20590). Note: requires matching DSDT sections for Conexant Codec and layoutID 12. and Kext Patch via Clover. Also has Manwe150's fix/additions for dock ports. Credit and thanks to vladichimescu.

    There are 2 files in AppleHDA_20672.kext/Contents/Resources

    Platforms.xml.zlib.dock and

    Platforms.xml.zlib.nodock

    The "dock" version adds the second audio output called "Headphones" and a second Input "Line In" - both of which are on the Docking Station itself.

    - IF you have a dock and want to use these ports - then just replace the Platforms.xml.zlib file with Platforms.xml.zlib.dock

    - IF you DO NOT have a dock, then use the new kext as is! (and not be confused by the extra Input/Output options!!!)

 

 

General Notes, Fixes, and Features

 

 

 

Installing Clover:

 

If you would like to run the installer package, Clover_v2.4k_rxxxx.pkg, to install the related tools and latest bits into the OS and ESP of this HD, there is a installer package in the Utilities directory

 

Select (check box) at least first 2 items! This picture shows a good set of overall options:

attachicon.gifclover.png

After you close the pkg installer, then follow these step to replace the ESP with the zip contents (step 4 above)

  • There are 2  Clover configuration files (config.plist)  that use the custom DSDT and WITH extra Clover patching

     a ) config.1600x900.plist - use for high-res LCD (rename to config.plist)   

     b ) config.1368x768.plist - use for low-res  LCD (rename to config.plist)

  • Model should be set to MacBookPro8,1 to get proper Graphics patching -  DP/HDMI/DVI/VGA FrameBuffers
  • Clover does dynamic patching on 4 Apple kexts:
    • Patch AppleIntelSNBGraphicsFB.kext

      -

      inserts a fix LCD brightness max level - now its the same brightness before and after sleep. Thanks to Timewalker75a (again!)

      - replaces the 4th port/buffer (DVI on dock) with VGA on left side. The 4 ports after patch are: LCD, DisplayPort on side, DisplayPort on dock, VGA on side. If you need DVI on the dock - then disable this patch! Or modify the edit scheme to change the 2nd or 3rd port (DP) to be the DVI if still want the VGA port.

    • Patch AppleHDA.kext to define the audio codec for the Conexant 20590/20672 chipset
    • Patch IOGraphicsFamily.kext - logo display fixes for startup phases 
    • Patch IOAHCIBlockStorage.kext - adds SSD TRIM function for a 3rd Party SSD - one can use the trimforce command now
  • Zip includes Clover files and custom kexts with kext install script:  _kext-install.command
  • Gfx Parameter files for Displays/Overrides offer more natural color gamma curves and screen options
  • Newer Thinkpad theme - adds Mavericks, Yosemite, El Capitan, Sierra Icons than in standard clover installer.
  • Special keys on laptop (without USB or Bluetooth keyboard):
    • LCD Brightness: These button pairs change brightness up/down​:  Fn+Home/End, ScrLck/Pause
    • Audio: The 3 buttons above F1-F3 control volume (except mic mute)
    • Insert key is the CD/DVD eject. 
    • Blue ThinkVantage button - toggles fan to highest speed.
    • The Alt key is the Mac Command key and Microsoft flag key is the Mac Option key.
    • Fn+PgUp - turns on the light!

DSDT Notes - Some of the DSDT tweaks (beyond manwe150's original version) are listed here:

  • DSDT includes source and binary
  • The "EDID" version of dsdt.aml should override removes infamous HD 3000 glitches and buffer hangs or so-called artifacts for 1600x.900 LCD. 
  • Added MaxBeepBootVolume to DSDT to rid AppleHDA assertion on startup
  • Shutdown fixes in DSDT  _PTS and _WAK (thanks to TimeWalker75, RehabMan and Manwe150)
  • Change/fixes to reset LEDs for proper sleep/wake status
  • Battery fixes to use native/current ACPIPlatform.kext with Rehabman's ACPIBatteryManager.kext - no need to rollback or patch AppleACPIPlatform.kext anymore.
  • PNLF additions from RehabMan provide smoother/wider LCD backlight control with IntelBacklight.kext
  • DSDT mods to KBD device - renamed to PS2K and added LENOVO OEM-ids for VoodooPS2Controller to use.
  • The PS2 Keyboard is identified as id LENOVO table-id T420 which will pickup the custom VoodooPS2Controller settings.
  • For El Capitan, removed the _PRW method from some of the devices in the DSDT

     

  • DSDT for "heat-step" (dsdt.heat-step.aml) has a modified method to control the fan speed vs automatically by BIOS.

     

    Follow the installation recipe to use this approach:

    1) copy/replace the default dsdt.aml file with the dsdt.heat-step.aml file in the ESP

    2) locate the ACPIPoller.kext in the Utilities folder and install the kext in /Library/Extensions

    3) reboot

    For Example:

  • mkdir /Volumes/ESP
    sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
    cp -a /Volumes/ESP/EFI/CLOVER/ACPI/dsdt.heat-step.aml /Volumes/ESP/EFI/CLOVER/ACPI/patched/dsdt.aml
    
    cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities
    sudo cp -a ACPIPoller.kext /Library/Extensions
    sudo chown -R 0:0 /Library/Extensions/ACPIPoller.kext
    sudo chmod -R go-w /Library/Extensions/ACPIPoller.kext
    sudo kextcache -i /

 

 

 

Optional: Create a custom SSDT

 

 

 

Included is a revised Pike's  SSDT generation script (sdtPRgen-clover.command) and a local copy of iasl. running the script will end with making a copy of ssdt.aml into proper ESP location when mounted. Clover can build a proper SSDT for power but if you want to play with the values this may help.

  • Creates P and C states to match system CPU. One can hand-edit to modify values for lower power consumption.  
  • Run the custom ssdtPRgen-clover.command script in Zip Utilities folder. It should ask you if you want copy ssdt.aml to your ESP ACPI/patched folder, otherwise copy/move ssdt.aml to the same location as your custom dsdt.aml which is: /Volumes/ESP/EFI/CLOVER/ACPI/patched

     

  • Note: the script will copy the file iasl from the Utility folder to /usr/local/bin/iasl

Hi,

 

usually i just consume all the great content here in the Forum, but this time i really have to say it loud: THANK YOU! For your great work, the extremely good howto and all the efford in keeping this here up to date! 

My MacBook Pro 15'' was stolen half a year ago and i had no money for a new one, so i looked into different possibilities: and the final one was: Buy a used T420 and use your Howto to make it run OSX... and boy - it runs great! 

I am not seeing any Problem so far at all (besides imessage, but i dont use it...) 

I have a model now with the i5, 16gb RAM, 512SSD and a modded 1.46 Bios to run my super old Atheros Wifi card  (and besides the Trackpad it really is an alternative to my 2012 MacBook Pro !!!

 

So i just have to say it again: THANK YOU SO MUCH!!

 

PS.: i still have 2 questions: 

1. Do i have to make any changes if i decide to use an i7 2630QM? (Any Clover configs or whatsoever?

2. i do have a second 512gb SSD laying around here... would it be possible to use both as RAID0 to increase read speed (is clover able to do that on the boot disk?)

  • Like 1
Link to comment
Share on other sites

it' s a pain in neck to upgrade to High Sierra :(

hm weird. It was very easy for me. just updated kexts and clover with the latest update for the t420 from GitHub. reboot. Then install HS update from AppStore, then several reboots later HS was installed like fine. 

  • Like 1
Link to comment
Share on other sites

hm weird. It was very easy for me. just updated kexts and clover with the latest update for the t420 from GitHub. reboot. Then install HS update from AppStore, then several reboots later HS was installed like fine. 

Hi Eman, is sleep working for you? For me clean install worked, but there is still the issue with Bluetooth when putting the system into sleep. Also after sleep, I identify some graphical glitches (minimal but still random single horizontal lines) but still that's new and not seen in Sierra.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...