Page 5 of 11

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 26, 2016 1:42 am
by Tasurinchi
hamish wrote:Do you have any idea how you ended up with a bootable install image after having a fatal error?
Yes, after the error message I tried again (a bad habit from mine) and the second time I did not get the error message, so I (wrongly) assumed it worked.

I can try to reproduce the error by de-installing the package, retrying the patch again and post the results here, will do that tonight.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 26, 2016 1:51 am
by hamish
Tasurinchi wrote:Yes, after the error message I tried again (a bad habit from mine) and the second time I did not get the error message, so I (wrongly) assumed it worked.
No need, I was able to quite rapidly replicate that issue from your description.

It looks like there is something weird going on with the compile - I've never seen this before, but gcc still generates an output file, even though it had a fatal link error. Thus, on subsequent runs, it finds the "mec_encrypt" binary and assumes it is right.. (oh, and some similar things later in the process, but I'll look at one at a time ...)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 26, 2016 2:01 am
by Tasurinchi
hamish wrote:No need, I was able to quite rapidly replicate that issue from your description.
Cool, one less to-do for me :wink:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 26, 2016 2:14 am
by hamish
Tasurinchi wrote:
hamish wrote:No need, I was able to quite rapidly replicate that issue from your description.
Cool, one less to-do for me :wink:
And, I've patched the repo with some added robustness checks. Thanks for helping me reproduce the issue :-)

I still need to work out why the mec-tools are generating output when they actually failed to compile!
It looks like gcc is creating a temporary file with some of the early pre-processor outputs:

Code: Select all

file mec_encrypt
mec_encrypt: GCC precompiled header (version 014) for C

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 26, 2016 3:44 am
by Tasurinchi
Glad I could help! I hope to find a battered T430 soon :wink:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Wed Jun 01, 2016 1:54 pm
by plympton
Has anyone successfully done this on a T430s? If not, I'll be trying soon when my latest comes in from ebay.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Wed Jun 01, 2016 2:34 pm
by harryK
plympton wrote:Has anyone successfully done this on a T430s? If not, I'll be trying soon when my latest comes in from ebay.

I only applied the battery portion and works perfectly

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 03, 2016 2:37 am
by BrothahHeffay
harryK wrote:
plympton wrote:Has anyone successfully done this on a T430s? If not, I'll be trying soon when my latest comes in from ebay.

I only applied the battery portion and works perfectly
So you can successfully use t420s batteries with this now? I couldn't get it to flash, I kept getting error 081, could you please tell me what exactly you did?
Would be a huge help because I'd like to get battery and especially keyboard working. Thanks.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat Jun 04, 2016 12:22 am
by hamish
BrothahHeffay wrote:
So you can successfully use t420s batteries with this now?
All the supported laptops have a patch available in the repo to remove the battery validation - however, I have left that patch disabled by default at the moment.

(BrothahHeffay are also exchanging messages to try and sort out the errors he is seeing)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat Jun 04, 2016 4:46 pm
by RealBlackStuff
I have this (unknown) keyboard with FRU: 04W2753, P/N: 0B35709, ID NO: 1BX04E, MODEL: C9-USE.
Don't know where this KB belongs, but it is supposedly an X220 KB.
Can't find it in any HMM although it appears to be genuine.

I first tried it quickly in my X230 and it switched the X230 on, no problem either going into the BIOS.
So then I tried the keyboard-mod (cover pins 25/27/29 as per nitrocaster) on this one, but it did NOT work.
Then I UNdid the mod by removing the tape, put it all back together and tried it again in my X230.
Ouch! Immediately some smoke and brilliant light from a burn above the right half of the F5 key.
I immediately pulled the power plug, but the damage was already done.
DEAD keyboard, crap...

My X220 has the generally available NMB keyboard (in my case from a T510) with FRU 45N2211, P/N 45N2176.
Not giving up that easy, I tried that NMB-KB in the X230 (without a mod), and Lo and Behold: everything worked straight out of the box! No smoke, no burn!

@Hamish:
what exact classic keyboard have you been using in your X230 for the last few years?
Did you ever apply a mod to that?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat Jun 04, 2016 10:26 pm
by hamish
RealBlackStuff wrote:I have this (unknown) keyboard with FRU: 04W2753, P/N: 0B35709, ID NO: 1BX04E, MODEL: C9-USE.
Don't know where this KB belongs, but it is supposedly an X220 KB.
Can't find it in any HMM although it appears to be genuine.

[...]

@Hamish:
what exact classic keyboard have you been using in your X230 for the last few years?
Did you ever apply a mod to that?
I'll have to disassemble some laptops to get the exact FRU numbers, so I'll get back to you later with details.

However, with nitrocaster's warning and prompting - and a lot of visual inspection - eventually I did find that all three of my keyboards have a small burn-hole (see http://www.thinkwiki.org/wiki/File:X220 ... d_burn.jpg) in a similar place that you report seeing your large burn. Given that my keyboards were purchased from several vendors over a couple of years of time - I've been assuming (hoping?) that this small burn was the common failure mode.

By the way, dont throw out your broken keyboard - I'll take it off your hands. For a start, I'd like to do a post-mortem on it - but I'm also trying to use these keyboards in another project, so I can always use spare parts :-)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 4:46 am
by nitrocaster
RealBlackStuff wrote: So then I tried the keyboard-mod (cover pins 25/27/29 as per nitrocaster) on this one, but it did NOT work.
Maybe the tape is too thick? The trick is to isolate only these 3 pins. I used ordinary scotch tape.

I suppose, the broken keyboard could be repaired with conductive glue.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 7:28 am
by RealBlackStuff
The FRU 04W2753 is supposedly an Alps KB, but I can't find it in any "regular" HMM.
Could it be that the FRU number might indicate that the X230 and its ilk were initially planned with the same keyboards as X220?

I used Kapton tape for the mod, which perhaps may be a tad thicker than scotch tape.
Anyway, it's too late now. :(
I'll try it again with another NMB keyboard, wish me luck!

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 11:40 am
by RealBlackStuff
Just modded another T4x0 KB, an NMB 45N2211, using scotch tape this time.
Again no success.
I wonder if my first KB-"burn" also damaged the X230 motherboard.
Can't check it, as I don't have an X230 KB (yet)...

Question 1: do you put in the modded KB BEFORE or AFTER the EC-update?

Question 2: am I modding the wrong layer of the gold contacts?

..1.2 <-- layers (they are the //)
x//y
//========== keyboard
bottom
My tape (x) is on the left side of layer 1.
Should it be on the right side (y) of layer 2 instead?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 12:51 pm
by nitrocaster
RealBlackStuff wrote:Just modded another T4x0 KB, an NMB 45N2211, using scotch tape this time.
Again no success.
I wonder if my first KB-"burn" also damaged the X230 motherboard.
Can't check it, as I don't have an X230 KB (yet)...

Question 1: do you put in the modded KB BEFORE or AFTER the EC-update?

Question 2: am I modding the wrong layer of the gold contacts?

..1.2 <-- layers (they are the //)
x//y
//========== keyboard
bottom
My tape (x) is on the left side of layer 1.
Should it be on the right side (y) of layer 2 instead?
1. Doesn't matter.
2. http://i.imgur.com/Lx41VMw.jpg

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 2:08 pm
by Tasurinchi
These last posts reminded me that I promised to do some pictures of my KB mod.

Pic 1

Pic 2

Mine has also the burned mark :(

Keyboard FRU is 45N2156

Edit: I hope the pics help, I had to put the tape between the layers, otherwise it wouldn't work (see my previous post somewhere up in this thread)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 2:12 pm
by RealBlackStuff
@nitrocaster:
Thanks , the keyboard is working now!
Q2: it was indeed the right side (y) of layer 2.
Next steps: update the EC for X220 and remove battery-check and whitelist.


@Tasurinchi:
Your tape is on the right side of the left layer (1), my tape is on the right side of right layer (2) if you understand my primitive drawing.
(or in between the two layers, if you like)
Strange that it works for you...

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 2:19 pm
by nitrocaster
Tasurinchi wrote:Edit: I hope the pics help, I had to put the tape between the layers, otherwise it wouldn't work (see my previous post somewhere up in this thread)
There's no pads between the layers. Does it work now?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sun Jun 05, 2016 3:34 pm
by Tasurinchi
RealBlackStuff wrote:Your tape is on the right side of the left layer (1), my tape is on the right side of right layer (2)
I think I got it, but that didn't work for me. I tried to describe my attemps in my old post here: click me
nitrocaster wrote:There's no pads between the layers. Does it work now?
Yes, it works fine, it's actually working since May 23rd :wink:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon Jun 06, 2016 9:19 am
by RealBlackStuff
hamish wrote: I have added his x230t patch to the repo, but not confirmed it looks OK or anything. I will try and find some time next week to look closer at that. However, I am not able to test it as I dont have any batteries that are not authentic - so I wouldnt want to add it to any patchset by default...
Check out my battery extension-cord option: http://forum.thinkpads.com/viewtopic.ph ... 06#p680106

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 10, 2016 12:22 pm
by plympton
hamish wrote:
BrothahHeffay wrote:
So you can successfully use t420s batteries with this now?
All the supported laptops have a patch available in the repo to remove the battery validation - however, I have left that patch disabled by default at the moment.

(BrothahHeffay are also exchanging messages to try and sort out the errors he is seeing)
How does one enable the patch? I just flashed a t430s and the keyboard is obviously working (well, the stock keyboard has been remapped), but I get a "battery won't charge hit <esc>" error at bootup. I'm more than happy to be a tester. I followed the instructions on the github page but haven't looked at the build scripts to see if the patch is just commented out or something.

Thanks!
-Dan

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 10, 2016 12:24 pm
by plympton
Semi off-topic, but has anyone looked into or made any progress on bypassing the whitelist wifi check similar to the battery bypass? I'd like to make a "classic" t430s (mostly for fun), and hackintosh it, but the mac requires atheros cards. A t420s makes an awesome hackintosh. :-)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 10, 2016 9:14 pm
by hamish
plympton wrote:
hamish wrote:
All the supported laptops have a patch available in the repo to remove the battery validation - however, I have left that patch disabled by default at the moment.
How does one enable the patch?

Thanks!
-Dan
The patches that are applied to the firmware are in the subdirectories "*.img.d" - only the patch files that match "*.patch" are applied when the new image is built.

In your case, this directory is "t430s.G7HT39WW.img.d", and you could enable the battery patch with

Code: Select all

mv t430s.G7HT39WW.img.d/006_battery_validate.patch.OFF t430s.G7HT39WW.img.d/006_battery_validate.patch
You can also disable the keyboard patches by renaming all the other files.

There have been at least two people confirming that the battery patches worked on a couple of laptop versions, but not all hardware, so yes, your test report would be good to have. However, I'm also still a little unsure about the longer term ramifications of enabling it by default - so I'm hedging my bets and waiting to hear if there is any fallout people who have done that patch..

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 10, 2016 11:21 pm
by plympton
hamish wrote:
plympton wrote:
How does one enable the patch?

Thanks!
-Dan
The patches that are applied to the firmware are in the subdirectories "*.img.d" - only the patch files that match "*.patch" are applied when the new image is built.

In your case, this directory is "t430s.G7HT39WW.img.d", and you could enable the battery patch with

Code: Select all

mv t430s.G7HT39WW.img.d/006_battery_validate.patch.OFF t430s.G7HT39WW.img.d/006_battery_validate.patch
You can also disable the keyboard patches by renaming all the other files.

There have been at least two people confirming that the battery patches worked on a couple of laptop versions, but not all hardware, so yes, your test report would be good to have. However, I'm also still a little unsure about the longer term ramifications of enabling it by default - so I'm hedging my bets and waiting to hear if there is any fallout people who have done that patch..
Got it, thanks! The first time I did it, it failed. At first I thought I had to reflash stock (so I did), but then found the problem. Double checked, and there was an extra line in the 006 patch file - something about removing a HEX file. I deleted that in VI, and re-ran it. Rebuilt the stick, reflashed the EC, and good to go - no more error at boot-up! Hooray!

Also, on the Github page, there's a typo (at least on my version of Ubuntu live). This line:
lsblk -d -p -o NAME,SIZE,LABEL
should be
lsblk -d -P -o NAME,SIZE,LABEL (capital P)

Thanks for the tips & hard work!

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri Jun 10, 2016 11:39 pm
by hamish
plympton wrote: [...]there was an extra line in the 006 patch file - something about removing a HEX file. I deleted that in VI, and re-ran it.
whoops, that line shouldn't have been there - I've committed a fix for that
plympton wrote:
Also, on the Github page, there's a typo (at least on my version of Ubuntu live). This line:
lsblk -d -p -o NAME,SIZE,LABEL
should be
lsblk -d -P -o NAME,SIZE,LABEL (capital P)
Oh great! Another weird difference.. Are you able to paste the output you got with both upper and lower case? I've confirmed that the lowercase 'p' is what I intended (and not a typo) but if there are inconsistent versions out there, I can just delete that option...

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon Jun 13, 2016 8:49 am
by RealBlackStuff
Before I do this EC-update for the KB, I'd like to know if I can UNdo it by just reflashing the Lenovo BIOS.
(in that case I assume the battery-check and whitelist-removal have to be redone again...).

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon Jun 13, 2016 9:03 am
by hamish
RealBlackStuff wrote:Before I do this EC-update for the KB, I'd like to know if I can UNdo it by just reflashing the Lenovo BIOS.
The Lenovo BIOS update will think you dont need an update - the version numbers will be the same. However, you can build a boot image with none of the patches and use that to reflash the unmodified EC firmware. To build this unmodified image, rename all the files in your specific *.img.d/ subdirectory to end with ".OFF" (or anything that is not "*.patch")

This is just a very overly complicated - and automated way - of doing essentially an edit the original Lenovo ISO to remove their autoexec.bat and then manually running the dosflash tool (an example commandline for dosflash is given in the docs/HACKING.txt file)

Good luck!

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue Jun 14, 2016 10:38 pm
by gtxaspec
Hello! I have looked through this thread, and just had some questions:

I am confused to whether ALL the keys and Fn combinations have been unlocked, Fn-Space, Fn-Arrow Keys, etc.

I read earlier that some of these were still not working. I just purchased an X230 based on the success of this mod. Once I receive it I will absolutely be doing this mod as soon as I open the box! Just wondering if anyone could clarify some specifics.

Thank You!

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue Jun 14, 2016 11:11 pm
by hamish
gtxaspec wrote:Hello! I have looked through this thread, and just had some questions:

I am confused to whether ALL the keys and Fn combinations have been unlocked, Fn-Space, Fn-Arrow Keys, etc.
Yup,
Essentially "all" the keys are working.

There are only three keys combos that have not been made to work:
  • Fn+Space ("zoom" - I never used it, so I dont know that it ever did anything much)
  • Fn+Battery (It might be possible to remap this, but I didnt see it as very important, and there were some complications)
  • Fn+Hibernate (This should be possible to make go, but the existing data in the firmware concerned me, so - out of cautiousness - I left it unworking)
Additionally, the Capslock light doesnt work on the classic keyboard.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue Jun 14, 2016 11:55 pm
by gtxaspec
I see! Thank you for clarifying. Perhaps these remaining missing keys are able to be remapped in windows? Can anyone share any success stores regarding this (if attempted)? I use Fn-Space quite often, it handles the Lenovo Zoom utility to lower the resolution on the fly to enlarge the screen (useful when you need extra detail, or if your eyes are bad like mine.)

Do you mind sharing any more detail on which problems you encountered in the keyboard mapping tables in regards to the keyboard matrix?

Thank You so much!