Search:  
Gentoo Wiki

IBM_Specific_Laptop_Guide

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

Contents

Kernel Configuration

ACPI

Linux Kernel Configuration: Thinkpad support
Power management options (ACPI, APM)  --->
 ACPI (Advanced Configuration and Power Interface) Support  --->
  [*] ACPI Support
   <M>   IBM ThinkPad Laptop Extras
Note: Building as a module has the advantage of being able to pass the parameter experimental=1, which enables extra functionality:


Kernel versions >= 2.6.21

Note: As of kernel 2.6.21, this module has been renamed to thinkpad_acpi and moved to the Misc driver section:
Linux Kernel Configuration: Thinkpad support
 Device Drivers --->
  [*] Misc devices --->
   <M> ThinkPad ACPI Laptop Extras

IBM Specific Hardware

TrackPoint

Some laptops have a TrackPoint (little red joystick like pointing device in the middle of the keyboard). To make the TrackPoint "scroll-able" with middle-button and the Point use the following configuration:

Code: /etc/X11/xorg.conf
Section "InputDevice"
       Identifier  "UltraNav TrackPoint"
       Driver      "mouse"
       Option      "Device"	         "/dev/input/mouse1"
       Option      "Protocol"            "ExplorerPS/2"
       Option      "Emulate3Buttons"     "on"
       Option      "Emulate3TimeOut"     "50"
       Option      "EmulateWheel"        "on"
       Option      "EmulateWheelTimeOut" "200"
       Option      "EmulateWheelButton"  "2"
       Option      "YAxisMapping"        "4 5"
       Option      "XAxisMapping"        "6 7"
       Option      "ZAxisMapping"        "4 5"
EndSection
Warning: Do not use /dev/input/mice with the above configuration, as it will cause odd behavior with other pointing devices.

Synaptics Touchpad

Many of the larger (> 12 inch) ThinkPads have a Synaptics touchpad; see

HDAPS - IBM Hard Disk Active Protection System

Some IBM notebooks have a sensor which detects physical movement.

The most important use of this is the parking the hard-disk heads upon detecting a sudden movement or crash.

Install app-laptop/hdapsd to make use of this feature.

Docking station (UltraBay)

Using thinkpad-acpi driver:

Tools

The following are ibm laptop specific utilities. They may require the ibm-acpi driver in the kernel.

conky

This lightwight system monitor has a few variables reading /proc/acpi/ibm/*. thinkpad_acpi has to be turned on in the kernel, otherwise conky will refuse to start.

IBM Specific ACPI scripts

For use with acpid or powersaved for example.

Switch Bluetooth on/off:

File: /etc/acpi/toggle_bluetooth.sh
#!/bin/bash
# toggle bluetooth
grep status /proc/acpi/ibm/bluetooth|grep -q enabled
if [ $? == 0 ]; then
  echo disabled > /proc/acpi/ibm/bluetooth
  /etc/init.d/bluetooth stop --quiet
else
  echo enabled > /proc/acpi/ibm/bluetooth
  modprobe rfcomm
  /etc/init.d/bluetooth restart --quiet
fi

The corresponding configuration file for acpid is

File: /etc/acpi/events/thinkpad-bluetooth
# Thinkpad bluetooth button

event=ibm/hotkey HKEY 00000080 00001005
action=/etc/acpi/toggle_bluetooth.sh

Eject from UltraBay:

File: eject_ultrabay.sh
#!/bin/bash
/usr/bin/sync
/sbin/idectl 1 off
/usr/bin/echo eject > /proc/acpi/ibm/bay

Change video output:

File: toggle_video_output.sh
#!/bin/sh
status=`/bin/awk '/^(lcd|crt):/ { ORS=""; print $2 }' /proc/acpi/ibm/video`
if [ "$status" == "enableddisabled" ]; then
  /usr/bin/echo lcd_disable,crt_enable >/proc/acpi/ibm/video
elif [ "$status" == "disabledenabled" ]; then
  /usr/bin/echo lcd_enable >/proc/acpi/ibm/video
elif [ "$status" == "enabledenabled" ]; then
  /usr/bin/echo crt_disable >/proc/acpi/ibm/video
fi
exit 0

Multimedia keys

Some Fn+<Function Key> combinations require the thinkpad-acpi (formerly called ibm-acpi) driver, and a command issued at startup to be registered with acpi. The command is of the form:

echo enable,bitmask > /proc/acpi/ibm/hotkey 

where bitmask is a hex representation of a binary mask of 12 bits, each corresponding to a function key (0x0001 for Fn-F1, 0x0002 for Fn-F2, 0x0008 for Fn-F4 etc.)

FIXME: This might be deprecated. Newer thinkpad_acpi has a 10-digit hex mask

Add the command to /etc/conf.d/local.start to have the keys enabled on startup.

It is not recommended to enable all the keys via bitmask. The recommended bitmask can be obtained from

Code: Determine recommended bitmask

cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask

0x008c7fff

To enable this bitmask:

Code: /etc/conf.d/local.start
 echo enable,0x008c7fff >/proc/acpi/ibm/hotkey 

Troubleshooting

Suspend to RAM

Success depends on your detailed system and on the exact kernel version.

Sound

If there are no errors from alsa, and the software mixer is unmuted, try unmuting and raising volume using the ibm volume buttons (usually located near the Access IBM button, or on the function keys using the Fn modifier). They are (usually) hardwired and require no software.

Links

Retrieved from "http://www.gentoo-wiki.info/IBM_Specific_Laptop_Guide"

Last modified: Tue, 19 Aug 2008 00:32:00 +0000 Hits: 12,826