Papers  
 
The Linux/IBM Thinkpad T30 Page
Last Update: Friday, August 6 2004
Please notify me of any corrections or suggested additions

Jonathan A. Zdziarski
jonathan@nuclearelephant.com


The IBM Thinkpad T-Series is one of the most advanced, reliable, and over-performing laptop computers I have used, which is why for the PC plaform I not only use the Thinkpad T-Series laptops, but also paid out-of-pocket to have my own.

The IBM Thinkpad features a 3-Year easy-serve warranty which is accompanied by overnight shipping and 48-hour repair turnaround time, so if something does go wrong with your laptop, it will be fixed quickly. The T30 is also the perfect combination of performance and mobility, with the ability to host two lithium-ion batteries simultaneously, high-end Pentium-4 processor, and an excellent resolution (1400x1050x24). The T30 used to write this article is a model 2366-97U with the following configuration:
  • 2 Ghz Pentium-4M Processor
  • 512MB RAM (Extended from stock 256MB)
  • 60GB Hard Disk
  • Intel 802.11b WiFi and Bluetooth
  • Integrated Intel Ethernet and Modem
  • HL-DT-ST GCC-4160N CDRW/DVD
  • 14.1" TFT Active Matrix Display 1400x1050x24
  • ATI Radeon Mobility 7500
  • Touchpad and UltraNav
  • IBM Embedded Security Chip

This article will discuss the various components of the T30 and provide useful tips for running Linux as the primary operating system. RedHat 9 and Fedora Core 1 were the primary distributions used in this article, however it should be possible to install just about any flavor of Linux you like. I have heavily customized GNOME to look like OSX (even added an Apple Logo since I believe my T30 is a Mac at heart). If you'd like help doing the same, please contact me. If you have additional information to contribute to this article, please contact its author.

Display
The video card is an ATI Radeon Mobility 7500. XFree86 4.3 suppors this with the radeon driver. If you plan on taking advantage of the Radeon's 3D capabilities, you will also need to load the direct rendering interface and glx drivers. This file contains a working XFree86 configuration file.

By default, XFree86 uses software rendering for 3D which is extremely slow and why you are getting poor frame rates with Chromium, 3D screensavers, etc. To get the 3D working correctly, you will need to load agpgart, direct rendering, and glx. The bad news is that 16MB of VRAM is only good for supporting 3D at 1400x1050 with 16-bit color depth, so you'll need to drop down to 16-bit in order to use any 3D games or screensavers. I decided to run my T30 at 24-bit without 3D, and just manually change it if I feel like playing a game, but whatever works for your specific needs is appropriate.

The latest DRI drivers can be found here. The agpgart and glx modules are included with RedHat 9 distribution. To enable 3D, install the latest DRI drivers and then follow these steps:
  • Add 'modprobe agpgart' and 'modprobe radeon' to your startup scripts (in that order)
  • Add the DRI and GLX drivers to your XF86Config (as shown in this file).
  • Drop your color depth down to 16-bit in your XF86Config and restart X.
To confirm that direct rendering is enabled, do a "glxinfo | grep direct". You should see the following line:

direct rendering: Yes

If you see 'No', then you have probably done one of two things: not dropped your color depth and restarted X, or not loaded the agpgart and radeon modules correctly. To see if they are loaded, use lsmod. You can also check /var/log/XFree86.0.log for WW (warnings) or EE (errors).

Once direct rendering has been enabled, you should be able to play Chromium at full speed and your 3D screensavers should have a much better framerate. Running glxgears, you should experience between 1800-2200 fps.

Dynamic 3D X-Server Creation
After several hours of researching and experimenting, I found that it is possible to leave your primary desktop at 24-bit color depth and spawn a new X-server with 16-bit color specifically for playing 3D games. This allows me to watch DVD's and play games whenever I want without having to restart X:

First, you will need to create a new XF86Config file (or at least add a 16-bit color depth to the existing one). I preferred the first option, and created XF86Config.3D in /etc/X11. Doing so allows me to tweak other options as well.

Next, you'll want to create a shell script to launch your favorite game. Lets use chromium:
/usr/X11R6/bin/X :1 -xf86config XF86Config.3D -depth 16 -auth /var/gdm/:1.Xauth vt8 &
DISPLAY=:1.0
export DISPLAY
chromium
DISPLAY=:0.0
export DISPLAY

Finally, make sure all of your drivers are pre-loaded at system boot (agpgart, radeon, etc), and run the script as NON-root. A new X-Server will spawn with your game, which should be running at full render speed if everything was done correctly (you can spawn an xterm session this way to run glxinfo to be certain hardware rendering is active). To exit the X-Server, use CTRL-ALT-BACKSPACE. To switch between your desktop and the alternative X-Server, use CTRL-ALT-F7 and CTRL-ALT-F8. You may also want to check out /etc/X11/gdm/gdm.conf if you're thinking about running both desktops permanently - which is kind of cool if you plan on sharing the laptop with a friend or spouse and want to avoid switching logins.

Running Multi-Head
It is possible with the T30 to run an external monitor and laptop display simultaneously and extend your desktop. You will want to check out octo's guide to multiscreening for more information.


TV Out
It took me a long time to figure out how to get the TV-Out to work with my Radeon Mobility 7500, but it does in fact work. The first thing to do is install a tool called atitvout (you've probably already done this and pulled your hair out trying to make it work). Once the tool is installed, you'll need to reboot with the S-Video connected to the TV. I have not yet figured out a way to "reset" the video card so that it would be detected in real-time, but I'm sure there is a way (as Windows does it). Anyway, once you've rebooted, you can run "atitvout detect" to confirm that the TV is detected and connected to S/Video. Next comes the tricky part...

In order for atitvout to work, I had to create an X session using the vesa driver (instead of radeon). In order to do this, I had to create a copy of my XF86Config file (or xorg.conf if you're using Xorg) and change this line:

Driver "radeon"

to:
Driver "vesa"

You'll also need to set the resolution to 800x600 or lower for standard television sets. Save this new file as something like XF86Config.vesa. Now you have two options: you can either reboot and start X using this config, or you can simply create a dynamic X session from your normal all-purpose desktop. You can do this in much the same way as I previously discussed under Dynamic 3D X-Server Creation. Chances are, if you're wanting to get the TV to work, you want to watch a movie - so I've concocted this handy little script to automatically start up an X server and Mplayer's GUI in full screen mode:

#!/bin/bash
 
/usr/X11R6/bin/X :1 -xf86config xorg.conf.vesa -depth 24 -auth /var/gdm/:1.Xauth vt8 &
DISPLAY=:1.0
export DISPLAY
sleep 5
atitvout ntsc
atitvout -f t
gmplayer -vo sdl -fs
atitvout -f lc
DISPLAY=:0.0
export DISPLAY

As usual, when you're finished you can press CTL-ALT-Backspace to end the session or CTL-ALT-F7 to switch to your normal desktop.

NOTE: I haven't found a way to allow the TV and LCD to simultaneously function. It's presently either-or. GMPlayer also requires the use of a different video output device than the standard X11. This can be SDL, if you have SDL support (hence, -vo sdl) or vesa if you don't (-vo vesa).

S3TC Support
The Thinkpad T30's Radeon 7500 is not supported by ATI's video drivers, and so you're stuck with DRI's drivers. DRI has not yet implemented S3TC Support, which is required for some games. I have written a HOWTO that will explain how to enable S3TC texture compression support in the DRI drivers using an unofficial patch.


Eye Candy
One nice feature I recently found was called the starter bar, which provides an application toolbar with the same look and feel of the OSX toolbar. It's a significant improvement over the standard Gnome panel. The starter bar is a gDesklet application. gDesklets (and the starter bar) can be downloaded from gdesklets.gnomedesktop.org.



Along with the starter bar, you can also find many other great desklets on this site (including a great weather tool and another gdesklet allowing you to put IRC on your wallpaper). Think of gDesklets as active desktop on steroids. Why this is not part of standard Linux distributions irks me.

Networking
The T30's ethernet NIC functions out-of-the-box and no special installation should be required. The ifconfig tool can be used to manually configure the interface, however eth0 is configured to initialize at startup in RedHat 9. If you choose to disable automatic startup, you can use "ifup eth0" to initialize the ethernet interface using DHCP.

The Wireless 802.11b is an Intel-based card with a Prism 2.5 chipset. This chipset is supported by several drivers including HostAP, the linux-wlan-ng drivers available at http://www.linux-wlan.org, and the kernel's built-in orinoco_pci driver. I prefer the orinoco_pci driver as it is compatible with wireless extensions. To use the included driver, you'll need to create a script in /etc/sysconfig/network-scripts for eth1. You'll also need to add the following line to /etc/modules.conf:

alias eth1 orinoco_pci

If you'd prefer to use the linux-wlan drivers, you will need to compile the drivers in with the Kernel (and all subsequent kernels) and install according to the instructions. You'll also want to add an alias for wlan0 to your /etc/modules.conf file:

alias wlan0 prism2_pci

You'll also need to initialize the wlan module at startup. An init.d script is installed with the drivers, so you can link this to your /etc/rc.d scripts. I didn't have much luck configuring a static IP using ifconfig, so you may need to use the ifup script to activate the network. To do this, you'll need to create a file similar to this and put it in /etc/sysconfig/networking/devices/ifcfg-wlan0. Once you have accomplished this, you can activate the wlan0 interface by first running "/etc/init.d/wlan start" and then running "ifup wlan0". You can view AP information using iwconfig.

When switching between battery and a/c power, the wlan0 interface is reset. By playing with the /etc/hotplug scripts, you can make this a more comfortable transition.

Hotkeys
The Thinkpad has several special keys for adjusting system volume, brightness and contrast, and etcetera. The utility tpb has been written specifically for Thinkpad button control and is a very versatile solution complete with customizable OSD and full control over the buttons.

Bluetooth
Bluetooth support for Linux is still fairly new, however with the right drivers and software, I have successfully exchanged data with PocketPC handhelds as well as Linux and Windows laptops. The Bluetooth module is actually a USB device. To support it, you will need to first install the BlueZ bluetooth protocol stack. This will provide only commandline functionality. Be sure to read all the documentation as the configuration phase is quite lengthy involving some aliasing and the loading of several modules at startup.

For a complete bluetooth solution, install the GNOME Bluetooth Subsystem on top of BlueZ. The bluetooth subsystem is a graphical interface adding a "Bluetooth:///" location to Nautilus, admin tools, and even a simple file drop allowing others to send you files. The GNOME Subsystem is a bit tricky to install, so make sure you use the correct installation prefix and such. I had to bug the author a few times to get it to work. Also make sure you turn on Bluetooth before you try and use it =).

Intel Speedstep
You will most definitely want to "modprobe speedstep" or "modprobe speedstep-ich" at startup, depending on which version of the kernel you're running. This will load the kernel's speedstep module which will throttle the CPU when operating on battery power. If you don't load this module, the T30 will continue to run at full 2Ghz speed on battery, which will last all of about 45 minutes. With the speedstep module loaded, you can view processor frequency policy by doing a "cat /proc/cpufreq". You can also "cat /proc/cpuinfo" for some info about your bogomips, current speed, etc. You may also wish to add the following line to /etc/rc.local to automatically set the operating policy at startup:

sh /etc/sysconfig/apm-scripts/apmscript change

I've also found that setting the hard-disk spindown to 5 minutes and setting "laptop mode" in the kernel makes a slight change in battery life...although it is still pretty poor in Linux. You can add the following lines to your apmscript to turn on/off laptop power-savings features:

On
                        hdparm -S 60  /dev/hda
                        sysctl -w vm.laptop_mode=1

Off
                        hdparm -S 240 /dev/hda
                        sysctl -w vm.laptop_mode=0

Modem
The integrated modem is a Lucent LT Winmodem with an Intel sticker on it. The AMR SmartLink drivers work quite effective. You can activate the modem interface (dial out) from the Network Device Control system tool. The SmartLink drivers can be found here. I found that only the older version appear to work correctly. I use v2.7.9. Once you have compiled and installed it, add the following line to your startup scripts:

/sbin/modprobe slmdm country=USA

Mobile Phone Data Calls
If you happen to have a mobile phone capable of making data calls, the Linux ACM module will manage the process of tying your mobile modem to a device. I use a Verizon LG vx6000 to make mobile data calls to your ISP. You can also subscribe to DSL-speed data services which is nice. I found I had to compile a new kernel in order to get ACM to work, so I grabbed 2.4.24 and built it with the config from /boot. After that, it worked great. Simply attach your mobile phone via a USB cable, and then /dev/ttyACM0 can be used like a standard modem device to make data calls.

Bluetooth and the Motorola V710 (NEW!)
I recently picked up a Motorola V710, Verizon's first bluetooth-enabled phone. As of this writing, it was only available at limited Radio Shacks (the Verizon stores don't even have them yet, and most of the Verizon customer service reps were VERY envious). I was initially told by Motorola that the V710 was incapable of making data calls due to a bug in the firmware, for which a patch was going to be released sometime in Sep '04. I decided to hack on it for a little while anyway, and discovered that this bug must be an interoperability issue with the provided Windows software. I didn't run into any real problems making data calls with this phone other than the channel for dial-up networking being 8 instead of the usual channel 1. For those of you interested in the services available on this phone, an sdptool browse gave me plenty of useful information:

Service Name: Handsfree Voice Gateway
Service RecHandle: 0x10000
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100
 
Service Name: Handsfree Voice Gateway
Service RecHandle: 0x10001
Service Class ID List:
  "" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "" (0x111e)
    Version: 0x0101
 
Service Name: Dial-Up Networking Gateway
Service RecHandle: 0x10002
Service Class ID List:
  "Dialup Networking" (0x1103)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

There are already plenty of useful tutorials for setting up bluetooth on Linux, so I won't get in-depth...the interesting details are this: Essentially all you need to do is use the rfcomm tool to bind channel 8 of your V710 to rfcomm0 and then you can treat /dev/rfcomm0 like a modem. If you don't know the phone's radio HW address, you can use "hcitool scan" or "sdptool browse" to find it. The phone works like a charm, and you can use the same dialup information I've provided for the VX6000 to get on Verizon's network. A few minor caveats: in order to discover the phone, you'll need to select the phone's "Find Me" option under the Connections - Bluetooth menu in order to make it discoverable for a period of 60 seconds. This is no doubt a security feature to prevent people from arbitrarily bonding with your phone. Also, when you first connect to it, you'll need to exchange pins and will be prompted (on the phone) to bond with the device. Once this is finished, you should be able to enter the radio's MAC address into /etc/bluetooth/rfcomm.conf and configure your laptop to automatically bind on boot.

To browse the filesystem, I had to shell out the $20 for a usb cable. The futuredial cable for the V60, V120, and T720 worked just fine for me. I connected the phone to my USB port and was immediately able to browse the filesystem using bitpim...albeit slow at 19,200 baud. According to motorola, a firmware upgrade will be released adding OBEX support to the phone, so I'll be able to exchange files via bluetooth once this update is available. Until then, I use a transflash card as it's much quicker. Linux mapped the bluetooth device to /dev/usb/ttyUSB0, which is what I had to tell bitpim. Sadly, I don't see any way (yet) to replace the gay lavendar background on the front window (sorry folks). Hopefully they'll let me change this in the next firmware upgrade.

Suspend
The T30's suspend feature works well, however there are two caveats: screen blanking causes the display frequency to go out of whack, and the system goes into suspend whenever the lid is closed (generally not desired behavior). Both of these can be fixed by editing the BIOS settings to disable screen blanking, and choosing "No Suspend" as a lid close action. Again, you may also need to play with the /etc/hotplug scripts to manage your wlan0 interface.

Mouse
The UltraNav and touchpad work fine in Linux, however you will need to disable the touchpad in the BIOS to get the middle button to work correctly.

NTFS
If you plan on keeping your Windows partition and would like to mount it in Linux, consider the Linux NTFS Project. Install, then simply "modprobe ntfs" and you should be able to mount your Windows partition from /dev/hda1.

Other Ideas
If you've had some success with Linux on your T30 and would like to submit other ideas, please contact the author. I'd love to add more to this page as it progresses.



 All Website Content © 2003 Jonathan A. Zdziarski. All Rights Reserved.
Reproduction prohibited without permission