Jump to content

Lenovo ThinkPad T420 with UEFI Only


K0gen
 Share

5,282 posts in this topic

Recommended Posts

Just wanted to post another thank you....had a hard drive crash on my t420 and I dropped a new hard drive in and did a totally fresh and clean install and everything was soooo easy and worked right out of the box. 

Link to comment
Share on other sites

TLUCK

 

First of all Thank you so much for your excellent work on this .. your "Guide" and "zip super package" make installing OSX easy like never been before. I had successfully clean install 10.9.2 on my T420 (4180AJ5). Everything work including sleep/wake audio.

 

:thumbsup_anim:  :thumbsup_anim:  :thumbsup_anim:  :thumbsup_anim:

 

 

One thing on the external monitor. Seem I have a non-sync monitor/shake picture when I plug my monitor via VGA port. Here my steps:-

 

  • plug the monitor via VGA port (I had ordered DP/HDMI Adapter, will give it a try once I got it too)
  • turn on the T420
  • Clover Menu show up fine (I even set the Clover Menu to display at 1600x900 to check/confirm if my monitor support 1600x900 resolution) I got a clear/nice picture. I can use FunctionKey-F7 to switch between TP LCD and monitor too (but not the "both"/"clone" ??) So I chose to boot from monitor
  • Select to boot OSX; screen change to apple logo on a white background for a little while till 10.9.2 start to show up on 1600x900 .. the display mode jump to "both"/"clone" mode automatically. Well, I do prefer it to display on monitor only but that not the key issue right now but the display's quality. Once it become "both"/"clone" mode, a nice picture on TP LCD but poor quality on the monitor. It look sparking, little shake all the time with ugly color.

At first, I'm so confident on your package and blame to my monitor.  It is a Toshiba LED TV (23PU200T). So I start to test it on Windows 7 (on the same T420 machine) - - found out that it show up a nice picture. Would it be possible that there is a problem specifically on OSX only ? Any expert opinion, please.

 

 

PS. some picture for more info. I took picture on Clover menu and the booting screen (which seem to display well) and the OSX screen on Monitor (bad quality) & on T420 LCD (nice) for comparison.

post-1300372-0-06105700-1396430004_thumb.jpg

post-1300372-0-40745400-1396430053_thumb.jpg

post-1300372-0-22721300-1396430103_thumb.jpg

post-1300372-0-05539300-1396430152_thumb.jpg

Link to comment
Share on other sites

k.surachi - glad you were able to build a hack on T420 with the bundle.

 

as far as VGA - not sure why the monitor is not syncing right - must be an OSX thing if it works fine with Windows. i would keep the LCD as main screen and the use the VGA as a 2nd desktop vs a mirror. Then you can set different resolutions for the TV.  However, for a TV i would recommend connecting via DisplayPort to DP to HDMI. VGA is analog and the digital function are far easier to manage with live detect and so on.

Link to comment
Share on other sites

@tluck et. al.

 

I don't remember if this was brought up before or not, but on the 420 and the 430, we have display limitations. the HD3000 only physically supports 2 displays. Likewise, the HD4000 in my 430 only physically supports 3 displays. Something with the display bus limits physical connections on mine to also 2 devices, but it's not aproblem. It was documented somewhere that the 430 only supports 2 displays. I'll post the link if I find it.

 

What I was wondering, is how the expansion port comes into play here. I already have 3 outputs on the unit (as do you): VGA, mini-DP, and LCD. Only any 2 of those 3 will work. Now when the unit is docked, I have an additional 3 outputs available (DP, VGA, DVI). (Or if you get the big dock, you get 5 ports: 2x DP, 2x DVI, VGA) I can verify that you may use any 2 of the total 6 ports in any combination. This includes unit ports and dock ports simultaneously.

 

So does the expansion port have a physical pass-through for the display bus? All the display ports are physically wired to the same DVI/DP bus. The VGA is actually D-SUB. 

How does clover handle this? Is it contributing to the display issues some of the users are having?

 

The only way I've ever been able to utilize 3+ monitors was to buy these lousy USB-w/e adapters from Startech. They suck, don't use them. Your GPU is not driving them. The software creates a new virtual display per each adapter you have hooked up. The more you have, the more your poor CPU gets bogged down. This causes all of the monitors connected through those adapters to have really laggy response times/stuttering. But the physically connected displays are still fine.

Link to comment
Share on other sites

@tetonne - yup. i had added the ssdtprgen script to the guide and bundle a few months ago. the CPU specific SSDT seems to make power management work a lot better. i will take a look at this (newer) version to see if there is anything new and different.

  • Like 1
Link to comment
Share on other sites

@tetonne - yup. i had added the ssdtprgen script to the guide and bundle a few months ago. the CPU specific SSDT seems to make power management work a lot better. i will take a look at this (newer) version to see if there is anything new and different.

Yes i know you provide it :)

i give the information just in case of news

Link to comment
Share on other sites

@tetonne - that is a good post for sure. it has some good information. FWIW, i tried the newer script and it generated the same information for ssdt. which is good i guess that nothing has changed for us on the T420. i will include the newer script for the next bundle post - if and when we need a new one !!!

 

IMO the T420 is 99.5% as good as real mac.  i say that as i have an OSX problem getting occasionally (once in 3 weeks or so) there is a random ethernet unit hang message and have to reboot.  

Link to comment
Share on other sites

Anyone know of a good resource on how to perform the EFI whitelist mod. I know you guys have a 420 firmware that's already whitelisted, but I can't find one for my 430.


EDIT: I believe I found one some time ago, but the version was old. I want to know how to perform it myself. Because Lenovo still updates the 430 firmware.


EDIT2: And I can't rollback anyways as I have the newest firmware.

Link to comment
Share on other sites

I found a cheap mini-dock ($50), so I've been working on upgrade support (e.g. removed VGA patch so that I could use both digital ports on the dock to drive my monitors).

 

I also patched AppleHDA (from 10.9) to drive the dock headphone/microphone ports:

 

First, edit ConfigData of CodecID 351359086 (LayoutId 12) /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist to add the dock input/output:

0x40,0x10,0x21,0x04, /* 0x19        jack, External      Right,             HP Out, 1/8" stereo/mono,    Black, misc 0,                      , 4-0 */

0x50,0x90,0x81,0x21, /* 0x1a        jack, Separate       Rear,            Line In, 1/8" stereo/mono,     Pink, misc 0,                      , 5-0 */

0x60,0x10,0x81,0x04, /* 0x1b        jack, External      Right,            Line In, 1/8" stereo/mono,    Black, misc 0,                      , 6-0 */

0x20,0x40,0x21,0x21, /* 0x1c        jack, Separate       Rear,             HP Out, 1/8" stereo/mono,    Green, misc 0,                      , 2-0 */

0x10,0x01,0x17,0x90, /* 0x1f    internal, Internal        N/A,            Speaker,     Other Analog,  Unknown, misc 0,  Jack Detect Disabled, 1-0 */

0x70,0x01,0xa6,0x90, /* 0x23    internal, Internal        N/A,             Mic In,    Other Digital,  Unknown, misc 0,  Jack Detect Disabled, 7-0 */

<data>
AZccQAGXHRABlx4hAZcfBAGnHFABpx2QAacegQGnHyEBtxxgAbcdEAG3HoEBtx8EAcccIAHHHUAB
xx4hAccfIQH3HBAB9x0BAfceFwH3H5ACNxxwAjcdAQI3HqYCNx+QAbcMAg==
</data>

Also add 2 new PathMap array elements (copy the other two, but modify mappings to add the new pins) to /System/Library/Extensions/AppleHDA.kext/Contents/Resources/Platforms.xml

 

Note: I couldn't get auto-switching detect to work on my first try, so this adds a Headphones & LineIn menu item instead. (First listing is auto-detect Internal Speaker/Headphones. Second listing is Dock Headphones and won't do anything if you don't have a dock. Same for audio input. I've discovered that it's trivial to modify AppleHDA to split Internal Speaker/Headphones1 too, but I like having the auto-switchover -- and the lenovo hardware mutes the internal speaker when you plug in headphones into either port. But I can post more detail if someone's interested.)

 

This setup is actually extremely cool since we can now plug in TWO sets of speakers for QUADRAPHONIC audio (use Audio MIDI Setup App to configure) when using the dock.

 

edit: oops, forgot to attach kext

 

 @ Manwe150

 

Would it be possible to give me some insight how did you make that excellent modification for T420's dock ? The reason I ask is I'd love to make similar modification for my ThinkPad X Series Docking too.

 

Note that I did try your mod (replace your 2 files, "Info.plist" & "Platform.xml.zlib", into my 'working' AppleHDA) It add another "output" under "System Perference/Audio/Output" ... the original output work as normal. But the additional output has no sound.

 

 

Many thanks.

Link to comment
Share on other sites

@k.surachai

 

Did you change the codec id to match your codec? I don't have an X-series, but it may use a different codec than the T series.

@tluck

 

Thanks for the attempt, but that thread is dead. Not a huge fan of necroposting. Which brings me to why I want to learn how to do it. Apparently, there aren't enough firmware modders out there.

Link to comment
Share on other sites

@k.surachai

 

what series laptop? you will need to verify that the audio chip pin mapping is the same.

 

I've previously posted some information on this topic:

http://www.insanelymac.com/forum/topic/285678-lenovo-thinkpad-t420-with-uefi-only/?view=findpost&p=1951204

 

from linux, you will want to extract the codecgraph of your chip. `cat /proc/asound/card0/codec#0` will give you a description of the capabilities of the chip. you can use codecgraph to turn this into a pretty picture. unless you are a pro at hex-to-decimal conversions, i would then edit a copy of this file in a text editor and convert all of the hex digits (which will match the number of the pin in the next step) to decimal numbers (which match the format of the values in Platform.xml)

 

If you have windows, you can extract the PinConfigOverrideVerbs from the registry. the script I wrote and attached on the previous page can help you generate the descriptive text and base64 encoded data to put in the <data> field of Info.plist. the arguments to use are `./pinconfig.py -v -r <inputfile>`, where input file is the numbers from the registry. (this script can also help with other conversions, see `./pinconfig.py -h` for the list of options) if the text description in the output appears to match your hardware, it is probably correct. the 1st field tells the computer the number of the pin, the 2nd-7th tell it the type. and the last field just needs to be a "<unique identifier>-hyphen-zero" to work with OS X. i've edited mine to give the working pins unique identifiers and remove the items with `f-0` (which are disabled pins, and not supported by AppleHDA.kext). you can also get this on linux, either by manually converting the alsa/asound dump from the previous step, or using the verbit script

 

note that my script ignores the final entry (01b70c02), even though this is a very important command (0  1b  70c  02) which is interpreted as (0 <input 0x1b> <EAPD> <on>) and may need to be added by hand

 

since you have a mostly working card, i would guess that your values may be the same. but if you can reply with your codec dump and, if you have them, the SVG and PinConfigOverrideVerbs, i can help point out where they differ

  • Like 1
Link to comment
Share on other sites


testing beta without account :

do
sudo /usr/sbin/softwareupdate --set-catalog "https://swscan.apple.com/content/catalogs/others/index-10.9seed-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"

undo
sudo /usr/sbin/softwareupdate --clear-catalog

 

Link to comment
Share on other sites

Hi, I have a Lenovo t420s (4170CTO) i5-2520, HD300 8G ram, and 1600x900 display. I have made laptop into a hackintosh through Nerish, but the resolution is all wrong initially it only allowed for one resolution of 13**x7** and after a patch/kext/ (not sure) what it was it only displays image through VGA on a 1080p screen. Anyways i'd like to try this method provided by tluck.

 

1. I'd like to know if the protocol provided by tluck would work on my system. I have tried multiple times to mount the application and clover both MBR and GUID method, but I have been unsuccessful. Is there any specific method/detail that needs to be followed to get the installation working?

 

2. If I have the t420s (4170CTO) what do I write for the product ID? I have seen others just writing a number that does not exactly match their product ID. Where can I find this ID?

 

Post OS Install on HD

  1. Boot from USB - but now select the new OSX partition. this will boot up OS X with clover - this will use the kexts and "top" level config.plist.
  2. Install standard Clover (Clover_v2k_rxxxx.pkg into ESP (partition 1) of HD - use link to download from source forge. and select (check box) at least first 2 items! here is a good set of options:
    attachicon.gifclover-pkg-install.png
  3. If not still automatically mounted from installer pkg, manually mount ESP of HD on /Volumes/ESP and replace folders /Volume/ESP/EFI/CLOVER and BOOT with contents in the zip. i5-2520M    | HD 3000 only | 8GB | 1600x9000
  4. rename config.1600x900.plist to config.plist or rename config.1366x768.plist to config.plist - depending on which matches your system.
  5. Install (copy) the DisplayVendorID-* folders from this zip file from to /System/Library/Display/Overrides
  6. Set up OEM folder: Here is the tricky part - fix OEM folder name to match your system model (found on the bottom label or clover will list it.)
    Note: The OEM config.plist has kext patching options etc vs top-level config.plist
    • If you have 1600x900 LCD, rename the OEM/<ProductID.1600x900> folder to match your product name.
    • If you have 1366x768 LCD, rename the OEM/<ProductID.1366x768> folder to match your product name.

Note: the OEM config.plist is slightly different than top-level config.plist. Most notable diffs are: (1) no kext injection from ESP and (2) kext patch of SNBGraphics buffers -  this same patch fixes brightness and 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 patch! Or patch replace the 3rd port (DP) with VGA. 

 

 

Thank you in advance.

Link to comment
Share on other sites

@Hipopalamus

1) yes this clover bundle will work for T420s in general - the dsdt is probably not right though. so you will need to remove that. there is a config.nodsdt.plist  that you can rename use. It can be used for generating a custom dsdt (you extract the clover patched version) but this all about post installation.

 

the method to create GUID USB installer i would say is the easiest way to create USB installer. the only tricky part is mounting the EFI.

 

i am not sure what you mean by mount the application? ... to install you should boot the USB and install from USB.

 

2) the product id can be obtained by going into the bios (F1 on startup) and looking at the main screen - its called machine type model . in your case will be 4170 something maybe it is 4170CTO. you rename the OEM/Product folder to OEM/4170CTO for example. again, you dont need the OEM folder for installation it is really for post install.

  • Like 1
Link to comment
Share on other sites

It's a long time ago since I've been on this forum, after working with Windows 8 for a while, there is this feeling again (muhaha) that I want OSX running here on my t420, and maybe on the t420s that I have now as well. I've read a lot of pages since I left, and all I have to say is that you guys all do amazing work! So much more compatibility since I started haha.

 

I'll try to get my hands on a Mac this week so I can make a good USB installer again.

Link to comment
Share on other sites

Lucky enough my boss let me use his iMac. I've tried cvad's util, but I think I had downloaded a bad image which was modified by someone. Because the images of Mavericks are hard to find, I'm now downloading an original image on the iMac. I will try if the new Diskmaker X (formally liondiskmaker) will work with this. Thanks for the tip anyway @tluck!

Link to comment
Share on other sites

@ Tluck

 

Hi first of all thanks for  all your help in the past.

 

I have updated all the kext files for my T420s to the latest kext files you uploaded to this forum (March27), however i have noticed that my trackpad and buttons below the trackpad work ok, but the buttons above whenever they are pressed the system thinks i am producing a double click.  Is there a setting in the kext file which can be modified?

I have fixed it by using an old kext.

 

Also does whenever my t420s goes to sleep, when the laptop wakes up the mouse does not work, anybody else experiencing this?

 

Thanks in advanced.

 

LC

Link to comment
Share on other sites

I just posted a new zip bundle in the Clover UEFI on T420 Guide - really just minor tweaks. 

 

19-Apr-2014

  • Fixed up VoodooPS2Controller 1.8.11 for double click issue on TrackPoint buttons - rolled back just the VoodooPS2Trackpad Plugin to 1.8.10 binary. (the TrackPad lower buttons were ok)
  • Revised top-level config.plist to patch DSDT on the fly and removed ACPI dsdt.aml for the installer
  • Updated FakeSMC.kext to v6.5.1255

@lcortez - hmm. not sure. this used to be a random problem. but since the recent clover DSDT patching and 10.9.2, the loss of PS2 after sleep just went away. USB mouse still works. the bundle has a work around for the trackpoint double click button issue.

 

@distortionmusic - are you using the OEM folder config.plist? if so, did you replace the kexts in /S/L/E? you should not use the OEM folders until you get it up and running for the 1st time etc. the HDA assertion makes me think the proper AppleHDA and/or DSDT is not in place? you may be missing FakeSMC too by using the OEM? did you follow all the steps in the guide (link in my signature)fs for post install?

  • Like 1
Link to comment
Share on other sites

I'll try again today (: I have tried booting with clean clover install via cvad's utility, and with cvad's util and then replacing with your folders, and when that didn't work I tried with different configs. I've tried to follow your guide step by step, what do I miss here?

 

I will keep trying until it works!!

 

edit: I got the installer to work, don't ask how. For some reason, cvad's utility doesn't work as well as it could be, but that's probably me. What I've done now, is following:

 

1. get original .app

2. use Diskmaker X (or do it in Terminal with createinstallmedia) to make OSX usb

3. plug in the USB stick in a Windows machine and (I don't know if for everyone, but for me it worked under windows 8.1) and you'll see the EFI partition of the usb installer. (You can manually mount it on a OSX system as well, but this was easier)

4. just copied the files from @tluck's zip file to the root of that partition.

5. boot from your osx install usb

 

It's now installing on the T420s, so I'll see where it goes now :)

Link to comment
Share on other sites

@distortionmusic - key things to remember:

 

1) use zip to replace default Clover and Boot folders

2) do not rename the OEM folders until after 1 or 2 boots so you can get clover and the custom kexts installed on the HD.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...