sp1r1t.org
you are here :[
-->networks--> linux on thinkpad R51]
base || news || coding || networks || linux || bioinf || stuff || contact
Using Linux on the IBM Thinkpad R51 Notebook
NOTE: This file is rather deprecated. It describes the installation of the old Debian Sarge distibution on the R51. I'm currently using Debian Etch on a ThinkPad T60 and I won't update this page anymore.
This document describes my experiences with the installation and configuration
of linux on the thinkpad r51. it is ment to help people who :
- consider buying such a machine and are not sure what efforts it
will take to get it running under linux
- own such a machine, want to use it under linux and neep help
setting it up
This document consists of the following parts :
1. intro
1.1 the hardware used
1.2 the software used
2. hardware check with knoppix
2.1 getting started
2.2 hardware support checklist
2.2.1 LAN
2.2.2 WLAN
2.2.3 graphics
2.2.4 sound
2.2.5 navigation / input devices
2.2.6 interfaces
2.2.7 power control
3. configuration of debian sarge
3.1 getting the wlan interface to work
3.2 getting the 3d acceleration of the Radeon 7500 mobility to work
3.3 getting the sound card to work
3.4 getting suspend to disk to work
3.5 getting thinkpad special keys to work
4. appendix
4.1 referenced / usefull external documents
4.2 my config files / dmesg output
4.3 building a new linux kernel
1. Intro
1.1 What we are talking about - the hardware
The exact name of the notebook I bought is IBM thinkpad R51 Centrino-1500 1829-DRG.
relevant hardware components :
cpu : Intel Centrino Pentium M 1.5 Ghz
ram : 512 MB DDR SDRAM
hdd : 40GB ATA-100 (Enhanced IDE)
optical drive : CDRW-/DVD
sound : SoundMAX
graphics : ATI Mobility RADEON 7500
wlan : Intel PRO/Wireless 2100 Network Connection 802.11b
eth : Intel PRO/1000 Gigabit Ethernet
the interfaces include IEEE 1394, parallel, RJ-11, RJ-45, USB 2.0 and
S-Video out.
More information can be found at the IBM website, the product page is at [
1 ]. Note that there are lots of different versions of the ThinkPad R51.
1.2 What we are talking about - the software
>ll software used is available for free from the internet. I used
two different linux distributions :
Knoppix 3.3 (bootable live-CD)
for the initial hardware check and to prevent the notebook from booting into that pre-installed OS*
Debian GNU/Linux sarge (testing)
permanent operating system, installation via the netinstaller CD available at
debian.org .
*) by the way : don't
forget to sell your license of that other OS and take care
when removing it from underneath the notebook!
2. Hardware check with knoppix
2.1 Getting started
The first thing i did after switching the notebook on for the first time
was to insert a knoppix dvd into the CD/DVD combo drive and boot into
linux. The knoppix version i used was 3.3, knoppix is a debian based linux
distribution available at
[ 2 ]. You may completely ignore
the knoppix part and start directly in the debian section
if you aren't interested in knoppix.
I didn't pass any boot options to the kernel, and knoppix did its job well -
the most relevant components worked at once. please note that the following
description is about what was recognized by knoppix at once and automatically,
without me doing anything. Remember that we are using knoppix only to have
a quick look at our system - you may completely skip the part on knoppix to get
debian running on your thinkpad.
Instructions on how to set up the rest once debian GNU/linux
is installed can be found in the debian section and should also apply to a
harddisk installation of knoppix - only difference is that some of the steps may
not be necessary on knoppix because knoppix comes with a kernel that has almost everything
compiled in by default. You may or may not like this, but for a live CD, it's the only way to go.
The complete dmesg ouput of knoppix 3.3 and debian
can be found in the appendix .
2.2 Hardware support check using Knoppix
2.2.1 LAN - Intel PRO/1000
The integrated Gigabit Ethernet card was recognized correctly.
After plugging the cat5 cable in, all i had to do was to click on
[KStart] -> KNOPPIX -> network / internet -> configure network adapter
and tell it to get its settings via my DHCP server.
If you think that dhcp sucks or don't have a dhcp server, edit /etc/network/interfaces
appropriately and do a etc/init.d/networking restart afterwards.
2.2.2. WLAN - Intel PRO/Wireless 2100 (802.11b)
The integrated WLAN adapter was not recognized. drivers for it
are under development and work very well, there is a sourceforge project that
can be found at
[ 3 ].
Another possibility is to use the ndiswrapper, but i haven't tried that yet
and see no reason to do so in the future.
It's not difficult to set the card up later under debian, see the
getting the wlan interface to work section
of this document for instructions.
2.2.3 Graphics - ATI Mobility RADEON 7500
The ATI card was recognized by knoppix and worked correctly,
but 3D acceleration was not available.
Getting 3d acceleration to work once debian is installed is
easy, see getting hardware 3d acceleration to work
in this document.
2.2.4 sound - SoundMAX / ac97
Sound card was recognized, sound worked.
2.2.5 Navigation + special IBM keys
The thinkpad R51 comes with both a touchpad and trackpoint. Both
worked at once, and 4 of the 5 buttons did so, too. The middle
button above the touchpad was not recognized.
Pressing [Fn]+[screen up] to switch the keyboard
illumination on worked.
Pressing [Fn]+[space] to zoom in did not work.
The keys to go back and forth in the web browser (left and right of
the [arrow up] key) did not work.
See the debian keys section for info on how to get them to work.
2.2.6 External Interfaces
The USB 2.0 ports were recognized. I plugged a 128 MB USB 1.1 memory stick in,
and mounted it as /dev/sda1 and could use it without problems.
2.2.7 Power Control
KDE indicated the correct state of the battery. Suspend to disk did not work.
See the debian section to see how to make it work.
3. Configuration of debian (sarge/testing)
To install debian sarge, you can download the netinstaller ISO
from the debian site and burn it
to a CD-R. the ISO is ~ 120 MB, the packages you need
in addition to that can be installed later via ftp using apt-get.
The installation of debian using the netinstaller is very easy and will
not be covered here. A note on partitioning : I used the entire disk for debian,
erasing everything that was preinstalled by IBM - including the "access IBM / rescue"-partition
at the end of the disk. This doesn't cause any problems (unless you really feel like
relying on windows to rescue you some day) ;-)
3.1 Getting the WLAN card to work
You should download and gunzip the tarball of the linux
driver for the Intel Pro 2100/Wireless 3b card from
[ 3 ] and
read the INSTALL document.
Check whether or not your kernel is ready for the wlan driver
as explained in the INSTALL document. As of now (july 2004), the
default sarge kernel is not, so i had to build a new kernel.
I suggest you build a 2.6.x kernel
instead of a 2.4.x kernel, but according to the INSTALL document of the
ipw2100 driver, it should be possible with both versions - only difference
seems to be that you need to load firmware in another way, as the way i used
requires sysfs, which is available in 2.6.x kernels only as far as i know.
Be sure to read the sections on ACPI, software supend 2 before building a new
kernel, you may have to do this multiple times if you start building your new
kernel right now. You can find some hints on building a new kernel in the
kernel build section . Once your kernel is ready, return here.
Ok, the kernel should now be ready. Let's build the wlan driver : cd into the directory
containing the driver source code, and do a make and make install.
Next step is to get the firmware from http://ipw2100.sf.net/firmware.php and cp it to
/usr/lib/hotplug/firmware. As it comes in .zip format, you may need to
apt-get install unzip before you can unzip it.
>ou should now be ready to load the firmware. Make sure you have set up an entry for
the wireless card in /etc/network/interfaces. as your LAN adapter should be eth0, the
wireless device will be eth1. Add something like this to /etc/network/interfaces if you want
to use dhcp :
# my WLAN adapter (811.b)
auto eth1
iface eth1 inet dhcp
If you would like a static ip setup, the entry will look similar to this :
iface eth1 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
>ou may now try ifconfig eth1 up or /etc/init.d/networking restart to
bring the interface up. To have more control over the configuration options of your card
(like encryption, ESSID, nickname, ...) i suggest you install iwconfig by doing
apt-get install wireless-tools . >nother tool that could prove useful if kismet ;-)
3.2 Getting the 3d acceleration for the Radeon 7500 mobilty to work
good news : there isn't much to do to prepare your laptop for quake3 ;-)
Have a look at your /etc/X11/XF86Config-4 file. It should
contain the following sections :
Section "Module"
...
Load "GLcore"
Load "dri"
Load "glx"
...
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Device"
Identifier "ATI Radeon 7500 mobility"
Driver "ati"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "ATI Radeon 7500 mobility"
Monitor "Generic Monitor"
DefaultDepth 24
...
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
...
EndSection
You may try to change the device section to the following to gain some performance :
Section "Device"
Identifier "ATI Radeon 7500 mobility"
Driver "radeon"
Option "AGPMode" "4"
Option "AGPFastWrite" "Yes"
EndSection
Reducing the color depths to 16 Bit (in /etc/X11/XF86Config-4) also gave a huge performance boost. You may want to test the performance using glxgears.
A copy of my XF86Config-4 file can be found in the files section of the appendix .
If 3d support doesn't work though you set up XF86Config-4 as described above, you may not
have a kernel with the radeon module,
AGP and DRI support (unlikely) and should compile
one now. That should do it.
Instructions on how to do this can be found in the
wlan section of this document. A kernel config file is also available, see
the files section of the appendix.
You should have an up-to-date version of X installed, under debian sarge, the version that
is installed by default should be ok. I have xlibmesa-dri 4.3.0.dfsg.1-4 and xserver-xfree86
4.3.0.dfsg.1-4 installed.
3.3 Getting the sound card to work
Though sound worked partially with the 2.6.6 kernel config, i had some problems. though
i could listen to mp3s and other files in KDE, i did not have any sound under quake3 and other
applications. I managed to get the sound to work completely now. here's how you can do that :
1) compile your kernel with ALSA support (you may use the 2.6.7 config in the appendix) and
the i810_audio module for OSS or the snd-intel8x0 module for ALSA (recommended).
2) install the alsa-utilities : apt-get install alsa-utils
3) run alsa-config, it will detect your sound chip automatically :-). this didn't work for me in the
beginning, installing module-init-tools fixed the problems.
4) use a mixer (try running kmix from an xterm if you're using KDE) to turn the
volume of your card up - it is set to be muted by default!
3.4 Getting suspend to disk (software suspend 2) and Power Management (ACPI/APM) to work
I suggest you use ACPI and don't integrate APM into the kernel.
If you want sws2 to work on your thinkpad r51, you need to compile ACPI support into your kernel. Be sure
to grab and apply the sws2 patch for your kernel version
(available at softwaresuspend.berlios.de ). Then make menuconfig
and select the sws2 options you want. Be sure to select a swap partition as resume target.
3.5 Getting Thinkpad Specialkeys to work
The Thinkpad R51 doesn't have that many special keys and getting them to work isn't very difficult. You can
get the FORWARD and BACK keys (next to the ARROW_UP key) to work using the xmodmap command. I suggest you
add the following lines to the file .Xmodmap in your home :
keycode 234 = F21
keycode 233 = F22
KDE and Gnome seem to ignore/discard the .Xmodmap, so you need to make sure it's processed in other ways. See
below for a suggestion. Please mail me if you have a better idea.
To get more of the special keys (FN + F1-F12) and an OSD to work, you should install tpb (Thinkpad Buttons). This can be done via apt-get. Note that you need nvram support in the kernel and xfonts-base-trancoded for tpb to work.
I start both the .Xmodmap stuff and tpb with a very short shellscript that i have placed in ~/.kde/Autostart. The script looks like this :
#!/bin/sh
#start tpb (thinkpad buttons)
tpb --osd=on --verbose --thinkpad="/usr/bin/X11/xterm -T ntpctl -e ntpctl"
#process .Xmodmap
xmodmap ~/.Xmodmap
4. Appendix
4.1 Referenced External Documents
[1] http://www5.pc.ibm.com/de/products.nsf/$wwwPartNumLookup/_TJ0DRGE?OpenDocument
[2] http://www.knopper.net/knoppix/
[3] http://ipw2100.sourceforge.net/
Usefull Links
Software suspend 2 patch : http://softwaresuspend.berlios.de/
ThinkWiki (Linux Thinkpad Wiki) : http://www.thinkwiki.org
ipw2100 WLAN driver : http://ipw2100.sourceforge.net/
IBM thinkpad acpi extras (integrated into vanilla kernel >= 2.6.10) : http://ibm-acpi.sourceforge.net/
Linux thinkpad mailing list :
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad/
Thinkpad special button support : http://www.nongnu.org/tpb/
4.2 My Configfiles and dmesg output
Note that the older ones may suck and therefore are no longer recommended.
dmesg of knoppix 3.3
dmesg of debian sarge with costumized kernel 2.6.6
dmesg of debian sarge with costumized kernel 2.6.7
dmesg of debian sarge with costumized kernel 2.6.10 sws2
kernel config for debian kernel 2.6.6 - NOT RECOMMENDED
kernel config for debian kernel 2.6.7 - NOT RECOMMENDED
kernel config for debian kernel 2.6.7 with apm - NOT RECOMMENDED
kernel config for 2.6.8.1 kernel.org kernel - NOT RECOMMENDED
kernel config for 2.6.9 kernel.org kernel - NOT RECOMMENDED
kernel config for 2.6.10 kernel.org kernel
kernel config for 2.6.10 kernel.org kernel with software suspend2 patch
kernel config for 2.6.11.6 kernel.org kernel (added IRDA support)
kernel config for 2.6.12.3 kernel.org kernel
kernel config for 2.6.17.9 kernel.org kernel
kernel config for 2.6.18.2 kernel.org kernel
kernel config for 2.6.19.1 kernel.org kernel
Usage instructions : after downloading and unpacking the kernel source
and setting up the symlinks as explained above, download the file and move it into /usr/src/linux and
name it .config. You may now
use the file by typing make oldconfig or make menuconfig as a base for you
kernel configuration.
Note : You should NOT use the file without modification (i.e. simply do a make bzImage without
running any config command) unless you are building a kernel version that matches the one i build using
the config file exactly. If you are
building a newer / other kernel version, use make oldconfig or make menuconfig first!
my XF86Config-4 file
4.3 building a new linux kernel
There are a lot of linux-kernel-compile-HOWTOs out there in the inet, for example
the official kernel HOWTO . It
is under revision at the time i write this and you can find the replacement
here .
Read one of them in you feel unsure. Here's the short version:
- install new mod utilities needed by 2.6.x : apt-get install module-init-tools
- download vanilla kernel sources from kernel.org
- untar sources in /usr/src, create symlink named linux to the directory :
ln -s /usr/src/linux-2.6.6 /usr/src/linux
cd /usr/src/linux
make clean
Note : You may want to apply patches at this time, for example the
software supend 2 patch .
- start kernel config and build process :
make menuconfig
Note that you may need libncurses5-dev to do this :
apt-get install libncurses5-dev
Note : This is the most interesting part. Select the necessary options like wireless support,
crypto library (see INSTALL) and other modules required for the thinkpad hardware. If you feel
unsure what to select, read the help sections of the options. >ou may also use my kernel config file, which can be found in the
files section of the appendix. Instructions on how to use it are there, too.
The example below is for the 2.6.6 kernel, replace this with your kernel version. Updated config files
for newer kernel versions can be found in the appendix.
make bzImage
make modules
make modules_install
depmod -a
- prepare kernel to be booted (you need to be in /usr/src/linux/):
cp arch/i386/boot/bzImage /boot/bzImage-2.6.6-jul-10
cp System.map /boot/System.map-2.6.6-jul-10
ln -s /boot/System.map-2.6.6-jul-10 /boot/System.map
- edit /boot/grub/menu.lst, add boot menu entry for new kernel image :
Note : This assumes you're using the grub bootloader.
title Debian GNU/Linux, kernel 2.6.6-jul-10
root (hd0,0)
kernel /boot/bzImage-2.6.6-jul-10 ro root=/dev/hda1
- reboot with new kernel. done.
base || news || coding || networks || linux || bioinf || stuff || contact