Linux (Debian) on IBM Thinkpad X40

Saturday, April 23, 2005 at 12:15 AM

There are plenty of pages on the Internet that describe in detail how to setup Linux on an IBM Thinkpad X40. Google is your friend. I have only listed things here that I to my knowledge have not been described elsewhere.

All the kernel related stuff refers to version vanilla Linux 2.6.11 but other versions should do as well. Some of configuration details below maybe specific to Debian unstable.

IrDA

Patching the Kernel

As of Linux 2.6.12-rc1 the IrDA chipset of the X40 is supported out of the box. Only if you are using an earlier kernel, you need to apply this little patch that adds support for the PC87833 NSC IrDA chip by invoking

patch -p1 < nsc-ircc-pc8738x.diff

from your linux kernel directory (e.g. /usr/src/linux). All other steps apply to any kernel version. Make sure

CONFIG_NSC_FIR=m

is set in .config (make menuconfig and select Device Drivers -> Networking support -> IrDA (infrared support) -> Infrared-port device drivers -> NSC PC87108/PC87338) and recompile the modules (make modules modules_install).

Inserting the module

Insert the module by executing modprobe nsc-ircc dongle_id=0x09. If the irq is already in use, disable the serial port first /bin/setserial /dev/ttyS0 uart none port 0 irq 0 (replace /dev/ttyS0 with the appropriate port).

The following output should appear in dmesg:

nsc-ircc, Found chip at base=0x164e
nsc-ircc, driver loaded (Dag Brattli)
IrDA: Registered device irda0
nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500

If not, enable irda debug support in the kernel and run echo 3 > /proc/sys/net/irda/debug and send the relevant output to me.

As a convenience I have created a file on my system /etc/modprobe.d/nsc-ircc that contains all the configuration options from above so the module is automatically loaded with the correct settings, when the irda init script is executed on startup:

alias irda0 nsc-ircc
options nsc-ircc dongle_id=0x09
install nsc-ircc /bin/setserial /dev/ttyS0 uart none port 0 irq 0; modprobe --ignore-install nsc-ircc

ACPI

I used the following ACPI options in my .config file to enable cpu frequency scaling (using cpufreqd):

CONFIG_ACPI_BUS=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_PCI=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y

Suspend-to-RAM (S3) and suspend-to-disk (S4) work fine on my system when acpi_sleep=s3_bios is passed as a kernel parameter.

Thinkpad Buttons

To make use of the Fn button combinations for screen blanking, wireless lan, sleep mode and hibernation use the Thinkpad ACPI module (available in the kernel since 2.6.10):

CONFIG_ACPI_IBM=y

Since kernel 2.6.12-rc1 I have to pass acpi_specific_hotkey as a kernel parameter, otherwise the module would fail to load saying Using generic hotkey driver.

I use the following commands to enable the buttons on my system:

echo 0x0010 > /proc/acpi/ibm/hotkey
echo enable > /proc/acpi/ibm/hotkey

As a convenience I have created a file on my system /etc/modprobe.d/ibm-acpi that enables the buttons when the module is loaded:

install ibm-acpi modprobe --ignore-install ibm-acpi; echo 0x0010 > /proc/acpi/ibm/hotkey; echo enable > /proc/acpi/ibm/hotkey;

Download the latest driver release and take a look at the config/ directory for acpid configuration scripts.

Entry filed under: Linux

No entries
Nothing found in the guestbook.