Archiv der Kategorie: ThinkPad

Replacing the Wifi card on a Lenovo Thinkpad T420

A journey has ended! I have finally replaced the wifi card on my Lenovo Thinkpad T420. This is my Story:

I bought this computer at the beginning of 2012 to replace my old Samsung R560, which was  three years old and still kicking, but it had a couple of those annoyances that laptops which are made for entertainment have: A glossy hull, useless extra media contol keys and the the inability to be opened with one hand. So I kept that machine as a secondary computer and purchased my T420 because I thought the Thinkpad T-Series are glamour free work horses. I also assumed the device would function under Linux without problems. And I was almost not let down: The T420 is performing like a beast, highly portable and has an insane battery lifetime even under Linux. The only problem was that the wifi seemed to have some problems.

I had random connection failures where no data would come trough even though the connection was still displayed as active, sometimes it wouldn’t connect at all and all that was dependent on the wifi infrastructure. (It worked almost flawlessly at home but problems arouse at any other place including my university (which is a big  deal obviously)).

Initially I thought it must be a linux/driver issue and searched around the web. Eventually I pinned the problem down to my Wifi card, a „Realtek 8188CE“. The sole mentioning of that name in a forum will get people to offer condolences. Apparently the issue is not Linux specific, but it’s worse there. I tried downloading and compiling the latest driver from Realtek with no success. So I quickly made the decision that the module has to be replaced. Replacing the hardware turned out to be easier than I expected. The real problem was to get the device to accept the new card.

Lenovo ships their laptops with built in white lists in the BIOS which checks Wifi and WWAN cards for a Lenovo branding, a so called FRU number. If  it finds an unbranded module it will refuse to work.

So I contacted Lenovo and asked where I could purchase such a branded card. The answered with a generic e-mail saying „please find a list of our licensed stores attached“ with a list of all online shops known to man as an attachment. So I found a fitting card at Cyberport.de where I also bought the Thinkpad, contacted them and asked about the branding. They said they were not sure but assumed it would work. When the card arrived I quickly put it in only to be greeted with a friendly message claiming to have found an „unauthorized network card“. „Computer says nah…“ (By the way: After I explained this to Cyberport on the phone they offered to take the card back. Thumbs up!)

When you see this... you're screwed!
When you see this… you’re screwed!

So no branding on that card. I contacted Lenovo support again this time via phone. The stressed lady with a foreign accent collected all my personal information before letting me ask any questions. After I told her about my problem I got an answer that boils down to this: „If you’r card is not from Lenovo it will not work. This is not a defect so I cannot help you! Linux??? We are not supporting Linux. Good bye.“

The weirdest thing is that neither her nor her colleagues answering to my e-mails could tell me where I could actually buy a Lenovo branded card. I made it explicitly clear that I do not want this to be treated as a warranty request or anything. I wanted to buy a wifi card… you know…. with money. No chance. All I got was the generic list of „authorized dealers“. Apparently Lenovo disallows the use of third party cards without offering cards themselves… so…. no cards for you!

Eventually someone in the Lenovo Forums provided me with the FRU numbers of some of the wifi cards Lenovo uses. Searching for those directly yielded some results and I was eventually able to buy a used „Intel Centrino Advanced-N 6205“ from a German online store. The card arrived today and I was finally able to boot with a non crap card. Linux automatically loaded the drivers and all I had to do is re-entering the WPA-2 key for my home network. I have yet to test the card on other networks but I am really optimistic. The remainder of this article will be a short how to on the issue.

How to replace the card

If you want to replace your card you need to make sure that you chose a compatible one. The most obvious thing to check is the number of antennas: If the new card has more antennas than the current one, you need to install additional antennas behind the screen and I guess you don’t want that. So check how many antennas your card has (the Realtek 8188CE has two) and chose a replacement accordingly.

Then try to find out the FRU number of this device, I found my number in the Lenovo Forums but I guess contacting support is also worth a try.

Now search for the FRU number directly. It is my understanding that you can’t buy new Lenovo branded modules so you need to find a used one. If you live in Germany or do not fear shipping costs check out www.nbwn.com, they have a great selection of used notebooks and parts.

Once you obtained a card follow the instructions in this video to replace the old card or my following step-by-step instruction pictures:

Flip the notebook over and remove the screw from the memory cover.
Flip the notebook over and remove the screw from the memory cover.
Remove the screw that keeps the keyboard in place.
Remove the screw that keeps the keyboard in place.
Flip over the device again, push the keyboard towards the screen and lift it up. Be careful not to damage or disconnect the cable.
Flip over the device again, push the keyboard towards the screen and lift it up. Be careful not to damage or disconnect the cable.
Remove the antennas (blue circles) and the screw.
Remove the antennas (blue circles) and the screw.
Take out the card.
Take out the card.

Now insert your new card and re-assemble your device.

Thinkpads throttle CPUs down when battery is removed

I was pretty sure that the proper way to treat your laptop battery, if you want a long fulfilling life for it, is to remove it from the laptop when you are connected to an AC adapter. After all the lifespan of a laptop battery (or any rechargeable battery) depends largely on the number of charging cycles. Now if you leave the battery in the computer when it’s connected to the AC adapter, it will drain it just a little bit and then recharge it again over and over. This is true at least for the default setting of Lenovo ThinkPads (as you can read here).

Now let me back up here a little: Today I noticed one of my current programming projects performance dropped significantly over night. I ran a benchmark last night and the same this morning without any major changes, but got much worse results. So I looked for the reason in the code, reverting my recent changes (which should not affect performance at all, but just to be sure). Just before I started to believe in black magic and question my sanity, I thought maybe the reason isn’t in the code after all but my computer is just somehow slower. So I did a little research and finally noticed something odd in the output of cpufreq-info for all 4 cores:

  analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.30 GHz
  available frequency steps: 2.30 GHz, 2.30 GHz, 2.00 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
  available cpufreq governors: powersave, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

What? „Frequency should be between 800 MHz and 800 MHz?“ That’s a rather tight margin! Of course this would explain the performance drop, but where does this come from? Changing the governor or setting the frequency manually did not change anything. Some web research showed that I was by far not the only one experiencing the problem and that can have multiple reasons. Explanations include kernel bugs and overheating CPUs. I could exclude the overheating and did not want to believe in kernelbugs yet. So I looked on and finally found an issue affecting Lenovo Thinkpads exclusively:

According to this article from ThinkWiki, the included AC adapters 65W are not enough to provide enough power to the system when it is on full load, so the BIOS decides to set the frequency to the lowest value and keep it there, if no battery is found. The article also offers a quick fix to this: Add processor.ignore_ppc=1 to your parameters in /boot/grup/menu.lst and everything will be fine. I tried it and yes, it really fixes the problem, but it’s not supposed to be safe as it doesn’t change the fact that the adapter doesn’t supply enough power. So when on full load the system can crash, I guess. So far it hasn’t for me.

So this leaves me with three options:

  1. Use the fix described above and risk the possibility of crashes.
  2. Leave the battery inserted always and risk decreasing it’s lifetime.
  3. Buy a stronger AC adapter. There are 90W and even more powerful ones available (but the 90W is enough for the T420; see this thread)

I have not decided yet, but am probably going with option three, since the extra adapter costs less than 20€.

Anyway, I’m a little angry at Lenovo now. I mean if they ship an inferior Adapter with my laptop, they could at least tell me. (People in this thread argue, that it is not inferior, because it is smaller and lighter and thus easier to carry.)