Difference between revisions of "Installing Debian 5.0 (Lenny) on a ThinkPad X32"

From ThinkWiki
Jump to: navigation, search
m (enhanced introduction)
m (Suspend-to-RAM: added precisions, fixed formatting)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Introduction notes ==
 
== 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 been generally prefered to duplicating information.
+
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.
 
The page dedicated to the {{X32}} is another good starting point to fine-tune your GNU/Linux installation on this notebook.
Line 11: Line 11:
 
== Upgrade the BIOS ==
 
== Upgrade the BIOS ==
  
In case your X32 came with Windows installed, enjoy a BIOS upgrade
+
In case your X32 came with Windows installed, enjoy a [[BIOS Upgrade]] before installing GNU/Linux.
before installing GNU/Linux.
 
  
 
== Prepare the installation media ==
 
== Prepare the installation media ==
Line 19: Line 18:
  
 
* Get the <code>boot.img.gz</code> from the [http://http.us.debian.org/debian/dists/lenny/main/installer-i386/current/images/hd-media/ Debian installer website]
 
* Get the <code>boot.img.gz</code> from the [http://http.us.debian.org/debian/dists/lenny/main/installer-i386/current/images/hd-media/ Debian installer website]
* Prepare a bootable USB stick, following the [http://debian.org/releases/lenny/i386/ch04s03.html.fr#usb-copy-flexible Debian installation guide], as the "easy way" did not work for us.
+
* Prepare a bootable USB stick, following the [http://debian.org/releases/lenny/i386/ch04s03.html#usb-copy-flexible 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 [http://debian.org/releases/lenny/i386/ch06s04.html Loading Missing Firmware] section of the installation guide.
 
* 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 [http://debian.org/releases/lenny/i386/ch06s04.html Loading Missing Firmware] section of the installation guide.
  
 
== Integrated wireless ==
 
== Integrated wireless ==
  
According to {{X32}}, various mini-PCI wifi cards may be installed. Ours came with If you
+
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:
have the Intel PRO/Wireless 2200BG, which identifies itself as:
 
  
 
{{cmduser|lspci}}<br />
 
{{cmduser|lspci}}<br />
Line 38: Line 36:
 
For this to work, you may need to include the non-free section from Debian's repositories in {{path|/etc/apt/sources.list}}, in case it is not enabled yet.
 
For this to work, you may need to include the non-free section from Debian's repositories in {{path|/etc/apt/sources.list}}, in case it is not enabled yet.
  
To enable the nice wireless led, add the following line to {{path|/etc/modprobe.d/local}} (creating this file if needed):
+
To enable the nice wireless led, enable the <code>led</code> option for the <code>ipw2200</code> module by adding the following line to {{path|/etc/modprobe.d/local}}, creating this file if needed:
 
<pre>options ipw2200 led=1</pre>.
 
<pre>options ipw2200 led=1</pre>.
  
 
== X.Org ==
 
== X.Org ==
  
First, make sure you're using the radeon driver.
+
First, make sure you're using the radeon driver, that supports best the integrated [[ATI Mobility Radeon 7000]] graphics card.
  
 
=== Direct rendering ===
 
=== Direct rendering ===
  
First, install the mesa-utils package. Then, to see if direct
+
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 <code>mesa-utils</code>, and run: {{cmduser|glxinfo | grep -i direct}}.
rendering is enabled, run: {{cmduser|glxinfo | grep -i direct}}.
 
  
If this command outputs {{cmdresult|direct rendering: Yes}}, you don't need to do anything special, as DRI is already working.
+
If this command outputs {{cmdresult|direct rendering: Yes}}, DRI is already working. Else, read on.
  
Else, read on. These instructions probably do far more than enabling DRI, but at least they work for me :)
+
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 {{path|/etc/modules}} and {{path|/etc/initramfs-tools/modules}}; the goal is to ensure these kernel modules are loaded in good order, before X is started:
 
Add the following lines to {{path|/etc/modules}} and {{path|/etc/initramfs-tools/modules}}; the goal is to ensure these kernel modules are loaded in good order, before X is started:
Line 91: Line 88:
 
</pre>
 
</pre>
  
The rovclock package allows to get/set these frequencies manually, see [[Rovclock]] for more information.
+
The rovclock package allows to get/set these frequencies manually (untested), see [[Rovclock]] for more information.
  
 
== Special keys ==
 
== Special keys ==
Line 101: Line 98:
 
The video switch key {{key|Fn}}{{key|F7}} is not bound to any action by default.
 
The video switch key {{key|Fn}}{{key|F7}} is not bound to any action by default.
 
To have it run a nice RandR user interface, see
 
To have it run a nice RandR user interface, see
[[Sample_Fn-F7_script#Having_Fn-F7_run_a_RandR_GUI]].
+
[[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 ==
 
== Bluetooth and IrDA ==
  
One can fully disable these things by adding the following lines to
+
Unless you use them, you can fully disable Bluetooth and [[IrDA]] by adding the following lines to
 
{{path|/etc/modprobe.d/local}}:
 
{{path|/etc/modprobe.d/local}}:
  
Line 122: Line 119:
 
=== SpeedStep ===
 
=== SpeedStep ===
  
Install the cpufrequtils Debian package.
+
Install the <code>cpufrequtils</code> Debian package.
  
 
{{path|/etc/default/cpufrequtils}} must contain:
 
{{path|/etc/default/cpufrequtils}} must contain:
Line 140: Line 137:
 
Then run:
 
Then run:
  
{{cmdroot|/etc/init.d/loadcpufreq restart}}
+
{{cmdroot|/etc/init.d/loadcpufreq restart}}<br />
 
{{cmdroot|/etc/init.d/cpufrequtils restart}}
 
{{cmdroot|/etc/init.d/cpufrequtils restart}}
  
 
=== laptop-mode ===
 
=== laptop-mode ===
  
Just install the laptop-mode-tools package.
+
Just install the <code>laptop-mode-tools</code> package.
  
 
=== Miscellaneous ===
 
=== Miscellaneous ===
Line 162: Line 159:
 
== SMAPI support ==
 
== 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 [[Tp_smapi dedicated page]] explaining how to do so. Make sure you add this module to {{path|/etc/modules}} so that it is loaded at boot time.
+
To get various model-specific features, such as advanced battery monitoring, the tp_smapi kernel module must be loaded. ThinkWiki has a nice [[Tp_smapi|dedicated page]] explaining how to do so. Make sure you add a line containing <code>tp_smapi</code> to {{path|/etc/modules}}, so that the module is loaded at boot time.
  
== Sleep and suspend ==
+
== Suspend-to-disk (hibernation) ==
  
First, install the needed acpi-support, uswsusp and hibernate packages.
+
First, install the needed packages: {{cmdroot|aptitude install acpi-support uswsusp hibernate}}.
  
=== Suspend-to-disk (hibernation) ===
+
It works OK with all methods: {{key|Fn}}{{key|F12}}, Gnome battery icon (that uses <code>pm-suspend</code>, hibernate command. The default backend is [[Swsusp]].
 
 
It works OK with all methods: {{key|Fn}}{{key|F12}}, Gnome battery icon and hibernate command. The backend used by default is [[Swsusp]].
 
  
 
Modifying {{path|/etc/hibernate/common.conf}} may be needed to achieve this:
 
Modifying {{path|/etc/hibernate/common.conf}} may be needed to achieve this:
  
* uncomment <code>UseDummyXServer yes</code> to prevent DRI from being disabled   on resume
+
* uncomment <code>UseDummyXServer yes</code> to prevent DRI from being disabled on resume
* uncomment <code>SwitchToTextMode yes</code>
 
 
* if using Gnome, uncomment <code>LockGnomeScreenSaver yes</code>
 
* if using Gnome, uncomment <code>LockGnomeScreenSaver yes</code>
  
=== Suspend-to-RAM ===
+
== Suspend-to-RAM ==
 +
 
 +
First, install the needed packages: {{cmdroot|aptitude install acpi-support uswsusp hibernate radeontool vbetool}}.
  
First, install the radeontool and vbetool packages.
+
=== Various methods of suspending ===
  
 
==== s2ram ====
 
==== s2ram ====
Line 195: Line 191:
  
 
Works ok with:
 
Works ok with:
{{cmdroot|pm-suspend --quirk-s3-bios --quirk-s3-mode --quirk-radeon-off}}}
+
{{cmdroot|pm-suspend --quirk-s3-bios --quirk-s3-mode --quirk-radeon-off}}
  
'''FIXME''': are the arguments needed?
+
'''FIXME''': are the arguments really needed, or are they guessed by the program?
  
 
==== Gnome ====
 
==== Gnome ====
  
The Gnome Power Manager suspend button does the Right Thing.
+
The Gnome Power Manager suspend button does the Right Thing, using <code>pm-suspend</code>.
 
   
 
   
 
==== Sleep key (Fn-F4) ====
 
==== Sleep key (Fn-F4) ====
  
 
Works ok in Gnome.
 
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|radeonfb]]).
 +
 +
Not tried the various workarounds described on [[Problem with high power drain in ACPI sleep]] yet.
  
 
== UltraBase X3 ==
 
== UltraBase X3 ==
Line 213: Line 215:
 
== Modem ==
 
== Modem ==
  
Install the sl-modem-source and module-assistant packages, then run:
+
Install the needed packages: {{cmdroot|aptitude install sl-modem-source sl-modem-daemon module-assistant}}
{{cmduser|m-a a-i sl-modem}} that will build and install the necessary (non-free) kernel module and userspace daemon.
+
 
 +
Then run:
 +
{{cmduser|m-a a-i sl-modem}} that will build and install the necessary (non-free) kernel module.
  
'''FIXME''': test the resulting packages actually work.
+
'''FIXME''': actually test the resulting packages.
  
 
== System information ==
 
== System information ==

Latest revision as of 12:46, 23 February 2009

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: