How to install Ubuntu_on_IBM_T23


I recently installed Debian on an IBM (Lenovo) Thinkpad T23. This is not exactly spectacular, but I ran into some small problems, which I want to write down as a reference for others.

My problems were:

You will find (my) solutions for these problems below.


The installation of Debian (sid - April 02006) worked smoothly - the graphic card (savage) was detected and everything seemed to be fine.

Only the output of glxinfo was strange, as it reported direct rendering: No. But the xorg log file reported a successful activation of dri.

Then I tried the following:

export MESA_DEBUG=verbose
export LIBGL_DEBUG=verbose

It reported a missing file. So I installed libgl1-mesa-dri (apt-get install libgl1-mesa-dri), which contains /usr/lib/dri/ Then it worked (as far as glxinfo tells you).

suspend to RAM (standby)

First you need to add acpi_sleep=s3_bios to your kernel boot options (preferably add it to the defoptions line in your /boot/grub/menu.lst and run update-grub afterwards).

Now you have to configure the acpi daemon to handle (e.g.) the closing of the lid. Put the following event handler into /etc/acpi/events/lid:

event=button[ /]lid

/etc/acpi/ could contain the following:

# /etc/acpi/
# beware: you need the ibm_acpi module to use the volume-related lines below


# save state of system clock to hardware clock
/sbin/hwclock --systohc

# emit a low beep
if [ -e "$BEEP_FILE" ]
  then  echo 12 >"$BEEP_FILE"
        # wait for the beep before turning off the volume
        sleep 1

# saving the current volume level and mute the sound output
# muting is nice to hide the strange suspend-sound
if [ -e "$VOL_FILE" ]
  then  # save the current volume level
        VOL=$(grep "^level:" "$VOL_FILE" | sed 's/[^0-9]//g')
        # mute the soundcard
        echo mute >"$VOL_FILE"

# activate suspend to ram
echo "mem" > /sys/power/state

# set system clock from hardware clock
/sbin/hwclock --hctosys

if [ -e "$VOL_FILE" ]
  then  # first: unmute again
        echo down >"$VOL_FILE"
        # restore the previous volume
        echo "level $VOL" >"$VOL_FILE"

# IMPORTANT: enable the sound card again (otherwise it is silent after sleep/hibernate)
amixer set Master mute >/dev/null 2>&1
amixer set PCM mute >/dev/null 2>&1
amixer set Master unmute >/dev/null 2>&1
amixer set PCM unmute >/dev/null 2>&1

Of course, the script has to be executable: chmod +x /etc/acpi/

You have to reboot to let the kernel boot option take effect.

hibernate with suspend2

NOTE: meanwhile uswsusp became the most convenient approach for suspend. Just run aptitude install uswsusp and you are done. In this case you may ignore the following part.

if you really want suspend2 ...

suspend2 is not yet part of the main kernel tree, so you will have to compile your own kernel. This is fairly easy with debian.

The following steps are required to use suspend to disk:

prepare initrd

You usually need to build an initrd-image, as the default debian kernel depends on a lot of modules - and you will surely need some of them to boot your system.

To detect a wake-up boot, you need to put the line echo >/proc/suspend2/do_resume into the linuxrc file of your initrd.

Of course, you could do this manually, but automation makes more fun (and is easier):

This script will get used automatically during the kernel package building (see below).

If you compile the compression algorithm for suspend2 as a module (and not statically), then you should add it to the initrd module list:

echo "lzf" >>/etc/mkinitrd/modules

patch your kernel

Get the sources and install some helpful packages:

apt-get install linux-source-2.6.15 kernel-package fakeroot
cd /usr/src
tar xjf linux-source-2.6.15

Get the suspend2-patch and apply it:

tar xjf suspend2-2.2-rc16-for-
cd linux-source-2.6.15

Reuse your current kernel configuration:

zcat /proc/config.gz >.config

Now you can build a debian package for your kernel (as normal user):

make-kpkg --initrd --rootcmd fakeroot kernel_image

You will get asked some questions regarding suspend2 - usually you should select Yes or at least Module.

When the package building is finished, you should install your shiny new kernel:

dpkg -i /usr/src/linux-image-2.6.15_2.6.15-10.00.Custom_i386.deb

Now it is the right time to reboot your box to test the new kernel.

suspending your machine

The hibernate package makes it quite easy to suspend your computer:

apt-get install hibernate

Maybe all users should be allowed to suspend the computer? Change the following line according to your needs and add it to /etc/sudoers (obviously you need sudo for this):

ALL    ALL=(ALL)NOPASSWD: /usr/bin/hibernate

Now everyone may run sudo /usr/bin/hibernate to suspend the machine.

using thinkpad-buttons for suspend

I know, it is a quite clumsy way (acpi events should be more appropriate), but I only did it with tpb:

apt-get install tpb

You need to change two lines in your /etc/tpbrc:

NVRAM       /dev/.static/dev/nvram
THINKPAD    /usr/bin/sudo /usr/sbin/hibernate

(I know - the static nvram device setting is just a quick and dirty workaround for not having configured it via udev ...)

The soundcard will not immediately work after resuming. This can be easily solved by adding the following lines to your /etc/hibernate/common.conf:

OnResume 20 amixer set Master mute >/dev/null 2>&1 \
            amixer set PCM mute >/dev/null 2>&1 \
            amixer set Master unmute >/dev/null 2>&1 \
            amixer set PCM unmute >/dev/null 2>&1

Now add tpb to the system boot, by storing the following script as /etc/init.d/tpb:

case "$1" in
                tpb -d
                killall tpb
                "$0" stop
                "$0" start

Now add it to your runlevel directories by issuing the following command:

update-rc.d tpb defaults

After your next reboot (or after typing /etc/init.d/tpb start now) you can use the button labeled ThinkPad to suspend your machine.

I know - this way was not very convenient. If you care - just improve this howto by clicking on edit :)

automatic hibernate when battery runs low

The goals are:

Put the following script into your /etc/acpi/ directory (e.g. as

Now you have to register this event by saving the following lines as /etc/acpi/events/lowpower:


The script uses the ibm_acpi module to emit a sound and to make the leds of your ThinkPad blink in case of emergency :)

internal modem

The output of lspci -v is (on my machine) the following:

0000:02:02.0 Communication controller: Agere Systems WinModem 56k (rev 01)
        Subsystem: AMBIT Microsystem Corp. IBM ThinkPad T23 (2647-4MG)
        Flags: bus master, medium devsel, latency 0, IRQ 11
        Memory at c0201000 (32-bit, non-prefetchable) [size=256]
        I/O ports at 6440 [size=8]
        I/O ports at 6000 [size=256]
        Capabilities: [f8] Power Management version 2

Now you should load the modules:

modprobe ltmodem
modprobe ltserial

wvdial should detect your new modem:


Add the modules to your /etc/modules if everything worked well:

echo "ltmodem" >>/etc/modules
echo "ltserial" >>/etc/modules

Additional stuff


Debian_on_IBM_T23 (zuletzt geändert am 2012-06-13 21:26:22 durch anonym)

Creative Commons Lizenzvertrag
This page is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.