Lenovo Thinkpad X60s

Hardware Info
Please add here your hardware inforamation for your model.

lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02) 02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02) 15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b4) 15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 09) 15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 18)

lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 003: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller Bus 005 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 058f:6366 Alcor Micro Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Processor
Processor family should be Pentium M according to this thread: what processor family does intel core duo L2400 belong to?

evdev (Xorg input devices)
Xorg uses evdev, as a generic input driver.

SD Host controller
The driver depends on 16-bit PCMCIA support. So, make sure to include the section in your kernel config.

Wireless
Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

For configuring the card please refer to Iwlwifi

Thinkpad ACPI
Then we need to load the thinkpad_acpi module with experimental flag and enable the fn keys. echo "options thinkpad_acpi experimental=1 hotkey=enable,0xffef" >> /etc/modprobe.d/thinkpad.conf echo "thinkpad_acpi" >> /etc/modules.autoload.d/kernel-2.6

linux-2.6.31-gentoo-r10
config from linux-2.6.31-gentoo-r6 work on linux-2.6.31-gentoo-r10. Just copy and compile as explained

Updating the kernel
When new release of the kernel is available, you will need to update some modules apart form the kernel.

Move the linux link of the current kernel to the new kernel cd /usr/src mv linux-2.6.31-gentoo-r6{,.bak} ln -sf linux-2.6.31-gentoo-r10 linux mv linux-2.6.31-gentoo-r6{.bak,}

First copy config file to the new kernel directory cp /usr/src/linux-2.6.31-gentoo-r{6,10}/.config

Enter the new kernel directory and run make cd linux make

Install programs again to generate extra modules emerge -av thinkpad tp_smapi

Install modules from compiled kernel make modules_install

Copy the kernel to /boot folder cp arch/i386/boot/bzImage /boot/kernel-2.6.31-gentoo-r10

Edit /boot/grub/grub.conf to accommodate the new kernel

CFLAGS
CFLAGS="-march=native --param l1-cache-size=32 --param l1-cache-line-size=64 -mtune=generic -O2 -fomit-frame-pointer -pipe"

CXXFLAGS
CXXFLAGS="${CFLAGS}"

CHOST
CHOST="i686-pc-linux-gnu"

MAKEOPTS
MAKEOPTS="-j3"

VIDEO_CARDS
VIDEO_CARDS="intel"

INPUT_DEVICES
INPUT_DEVICES="evdev"

USE flags
USE="${USE} acpi hdaps smapi mmx sse sse2"

Suspend to ram
Please look here: go to sleep on lid close. In this section you will create a script that associate closing the lid with sleeping.

I also added another association of the buttons fn-F4, which are sleep, in this laptop.

The same behavior as the lid event.

Sound
I have a problem with the microphone of the laptop.

Testing it with: arecord test.wav aplay test.wav Just don't work. It doesn't matter what you do in alsamixer.

I have figured it out. You need to turn Capture on. But alsamixer didn't work, so I did this: amixer

... Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 15 Front Left: Capture 15 [100%] [22.50dB] [off] Front Right: Capture 15 [100%] [22.50dB] [off] ...

amixer sset Capture cap

Simple mixer control 'Capture',0 Capabilities: cvolume cswitch Capture channels: Front Left - Front Right Limits: Capture 0 - 15 Front Left: Capture 15 [100%] [22.50dB] [on] Front Right: Capture 15 [100%] [22.50dB] [on]

So 'amixer sset Capture cap' did the trick.

Bluetooth
We started configuring the fn keys in #Thinkpad_ACPI section. Now we need to use acpi to define the action when fn+F5 is pressed. Edit the two files:

Now restart acpid: /etc/init.d/acpid start Add bluetooh to startup and run it: rc-update add bluetooth default /etc/init.d/bluetooth start

Now you can check that the bluetooth light is on and off when you press fn+F5. You can also run tail -f /var/log/messages to see that bluetooth starts and stops.

HDAPS - IBM Active Protection System
Please read this: Gentoo on x200 - hdaps. It will explain what we are doing.

Install app-laptop/tp_smapi emerge app-laptop/tp_smapi

Now lets add the modules to system start: echo "tp_smapi" >> /etc/modules.autoload.d/kernel-2.6 echo "hdaps" >> /etc/modules.autoload.d/kernel-2.6 echo "options hdaps invert=3" >> /etc/modprobe.d/thinkpad.conf modprobe tp_smapi modprobe hdaps

Start hdapsd: rc-update add hdapsd default /etc/init.d/hdapsd start

To test the sensor I have installed neverball game. It works great. The invert value for the computer is 3. I found this value after trying 0 to 7! hehe. You can read how to setup the axis here.

Don't forget to load module 'joydev' (CONFIG_INPUT_JOYDEV) for the game to work.

OSD
add the USE flag 'xosd' to /etc/make.conf. Then install tpb and update world for changing USE flags: emerge tpb emerge -avuND world

Power Saving
You can read here about saving power: Less Watts Tips & Tricks.

Sound Card
Checking the sound card power saving: cat /sys/module/snd_hda_intel/parameters/power_save 120 Shows that the powersave mode is working, because the value is greater then 0.

So, nothing to do here.

Turning off the LCD
To turn off the LCD run: xset dpms force suspend

The off command will not work. I don't know why. xset dpms force off

So we just use 'suspend' instead of 'off'.

SD Host controller
Load the module on startup: echo sdhci >> /etc/modules.autoload.d/kernel-2.6

Add this line to /etc/fstab, so you could mount the card to /mnt/sd:

When inserting the card to the slot /var/log/messages shows: Jan 28 19:34:08 legolas kernel: mmc0: card lacks mandatory switch function, performance might suffer. Jan 28 19:34:08 legolas kernel: mmc0: new SD card at address b368 Jan 28 19:34:08 legolas kernel: PM: Adding info for mmc:mmc0:b368 Jan 28 19:34:08 legolas kernel: mmcblk0: mmc0:b368 D1018 244 MiB Jan 28 19:34:08 legolas kernel: PM: Adding info for No Bus:mmcblk0 Jan 28 19:34:08 legolas kernel: mmcblk0: p1 Jan 28 19:34:08 legolas kernel: PM: Adding info for No Bus:mmcblk0p1 Jan 28 19:34:08 legolas kernel: PM: Adding info for No Bus:179:0

Running 'fdisk -l' will list the card as a hard drive: Disk /dev/mmcblk0: 255 MB, 255852544 bytes 16 heads, 32 sectors/track, 976 cylinders Units = cylinders of 512 * 512 = 262144 bytes Disk identifier: 0x00000000

Device Boot     Start         End      Blocks   Id  System /dev/mmcblk0p1  *           1         976      249805+   6  FAT16