Jump to content

Lenovo ThinkPad T420 with UEFI Only


Go to solution Solved by tluck,
5,229 posts in this topic

Recommended Posts

 

@kanabiol - ah yes - i see what is going on. sorry.

-- the EDID data is injected anyway - i will remove the EDID from the 1368 config.plist - i seem to recall this is a clover bug in some versions - meaning it will inject it even if Inject EDID = false.

 

ill redo the zip package shortly.

 

Thank you very much for the work you are doing. Make install from scratch, everything worked perfectly!

Take it as reference, not using it

I figured, but I'd really appreciate it if you could provide a little more info.

I've never worked with DSDT patches or manual patching before.

 

I understand that I should take some "code" from your DSDT and put it into mine to get everything working, correct?

i am not 100% sure there is anything in that DSDT that would address your issue - brightness for NON-intel - i.e. the Nvidia card.

the current zip file contains IntelBacklight.kext that is for integrated IGPU (intel GFX).  there is an alternative approach that used ACPI to control brightness - that may be of interest. 

 

you still need to have the PNLF device in DSDT (and some other coding )

and then use ACPIBacklight.kext instead of intelBacklight.kext.

the t420 had this method along time ago.

Fellows, I have a somewhat off topic issue.

I grabbed an almost pristine T420 from fleabay which has BIOS 1.4.9 on it sadly.

I learned from Mr. Goggle that it is possible in theory to downgrade to 1.4.6 using a bootable thumb drive with BIOS and flash exe on it.

However I have hit a wall as I´m clueless how to extract the needed files from the 1.4.6 BIOS upgrade ISO. Linux and eltorito are the key words here.

Files on the BIOS ISO are invisible in any way I´m aware of.

 

Is anybody here willing and able to create an image of such a thumb drive with the needed files on it?

I could provide a DOS bootable thumbdrive image and the BIOS ISO if that would help.

 

Thanks for caring!

@galaretka - i posted a new zip with El Cap version of the VoodooPS2Controller so CapsLock works (again)

@x4080 - there are only so many gestures implemented - 4 fingers is not one of them.

@goodguess -

 

i found this script a while back when i was looking at thinkpad ISOs for some reason or another at this link.

the phython code is below and it will extract the "invisible" files. it may be helpful as it can run on your hack to extract/create a bootable flash drive.

 

eltorito-iso-extract.py

#!/usr/bin/env python
import struct
import sys
SECTOR_SIZE = 2048
def find_image(fp):
    # el-torito boot record descriptor
    fp.seek(0x11 * SECTOR_SIZE)
    data = fp.read(SECTOR_SIZE)
    assert data[:0x47] == b'\x00CD001\x01EL TORITO SPECIFICATION' + b'\x00' * 41
    boot_catalog_sector = struct.unpack('<L', data[0x47:0x4B])[0]
    # check the validation entry in the catalog
    fp.seek(boot_catalog_sector * SECTOR_SIZE)
    data = fp.read(0x20)
    assert data[0:1] == b'\x01'
    assert data[0x1e:0x20] == b'\x55\xAA'
    assert sum(struct.unpack('<16H', data)) % 0x10000 == 0
    # Read the initial/default entry
    data = fp.read(0x20)
    (bootable, image_type, load_segment, system_type, sector_count,
     image_sector) = struct.unpack('<BBHBxHL', data[:12])
    image_offset = image_sector * SECTOR_SIZE
    if image_type == 1:
        # 1.2MB floppy
        image_size = 1200 * 1024
    elif image_type == 2:
        # 1.44MB floppy
        image_size = 1440 * 1024
    elif image_type == 3:
        # 2.88MB floppy
        image_size = 2880 * 1024
    elif image_type == 4:
        # Hard disk image.  Read the MBR partition table to locate file system
        fp.seek(image_offset)
        data = fp.read(512)
        # Read the first partition entry
        (bootable, part_type, part_start, part_size) = struct.unpack_from(
            '<BxxxBxxxLL', data, 0x1BE)
        assert bootable == 0x80 # is partition bootable?
        image_offset += part_start * 512
        image_size = part_size * 512
    else:
        raise AssertionError('unhandled image format: %d' % image_type)
    fp.seek(image_offset)
    return fp.read(image_size)
if __name__ == '__main__':
    with open(sys.argv[1], 'rb') as iso, open(sys.argv[2], 'wb') as img:
        img.write(find_image(iso))

Wow tluck, that really looks like a place to start from and may be the solution for all those 1.49 crippled T420 out there.

The sellers at fleabay usually say that downgrading BIOS is not possible.

 

Seems there is to do some footwork still with Python and El Cap and I´m afraid this thing is above my head. :(

Syntax errors with Python 3.5 - similar issues with the built in 2.7. Would have been a miracle if it was that easy.

 

PY-Errors.rtf

PY-Shell-Errors.rtf

 

Edit: The CD I´m using as source is 83uj28us.iso

I figured, but I'd really appreciate it if you could provide a little more info.

I've never worked with DSDT patches or manual patching before.

 

I understand that I should take some "code" from your DSDT and put it into mine to get everything working, correct?

Search for NVCAP in the DSDT, find the Device that contains it, start from there

Thanks a lot for taking a plunge into eltorito, tluck.

I´ll put the files together on a DOS boot stick to try whether pflash does handle the 1.49 BIOS on my "new" T420.

Wish me luck that I won't end up with a big black bookend. ;)

 

Edit: Success!

All went well and I can´t thank you enough that this was made possible by your work.

I had been thinking of returning the T420 to the seller as 1.49 would have been a no go.

Would have been sad to see it go with 4/120GB, WWAN, smartcard reader, no signs of wear, docking station and bag for EUR 230.

Quite a nice testing ground for Sierra, 4GB is not too much, but maybe I´ll make it 6GB for both T420.

 

I´m uploading an image of my thumb drive right now, hoping that someone may find it useful.

Included is a USB image tool for Windows to read/write USB sticks.

I wrote a how to which is on the USB stick, together with the text  editor TE for DOS.

maybe not the most elegant writing, but here it is.

 

READ_ME.txt

Erratum: Viewing the file from the Mac side, I found a weird character in the PFLASH command.

The correct input is: "PFLASH /sa B146.FL1" with a blank (space) behind /sa.

sa stands for skip all (BIOS) checks here, BTW.

 

The thumb drive image is available from Mega.nz, feel free to improve it.

 

The DL is 800MB, mainly zero bytes, as the whole data content is merely 30MB.

I already took the smallest thumb drive (1GB) I could find. :(

I´m not aware of creating a smaller image file in Windows.

 

Regardless of the contrary told at many sites, a BIOS downgrade of a T420 is possible and not too hard to achieve.

If you are located in the EU and are tempted to buy one, this seller can be recommended -

presuming the ThinkPad is in good as new condition like mine : http://stores.ebay.de/jereist/_i.html?_nkw=T420&submit=Finden&_sid=29150972

Hey tluck!

 

Do you remember when you and I figured out that the í and 0 keys are swapped on the keyboard and you've implemented some changes (changing to ANSII maybe?) that solved the problem?

Today I've installed Sierra on my friend's T420 and on his machine these keys are swapped incorrectly :( So "0" key is next to left shift instead of being on the left side of the "1" key. On my machine the keys work fine...

How could this be?

 

Another thing. His machine has a 2540m CPU while mine has 2520m. His fan can run on 2000 RPM flawlessly and he has much lower temperatures.

In HW Monitor my heatsink is around 51 C degrees (124 F), while his is around 43 C (110 F)... That's a huge difference. I checked and he has a different heatsink, although looks the same. The FRU of his heatsink is 04W0627. Both systems were running in idle mode as much as possible, I was constantly checking in Activity Monitor.

I remember you also get 2000 RPM fan speed on idle mode. Do you think you can check the FRU on your heatsink as well to confirm if this is really the key to the lower RPMs?

 

Thanks.

@kanabiol - hmm no idea? are you using the standard DSDT and config.plist - which defines model as MBP8,1. there is a kextpatch to add VGA port.

 

@somez - LOL -  well no idea on keyboard thing! keyboard kext is compiled with ANSI default  - on mine `i is next to  1 key for Hungarian layout. 

 

post-954945-0-58525100-1481041247_thumb.png

 

on temps - have you replaced the grease under the heatsink to get better heat flow? if it is dry it may not conduct heat as well. will check my FRU when i can shutdown.

 

@kanabiol - hmm no idea? are you using the standard DSDT and config.plist - which defines model as MBP8,1. there is a kextpatch to add VGA port.

 

 

After a couple of reboots and turn off the VGA cable, as a result of the monitor is connected. But after turning off the monitor appears connected, although physically it is disabled

 

76f493f8a346d775aeb95ad8ada0cf16.png

@kanabiol - hmm no idea? are you using the standard DSDT and config.plist - which defines model as MBP8,1. there is a kextpatch to add VGA port.

 

@somez - LOL -  well no idea on keyboard thing! keyboard kext is compiled with ANSI default  - on mine `i is next to  1 key for Hungarian layout. 

 

attachicon.gifScreen Shot 2016-12-06 at 11.22.29 AM.png

 

on temps - have you replaced the grease under the heatsink to get better heat flow? if it is dry it may not conduct heat as well. will check my FRU when i can shutdown.

 

I see the same keyboard layout in preferences but it works differently despite the layout shown.

 

Regarding temps, yes I have applied a new paste a few months ago. I plan to take the machine apart and check if there is any dust blocking the vent exhaust.

Just to let the community my case.

 

I got this laptop for a Visual Studio Project, because I had only a Macbook Pro Retina

Lenovo T420i (Mexican Laptop) with ñ keyboard (Mexico Style)

Core i5 2520m, 8GB RAM, SSD, Intel 3000 HD (integrated)

Got this laptop for around $150 with bad battery, got new battery extended for $50 and profit.

1 year passed and I finish my project, Trade my MacBook Pro Retina for an Alienware 17 and then I was Macless and don't want to bother with the alienware because of Optimus and my desktop is compatble but I didn't want to bother with my long-term PC. So this laptop was the option for my OSX alternative.

I had the bios with 1.43, one day before trying to hackintosh I upgrade the bios to 1.49, then I realize my problem, after that I downgrade to 1.46 latest modded bios. I got a second hand Atheros Ar5bhb92 (because I don't want to use any kext, and this work oob) for less than $5 shipping included (thank mexico!) and start my journey to this. (I tried before hackintosh like 3 times but never did it like I really want.

 

I did my "own" way of doing this since I got problems so, the first thing is that my two 8gb sticks had problems with clover (it says that I don't have enough space) so I used another one of 64gb. Made my USB Boot with Unibest (Selected sierra) that installed clover, then remplace clover files with the one attached here, Passed boot startup, installed sierra, installed clover on HDD, everything good so far and with better performance than my old MacBook Pro Retina 2014.

 

Installed updated, homebrew and stuff.

 

So far, the only thing not working are the bright keys (up down) and that my keyboard it's mexican spanish with a lot of keys moved so even spanish don't help at all but I can live with that.

 

I did this in 3 nights so I feel really happy about it.

 

Thank you!

tluck,

 

I was thinking more about this CPU temp/fan issue. And 2 things popped up:

1. Could it be I have a faulty temp sensor in the machine?

2. On my friend's machine I was monitoring the "CPU pack average" value and most of the time it was able to go below 1 GHz. In my case values under 1 GHz are rarely seen or almost never. I've run the SSDT generation script on both machines. Is there a way I can confirm that my machine can use all the CPU power states it's capable of? I'm starting to think it does not go to low level power mode or something like that.

 

Thanks.

@OscarS - great story. glad everything is working out for you.

 

@Somez- do you have the modded bios where you can change the thermal settings? are they the same settings?

do have the same HD in each machine. a SDD runs a lot cooler. idle while writing this the CPU temps range from 41-44C (106-108F).  the FAN is running around to 1958rpm. 

my son has same computer but his runs a lot hotter for some reason.

post-954945-0-16574900-1481160294_thumb.png

@OscarS - great story. glad everything is working out for you.

 

@Somez- do you have the modded bios where you can change the thermal settings? are they the same settings?

do have the same HD in each machine. a SDD runs a lot cooler. idle while writing this the CPU temps range from 41-44C (106-108F).  the FAN is running around to 1958rpm. 

my son has same computer but his runs a lot hotter for some reason.

attachicon.gifScreen Shot 2016-12-07 at 8.27.26 PM.png

@OscarS - great story. glad everything is working out for you.

 

@Somez- do you have the modded bios where you can change the thermal settings? are they the same settings?

do have the same HD in each machine. a SDD runs a lot cooler. idle while writing this the CPU temps range from 41-44C (106-108F).  the FAN is running around to 1958rpm. 

my son has same computer but his runs a lot hotter for some reason.

attachicon.gifScreen Shot 2016-12-07 at 8.27.26 PM.png

Thermal settings in the bios? I haven't seen that. There is something like "balanced" and "max performance", but nothing more. What do you have?

 

Both of us have nearly identical ssd and hdd in optibay. Their temps are also the same.

 

post-1647866-0-66888100-1481198786_thumb.png

I was googling around and found https://github.com/Piker-Alpha/AppleIntelInfo

I loaded AppleIntelInfo.kext and then ran  sudo cat /tmp/AppleIntelInfo.dat command

 

The output only shows me P-States and no C-States. Is that ok?

 

CPU Ratio Info:

------------------------------------

CPU Low Frequency Mode.............: 800 MHz

CPU Maximum non-Turbo Frequency....: 2500 MHz

CPU Maximum Turbo Frequency........: 3200 MHz

 

IGPU Info:

------------------------------------

IGPU Current Frequency.............:  650 MHz

IGPU Minimum Frequency.............:  650 MHz

IGPU Maximum Non-Turbo Frequency...:  650 MHz

IGPU Maximum Turbo Frequency.......: 1300 MHz

IGPU Maximum limit.................: No Limit

 

CPU P-States [ (8) 21 30 ] iGPU P-States [ (13) ]

CPU P-States [ 8 19 21 (25) 30 ] iGPU P-States [ (13) ]

CPU P-States [ 8 (16) 19 20 21 25 30 ] iGPU P-States [ (13) ]

CPU P-States [ (8) 13 16 19 20 21 25 30 ] iGPU P-States [ (13) ]

CPU P-States [ (8) 13 14 16 19 20 21 25 30 ] iGPU P-States [ (13) ]

CPU P-States [ (8) 13 14 16 18 19 20 21 25 30 ] iGPU P-States [ (13) ]

CPU P-States [ (8) 12 13 14 16 18 19 20 21 25 30 ] iGPU P-States [ (13) ]

CPU P-States [ (8) 11 12 13 14 16 18 19 20 21 25 30 ] iGPU P-States [ (13) ]

 

 

when runnin the SSDt generation script in this guide I get the following output:

 

System information: Mac OS X 10.12.1 (16B2555)

Brandstring 'Intel® Core i5-2520M CPU @ 2.50GHz'

 

 

Warning: No ACPI Processor declarations found in the DSDT!

Using assumed Scope (\_SB) {}

 

Generating ssdt.dsl for a 'MacBookPro8,1' with board-id [Mac-94245B3640C91C81]

Sandy Bridge Core i5-2520M processor [0x206A7] setup [0x0603]

With a maximum TDP of 35 Watt, as specified by Intel

Number logical CPU's: 4 (Core Frequency: 2500 MHz)

Number of Turbo States: 7 (2600-3200 MHz)

Number of P-States: 25 (800-3200 MHz)

Adjusting C-States for detected (mobile) processor

Injected C-States for CPU0 (C1,C3,C6,C7)

 

Does the above warning mean any problem or it can be ignored?

×
×
  • Create New...