Jump to content

Lenovo ThinkPad T420 with UEFI Only


K0gen
 Share

5,282 posts in this topic

Recommended Posts

on the T420 - we have sandy bridge and the id that you listed looks like a frame buffer id. we use id=1 for MBP8,1 and we don't really need specify a frame buffer id explicitly. a

 

yup i have seen these mappings - i am trying to hack my new T460 and am using that list or something like it - these may come in handy on Sierra for the T420 which seems which may need some new mappings.

I'm actually in the middle of mapping the keyboard the same way as above. Pretty successful with the exception of Fn+F4 as it expects an immediate sleep trigger, so repeated press of the combo does not call the ec query.

 

Sent from my SM-G920F using Tapatalk

Link to comment
Share on other sites

Hey Guys,

 

Quick question...  Do you guys have working hibernate and shutdown?

 

I'm on an x220 and the guide I used borrowed a few things from the T420 installation guide here...   I'm just curious if you guys have the same issues I have (and if not, how the heck do I get it to work on my x220)...  Basically I want to enable hibernate to put less strain on the battery and my shutdown usually reboots ~50% of the time.

 

Thanks!

Link to comment
Share on other sites

Hey Guys,

 

Quick question...  Do you guys have working hibernate and shutdown?

 

I'm on an x220 and the guide I used borrowed a few things from the T420 installation guide here...   I'm just curious if you guys have the same issues I have (and if not, how the heck do I get it to work on my x220)...  Basically I want to enable hibernate to put less strain on the battery and my shutdown usually reboots ~50% of the time.

 

Thanks!

For shutdown try checking HaltEnabler in config.plist, for hibernate I do not know since I do not use sleep that often

Link to comment
Share on other sites

for me shutdown and reboot all work as expected on the T420. i have it in a dock and no problem there.

i have seen that if you don't have USB ports working properly that can lead to odd shutdown/reboot issues.

 

hibernate is working with OxsAptioFix2 only and then setting hibernate mode to 7 - which if i remember from Tetonne, is no longer setable by the pmset command - so you have to set it in the plist manually.

Link to comment
Share on other sites

I got OS X working with coreboot with an Ivy Bridge CPU it's still a WIP though:

  • USB needs fixing as only 2 ports work
  • battery remaining time seems to be inaccurate (not sure though)
  • the laptop wakes from sleep instantly last time I checked because of the USB.
  • incomplete power management
  • full backlight brightness at every boot

Any help would be appreciated ;)

post-469829-0-89414800-1469814113_thumb.png

Link to comment
Share on other sites

About Hibernation : http://www.insanelymac.com/forum/topic/299721-sleep-hibernation-how-it-works-and-how-to-use/

 

For OS X El Capitan, you'll need modify the com.apple.PowerManagement.plist.

Type this in Finder > Go > Go to folder/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

 

And find the Hibernate Mode in both section and put the value that you want.

source :             #3            

Link to comment
Share on other sites

I got OS X working with coreboot with an Ivy Bridge CPU it's still a WIP though:

  • USB needs fixing as only 2 ports work
  • battery remaining time seems to be inaccurate (not sure though)
  • the laptop wakes from sleep instantly last time I checked because of the USB.
  • incomplete power management
  • full backlight brightness at every boot

Any help would be appreciated ;)

Use Rehabman's EHC1 to EH01, EHC2 to EH02 + USBInjectAll.kext for USB recognition, the uDP/Renesas USB 3.0 can only be used as a USB 2.0 with PXHCD.kext. Use Lenovo X220 (?) patch for battery. Use Rehabman's USB_PRW_0x0D patch for sleep problem ( remove XHC power management patch as yours isn't Intel ). Power management is due to AICPM and your generated SSDT, do not use -xcpm with M or QM CPU. Full backlight at boot can be something related to NVRAM not saving properly

  • Like 1
Link to comment
Share on other sites

Use Rehabman's EHC1 to EH01, EHC2 to EH02 + USBInjectAll.kext for USB recognition, the uDP/Renesas USB 3.0 can only be used as a USB 2.0 with PXHCD.kext. Use Lenovo X220 (?) patch for battery. Use Rehabman's USB_PRW_0x0D patch for sleep problem ( remove XHC power management patch as yours isn't Intel ). Power management is due to AICPM and your generated SSDT, do not use -xcpm with M or QM CPU. Full backlight at boot can be something related to NVRAM not saving properly

 

  1. I'll try to get USB working following your tips
  2. The battery patch won't work - this is a completely new ACPI implementation of the entire system. (check out the coreboot github: src/mainboard/lenovo/t420 and src/ec/lenovo/h8)
  3. So should I generate an SSDT using ssdtPRGen and remove -xcpm?
  4. The NVRAM is emulated - unfortunately, the only way I could get an EFI implementation right now is through DuetPkg which is basically a floppy image that contains an UEFI implementation through BIOS (SeaBIOS in my case - it resides as a RAMDISK in my BIOS)

Thanks for the tips, I'll try make some progress and I'll try to post my files as soon as I think it's stable enough (or someone asks me to upload it)

 

EDIT: This is a T420, not a T430/T430s and I only have USB2.0 ports - no ExpressCard USB3.0 solutions either.

Link to comment
Share on other sites

Thanks to all of you for this great work!

 

@tluck could you please add the code from mikaelr (See #2354 and #2399) to the current dsdt.dsl / dsdt.aml or at least provide an additional one like you did for the config.plist for the screen resolutions?

It would be great to have a more silent Laptop through that. I know that RehabMans modded acpipoller.kext or hwmonitor has to be used in this case.

 

Thanks in advance!

Link to comment
Share on other sites

For shutdown try checking HaltEnabler in config.plist, for hibernate I do not know since I do not use sleep that often

 

I tried enabling HaltEnabler but it had no affect.  System still rebooted on shutdown (this time i was on battery power)

 

for me shutdown and reboot all work as expected on the T420. i have it in a dock and no problem there.

i have seen that if you don't have USB ports working properly that can lead to odd shutdown/reboot issues.

 

hibernate is working with OxsAptioFix2 only and then setting hibernate mode to 7 - which if i remember from Tetonne, is no longer setable by the pmset command - so you have to set it in the plist manually.

 

I wonder if my custom USB injectAll kext is causing issues.  I've disabled the everything that's not sed and also disabled the USB that goes to the BTDC.  

 

I also enabled hibernate mode 7 via manual plist editing.  Still can't get it to hibernate.  

 

Also updated Clover to the latest version.   

 

About Hibernation : http://www.insanelymac.com/forum/topic/299721-sleep-hibernation-how-it-works-and-how-to-use/

 

For OS X El Capitan, you'll need modify the com.apple.PowerManagement.plist.

Type this in Finder > Go > Go to folder/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

 

And find the Hibernate Mode in both section and put the value that you want.

source :             #3            

 

 

Thanks,  I've tried it and still not working.  I will try again (hard to test since I have to wait 4200 seconds).    One thing is that I don't see the hibernate option in clover.  Does that only pop up after a hibernation or is it always visible during any boot?

 

Thanks!!!

Link to comment
Share on other sites

^ about Hibernate mode : this doesn't work for me neither :(

the 1st link was ok with 29 in the past. i had screen 1 and screen 2. but for none reason it doesn't work anymore even with the 2nd part (com.apple.PowerManagement.plist)

that should be a priority of clover's team lol

Link to comment
Share on other sites

 

Great.. It did just that. Only needed to adjust the info.plist to match the t420 and use TCPU as poll method. 

 

                        <key>IONameMatch</key>

                        <string>MON0000</string>  <!-- Was FAN00000 -->

                        <key>IOProviderClass</key>

                        <string>IOACPIPlatformDevice</string>

                        <key>Methods</key>

                        <array>

                                <string>TCPU</string> <!-- Was FCPU -->

                        </array>

Loaded the kext and it is now making sure the fan controller logic is polled even if hwmonitor is stopped.

 

 

Guys, I really would like to achieve 2000 RPM fan speed at 55 C CPU temperature with this method and without relying on HWMonitor. However I don't understand how this could be done based on the above instructions. Can someone point me to the right direction maybe?

 

Thanks.

 

UPDATE: My bad, the instructions are in comment #2264892

 

"Quick howto replace the default fancontol logic on a T420 with a patched dsdt.

 
note: it’s assumed that you know what is going on. It’s important to have ether HWmonitor or the APCIPoller running.
It will poll the TCPU method in acpi and adjust the fan speed accordingly. If nothing is polling the TCPU (cpu temperature)
fan will just keep the current speed and not adjust speed according to cpu temperature. (Could cause overheating.)
ACPIPoller is just the default from Rehabman’s github but with a plist corrected to match a T420.
The rest is a default install using truck’s guide above corrected with a new TCPU function in the dsdt.
 
for details see here: 
 
 
* Mount the ESP volume. (Replace disk0s1 with your ESP volume.)
mkdir /Volumes/ESP && sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
 
* Backup old aml.
cp /Volumes/ESP/EFI/CLOVER/ACPI/patched/dsdt.aml /Volumes/ESP/EFI/CLOVER/ACPI/patched/dsdt.aml.orig
 
* Copy the asl from the zip.
cp ~/Downloads/T420_fancontrol/dsdt.aml /Volumes/ESP/EFI/CLOVER/ACPI/patched/dsdt.aml 
 
* Copy the kext that poll the new fan control logic in ‘TCPU’ by requesting the CPY temp at intervals.
cp -r ~/Downloads/T420_fancontrol/ACPIPoller.kext /Library/Extensions/ACPIPoller.kext 

kextutil /Library/Extensions/ACPIPoller.kext"

 

Actually I got errors when tried to overwrite the ACPIPoller.kext with the one in the attachment even though I was using sudo.

The errors were like this:

 

Tamass-MacBook-Pro:~ somez$ sudo kextutil /Library/Extensions/ACPIPoller.kext

Diagnostics for /Library/Extensions/ACPIPoller.kext:

Code Signing Failure: not code signed

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext "/Library/Extensions/ACPIPoller.kext"

kext signature failure override allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext "/Library/Extensions/ACPIPoller.kext"

 

Currently my fan is running at 2000 RPM but HWMonitor is also running so I'm not sure whether it's still needed or it's not a problem if I quit HWMonitor.

Link to comment
Share on other sites

those errors are ok.  check that the kext is running by

 

kextstat | grep -i acpi

 

otherwise i might use this procedure to install the kext.

 

sudo cp -r ~/Downloads/T420_fancontrol/ACPIPoller.kext /Library/Extensions/ACPIPoller.kext

sudo chown -R 0:0 /Library/Extensions/ACPIPoller.kext

sudo chmod -R go-w /Library/Extensions/ACPIPoller.kext

sudo kextcache -i /
 

Link to comment
Share on other sites

those errors are ok.  check that the kext is running by

 

kextstat | grep -i acpi

 

otherwise i might use this procedure to install the kext.

 

sudo cp -r ~/Downloads/T420_fancontrol/ACPIPoller.kext /Library/Extensions/ACPIPoller.kext

sudo chown -R 0:0 /Library/Extensions/ACPIPoller.kext

sudo chmod -R go-w /Library/Extensions/ACPIPoller.kext

sudo kextcache -i /

 

 

Hey tluck!

 

Actually yesterday I was able to confirm it's working by running Prime95 with HWMonitor running and without it. In both cases the fan kicked in after 11 seconds and jumped up until 55000 RPM. When the load ended my fan speed went down to 3500 RPM and stayed the for about 5 more minutes then decreased to the desired 1900-2000 RPM level. The thinkvantage button still works so this is like a dream now :)

 

Do you think you could incorporate this solution to lower the fan speed into your guide?

Thanks.

 

UPDATE #1

It seems closing the lid and thus sending the machine to sleep is causing weird behaviour when the machine is woken up.

For the first 3 times right after waking up the fan kicked in immediately at 5500 RPM then started to slow down to 2000.

Now after the 5th try the fan speed was not read by the system. It was literally displaying a "-". Thinkvantage button did not have any effect however the fan was working as the temperature did not climb up. Then suddenly it was showing 16k RPM while based on it' noise it was still running at 2000 instead.

Link to comment
Share on other sites

Update the Zip bundle in the Guide.

 

 

16-Aug-2016 Update

  • Updated to Clover r3705 (should be Sierra ready)
  • Revised the ThinkPad Theme - new banner etc
  • Updated FakeSMC kexts (and included installer for HWMonitor.app)
  • Updated VoodooPS2Controller kext to latest rev - with a few TrackPad and KeyBoard param tweaks -- changed F1-F12 mappings to be like apple keyboard post-954945-0-58742400-1471373265_thumb.png - As usual - special thanks go to RehabMan.
  • Changed the Bluetooth kext to be an injector style kext instead of full (dummy) kext - no longer version specific
  • ​Other kext updates - no new features
  • Added DSDT for "heat-step" - An optional DSDT that needs (RehabMan's) ACPIPoller.kext or HWMonitor to monitor ACPI to change fan speed as function of Temperature.

 

I installed macOS Sierra PB 5 - still works ok -- seems like a more solid beta that El Cap...

anyway, it will need work and time to figure out the key mappings etc - i.e. to get audio buttons etc working.

 

Note:

my T460 experiment is a partial failure - partial success!

everything works -with one big BUT --  cant get full 3D graphics. May post interim results and will seek more help!

  • Like 2
Link to comment
Share on other sites

Trying to install El Capitan and hit a little snag.

 

On Part 2 - Post OS Installation and Setup, Step 5, It says to run this command to "Install cutom kexts on HD"

 

~/Downloads/T420/EFI/CLOVER/kexts/_kext-install.command

 

Thing is, I don't see the _kext-install.command in that folder (from the T420_UEFI-Clover-b3705_10.10_10.11_2016-08-16.zip). The only thing I see is _post-install-network-reset.command file and the "Other" folder that has the following kext files:

 

ACPIBatteryManager.kext

AppleHDA_20672.kext

BlueTooth_Injector_T420.kext

FakeSMC.kext

IntelBacklight.kext

IntelMausiEthernet.kext

IOAHCIBlockStorageinjector.kext

VoodooPS2Controller.kext

 

Where can i get that file to finish up the install?

 

Thanks for the help!

Link to comment
Share on other sites

Update the Zip bundle in the Guide.

 

 

16-Aug-2016 Update

  • Updated to Clover r3705 (should be Sierra ready)
  • Revised the ThinkPad Theme - new banner etc
  • Updated FakeSMC kexts (and included installer for HWMonitor.app)
  • Updated VoodooPS2Controller kext to latest rev - with a few TrackPad and KeyBoard param tweaks -- changed F1-F12 mappings to be like apple keyboard attachicon.gifF-keys.png - As usual - special thanks go to RehabMan.
  • Changed the Bluetooth kext to be an injector style kext instead of full (dummy) kext - no longer version specific
  • ​Other kext updates - no new features
  • Added DSDT for "heat-step" - An optional DSDT that needs (RehabMan's) ACPIPoller.kext or HWMonitor to monitor ACPI to change fan speed as function of Temperature.

 

I installed macOS Sierra PB 5 - still works ok -- seems like a more solid beta that El Cap...

anyway, it will need work and time to figure out the key mappings etc - i.e. to get audio buttons etc working.

 

Note:

my T460 experiment is a partial failure - partial success!

everything works -with one big BUT --  cant get full 3D graphics. May post interim results and will seek more help!

 

Thanks tluck for your hard work on these updates.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...