Jump to content

Lenovo ThinkPad T420 with UEFI Only


K0gen
 Share

5,271 posts in this topic

Recommended Posts

@zarcano - could be a clover issue - black screen - i see you did inject the EDID for the HD screen? maybe set your screen to 960x600.

do you have a patched EDID for IGPU? then inject the EDID there and dont inject gfx via clover. see DSDT.edid.dsl for an example

 

good news - I installed High Sierra today - and all is working! just had to update Lilu and AppleALC - as soon as i fix the theme i will upload 

  • Like 1
Link to comment
Share on other sites

@tetonne - I will add Lilu and AppleALC for audio in the next bundle. (i don't have a T460 anymore so am back to my good old T420)

 

@XentriX0110 - VoodooPS2Controller for the T420 is using the T420 Profiles matched with a device property found in the kext's Info.plist files. You can either copy these values to the defaults or identify your system as such (or make a 220 profile). The DSDT for the T420 adds some properties. you could probably have Clover inject these properties instead of putting in the DSDT?

 

ioreg -l

...

| +-o PS2K  <class IOACPIPlatformDevice, id 0x100000162, registered, matched, active, busy 0 (4631 ms), retain 9>

    | | | {

    | | |   "RM,oem-id" = "LENOVO"

    | | |   "IODeviceMemory" = (({"address"=96,"length"=1}),({"address"=100,"length"=1}))

    | | |   "AAPL,has-embedded-fn-keys" = <01000000>

    | | |   "device-properties" = {"RM,oem-table-id"="T420","AAPL,has-embedded-fn-keys"=<01000000>,"RM,oem-id"="LENOVO"}

    | | |   "IOInterruptControllers" = ("io-apic-0")

    | | |   "_STA" = 18446744073709551615

    | | |   "IOInterruptSpecifiers" = (<0100000000000000>)

    | | |   "name" = <"PNP0303">

    | | |   "RM,oem-table-id" = "T420"

    | | | }

    

 

 

I'm using a T420 and have generated my DSDT. Do I still need to edit my VoodooPS2Controller?

Link to comment
Share on other sites

@tluck thanks for the info! I think i just formatted my EDID wrong. Is there a specific resource that can tell me how to format it?

This is what I get from xrandr. How is it formatted in the plist? I saw something about throwing away a certain number of bytes?

00ffffffffffff0030aea34000000000
0c190104951f1178ea8545a45a54a127
0c505400000001010101010101010101
010101010101293680a070381f403020
350035af1000001e0000000000000000
000000000000000000000000000f00d1
093bd1093b1e0a0006af3d12000000fe
004231343048414e30312e32200a0037

Thanks again for your help!

 

UPDATE:

I used this resource, turns out its just base64  :blush:

http://www.osx86.net/forums/topic/20664-guide-edid-injection/

 

In case anyone is wondering, here is the output of my EDID in base 64.

AP///////wAwrqNAAAAAAAwZAQSVHxF46oVFpFpUoScMUFQAAAABAQEBAQEBAQEBAQEBAQEBKTaAoHA4H0AwIDUANa8QAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAADwDRCTvRCTseCgAGrz0SAAAA/gBCMTQwSEFOMDEuMiAKADc=

Didn't work, though. Still have the black screen. Going to look at DSDT.edid.dsl now  :yes: 

Link to comment
Share on other sites

@tluck thanks for the info! I think i just formatted my EDID wrong. Is there a specific resource that can tell me how to format it?

This is what I get from xrandr. How is it formatted in the plist? I saw something about throwing away a certain number of bytes?

00ffffffffffff0030aea34000000000
0c190104951f1178ea8545a45a54a127
0c505400000001010101010101010101
010101010101293680a070381f403020
350035af1000001e0000000000000000
000000000000000000000000000f00d1
093bd1093b1e0a0006af3d12000000fe
004231343048414e30312e32200a0037

Thanks again for your help!

 

UPDATE:

I used this resource, turns out its just base64  :blush:

http://www.osx86.net/forums/topic/20664-guide-edid-injection/

 

In case anyone is wondering, here is the output of my EDID in base 64.

AP///////wAwrqNAAAAAAAwZAQSVHxF46oVFpFpUoScMUFQAAAABAQEBAQEBAQEBAQEBAQEBKTaAoHA4H0AwIDUANa8QAAAeAAAAAAAAAAAAAAAAAAAAAAAAAAAADwDRCTvRCTseCgAGrz0SAAAA/gBCMTQwSEFOMDEuMiAKADc=

Didn't work, though. Still have the black screen. Going to look at DSDT.edid.dsl now  :yes: 

Hi zarcanzo

Your EDID same with me.

My T420s is integrate graphics with FHD display.

So maybe is your patch bios.

Attach is my efi file.efi.zip

Link to comment
Share on other sites

@XentriX0110 - not if you are using everything i posted - including DSDT. Your T420 Trackpad/TrackPoint should be working just like mine.

 

I updated the guide for High Sierra today. the only thing not working with Beta 2 is my 2nd drive in the CD Bay.

  • Like 2
Link to comment
Share on other sites

@XentriX0110 - not if you are using everything i posted - including DSDT. Your T420 Trackpad/TrackPoint should be working just like mine.

 

I updated the guide for High Sierra today. the only thing not working with Beta 2 is my 2nd drive in the CD Bay.

Ya I followed your guide all the way through.

 

Everything seems to be working but some websites give like a lag spike when scrolling or sometimes just plain random lag spikes doing something that's not Internet related .

 

128gb ssd with 8gb ram

 

Sent from my SM-G955U using Tapatalk

Link to comment
Share on other sites

Hi Tluck,

 

where to you put your files now?

 

You used to attach them to the post. Now not?

 

Lenovo T420 Clover Guide  15-July-2017 Update

  • Release Clover r4114 on GitHub
  • Support for High Sierra
  • Swapped out AppleHDA_20672 for Lilu+AppleALC (custom for T420)

Various Releases and Tweaks over Last 6 months

 

  • Release Clover r4070 on GitHub
    • 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 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.25.1426) - 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.70.2) - RehabMan's kext configured for v3 ACPI instructions to show/track battery info on menu bar
     
  • AppleALC.kext (v1.1.4) 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.  Also has Manwe150's fix/additions for dock ports. 

    ​There are 2 profiles: ID 12 for normal laptop Audio and ID 13 for use with Audio ports on the Dock Station.
    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 use Audio ID 13 in config.plist or DSDT.
- IF you DO NOT have a dock, then use the new kext as is! (and not be confused by the extra Input/Output options!!!)

  • Lilu.kext (v1.1.6) - 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.0) - 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.25f) - 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

Link to comment
Share on other sites

Sorry. My wife dragged me out the house before I could finish up. I made some mistake on the 4114 post. So I will repost on github later today.  

 

Update:

 

Lenovo T420 Clover Guide 16-July-2017 Update
Update to new Release v2017.07.16 Clover r4115 - all files are all on GitHub
Theme and general support for High Sierra (Beta)
Swapped out AppleHDA_20672 for Lilu+AppleALC (custom for T420)

  • Like 4
Link to comment
Share on other sites

Hi folks!

Sorry for not following this thread all the time. Not being an early adopter at all, were there any caveats with the 10.12.6 upgrade?

Is it safe to install from App store and just let it do its thing? 10.12.5 is running just fine. :)

Link to comment
Share on other sites

Hi folks!

Sorry for not following this thread all the time. Not being an early adopter at all, were there any caveats with the 10.12.6 upgrade?

Is it safe to install from App store and just let it do its thing? 10.12.5 is running just fine. :)

upgrade to 10.12.6 is ok

  • Like 2
Link to comment
Share on other sites

Hello, Recently I  following you guild On my T420 and facing a strange problem showing below:

http://drive.google.com/open?id=1z2EOmEK_NjmYRacDSST5eiVMe-9MbmhnpA

 

seems my HD3000 is not working correctly, but I have the same hardware specify(T420 i5 4G 1600 display) like yours

 

if you can point me where the problem is it will be really helpful, Thanks!

Link to comment
Share on other sites

With the recent version i get an normal apple splash screen while my t420 is booting but the login screen is not right. i only have the left half of the screen. colors are not right either.

does anyone know what i have to do to fix this?

 

post-1597323-0-17616700-1500617377_thumb.jpg

Link to comment
Share on other sites

@sunny 678 and fakybaby

did you rename config.1366x768.plist to config.plist?

Yes, My screen is 1600*900, I already rename the name to config.plist.

I'm wonder maybe I need add some DualLink = 1 in it?

Link to comment
Share on other sites

@fakybaby and @suny678 - did you get it working? 

 

Clover should be defaulting to DualLink=1 but in some cases it seems be removing it? I can make a change to the code like a posted a while back if this issue persists.

  • Like 1
Link to comment
Share on other sites

if you have a 1600x900 LCD and are getting the black screen or DualLink issues (stretched screen) with the recent versions of clover ... for now do this:

 

1) use the other DSDT option with the EDID and DualLink=1

2) and turn off Clover Intel GFX injection.

 

so for example, copy dsdt.edid.aml to CLOVER/ACPI/patched/dsdt.aml

and in config.plist set Inject to False:

<key>Graphics</key>
<dict>
  <key>EDID</key>
  <dict>
   <key>Comment</key>
   <string>LCD 1600x900</string>
   <key>Custom</key>
   <data>
   AP///////wAw5OICAAAAAAEUAQOAHxF44jOFmVZVkScXUFQAAAAB
   AQEBAQEBAQEBAQEBAQEBgCVAgGCEGjAwIDUANq4QAAAYAAAAAAAA
   AAAAAAAAAAAAAAAAAAAA/gBMZW5vdm8KICAgICAgAAAA/gAxNjAw
   eDkwMAogICAgAK0=
   </data>
   <key>Inject</key>
   <true/>
  </dict>
  <key>Inject</key>
  <dict>
   <key>Intel</key>
   <false/>
  </dict>
</dict>
  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

@Tluck

 

Thank you for the foresight in putting comments against your DSDT patches.

 

I have successfully extracted and patched my DSDT for my "new" Thinkpad W520 and now have the following functional:

 

Lid / Sleep Behaviour

Battery & Charge

Keyboard and Function Keys

Sound

Graphics (1920x1080 95% gamut)

Native CPU Power Management

100% Working Sensor Information

Volume Buttons & ThinkVantage button working 

Brightness on ScrLk / Pause and Fn+Home & Fn+End

 

The only thing I haven't got is working / detected Renesas USB3 ports which I believe isn't achievable under macOS Sierra?

 

Anyways, thanks for the forward thinking DSDT comments !

  • Like 2
Link to comment
Share on other sites

@Tluck

 

Thank you for the foresight in putting comments against your DSDT patches.

 

I have successfully extracted and patched my DSDT for my "new" Thinkpad W520 and now have the following functional:

 

Lid / Sleep Behaviour

Battery & Charge

Keyboard and Function Keys

Sound

Graphics (1920x1080 95% gamut)

Native CPU Power Management

100% Working Sensor Information

Volume Buttons & ThinkVantage button working 

Brightness on ScrLk / Pause and Fn+Home & Fn+End

 

The only thing I haven't got is working / detected Renesas USB3 ports which I believe isn't achievable under macOS Sierra?

 

Anyways, thanks for the forward thinking DSDT comments !

hi.do you enable nvidaiquadro 1000m? my thinkpad is also w520

Link to comment
Share on other sites

hi.do you enable nvidaiquadro 1000m? my thinkpad is also w520

No but I could.

 

What model number is yours? Mine is 4284-DZ6 which is 2760QM with 1000m.

 

I will reinstall with Discrete only and give you feedback....

 

Quick Edit:

 

Can boot with discrete graphics. Shows as Lenovo Quadro 1000m 

 

Required 6,1 SMBIOS definition. Requires further playing with to get web drivers up and running.

I'll take a look at it when I get more time. Probably requires custom EDID injection as well.

Link to comment
Share on other sites

 Share

×
×
  • Create New...