Jump to content

Lenovo ThinkPad T420 with UEFI Only

* * * * * 20 votes UEFI ThinkPad T420 Lenovo Clover

Best Answer tluck, 08 October 2013 - 02:47 PM

20-June-2015 Update

  • No new features - just updated components to current revs:
    • Updated to Clover r3237 - compiled to remove text before GUI
    • Updated FakeSMC.kext (and HWMonitor.app) - installer included.
    • Updated VoodooPS2Controller.kext
  • Switched to OsxApioFix2Drv-64.efi since it allows hibernation and works fine.
  • Switched to Mieze's modern Intel LAN Ethernet Kext (IntelMausiEthernet.kext v2.0.0) - replaces AppleIntelE1000e.kext - Thank you!!!
  • Fixed command line tools: _kext-install-SLE.bash and _post_install_network_reset.bash (to handle new ethernet kext)

Other Tweaks over Last 6 months

  • Added ACID SMC key in FakeSMC.kext Info.plist for AC power support for T420 on Yosemite - custom install pkg included - see Utility folder.
  • Added universal time registry fix for dual boot with Windows for consistent time.
  • Tweaked _kext_install 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 Other folder vs 10.10, 10.9 since they are all the same.
  • ThinkPad Theme - minor tweaks to add Yosemite 2014.  This theme revised and committed to Clover 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 (fixed since October 13) and BroadcomBluetooth_T420.kext are added. Huge thanks to vladichimescu for showing me this kext method.
  • All custom/extra kexts are OS version independent and go in /Systems/Library/Extensions 
  • 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.
  • Added drop table DMAR so VT-d does not have to be disabled
  • Note: To make an Mavericks USB installer, just follow the Yosemite method

Lenovo T420 Clover Guide

 

Attached is a current zip file with a complete /EFI pack for the Lenovo T420 using Clover on OS X versions:

  • 10.10  Yosemite
  • 10.9    Mavericks

Why Clover vs Chameleon?

  • Native UEFI boot support for OS X and Windows on GUID/GPT disks.
  • Native Apple OS X Installers and App Store Updaters. 
  • Supports Recovery HD for system recovery and 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 is a zip contains what is working for me on my specific model. The guide outlines the 2 phases: (1) how create a USB installer and install OSX, and (2) run OSX for your HD. If your HW is not similar as mine, the included DSDT and configuration files may need to be retrofitted to work for your system.  The models T420s, T420i as well as the T520 family may work as is or need some changes to the DSDT.

 

Highlights:

  • A current File Bundle for 10.9 or later is here in the zip file attached to the bottom of this post
    • Full Clover File set - config.plist + required custom kexts + custom DSDT
  • There are 2 configuration file sets: 
    • for high-res LCD (1600x900)
    • 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

 

INSTALLATION GUIDE

 

BIOS settings:

- Recommend update to BIOS v1.46

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

- 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

 

  1. 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.
  2. Install OS X to a GPT formatted disk using the standard Install OSX .app downloaded from the Apple Store.
  • Copy Mavericks (10.9.x) and Yosemite (10.10.x) to USB installer
  1. Download latest Yosemite or Mavericks - they are free in the Apple App Store
  2. Partition an 8GB (or larger) USB formatted with GUID Partition Table
    - use the Partition Options... menu to change from MBR to GPT
    - Name the partition USB 
    - Use format: Mac OS Extended (Journaled)

    Note: if you have a larger USB (say 16GB) you can split into 2 8GB partitions, so you can have 10.9 and 10.10 installers on the same USB key

     
  3. Run this command (if Mavericks, the replace word Yosemite with Mavericks):
    sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ OS\ X\ Yosemite.app —nointeraction
    
  • Put Clover installation on USB
  1. manually mount the ESP of the USB and copy the entire EFI folder (from the zip) onto the USB ESP
    For example, assuming the USB is disk2:

    sudo mkdir /Volumes/ESP-USB
    sudo mount -t msdos /dev/disk2s1 /Volumes/ESP-USB
    sudo cp -a ~/Downloads/T420/EFI /Volumes/ESP-USB

    Note: run "diskutil list" on the command line to find your USB disk
           

  2. Setup configuration files to match your LCD resolution in /Volumes/ESP-USB/EFI/CLOVER:
    1. ​​​Rename ACPI.1600x900 to ACPI or rename ACPI.1366x768 to ACPI
    2. Rename config.1600x900.plist to config.plist or rename config.1366x768.plist to config.plist
       
  • Boot from USB and select Install OSX
     
  1. Install on your GPT disk - OSX partition.
  2. Wait about 30 minutes plus or minus.
  3. 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”And set up the network later after installation the NIC driver kext.And your Intel WiFi will not work. Period. 

TIP: Enable debug mode for Disk Utility to see all the partitions (such as hidden EFI). From the Terminal command line, run this:

defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

Part 2 - Post OS Installation and Setup on HD

  1. Boot Clover from USB - but now select the newly installed disk/partition to start OS X. 
    Note: This will boot up OS X with Clover injecting the custom kexts from the USB (for now). 

     
  2. Install Clover on HD 

    a ) Run the full Clover_v2k_rxxxx.pkg to install the related latest bits into the HD OS and ESP (usually partition 1) of disk0. Use the link to download the pkg from SourceForge.  You can do this step later on if you don't have way to get it before you are setup on the network. Select (check box) at least first 2 items! This picture shows a good set of overall options:
    [attachment=159590:clover-pkg-options.png]  After you close the pkg installer, then follow these step:

    b ) REPLACE the ESP (EFI folders) contents with the exact CLOVER folder as used in the setup on USB from steps above. If not still automatically mounted by the installer pkg, manually mount the ESP of your HD on say /Volumes/ESP. Then copy and replace the folders /Volume/ESP/EFI/CLOVER and BOOT from the USB installer you just built and used.

    Note: Yosemite likes to make a logical volume and this may confuse the Clover Installer looking for the ESP. So I recommend revert your root partition to a regular volume. Run: 
    sudo diskutil corestorage revert /
     
  3. Install custom kexts on HD
    • Recommended: Use the folder with its config.plist with the custom dsdt.aml (as is) to start.  And install the custom kexts from the zip folder to the /System/Library/Extensions folder. 

      Install these kexts from the zip folder EFI/CLOVER/kexts/Other by either method:
      - if you don't have a GUI, use the included shell script _kext-install-SLE.bash
      OR 
      - if you have a GUI, then use the Kext Utility tool (from cvad included in Utilities folder). 

      Note: If you choose to NOT install the custom kexts in the OS /S/L/E folder, then AppleHDA and BroadcomBluetooth kexts will not work properly. You can also install custom kexts in /Library/Extensions if you dont want to put them in /System/Library/Extensions

       
  4. Install (copy) the DisplayVendorID-* folders
    These are from the zip file and should be put in /System/Library/Display/Overrides
    Note: These provide alternate color correction and gamma curves as well as more screen sizes for just a few LCD models. 

     
  5. Reboot - Boot Clover from HD vs USB.
    Hit the spacebar on your boot selection (OSX) to start up
     without kext caches to make sure it loads all the custom kexts just installed. 

     
  6. Ethernet Device Install
    Note: This step is optional but usually needed after a fresh OS install.
    This loads the ethernet kext and resets network device order to have ethernet as en0 (may help with iMessage etc)
    Run this set of commands in a terminal window:

    sudo kextload /System/Library/Extensions/IntelMausiEthernet.kext
    sleep 10
    sudo rm       /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    
  7. Create a custom SSDT (optional)  
    Creates P and C states to match system CPU. Test against Clover generated SSDT PM tables - may be the same performance lately. (Long ago Clover had some issues here.)
    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: it will copy iasl from the Utility folder to /usr/local/bin/iasl

     
  8. Reboot a final time to use the new SSDT table (and other changes from last 3 steps)

 

Known Issues and Random Tips:

  • The stock Intel WiFi will not work. There are options to replace and use modded bios.
     

  • 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.
     
  • E1000e ethernet hang: with the 2.5.4d and 3.x version of the Intel E1000e ethernet kext, I have seen some random problems. I rolled back to v2.4.14 and have not had issues lately. The issue occurs under heavy file copy/transfers and your ethernet stops working with a lot of log messages that only a reboot fixes.  (Now using IntelMausiEthernet.kext)
     
  • 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 now (~r3050+) can possibly generate proper values and inject using RtVariables - use mac address -- see wiki for details.
  • With ACPIBacklight.kext installed, boot with lid open or LCD will be black when you open it.
     
  • After installing the kexts to /S/L/E, sometimes the symbolic link for the binary in AppleHDA_20672.kext and BroadcomBluetooth_T420.kext gets messed up. Fix by running this script:
  • cd /System/Library/Extensions/AppleHDA_20672.kext/Contents/MacOS
    sudo rm AppleHDA
    sudo ln -s /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
    
    cd /System/Library/Extensions/BroadcomBluetooth_T420.kext/Contents/MacOS
    sudo rm BroadcomBluetoothHostControllerUSBTransport
    sudo ln -s /System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/BroadcomBluetoothHostControllerUSBTransport.kext/Contents/MacOS/BroadcomBluetoothHostControllerUSBTransport
    
    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)

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. 

 

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 kext install tool to properly copy all kexts to the /S/L/E (/System/Library/Extensions) folder.

  • FakeSMC.kext (v6.14.1372) - Core hack mechanism. Using Kozlek's version + plugins + custom FakeSMC Info.plist
    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.
    • ​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).
  • 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.
  • IntelMausiEthernet.kext (v.2.0.0) - Mieze's Intel LAN kext that supports TSO, EEE and other features. Put this kext in /System/Library/Extensions and remove or disable AppleIntelE1000e.kext
  • VoodooPS2Controller.kext (v1.8.15) - T420 version of RehabMans's PS2 Keyboad/TouchPad/TrackPoint -  This version has extra T420 definitions in the Info.plist files. 
    • Modified Info.plist(s) to add LENOVO T420 key and 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
    • Reduced MouseMultiplier X and Y to 9 vs 20
    • Note: VoodooPS2Controller keyboard mappings have 3 or 4 finger swipe left/right to back/forward configured for Safari browser.
  • ACPIBatteryManager.kext (v1.55) - RehabMan's kext configured for v3 ACPI instructions to show/track battery info on menu bar
  • ACPIBacklight.kext (v2.0.3) - RehabMan's kext for smoother/enhanced LCD backlight (dimming) control. The fix is for a Yosemite quirk.
  • GenericUSBXHCI.kext (v1.2.8d9) - RehabMan's version. Use for some USB3 express cards, if your card is not natively supported by OS X.
  • IOAHCIBlockStorageInjector.kext -  configured to make just the DVD device appear internal so iDVD player works. 
  • BroadcomBluetooth_T420.kext (v999.99) - adds ProductID 8575 to make BT work better (on/off capability). Keep original/modified BroadcomBluetooth plug-in and add this kext to /S/L/E.
  • AppleHDA_20672.kext (v999.99) Keep original/unmodified AppleHDA.kext and add this kext to /S/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 - 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

  • Clover configuration files (config.plist) 
     a ) config.plist                   - (default) to use the custom DSDT and WITH extra Clover patching
     b ) config.nodsdt.plist    - this testing version - everything works except battery levels
                                                       - remove/rename DSDT.aml and use built-in/BIOS DSDT with Clover patching
  • Model is to set MacBookPro8,1 explicitly in config.plist. (needed to get proper DP/HDMI/DVI/VGA FrameBuffers)
  • Clover does dynamic patching on 3 Apple kexts:
    • Patches AppleIntelSNBGraphicsFB.kext - inserts buffers to fix LCD brightness max level - now its the same brightness before and after sleep. Thanks to Timewalker75a (again!) And patch 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 you can either not do this! Or replace the 3rd port (DP) if you want the VGA.
    • Patches IOAHCIBlockStorage.kext for SSD TRIM on 3rd Party SSD
    • Patches AppleHDA.kext for audio codec Conexant 20672
  • Zip includes extra and custom kexts plus cVad's Kext Utility v2.5.7 for easy kext installation (or you can use manual script:  _kext-install-SLE.bash)
  • Optionally use ssdtPRgen-clover.command script so you can create your own SSDT P/C state tables
  • The High-res vs Low-res config.plist (and DSDT) are the essentially the same - difference is EDID and DualLink settings.
  • For 1600x900 an alternate working EDID is injected by Clover and is also in the 1600x900 version of the DSDT.
  • Added folder for Displays/Overrides - put these folders in /System/Library/Displays/Overrides
    • more natural color gamma curves and more screen size options
    • 2 sets of timings - 60 and 50 Hz option
  • Has a newer Thinkpad theme - for Mavericks and Yosemite Icons.
  • Special keys on laptop (without USB or Bluetooth keyboard): 
    • The ScrLk and Pause keys change LCD brightness - which are F14 and  F15 (above F10 and F11).
    • Insert key is the CD/DVD eject. 
    • The 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 - still turns on the light!

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

  • DSDT includes source and binary
  • For 1600x900 LCD, the EDID override removes infamous HD 3000 glitches and buffer hangs or so-called artifacts.

  • 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 ACPIBacklight.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.

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

EmuVariableUefi-64.efi migration to native NVRAM

 

1) Before updating if you are still using EmuVariable.efi, run this command see and then save current nvram values:

nvram -p
nvram -xp > ~/nvram.plist

2) Update the ESP with new Clover version (from zip or pkg) - uncheck EmuVariableUEFI-64 driver option.

3) Rename (or remove) EmuVariable driver the ESP so it will not be loaded on next boot, if there is one still in the Clover driver folder.  

Note: manually mount ESP on /Volumes/EFI or /Volumes/ESP, if not already mounted and then run:

mv /Volumes/ESP/EFI/CLOVER/drivers64UEFI/EmuVariableUEFI-64.efi /Volumes/ESP/EFI/CLOVER/drivers64UEFI/EmuVariableUEFI-64.efi.NU

4) Reboot and restore previous nvram values and remove Clover NVRam variable. You should see some variables already in there.

nvram -p
sudo nvram -xf ~/nvram.plist
sudo nvram -d Clover.NVRamDisk

5) Reboot to boot run with final values! 

 

Old issues - no longer happening. 

These 4 problems listed below happened with earlier versions of Clover and OS X  but on 10.9.2 or later, and with the rewrite of Clover and OsxAptopFixdrv-64.efi, these UEFI/ESP issues are seem to be a thing of the past.

  1. putting to sleep can result in flashing/hung state

  2. built-in keyboard mute button can totally freeze system - works fine from software (i.e. apple bluetooth KB)

  3. shutdown may not go all the way to full power off (OS shuts down but at black screen with fans/lights on)

  4. built-in PS2 keyboard/trackpad may disappear after sleep/wake 

Optional: Boot with Clover on MBR USB

 

One can still boot from the HD using UEFI. But one can also create a bootable MBR formatted USB with CloverEFI. This boot method may mitigate any random UEFI issues. The exact same EFI folder can be used. To make a bootable MBR USB:

  1. Format the stick as MBR (which is usually the default) with a single FAT32 partition named USB.
  2. Optionally copy the OSX installer to USB (same command for GUID USB above) but must be done before steps below!
  3. Then with Clover_v2k_rxxxx.pkg, install to the USB for "legacy CloverEFI" boot.  That is: Uncheck the top 2 items, and in Bootloader check the 2nd option to install boot0af.
  4. After the Clover pkg installer is finished and closed, then replace the EFI/CLOVER folder just like you did on the HD. the EFI/BOOT folder is not needed. Note: the HD ESP EFI folder and USB EFI folder should be exactly the same now.
  5. Then from the BIOS, set USB-HDD as top boot option (so you don't have manually boot from USB vs the HD)
Go to the full post


  • Please log in to reply
1833 replies to this topic

#81
Espamac

Espamac

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts

The missing sound after reboot is strange... wait.
I have totally forgot to mention about the rc scripts files in etc. Just place them in /etc reboot and check if this will help (run myFix just in case)

I have used DSDT Editor with the latest iasl compiller (you can search forum for the latest binary or compile one from sources)

Send/Share your config fille - I think something is not right.


OK, placing the rc scripts in /etc made the volume controls appear on the top bar but still no sound. I have, as of now

this AppleHDA.kext Attached File  AppleHDA.kext.zip   1.7MB   43 downloads on the extra/extensions, NO on the kexts folder of OEM folder (I also tried placing it there)

this my config.plist on the OEM folder: Attached File  config.plist.zip   1.03KB   28 downloads

and this is the dsdt file (the one you created): Attached File  dsdt.aml.zip   26.99KB   25 downloads

When booting I managed to read this error:

Sound assertion " != setupHost Interrupt ()" failed inAppleHDAController at line 441 goto Exit

Which obviously means nothing to me :)

big thanks!

#82
Kogen Mantis

Kogen Mantis

    InsanelyMac Protégé

  • Donators
  • 98 posts
  • Gender:Male

OK, placing the rc scripts in /etc made the volume controls appear on the top bar but still no sound. I have, as of now

this AppleHDA.kext Attached File  AppleHDA.kext.zip   1.7MB   43 downloads on the extra/extensions, NO on the kexts folder of OEM folder (I also tried placing it there)

this my config.plist on the OEM folder: Attached File  config.plist.zip   1.03KB   28 downloads

and this is the dsdt file (the one you created): Attached File  dsdt.aml.zip   26.99KB   25 downloads

When booting I managed to read this error:

Sound assertion " != setupHost Interrupt ()" failed inAppleHDAController at line 441 goto Exit

Which obviously means nothing to me :)

big thanks!

You are using wrong AppleHDA.kext. Try this one:
Attached File  T420_CX20590_10.8.2_AppleHDA.kext.zip   1.4MB   164 downloads

And here is the Clover config with USB3 support and TRIM for SSD drives. (always make a backup of an old one just in case of KP):
Attached File  Lenovo_Clover-USB3_TRIM_Patch.config.plist.zip   1.08KB   98 downloads

Edited by Kogen Mantis, 02 March 2013 - 08:05 PM.


#83
Espamac

Espamac

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts

You are using wrong AppleHDA.kext. Try this one:
Attached File  T420_CX20590_10.8.2_AppleHDA.kext.zip   1.4MB   164 downloads

And here is the Clover config with USB3 support and TRIM for SSD drives. (always make a backup of an old one just in case of KP):
Attached File  Lenovo_Clover-USB3_TRIM_Patch.config.plist.zip   1.08KB   98 downloads


I really thank you for your effort. I'm trying to find a pattern here but I'm unable, the sound sometimes appears but it disappears after reboot. I've tried doing it in parts, installing and uninstalling the dsdt file, the AppleHDA.kext you provided, and also triying to modify a basic config.plist by adding the string HDAInjection set to NO. I've also tried a dsdt file compiled by myself with all errors fixed. The system boots with no KP but the sound comes and go. I'm unable to reproduce what makes the sound disappear. As of now is again gone for good.

I've tried using the config file you provided but I get KP. I'm sorry for asking so many questions, I'm trying to find info around but I get nothing. I'm thinking of a clean install but everything looks clean enough :)

EDIT: Just one question: I understand the config.plist I have on EFI/ is overruled by the one on OEM/4291BG/ isn't it?

Edited by Espamac, 03 March 2013 - 04:40 PM.


#84
Espamac

Espamac

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
OK, more info. I find this really intriguing to be honest. To change I tried with the files from post #51. And again it worked, this time even lasted for 2 reboots. And again sound is gone. After the second successful reboot you could read on the kernel boot messages "Sound assertion in AppleHDACodecGeneric at line 360" repeated 3 times. I think I've seen than message the other times I had a successful boot with sound. After that I always get the same kernel boot message: "Sound assertion in AppleHDAController at line 463" and no sound at all.

I have the feeling this is not related to the kexts or the dsdt files since they are able at first boot to get the sound working. Something changes after reboot, but I don't know what is it. Even more puzzling is that if I paste again the exact same kexts and dsdt files that provided a successful boot with sound and run myHack, sound no longer works. They only work once (????). So something is changed that prevents those files to work again, but I don't know what.

#85
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 864 posts
  • Gender:Male
  • Location:NC, USA
@Kogen - very cool stuff. nice thread. i may test this approach out!

@espamac - does your x220 have cx20590 audio chip or cx20672? if it is not cx20590 - this may explain why the kext above wont work. (the zip posted here seems to be the one i packaged up and posted for manwe150's thread on T420 - which has a CX20590 chip/codec)
should easy to fix with some binary hacking though...

#86
Kogen Mantis

Kogen Mantis

    InsanelyMac Protégé

  • Donators
  • 98 posts
  • Gender:Male
Hi everyone - my T420 died on me... so it is going to be a little break for me in case of actually testing something out. I was about to release the next Beta3 of the EFI Pack but all that went to ... bip!

The good: The warranty will cover motherboard replacement.

The bad: Turns out that my LCD Panel was also somehow mysteriously broken and this mechanical failure won't be covered by the warranty - so I'm out of luck.

The funny: I guess I will have the time to finally test the VGA out or use AirMirroring :)

#87
Espamac

Espamac

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
@ Kogen So sorry about that!

@ tluck, thanks a lot, my codec is actually cx20672 so I guess I'll have to patch the AppleHDA.kext myself. No idea of how to do that though ;)

It looks like I need the device and vendor ID of my sound card. Can I get them with the .app SystemInfo? I don't have access to PC or Linux right now.
I've read here that Clover can patch "on-the-fly" the kext but I would need the hexadecimal string to be substituted once I've got my device id hex, this being a example:

<key>

KextsToPatch

</key>


<dict>
<key>0</key>
<dict>
<key>Name</key>
<string>AppleHDA</string>
<key>Find</key>
<data>hBlNEQ==</data>
<key>Replace</key>
<data>BXYdEQ==</data>
</dict>



</dict>


I can figure out how to get my device ID hex. But how do I get the original string to be substituted? Is it always the same? (I guess no, but it doesn't hurt asking :))

#88
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 864 posts
  • Gender:Male
  • Location:NC, USA
@espamac - this might work? i found the HDA stuff to be pretty tricky. i honestly cant remember how it got the chipset id. sorry (probably got it from dsdt dump on windows or manwe150 dsdt?!) i did use bcc9's bin patching script to patch the binary. but before that at one point i loaded ubuntu to dump a bunch of things (which included the codec ID) and to get the pins-outs etc.

Codec: Conexant CX20590

Address: 0

AFG Function Id: 0x1 (unsol 1)

Vendor Id: 0x14f1506e << this is the codec ID



there are at least other 3 files that have to match the dsdt.
anyway, i posted an outline of what i did here for the CX20590 on T420 - not pretty:
http://www.insanelym...60#entry1866235

it seems like others are using voodoohda - or someone patched AppleHDA for x220? i didnt spend much time on this site... but they may have made it work by making it think it had a cx20590 via dsdt etc.
http://forum.thinkpa...p?f=32&t=102098

#89
Espamac

Espamac

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts

@espamac - this might work? i found the HDA stuff to be pretty tricky. i honestly cant remember how it got the chipset id. sorry (probably got it from dsdt dump on windows or manwe150 dsdt?!) i did use bcc9's bin patching script to patch the binary. but before that at one point i loaded ubuntu to dump a bunch of things (which included the codec ID) and to get the pins-outs etc.

Codec: Conexant CX20590

Address: 0

AFG Function Id: 0x1 (unsol 1)

Vendor Id: 0x14f1506e << this is the codec ID



there are at least other 3 files that have to match the dsdt.
anyway, i posted an outline of what i did here for the CX20590 on T420 - not pretty:
http://www.insanelym...60#entry1866235

it seems like others are using voodoohda - or someone patched AppleHDA for x220? i didnt spend much time on this site... but they may have made it work by making it think it had a cx20590 via dsdt etc.
http://forum.thinkpa...p?f=32&t=102098


Thanks a lot tluck. I'm trying but still can't get any sound. I'm thinking of using VodooHDA, this is driving me nuts :)

I've used all the modified kexts for the x220 used on the thinkpad forums to no avail. The most annoying thing is getting on and off randomly. I've done a clean install and have started from scratch again. For now I have no sound at all :D I'll try step by step to see if I get anywhere. Specs of my computer says

cx20672

but the codec dump from linux said the codec was

CX20590

so I'm sticking to that.

I've read extracting the dsdt from dsdt editor is worse than doing it from ubuntu, any idea why? I dumped the codec audio from ubuntu live usb but the dsdt doesn't show up. It seems its location has been changed, I'm using ubuntu 12.10. I tried then installing ubuntu on a different partition (64 bit, efi boot, etc...) but I'm cannot boot. At this point I went back to OS X I'll try to work this out without Ubuntu to make it less time consuming. I have enough trouble with the sound to add to that dual booting :P

Main issues I want to fix: sound, sleep and screen brightness (it's gonna blind me at night...)
Secondary: bluetooth, usb 3.0 and

#90
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 864 posts
  • Gender:Male
  • Location:NC, USA
@espamac

sure voodoohda may be your best way to get audio running. curious as to what was the codec id (hex) from the linux dump for your audio? and yeah i just booted ubuntu live from a USB to get the info i needed. i used a windows tool to get the raw dsdt info - but i ended up using manwe150's dsdt which had a number of essential edits - especially the ehci stuff for sleep and display definition - which then provides a brightness knob. Note: you will probably need to use the rollback 10.6.8 AppleACPIPlatform.kext for some disks to recover from sleep. anyway, certainly are lots of opinions and ways to get at the dsdt info.

#91
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 864 posts
  • Gender:Male
  • Location:NC, USA
@espamac -

i found this snippet from a dsdt - which may help you define your audio board.



             Device (HDEF)
             { 
                 Name (_ADR, 0x001B0000)
                 Name (_S3D, 0x03)
                 Name (RID, Zero)
                 Name (_PRW, Package (0x02)
                 { 
                     0x0D,
                     0x04
                 })
                 Method (_PSW, 1, NotSerialized)
                 { 
                     Noop
                 } 
                 Method (_DSM, 4, NotSerialized)
                 { 
                     Store (Package (0x06)
                         { 
                             "layout-id",
                             Buffer (0x04)
                             { 
                                 0x0C, 0x00, 0x00, 0x00
                             },
                             "device-type",
                             Buffer (0x11)
                             { 
                                 "Conexant 20672"
                             },
                             "PinConfigurations",
                             Buffer (0x28)
                             { 
                                 /* 0000 */    0x40, 0x10, 0x21, 0x00, 0x50, 0x90, 0xA1, 0x61,
                                 /* 0008 */    0x60, 0x10, 0xA1, 0x00, 0x10, 0x40, 0x21, 0x61,
                                 /* 0010 */    0xF0, 0x00, 0xF0, 0x40, 0x20, 0x00, 0xF0, 0x40,
                                 /* 0018 */    0x30, 0x00, 0x17, 0x90, 0x80, 0x00, 0xF0, 0x40,
                                 /* 0020 */    0x90, 0x00, 0xF0, 0x40, 0x70, 0x00, 0xA6, 0x90
                             } 
                         }, Local0)
                     DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                     Return (Local0)
                 } 
             } 


#92
cayspekko

cayspekko

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
Hi! I've been building hackintoshes off and on for a while now, but never have posted to this forum. I'm still consider myself a newbie. First of all, I'd like to thank Kogen Mantis and everyone else for all their hard work, after reading through this thread I'm able to get my T420 up and running pretty good! I spent all evening yesterday trying to fix one issue though: my sound doesn't work.

It looks like I'm in the same boat as espamac where I'm trying to install 10.8.2 but have a Conexant 20672. I've gotten sound to work exactly once, and this was after running Kext Wizard to clean up permissions and caches on both extra and /s/l/e. After I rebooted, the sound never came back.

I always see these entries in the syslog:


Mar 17 20:31:10 localhost kernel[0]: Kext com.apple.driver.AppleHDAController - library kext com.apple.iokit.IOGraphicsFamily not found.
Mar 17 20:31:10 localhost kernel[0]: Can't load kext com.apple.driver.AppleHDAController - failed to resolve library dependencies.
Mar 17 20:31:10 localhost kernel[0]: Kext com.apple.driver.AppleHDAController failed to load (0xdc00800e).
Mar 17 20:31:10 localhost kernel[0]: Failed to load kext com.apple.driver.AppleHDAController (error 0xdc00800e).
Mar 17 20:31:10 localhost kernel[0]: Couldn't alloc class "AppleHDAController"

and


Mar 17 20:31:12 Dougs-MacBook-Pro kernel[0]: Sound assertion "0 != setupHostInterrupt ()" failed in AppleHDAController at line 441 goto Exit
Mar 17 20:31:12 Dougs-MacBook-Pro kernel[0]: Sound assertion "!fProvider->open ( this )" failed in AppleHDAController at line 355 goto Exit

I've tried various DSTS edits, including the one above along with the AppleHDA.kext in post #83

Not sure if I'm doing something wrong or what. But I'm willing to try more options if anyone has an idea.

Here's some more info:
i5-2520M 2.50ghz
bios 1.43
16 gb ram.
OSX installed in 2nd hard drive installed in the optical bay
Audio: Name = Conexant 20672 SmartAduio HD: VEN_14F1 DEV_506E

Also, I was wondering if anyone else had issues with graphical artifacts showing up every once in awhile? Also, about 25% of the time when I boot, it'll boot into an ugly grey screen with spikey lines. I can fix the graphic artifacts by lowering the resolution and then raising it again, and usually the grey screen goes away on the next boot.

Thanks again for your help!!! I've attached the DarwinDumperReports

Attached Files



#93
LostVampire

LostVampire

    InsanelyMac Protégé

  • Members
  • Pip
  • 23 posts
Thanks everyone and esp. to Kogen for excellent work. I have a t420 which is running Windows 7. My questions are

1) Do I need to re-install Win 7 if I want to dual boot?

2) Will I be able to use extended external monitors. VGA or DVI or both?

#94
tluck

tluck

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 864 posts
  • Gender:Male
  • Location:NC, USA
@lostvampire

1) this approach as far as i know know is about moving away from MBR to EFI formatted disks. i plan to move over from chameleon given the extensive list of features! see this for more details on why:
http://www.osx86.net...bootloader.html
- does support dual boot

2) yes - there is a method to provide VGA support = there are a couple of threads on patching the Kext (AppleIntelSNBGraphicsFB.kext). i recently packaged up a kext pack for T420 on a parallel thread. see this link for discussion of this topic as well as a 10.8.3 kext pack for T420 including support for VGA and DVI (entry 238)
http://www.insanelym...20#entry1898288

#95
distortionmusic

distortionmusic

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
  • Gender:Male
  • Location:Netherlands
@cayspekko I've tried a caddy for my optical bay, and switched back to optical. Issue is that now and then the drive gets removed from the system, I think it's because my caddy does not have such a handy locking system the original optical drive has. Did you use an original caddy or third party?

@kogen mantis, I'm still working on OSX with this system and it works like a charm. Only issues I still try to resolve is sleep problems (the one i've mentioned before, sometimes it goes to sleep well, and sometimes it gets stuck with flickering sleep light and heavy blowing fan) and my VGA out does not work, but that is not a big issue :) battery goes much longer then with Windows by the way

#96
cayspekko

cayspekko

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
Hey! I got sound to work! I don't know if this will help anyone but this what I did: (which may or may not be everything since I tried so many different approaches!) So apart from the tutorial in post #1 I did the following:

a. followed post #80 and installed Kogen's rc.scripts I don't know if this is necessary
b. I used raffitaffy's kexts from post #51 (but not the dtst.aml). I put them in an Extra/Extensions folder and used myHack to install them.
c. I used the dtst.aml from Kogen's post #32 (put it in the EFI/OEM/[mylenovonumber]/patched folder)

Thanks again everyone for all your great help!!!

@cayspekko I've tried a caddy for my optical bay, and switched back to optical. Issue is that now and then the drive gets removed from the system, I think it's because my caddy does not have such a handy locking system the original optical drive has. Did you use an original caddy or third party?


I use the official hdd caddy from lenovo to use in the optical bay. I have windows installed on ssd in the primary hd slot. I did have issues trying to install iatkos using the optical drive plugged into a third pary optical drive to usb caddy but gave that up and used a vmware image to create an install usb.

#97
miaumiau2

miaumiau2

    InsanelyMac Protégé

  • Members
  • Pip
  • 12 posts
Hey!

Thanks to Kogen's awesome explanations I finally moved from 10.7.4 to 10.8.3. However, I was hoping that upgrading would help to get rid of some problems I had with 10.7.4, but unfortunately I seem to still have issues:

- sometimes sleep / wake hangs, it looks like it writes the hibernation file, and when the LED is supposed to blink slowly, it starts to blink fast and the FAN goes loud and the PC hangs... nothing I can do then just reboot.

- I noticed that sometimes when I push the speaker off button (vs lowering the volume all the way to the button) the system hangs. no fan noise here and reboot needed too.

- Finally, sometimes when waking after sleep the track/touchpad is not working. Keyboard works but not the trackpad.

I tried to find something in the logs, but all I could find was a sound card error just after wake:

31.03.13 00:45:52,000 kernel[0]: No interval found for . Using 8000000
31.03.13 00:45:52,000 kernel[0]: RTC: PowerByCalendarDate setting ignored
31.03.13 00:45:52,000 kernel[0]: Previous Sleep Cause: 5
31.03.13 00:45:52,000 kernel[0]: The USB device HubDevice (Port 1 of Hub at 0x1a000000) may have caused a wake by issuing a remote wakeup (2)
31.03.13 00:45:52,000 kernel[0]: 758.600117: ATHR: unknown locale: 60
31.03.13 00:45:52,000 kernel[0]: 758.625142: ATHR: unknown locale: 60
31.03.13 00:45:52,000 kernel[0]: 758.626024: ATHR: unknown locale: 60
31.03.13 00:45:52,000 kernel[0]: en1: 802.11d country code set to 'DE '.
31.03.13 00:45:52,000 kernel[0]: 758.752203: ATHR: unknown locale: 60
31.03.13 00:45:52,000 kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140
31.03.13 00:45:52,000 kernel[0]: [0xffffff8016994600](0)/(5) Device not responding
31.03.13 00:45:52,000 kernel[0]: Sound assertion "0 == fAudioEngineArray" failed in AppleHDADriver at line 3163 goto Exit
31.03.13 00:45:52,000 kernel[0]: USBMSC Identifier (non-unique): 001CC0EC346CBB40971B022B 0x951 0x162d 0x100
31.03.13 00:45:54,910 com.apple.launchd[1]: (com.apple.qtkittrustedmoviesservice[432]) Could not terminate job: 3: No such process
31.03.13 00:45:54,910 com.apple.launchd[1]: (com.apple.qtkittrustedmoviesservice[432]) Using fallback option to terminate job...
31.03.13 00:45:55,000 kernel[0]: en1: BSSID changed to 24:65:11:6d:6e:7c
31.03.13 00:45:55,000 kernel[0]: en1::IO80211Interface::postMessage bssid changed
31.03.13 00:45:55,000 kernel[0]: AirPort: Link Up on en1
31.03.13 00:45:55,000 kernel[0]: en1: BSSID changed to 24:65:11:6d:6e:7c
31.03.13 00:45:55,000 kernel[0]: en1::IO80211Interface::postMessage bssid changed
31.03.13 00:45:55,000 kernel[0]: 761.819746: apple80211Request[10310] Unsupported ioctl 111
31.03.13 00:45:55,000 kernel[0]: AirPort: RSN handshake complete on en1

BTW, I am on a X220. I've patched my DSDT according to this guide: http://forum.thinkpa...p?f=32&t=102098 (linked from http://forum.thinkpa...p?f=32&t=105334).

Any ideas?

#98
crashnburn_in

crashnburn_in

    InsanelyMac Protégé

  • Members
  • PipPip
  • 73 posts
Can you outline the following things in your first post?

- Which model(s) of T420 / T420 s is this working for ? Has been tested? Should work for?
- What components are working/ not working/ working natively/ need kext/ drivers/ hacks?

I am considering buying a T420 or T420s but I'd like clarity on which models/ components are working etc.

#99
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 277 posts
  • Gender:Male
Hi there!

Since you guys are using EmuVariableUefi driver when using Clover, please test new version. Details here: http://www.projectos...indpost&p=28411

Thanks.

#100
cayspekko

cayspekko

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts

Hi there!

Since you guys are using EmuVariableUefi driver when using Clover, please test new version. Details here: http://www.projectos...indpost&p=28411

Thanks.


Tried it here and didn't notice anything different. Which is good I guess.





Also tagged with one or more of these keywords: UEFI, ThinkPad, T420, Lenovo, Clover


3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy