Installing Debian 5.0 (Lenny) on a ThinkPad X32

From ThinkWiki
Jump to: navigation, search

Introduction notes

This wiki has tons of useful tips regarding this laptop, so this document only gathers information that is either specific to Debian Lenny or hard to find on the web. Linking to other pages on this wiki has generally been prefered to duplicating information.

The page dedicated to the X32 is another good starting point to fine-tune your GNU/Linux installation on this notebook.

To do

  • Document Linux boot options

Upgrade the BIOS

In case your X32 came with Windows installed, enjoy a BIOS Upgrade before installing GNU/Linux.

Prepare the installation media

Running the installation from a USB stick was the chosen method.

  • Get the boot.img.gz from the Debian installer website
  • Prepare a bootable USB stick, following the Debian installation guide, as the "easy way" did not work for us.
  • In case you need to install using a wireless network, you are quite lucky, as Lenny's installer now supports loading firmwares during the install process; to make use of this feature, follow the Loading Missing Firmware section of the installation guide.

Integrated wireless

According to X32, various mini-PCI wifi cards may be installed in this notebook. Ours came with the Intel PRO/Wireless 2200BG Mini-PCI Adapter, which identifies itself as:

$ lspci
02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)

$ lspci -n
02:02.0 0280: 8086:4220 (rev 05)

To get it working, one must install the firmware (unless it was loaded during the installation process): # aptitude install firmware-ipw2x00.

For this to work, you may need to include the non-free section from Debian's repositories in /etc/apt/sources.list, in case it is not enabled yet.

To enable the nice wireless led, enable the led option for the ipw2200 module by adding the following line to /etc/modprobe.d/local, creating this file if needed:

options ipw2200 led=1

.

X.Org

First, make sure you're using the radeon driver, that supports best the integrated ATI Mobility Radeon 7000 graphics card.

Direct rendering

Out of two slightly different Lenny installations, one had DRI working out of the box, while the other required applying the following instructions; so you first want to check wether direct rendering is already enabled, by installing the mesa-utils, and run: $ glxinfo .

If this command outputs direct rendering: Yes, DRI is already working. Else, read on.

The following instructions probably do far more than enabling DRI, but this combination of random factors does work for me, and I did not bother finding out which ones were really necessary.

Add the following lines to /etc/modules and /etc/initramfs-tools/modules; the goal is to ensure these kernel modules are loaded in good order, before X is started:

intel_agp
agpgart
drm
radeon

Then add these options to the Device section in /etc/X11/xorg.conf:

Option		"DRI" "true"
Option		"AccelMethod" "EXA"
Option		"AGPMode" "4"
Option		"AGPFastWrite" "on"
Option		"ColorTiling" "on"
Option		"EnablePageFlip" "on"
Option		"AGPSize" "32"
Option		"GARTSize" "32"
Option		"XAANoOffscreenPixmaps" "true"
Option		"EnableDepthMoves" "true"

TrackPoint

The TrackPoint page is a good starting point to fine-tune this input device according to your needs and preferences, e.g. scrolling using the middle-mouse-button and the TrackPoint.

Power saving

To enable dynamic adjusting of the Radeon card frequency rates, add this option to the Device section in /etc/X11/xorg.conf:

Option		"DynamicClocks" "on"

The rovclock package allows to get/set these frequencies manually (untested), see Rovclock for more information.

Special keys

Once the acpi-support package is installed, almost all special Fn keys work as expected, at least on a Gnome desktop.

Video switch key

The video switch key FnF7 is not bound to any action by default. To have it run a nice RandR user interface, see Sample_Fn-F7_script#Having_Fn-F7_run_a_RandR_GUI. Additional information about multiple displays can be found on Xorg RandR 1.2.

Bluetooth and IrDA

Unless you use them, you can fully disable Bluetooth and IrDA by adding the following lines to /etc/modprobe.d/local:

# irda-related modules
blacklist irda
blacklist irtty_sir
blacklist nsc_ircc
blacklist sir_dev
# bluetooth
blacklist hci_usb

Power saving

SpeedStep

Install the cpufrequtils Debian package.

/etc/default/cpufrequtils must contain:

ENABLE="true"                
GOVERNOR="ondemand"

/etc/default/loadcpufreq must contain:

ENABLE=true
FREQDRIVER=acpi-cpufreq

Then run:

# /etc/init.d/loadcpufreq restart
# /etc/init.d/cpufrequtils restart

laptop-mode

Just install the laptop-mode-tools package.

Miscellaneous

Adding the following lines to /etc/modprobe.d/local enables automatic power saving for the sound card and the USB ports, and prevents the wireless card from monitoring the whole universe unless told:

options snd-ac97-codec power_save=1
options usbcore autosuspend=1
options ipw2200 associate=0

SMAPI support

To get various model-specific features, such as advanced battery monitoring, the tp_smapi kernel module must be loaded. ThinkWiki has a nice dedicated page explaining how to do so. Make sure you add a line containing tp_smapi to /etc/modules, so that the module is loaded at boot time.

Suspend-to-disk (hibernation)

First, install the needed packages: # aptitude install acpi-support uswsusp hibernate.

It works OK with all methods: FnF12, Gnome battery icon (that uses pm-suspend, hibernate command. The default backend is Swsusp.

Modifying /etc/hibernate/common.conf may be needed to achieve this:

  • uncomment UseDummyXServer yes to prevent DRI from being disabled on resume
  • if using Gnome, uncomment LockGnomeScreenSaver yes

Suspend-to-RAM

First, install the needed packages: # aptitude install acpi-support uswsusp hibernate radeontool vbetool.

Various methods of suspending

s2ram

Works out of the box.

hibernate-ram

In /etc/hibernate/ram.conf, uncomment RadeonTool yes and comment TryMethod sysfs-ram.conf. Then the # hibernate-ram command should do the Right Thing.

One can optionnally enable suspend-to-both by uncommenting TryMethod ususpend-both.conf in the same file.

pm-suspend

Works ok with: # pm-suspend --quirk-s3-bios --quirk-s3-mode --quirk-radeon-off

FIXME: are the arguments really needed, or are they guessed by the program?

Gnome

The Gnome Power Manager suspend button does the Right Thing, using pm-suspend.

Sleep key (Fn-F4)

Works ok in Gnome.

High power drain while sleeping

A mean instantaneous power consumption equal to 811mW was measured while sleeping for 10.5h, which is a bit too high (custom Linux kernel 2.6.28, without radeonfb).

Not tried the various workarounds described on Problem with high power drain in ACPI sleep yet.

UltraBase X3

UltraBase_X3 has useful information on this. In short, using the stock Debian kernel, hotswapping the UltraBase is not possible, but it is perfectly recognized if the computer is booted docked.

Modem

Install the needed packages: # aptitude install sl-modem-source sl-modem-daemon module-assistant

Then run: $ m-a a-i sl-modem that will build and install the necessary (non-free) kernel module.

FIXME: actually test the resulting packages.

System information

lspci

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY
02:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev aa)
02:00.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev aa)
02:00.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 02)
02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG [Calexico2] Network Connection (rev 05)

lspci -n

00:00.0 0600: 8086:3340 (rev 03)
00:01.0 0604: 8086:3341 (rev 03)
00:1d.0 0c03: 8086:24c2 (rev 01)
00:1d.1 0c03: 8086:24c4 (rev 01)
00:1d.2 0c03: 8086:24c7 (rev 01)
00:1d.7 0c03: 8086:24cd (rev 01)
00:1e.0 0604: 8086:2448 (rev 81)
00:1f.0 0601: 8086:24cc (rev 01)
00:1f.1 0101: 8086:24ca (rev 01)
00:1f.3 0c05: 8086:24c3 (rev 01)
00:1f.5 0401: 8086:24c5 (rev 01)
00:1f.6 0703: 8086:24c6 (rev 01)
01:00.0 0300: 1002:4c59
02:00.0 0607: 1180:0476 (rev aa)
02:00.1 0607: 1180:0476 (rev aa)
02:00.2 0c00: 1180:0552 (rev 02)
02:01.0 0200: 8086:101e (rev 03)
02:02.0 0280: 8086:4220 (rev 05)

/proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Pentium(R) M processor 1.70GHz
stepping        : 6
cpu MHz         : 600.000
cache size      : 2048 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips        : 1198.97
clflush size    : 64
power management: