Thinkpad R400

After years of service, I finally retired my trusty old Dell. The HD crashed, again, and I promised myself I would get a new laptop when it was time to replace the third disk. I also promised my next laptop would be a thinkpad, so I’m typing this on a Lenovo thinkpad R400. The budget model, it has a 14.1″ screen and coreduo processor, so I can go wild installing operating systems in vmware.

Mostly everything worked out of the box, but of course, the devil is in the details. Because Mandriva sales pissed me off recently, i decided to give debian a try. It is all the hype among geeks nowadays. What did not work right after I installed ‘lenny’ (yes, debian uses stupid mnemonic version names instead of numbers like sane people) was the wifi and suspend/resume. Yes, notorious items, I know.

Wireless was easily fixed by installing the latest linux kernel (2.6.28). However, the compiled version available from apt-get didn’t work out for me, because vmware needs the kernel headers and for some reason the debian team never got around to properly uploading those to the repositories. So, with some help I found out the procedure to create a debian package from a kernel source pulled from kernel.org:

  1. Download kernel into /usr/src (eg cd /usr/src ; wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.7.tar.bz2);
  2. Unpack (eg tar -jxvf http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.7.tar.bz2);
  3. Configure the kernel (I did so by a ‘make menuconfig’ and then importing the 2.6.26 configuration from /boot);
  4. Build it ‘the debian way’ (which is make-kpkg clean ; fakeroot make-kpkg –revision=custom.1.0 kernel_image);
  5. Now install the kernel (cd .. ; dpkg -i linux-image-2.6.28.7_custom.1.0_amd64.deb);
  6. Finally, you need to regenerate the initramfs (cd /boot ; mkinitramfs -o /boot/initrd.img-2.6.28.7 2.6.28.7);
  7. And upgrade grub (update-grub);
  8. Done!

So that worked nicely for me. One small bug remains: kernel crashes when I connect to an airport extreme wifi thingy. I blame Apple :)

On to suspend / resume. Suspend worked nicely, but on resume the backlight would not come on. I could see that the machine resumed and I tried various solutions to get the backlight lit again, in the end I found that a combination of chvt and vbetool did the trick. To make it work, I put the following content in /etc/pm/sleep.d/00LCD (the name is arbitrary, and you probably want to use something else than00 to start with):

#!/bin/sh
# Enable backlight after suspend

. “${PM_FUNCTIONS}”

case “$1” in
thaw|resume)
/usr/bin/chvt 1
/usr/sbin/vbetool post
/usr/bin/chvt 7
;;
*)
;;
esac

It is a bit of a hack, but it does the trick for me. I do a ‘chvt 1’ because according to man vbetool, you should do a ‘vbetool post’ only from console because it interferes with X.

So, i’m quite happy with my new laptop. The keyboard is comfortable, the touchpad has nice scrolling features, the on-board UMTS/HSDPA interface works like a charm and it is much faster than my previous laptop. I think it’s a keeper.

Flattr this

4 Responses to “Thinkpad R400”

  1. ReinoutS Says:

    I don’t know how Mandriva sales department pissed you off, but it doesn’t reflect on the quality of the product does it?
    Debian doesn’t have a sales department; you could simply download the Mandriva Free edition as well.

  2. gmc Says:

    Reinout, no it doesn’t reflect on the quality of the product, that’s true. It’s just that when you financially support a project by buying their distro, you’d expect some kind of ‘thanks’, instead of just being ignored when you ask a reasonable question. In the past, when you paid for the pwp, you’d get access to the different torrents (32-bit, 64-bit, …). Now, you get 9 days of access to an FTP server, which is so slow that in those 9 days you can download exactly one DVD iso. I guess you have to pay twice if you want both the 32-bit and 64-bit version. I say ‘i guess’, because after 5 mails over 2 months, i still dont have a reply as to what is going one. I just don’t quite like that kind of business model.

    Then again, maybe by buying the pwp, i’m not supporting the project at all but merely some CEO that’s getting big bonuses out of it. I must admit, I didn’t research the funding structure thoroughly.

    Anyway, debian runs like a charm. True, it lacks some of the nicer user-friendliness features mandriva has, but I get by.

  3. ReinoutS Says:

    Hmm, I still have access to PWP torrents on http://club.mandriva.com/xwiki/bin/view/Downloads/MyTorrents – but I don’t know if you automatically get an account upon buying at the store. In any case, I have the iso for you if you’re still interested.

  4. gmc Says:

    Had to edit the script a bit when i reinstalled debian after a hd crash:

    #!/bin/sh
    # Enable backlight after suspend

    . “${PM_FUNCTIONS}”

    if [ “$1” = “resume” ]; then
    /usr/bin/chvt 1
    /usr/sbin/vbetool post
    /usr/bin/chvt 7
    fi

Leave a Reply