IBM ThinkPad T42

From ArchWiki
Revision as of 20:43, 28 January 2010 by Thayer (talk | contribs) (Do not use -Sy when installing packages)
Jump to: navigation, search


This page describe a step-by-step guide to install Arch Linux on IBM Thinkpad T42. The Arch version used was 2008.06 (Overlord, 2008-06-24). To get more details about the laptop model, visit ThinkWiki[1] page on the T42 is indispensable and makes for easy reference. Informations about how-to proceed a basic Arch Linux installation, please follow up The Beginners Guide prior to follow this document.

Materials (what you'll need):

  • Internet connection like wired. There are instructions to configure wireless connection below;
  • 3 reboots ;-)


  • Add a user with rights to perform general computing tasks by including the user in the following groups: audio,lp,network,optical,power,storage,video (no comma separation)
 $ adduser <login name>
  • Arch Linux shows the messages that appeared during the boot process. You can remove the first line in /etc/issue file if you wish, which is a "clear screen" escape code.
  • Add/change mirrors for repositories within /etc/pacman.d/mirrorlist before your first upgrade of your system. This will ensure a speedy installation with fewer opportunities for network interference (broken connections, power outages) as is throttled with a maximum bandwith limit:
 $ pacman -S pacman
 $ pacman -Syu
  • Assuming an installation from the Core installation disc, reboot the system to initialize and run the newly updated kernel.


  • Restore dotfiles and configurations files from your backup
  • Install screen terminal multiplex
 $ pacman -S screen
  • Change Console Fonts to Terminus. Install with:
 $ pacman -S terminus-font
  • Edit /etc/rc.conf, changing to CONSOLEFONT="ter-v16b"

Setup Iptables

Type thouse commands below:

 $ iptables -N open
 $ iptables -A INPUT -p icmp -j ACCEPT
 $ iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 $ iptables -A INPUT -j open
 $ iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset
 $ iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
 $ iptables -A INPUT -s localhost -d localhost -j ACCEPT
 $ iptables -P INPUT DROP
 $ iptables -P FORWARD DROP
 $ /etc/rc.d/iptables save | start
 $ iptables -L

Coloring manpages

Install most:

 $ pacman -S most

To get it up and running change the /etc/man.conf file and change the PAGER and BROWSER variable to:

PAGER           /usr/bin/most -s
BROWSER         /usr/bin/most -s

Shell completion

This is a very desirable feature that you will no doubt benefit greatly from, install it:

 $pacman -S bash-completion

After, please add the if statement below to your ~/.bashrc

 if [ -f /etc/bash_completion ]; then
     . /etc/bash_completion

Template:Box Note

Terminal mouse

Mouse support in the console is useful for many things, including programs such as Links and vim. To enable mouse support in the console, please install gpm:

 $ pacman -S gpm

Needs to change /etc/conf.d/gpm to support IBM Trackpoints, replace the existing line with:

 GPM_ARGS="-m /dev/input/mice -t ps2"

Add gpm into DAEMONS array in /etc/rc.conf to have it started at boot.

Configuring sudo

Add sudo package:

 $ pacman -S sudo

To summarize, the following setup will satisfy most individuals, where USER_NAME is the individual's username:

  • add "YOUR_USER_NAME ALL=(ALL) ALL" to /etc/sudoers using command visudo
  • add "complete -cf sudo" to /home/USER_NAME/.bashrc
  • YOUR_USER_NAME to wheel group using command "gpasswd -a YOUR_USER_NAME wheel"

For more details, diferent hardware or problems solutions, please visit:


Install daemons:

 $ pacman -S hal fam acpid

Start hal, acpid and fam... after start it:

 $ /etc/rc.d/hal start
 $ /etc/rc.d/fam start

Template:Box Note

Edit DAEMONS array in /etc/rc.conf to add HAL and fam, remember that the other matters.

Configuring audio card

The Advanced Linux Sound Architecture (known by the acronym ALSA) is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Besides the sound device drivers, ALSA also bundles a user space library for application developers who want to use driver features with a higher level API than direct interaction with the kernel drivers.

Template:Box Note

The alsa-utils package contains the alsamixer userspace tool, which will allow us to configure the sound device from the console. (You may also run alsamixer from an X environment later.)

Install the alsa-utils package:

$ pacman -S alsa-utils

As normal, non-root user, invoke /usr/bin/alsamixer:

# alsamixer

Unmute the Master and PCM channels by scrolling to them with cursor left/right and pressing M. Increase the volume levels with the cursor-up key. (70-90 Should be a safe range.) Some machines, (like the Thinkpad T61), have a Speaker channel which must be unmuted and adjusted as well. Leave alsamixer by pressing ESC.

Sound Test it! Ensure your speakers are properly connected, and test your sound configuration as normal user using /usr/bin/aplay:

# aplay /usr/share/sounds/alsa/Noise.wav

Add the alsa daemon to your DAEMONS array in /etc/rc.conf to automatically restore the mixer settings on boot.

# nano /etc/rc.conf

More about ALSA? See


Refresh pacman package list and then install acpid:

* pacman -S acpid

Unless you already have HAL as part of your DAEMON array, add acpid to DAEMONS in /etc/rc.conf to have it start at boot-up. Else, omit acpid as HAL will call and start acpid.

To start acpid:

* /etc/rc.d/acpid start
* /etc/rc.d/acpid start

Then add thinkpad_acpi to your MODULES array in /etc/rc.conf

More about the ACPI daemon? See
More about thinkpad_acpi? See

Cpu frequency utils

The cpufrequtils package is available from the Extra repository:

# pacman -S cpufrequtils

Load kernel module for Intel processor:

# modprobe acpi-cpufreq
# modprobe cpufreq_ondemand
# modprobe cpufreq_powersave

To load the drivers automatically at startup, add the appropriate driver to the MODULES array within /etc/rc.conf. For example:

MODULES=(thinkpad_acpi acpi-cpufreq cpufreq_ondemand cpufreq_powersave e1000 slhc ipw2200 [...]

Edit /etc/conf.d/cpufreq as root, selecting the desired governor:

#configuration for cpufreq control
# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace

# valid suffixes: Hz, kHz (default), MHz, GHz, THz

Template:Box Note

Start the cpufreq daemon:

# /etc/rc.d/cpufreq start

Add cpufreq to the DAEMONS list in /etc/rc.conf.

DAEMONS=(syslog-ng cpufreq network netfs @crond alsa hal fam gpm)

For more details, diferent hardware or problems solutions, please visit:

Suspend and hibernate

To get Suspend and Hipernate, please install the pm-utils package, now available from the Extra repository:

# pacman -S pm-utils

In order for suspend2disk (hibernate) to work, we need to edit /boot/grub/menu.lst as root and add resume=/path/to/swap/drive (e.g. /dev/sda2) to the kernel options, for example:

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 resume=/dev/sda2 ro vga=0
initrd /kernel26.img

Because the pm-utils scripts must be run as root, you may want to make the scripts accessible to normal users by running sudo without the root password. To do so, edit the /etc/sudoers file with visudo, for example:

# visudo

add the following lines, replacing username with your own:

username  ALL=(ALL) NOPASSWD: /usr/sbin/pm-hibernate
username  ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend


username  ALL = (ALL) NOPASSWD: /usr/sbin/pm-hibernate,/usr/sbin/pm-suspend

before saving and exit visudo. You can now run the scripts without a password by simply typing:

$ sudo pm-hibernate


$ sudo pm-suspend

For more details, diferent hardware or problems solutions, please visit:


The MiniPCI slot on the T42 comes with 2 brands of wireless cards, with each brand having 3 different models. So we have a total of 6 different wireless cards. The most common to see are:

  • IBM 11b/g Wireless LAN Mini PCI Adapter (use madwifi)
  • IBM 11a/b/g Wireless LAN Mini PCI Adapter (use madwifi)
  • IBM 11a/b/g Wireless LAN Mini PCI Adapter II (use madwifi)

For atheros madwifi driver, use madwifi throught ath_pci module (Package: madwifi). Eventually you may prefer to use the newer module (since kernel 2.6.27) called ath5k. I'll focus on the old version one once its stability and, at least, fully functional with wpa encryption. To folow up instruction to install ath5k, please read this. To load madwifi driver, type:

modprobe ath_pci

If using ath_pci, you may need to blacklist ath5k by adding it to the MODULES= array in /etc/rc.conf, and subsequently prefixing it with a bang (!):

MODULES=(ath_pci !ath5k forcedeth snd_intel8x0 ... ...)

Template:Box Note

It is pretty standard fare to install these madwifi drivers; consult the main Wireless Setup document for detailed instructions, and if in doubt, always check the ThinkWiki pages[2]. If an Archer has experience with a T42 that uses the Intel PRO wireless card, please feel free to modify this document to inclube information about:

  • Intel PRO/Wireless LAN 2100 3B Mini PCI Adapter (use ipw2100)
  • Intel PRO/Wireless 2200BG Mini-PCI Adapter (use ipw2200)
  • Intel PRO/Wireless 2915ABG Mini-PCI Adapter (use ipw2200)

For more details, wireless encryption configurations or problems solutions, please visit:


To Install and configure X Window System prior to install a desktop enviromment, please proceed:

 # pacman -S xorg xf86-video-ati hwd

the open-source drivers will work to some degree on Radeon chipsets up. Now simply run the following command as root to generate automatic generate xorg.conf supporting radeon:

 # hwd -xa

Edit your xorg.conf, and add or make sure you have the following in their given sections:

Section "Module"
  Load  "glx"
  Load  "dri"
  Load  "drm"
Section "Device"
 Identifier "name"                     # your alias
 Driver "radeon"
 Option "XAANoOffscreenPixmaps" "true" #needed for aiglx
Section "DRI"
 Group        "video"
 Mode         0666

You should improve performance by tuning it. The following options apply to Section "Device" only.

By design, the open-source driver runs at AGP 1x speed. It is generally safe to modify this. If you notice hangs, try reducing the value or removing the line entirely.

      Option "AGPMode" "4"

ColorTiling is completely safe to enable and supposedly is enabled by default. People have noticed a performance increase when enabled via xorg.conf.

      Option "ColorTiling" "on"

Acceleration architecture; this will work only on newer cards. If you enable this and then can't get back into X, remove it.

      Option "AccelMethod" "EXA"

Page Flip is generally safe to enable. This would mostly be used on older cards, as enabling this would disable EXA. With recent drivers can be used together with EXA.

      Option "EnablePageFlip" "on" 

This will enable fast writes. This one can be problematic, so be prepared to remove it if you can't get into X.

      Option "AGPFastWrite" "yes"

Conclusion (not yet)

1. Restarting everything DONE
2. Back with more acpi details DONE
3. wireless DONE
4. Desktop suggestion
5. thinkpad buttons
6. Cleanup and release


Desktop suggestions:

About how-to install Arch Linux, see:

About the opensource ATI driver:

Are you curious? try this using your T42: