<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fuchs</id>
	<title>ThinkWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fuchs"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Fuchs"/>
	<updated>2026-05-04T01:53:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=50074</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=50074"/>
		<updated>2010-11-22T13:20:07Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-drivers. You might be interested in the ~arch masked drivers. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In recent versions of the driver, several 5 GHz networks create a lot of disconnects. You can try to set &lt;br /&gt;
&lt;br /&gt;
options iwlagn 11n_disable=1&lt;br /&gt;
&lt;br /&gt;
in /etc/modprobe.d/iwlagn.conf  as a temporary solution while Intel is working on a fix.&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you might want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
=== Hard Drive Active Protection ===&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!arrow keys&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
!Fn+Fx&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F23&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 200 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
!Brightnes&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
!Media&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
!Volume&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.36 ==&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.36]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
 * [http://www.neoberserker.de/phpBB3/viewtopic.php?f=13&amp;amp;t=2132 HowTo -- Install Gentoo on Thinkpad T410 using Intel GMA HD and NVIDIA NVS 3100M (german)]&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User:Fuchs&amp;diff=49871</id>
		<title>User:Fuchs</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User:Fuchs&amp;diff=49871"/>
		<updated>2010-10-25T20:00:53Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__	 &lt;br /&gt;
&lt;br /&gt;
=== Hello! ===&lt;br /&gt;
My name is Christian, I was born in Biel/Bienne, Switzerland. &lt;br /&gt;
&lt;br /&gt;
I am a student at the TI.BFH in Biel/Bienne, studying computer science. &lt;br /&gt;
&lt;br /&gt;
=== Contact: ===	 &lt;br /&gt;
You can contact me via the discussion section of my profile. &lt;br /&gt;
&lt;br /&gt;
I speak (swiss)german, french, english and a little bit spanish. &lt;br /&gt;
&lt;br /&gt;
I might understand italian, but I will answer in english. &lt;br /&gt;
&lt;br /&gt;
My username is usually Fuchs as well, but as there is no nick registration on the IRCNet ... &lt;br /&gt;
	 &lt;br /&gt;
=== My Thinkpad: ===	 &lt;br /&gt;
I own a Thinkpad R61 which runs a Gentoo Linux Stage 1 installation&lt;br /&gt;
and a Thinpad T410 which runs as well Gentoo Linux.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49870</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49870"/>
		<updated>2010-10-25T19:52:15Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Graphics: NVIDIA Quadro NVS 3100M (GT218) */  typo in package name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-drivers. You might be interested in the ~arch masked drivers. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you might want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
=== Hard Drive Active Protection ===&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!arrow keys&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
!Fn+Fx&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F23&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 200 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
!Brightnes&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
!Media&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
!Volume&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.36 ==&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.36]&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49869</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49869"/>
		<updated>2010-10-25T18:46:55Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: Kernel configuration&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you might want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
=== Hard Drive Active Protection ===&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!arrow keys&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
!Fn+Fx&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F23&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 200 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
!Brightnes&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
!Media&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
!Volume&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
== Kernel 2.6.36 ==&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.36]&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49868</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49868"/>
		<updated>2010-10-25T14:47:01Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Graphics: NVIDIA Quadro NVS 3100M (GT218) */  bash syntax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!arrow keys&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
!Fn+Fx&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F23&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 200 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
!Brightnes&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
!Media&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
!Volume&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
Follows soon&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49867</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49867"/>
		<updated>2010-10-25T14:45:22Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xmodmap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC. &lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!arrow keys&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
!Fn+Fx&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F23&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 200 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
!Brightnes&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
!Media&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
!Volume&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
Follows soon&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49866</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49866"/>
		<updated>2010-10-25T14:36:21Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xmodmap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC. &lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
! additional arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 167 = XF86Forward&lt;br /&gt;
keycode 166 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx Keys: F2,F3,F4,F5,F7,F8,F9&lt;br /&gt;
&lt;br /&gt;
keycode 160 = F22&lt;br /&gt;
keycode 244 = F13&lt;br /&gt;
keycode 150 = F24&lt;br /&gt;
keycode 200 = F25&lt;br /&gt;
keycode 235 = F27&lt;br /&gt;
keycode 156 = F28&lt;br /&gt;
keycode 213 = F29&lt;br /&gt;
&lt;br /&gt;
! Brightness (Fn+Pg* keys)&lt;br /&gt;
&lt;br /&gt;
keycode 101 = SunVideoRaiseBrightness&lt;br /&gt;
keycode 212 = SunVideoLowerBrightness&lt;br /&gt;
&lt;br /&gt;
! Fn+Arrow keys (Multimedia keys)&lt;br /&gt;
&lt;br /&gt;
keycode 173 = XF86AudioPrev&lt;br /&gt;
keycode 172 = XF86AudioPlay&lt;br /&gt;
keycode 171 = XF86AudioNext&lt;br /&gt;
keycode 174 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
! Volume control&lt;br /&gt;
&lt;br /&gt;
keycode 121 = XF86AudioMute&lt;br /&gt;
keycode 122 = XF86AudioLowerVolume&lt;br /&gt;
keycode 123 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
Follows soon&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49865</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49865"/>
		<updated>2010-10-25T14:30:07Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: camera / sd reader&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC. &lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Integrated Webcam == &lt;br /&gt;
&lt;br /&gt;
The Camera seems to be a Chicony Electronics Co., Ltd. device, with &lt;br /&gt;
&lt;br /&gt;
Vendor ID: 0x17ef&lt;br /&gt;
Product ID: 0x480f&lt;br /&gt;
&lt;br /&gt;
You have to enable: Video capture adapters  ---&amp;gt; V4L USB devices  ---&amp;gt;  USB Video Class (UVC) in the kernel, then the camera will work out of the box (tested with Kopete) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Card reader == &lt;br /&gt;
&lt;br /&gt;
The card reader is a&lt;br /&gt;
&lt;br /&gt;
SD Host controller: Ricoh Co Ltd Device e822 (rev 01)&lt;br /&gt;
&lt;br /&gt;
You can enable the sd/sdhci drivers in the Kernel in order to get it to work.&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control &lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
Follows soon&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49864</id>
		<title>Installing Gentoo on a ThinkPad T410</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_on_a_ThinkPad_T410&amp;diff=49864"/>
		<updated>2010-10-25T11:55:24Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: initial commit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{T410}}&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Webcam&lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection &lt;br /&gt;
* Card reader: SD Card&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* E-Sata (should work, no devices for testing) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
* Card Reader: Memory Stick&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 3100M (GT218) ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver.  &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=0x361. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness control needs a workaround. &lt;br /&gt;
Add &lt;br /&gt;
&lt;br /&gt;
Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
to your xorg.conf&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC. &lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Works out of the box. The microphone might has to be unmuted via alsamixer. If you are using pulse audio, check pavucontrol as well. &lt;br /&gt;
&lt;br /&gt;
The mute button and the volume up and volume down buttons work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the hdmi output) as the default, so you have to change the default / primary mixer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, WiFi Link 6000 Series WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to emerge the net-wireless/iwl6000-ucode package. &lt;br /&gt;
You have to enable iwlwifi / iwlagn in your kernel configuration. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to a key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ports: USB, HDMI, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
USB works out of the box. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
HDMI is untested, but as it is recognized (including the alsa audio device) it should work. &lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use the xorg.conf.d directory, udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk works out of the box as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
&lt;br /&gt;
Not tested yet&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd and app-laptop/tp_smapi with the hdaps USE-Flag enabled,  which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
You can achieve about 4 - 6 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 3100M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # backlight fix&lt;br /&gt;
    Option &amp;quot;RegistryDwords&amp;quot; &amp;quot;EnableBrightnessControl=1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
        Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
        Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
        Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
        DefaultDepth  24&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport  0 0&lt;br /&gt;
                Depth     24&lt;br /&gt;
                Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 16&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
                SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
                Viewport 0 0&lt;br /&gt;
                Depth 8&lt;br /&gt;
                Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
        EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control &lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
Follows soon&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=46121</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=46121"/>
		<updated>2010-02-20T12:32:11Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: lots of updates: X11, nvidia driver, synaptics, ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
In recent nvidia drivers, powermizer can be configured via `nvidia-settings`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
        echo &amp;quot;Powermizer control script.&amp;quot;&lt;br /&gt;
        echo &amp;quot;2010 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
        echo &amp;quot;usage: powermizer on | off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
        if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0&lt;br /&gt;
        fi&lt;br /&gt;
        if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
                nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1&lt;br /&gt;
        fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script turns powermizer on or off. You can use it together with acpi events or your power management to turn powermizer off as soon as your notebook is powered via AC. &lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
&lt;br /&gt;
TouchPads are, as all the other input devices, not configured via xorg.conf anymore in xorg &amp;gt;= 1.6. &lt;br /&gt;
You can either use hal policy files (deprecated as well), udev rules or synclient on a per user base. &lt;br /&gt;
&lt;br /&gt;
I use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
synclient HorizEdgeScroll=1 VertEdgeScroll=1 MinSpeed=0.25 MaxSpeed=0.42 AccelFactor=0.0010 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 TapButton2=2 TapButton3=3 PalmDetect=1 PalmMinWidth=5 RTCornerButton=2 RBCornerButton=3&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in my autostart, which activates two finger scrolling, multifinger tab and edge buttons. &lt;br /&gt;
&lt;br /&gt;
The touchpad can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. You can remove the &amp;quot;echo&amp;quot; line if you don't want the status being displayed or if you don't have xosd. &lt;br /&gt;
You can make the script executable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
On newer versions of xorg it might be possible that the accelerometer is seen as a mouse, which makes your pointer hop to the middle of the screen all the time. In order to solve this, you can create a udev rule: &lt;br /&gt;
&lt;br /&gt;
/etc/udev/rules.d/99-hdaps.rules&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS accelerometer data&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
SUBSYSTEM==&amp;quot;input&amp;quot;, KERNEL==&amp;quot;event*&amp;quot;, ATTRS{name}==&amp;quot;ThinkPad HDAPS joystick emulation&amp;quot;, ENV{x11_driver}=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which solves this problem. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
##  Server Flags  (Don't zap false allows you to re-active CTRL+ALT+Backspace via xset) &lt;br /&gt;
##              &lt;br /&gt;
Section &amp;quot;ServerFlags&amp;quot;&lt;br /&gt;
    Option &amp;quot;DontZap&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
EndSection                  &lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##                                   &lt;br /&gt;
Section &amp;quot;Files&amp;quot;                      &lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/local&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/misc&amp;quot; &lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/Type1&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/TTF&amp;quot;  &lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/75dpi&amp;quot;&lt;br /&gt;
    FontPath    &amp;quot;/usr/share/fonts/100dpi&amp;quot;&lt;br /&gt;
EndSection      &lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID          &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # Allows the driver to enable VBlank interrupt generation only when it is required&lt;br /&gt;
    # Saves power, as there are less wakeups&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension (default by now) and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    # Also activating BackingStore which keeps pixel data for occluded window regions&lt;br /&gt;
    # and activating TripleBuffer. ARGBGLXVisuals are now enabled by default &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove this line&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     16&lt;br /&gt;
		Modes	  &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport  0 0&lt;br /&gt;
		Depth     8&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load composite for compiz (should be default by now) &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
=== 2.6.27 ===&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.27 gentoo hit portage. &lt;br /&gt;
There are several imporant changes. &lt;br /&gt;
&lt;br /&gt;
My kernel config is [http://www.fuchsnet.ch/files/tp/config-2.6.27-gentoo here], the hdaps patch is [http://www.fuchsnet.ch/files/tp/hdaps-2.6.27.patch here]. Please note that you need a recent hdpasd to work with this new version. &lt;br /&gt;
&lt;br /&gt;
Intels Wifi module is now split up and named iwlagn and iwlcore. &lt;br /&gt;
&lt;br /&gt;
Suspend and Hibernate work without Tux on Ice kernels. (Just be patient with hibernate, you'll get a black screen for a while before it comes back up) &lt;br /&gt;
&lt;br /&gt;
You also need a recent nvidia driver to work with the new kernel.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=39092</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=39092"/>
		<updated>2008-10-13T21:45:04Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Unstable Kernels and updates */ 2.6.27&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID          &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # Allows the driver to enable VBlank interrupt generation only when it is required&lt;br /&gt;
    # Saves power, as there are less wakeups&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension (default by now) and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    # Also activating BackingStore which keeps pixel data for occluded window regions&lt;br /&gt;
    # and activating TripleBuffer. ARGBGLXVisuals are now enabled by default &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     16&lt;br /&gt;
		Modes	  &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport  0 0&lt;br /&gt;
		Depth     8&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load composite for compiz (should be default by now) &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
=== 2.6.27 ===&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.27 gentoo hit portage. &lt;br /&gt;
There are several imporant changes. &lt;br /&gt;
&lt;br /&gt;
My kernel config is [http://www.fuchsnet.ch/files/tp/config-2.6.27-gentoo here], the hdaps patch is [http://www.fuchsnet.ch/files/tp/hdaps-2.6.27.patch here]. Please note that you need a recent hdpasd to work with this new version. &lt;br /&gt;
&lt;br /&gt;
Intels Wifi module is now split up and named iwlagn and iwlcore. &lt;br /&gt;
&lt;br /&gt;
Suspend and Hibernate work without Tux on Ice kernels. (Just be patient with hibernate, you'll get a black screen for a while before it comes back up) &lt;br /&gt;
&lt;br /&gt;
You also need a recent nvidia driver to work with the new kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 2.6.25 ===&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38964</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38964"/>
		<updated>2008-09-29T17:37:55Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID          &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # Allows the driver to enable VBlank interrupt generation only when it is required&lt;br /&gt;
    # Saves power, as there are less wakeups&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension (default by now) and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    # Also activating BackingStore which keeps pixel data for occluded window regions&lt;br /&gt;
    # and activating TripleBuffer. ARGBGLXVisuals are now enabled by default &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     16&lt;br /&gt;
		Modes	  &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport  0 0&lt;br /&gt;
		Depth     8&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load composite for compiz (should be default by now) &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38963</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38963"/>
		<updated>2008-09-29T17:35:29Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID          &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # Allows the driver to enable VBlank interrupt generation only when it is required&lt;br /&gt;
    # Saves power, as there are less wakeups&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    # Also activating BackingStore which keeps pixel data for occluded window regions&lt;br /&gt;
    # and activating TripleBuffer. ARGBGLXVisuals are now enabled by default &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     16&lt;br /&gt;
		Modes	  &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport  0 0&lt;br /&gt;
		Depth     8&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load composite for compiz (should be default by now) &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38672</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38672"/>
		<updated>2008-08-22T18:47:45Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  more minor fixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID          &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	   &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     16&lt;br /&gt;
		Modes	  &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport  0 0&lt;br /&gt;
		Depth     8&lt;br /&gt;
		Modes     &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load composite for compiz (should be default by now) &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38670</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38670"/>
		<updated>2008-08-22T18:46:01Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  fixed copy &amp;amp; paste error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID		   &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38669</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38669"/>
		<updated>2008-08-22T18:13:54Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
## Read the Appendix B of the nvidia README for explanations &lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID		   &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    # Set InitialPixmapPlacement to 2 and GlyphCache to 1 for massive performance gains&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38668</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38668"/>
		<updated>2008-08-22T18:12:22Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Graphics: NVIDIA Quadro NVS 140M */  update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
I recommend to get the nvidia driver 177.68 or newer, as some major RENDER improvements increased the speed, especially with Qt4 and KDE4, dramatically.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID		   &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38667</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=38667"/>
		<updated>2008-08-22T18:10:05Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebuffer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Server layout for the built in monitor, an external mouse and the touchpad&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
    Screen      0  &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
    InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    InputDevice    &amp;quot;LX8&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## FontPath for the x font server xfs&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
    FontPath        &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Module Section, load default modues&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
    Load           &amp;quot;dbe&amp;quot;&lt;br /&gt;
    Load           &amp;quot;extmod&amp;quot;&lt;br /&gt;
    Load           &amp;quot;glx&amp;quot;&lt;br /&gt;
    Load           &amp;quot;freetype&amp;quot;&lt;br /&gt;
    Load           &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Keyboard section, layout is swissgerman&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;kbd&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbModel&amp;quot; &amp;quot;pc105&amp;quot;&lt;br /&gt;
    Option         &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Touchpad section, values can be changed with synclient on the fly, &lt;br /&gt;
## as SHMConfig and UseSHM allow this&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Protocol&amp;quot; &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option         &amp;quot;LeftEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;RightEdge&amp;quot; &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TopEdge&amp;quot; &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BottomEdge&amp;quot; &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerLow&amp;quot; &amp;quot;25&amp;quot;&lt;br /&gt;
    Option         &amp;quot;FingerHigh&amp;quot; &amp;quot;30&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapTime&amp;quot; &amp;quot;180&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxTapMove&amp;quot; &amp;quot;220&amp;quot;&lt;br /&gt;
    Option         &amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MinSpeed&amp;quot; &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option         &amp;quot;MaxSpeed&amp;quot; &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AccelFactor&amp;quot; &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option         &amp;quot;SHMConfig&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseSHM&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## External Logitech LX8 Mouse&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;LX8&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;evdev&amp;quot;&lt;br /&gt;
    Option         &amp;quot;CorePointer&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Name&amp;quot; &amp;quot;Logitech USB Receiver&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Buttons&amp;quot; &amp;quot;9&amp;quot;&lt;br /&gt;
    Option         &amp;quot;ZAxisMapping&amp;quot; &amp;quot;4 5 6 7&amp;quot;&lt;br /&gt;
    Option         &amp;quot;HWHEELRelativeAxisButtons&amp;quot; &amp;quot;7 6&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Resolution&amp;quot; &amp;quot;1600&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Built in Monitor with power saving features enabled &lt;br /&gt;
## and manually specified frequencies as the EDID is a bit broken&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
    ModelName      &amp;quot;LEN&amp;quot;&lt;br /&gt;
    HorizSync       28.0 - 61.0&lt;br /&gt;
    VertRefresh     43.0 - 62.0&lt;br /&gt;
    Option         &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Videocard section. Some of the following options are now default&lt;br /&gt;
## and only kept for compatibility reasons with older drivers&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
    Identifier     &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
    Driver         &amp;quot;nvidia&amp;quot;&lt;br /&gt;
    VendorName     &amp;quot;NVIDIA Corporation&amp;quot;&lt;br /&gt;
    BoardName      &amp;quot;Quadro NVS 140M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # bus options (disable agp and specify the bus ID (pci-e)&lt;br /&gt;
    Option         &amp;quot;NvAGP&amp;quot; &amp;quot;0&amp;quot;&lt;br /&gt;
    BusID		   &amp;quot;PCI:1:0:0&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # do not use the frequencies provided by the monitor edid &lt;br /&gt;
    Option         &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
    # power savings&lt;br /&gt;
    Option         &amp;quot;OnDemandVBlankInterrupts&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # allow underclocking&lt;br /&gt;
    Option         &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # enable the X Resize and Rotation extension&lt;br /&gt;
    Option         &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # speed up 2d by actiavting the RENDER extension and using&lt;br /&gt;
    # DAMAGE to only update regions of the screen which actually changed. &lt;br /&gt;
    Option         &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option         &amp;quot;UseEvents&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
    Option         &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option         &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AllowIndirectPixmaps&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
    Option	       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;True&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
    # pixmap speedups since 177.* driver version &lt;br /&gt;
    # this will reserve about 5 MB of video memory for pixmaps &lt;br /&gt;
    # If some applications (e.g. xchat) need SHM Pixmaps then remove the second line&lt;br /&gt;
    Option         &amp;quot;PixmapCacheSize&amp;quot; &amp;quot;1000000&amp;quot;&lt;br /&gt;
    Option         &amp;quot;AllowSHMPixmaps&amp;quot; &amp;quot;False&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Screen Section&lt;br /&gt;
##&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## Extensions, load compisite for compiz&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option         &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
## DRI Section, deprecated&lt;br /&gt;
##&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37480</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37480"/>
		<updated>2008-04-28T12:20:27Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Unstable Kernels and updates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## The following settings can be changed on the fly&lt;br /&gt;
## by using synclient. Note that shm has to be enabled for this. &lt;br /&gt;
## All options are documented in the synaptics driver documentation. &lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	  &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	  &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	  &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	  &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	  &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	  &amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	  &amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	  &amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	  &amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	  &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	  &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	  &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	  &amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	  &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Lenovo R61 Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA Quadro NVS 140M&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot;                &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot;   &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot;             &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;               &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot;                   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot;             &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored&lt;br /&gt;
or removed by using [http://www.nvnews.net/vbulletin/showpost.php?p=1639413&amp;amp;postcount=11 this patch] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37427</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37427"/>
		<updated>2008-04-24T13:21:36Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Unstable Kernels and updates */  nvidia driver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## The following settings can be changed on the fly&lt;br /&gt;
## by using synclient. Note that shm has to be enabled for this. &lt;br /&gt;
## All options are documented in the synaptics driver documentation. &lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	  &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	  &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	  &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	  &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	  &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	  &amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	  &amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	  &amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	  &amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	  &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	  &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	  &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	  &amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	  &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Lenovo R61 Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA Quadro NVS 140M&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot;                &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot;   &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot;             &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;               &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot;                   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot;             &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) The nvidia drivers in portage do _not_ work with 2.6.25. &lt;br /&gt;
You either have to install 173.08 (beta at the moment) &lt;br /&gt;
or patch the older ones, as described [http://www.nvnews.net/vbulletin/showthread.php?t=110088 here]&lt;br /&gt;
&lt;br /&gt;
There will be a NVRAM warning in dmesg on x86_64, which, according to nvidia, can safely be ignored. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here] (for tuxonice and wireless patched) &lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37426</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37426"/>
		<updated>2008-04-24T13:17:55Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: 2.6.25&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## The following settings can be changed on the fly&lt;br /&gt;
## by using synclient. Note that shm has to be enabled for this. &lt;br /&gt;
## All options are documented in the synaptics driver documentation. &lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	  &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	  &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	  &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	  &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	  &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	  &amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	  &amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	  &amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	  &amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	  &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	  &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	  &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	  &amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	  &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Lenovo R61 Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA Quadro NVS 140M&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot;                &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot;   &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot;             &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;               &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot;                   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot;             &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;br /&gt;
&lt;br /&gt;
== Unstable Kernels and updates ==&lt;br /&gt;
&lt;br /&gt;
Recently, 2.6.25-tuxonice hit portage, ~masked. &lt;br /&gt;
If you'd like to to update there are several important changes. &lt;br /&gt;
&lt;br /&gt;
1) you'll need two new hdaps patches, [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-1.diff here] and [http://www.fuchsnet.ch/files/tp/hdaps-2.6.25-patch-2.diff here]. &lt;br /&gt;
&lt;br /&gt;
2) you might want to patch iwlwifi to the newest version, with working LEDs. &lt;br /&gt;
A patch can be found [http://www.fuchsnet.ch/files/tp/linux-2.6.25-iwl-merge.patch.bz2 here], original from [http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1209 here]&lt;br /&gt;
&lt;br /&gt;
Please note: I can't guarantee that the patches above will work, &lt;br /&gt;
nor I can guarantee that they don't screw your system. &lt;br /&gt;
They work fine here, but might not on your computer. &lt;br /&gt;
I am not responsible for whatever happens when you use them. &lt;br /&gt;
&lt;br /&gt;
Those patches can be applied with patch -p1 &amp;lt; $patchname in your linux directory. &lt;br /&gt;
Please note that in kernel ALSA should be used, as 1.0.16 (which is in kernel) &lt;br /&gt;
fails to compile.&lt;br /&gt;
&lt;br /&gt;
My 2.6.25 kernel config is &lt;br /&gt;
[http://www.fuchsnet.ch/files/tp/config-2.6.25-ice-wl here]&lt;br /&gt;
&lt;br /&gt;
Use at own risk, and note that I use ext3 as filesystem and ahci for the hdd.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37364</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37364"/>
		<updated>2008-04-20T13:04:12Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Graphics: NVIDIA Quadro NVS 140M */  performance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Performance of the card depends heavy on powermizer &lt;br /&gt;
and some nvidia settings. &lt;br /&gt;
&lt;br /&gt;
I recommend you read my [[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#xorg.conf|Xorg.conf]],&lt;br /&gt;
put the following settings in an autostart&lt;br /&gt;
&lt;br /&gt;
nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1 &amp;amp;&lt;br /&gt;
&lt;br /&gt;
and use this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while true; do&lt;br /&gt;
    &lt;br /&gt;
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`&lt;br /&gt;
    &lt;br /&gt;
    if [ $powerstate = &amp;quot;on-line&amp;quot;  ]; then&lt;br /&gt;
       nvidia-settings -q all &amp;gt; /dev/null&lt;br /&gt;
    fi&lt;br /&gt;
    sleep 25;&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which forces powermizer to stay on level 2 while your thinkpad is on AC power, not battery. &lt;br /&gt;
(You can remove the if to keep it on level 2 even on battery, but this consume more power)&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 [[dynticks]] are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## The following settings can be changed on the fly&lt;br /&gt;
## by using synclient. Note that shm has to be enabled for this. &lt;br /&gt;
## All options are documented in the synaptics driver documentation. &lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	  &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	  &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	  &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	  &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	  &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	  &amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	  &amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	  &amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	  &amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	  &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	  &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	  &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	  &amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	  &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Lenovo R61 Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA Quadro NVS 140M&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot;                &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot;   &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot;             &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;               &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot;                   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot;             &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37187</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37187"/>
		<updated>2008-03-28T11:49:26Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
You also might want to change the keyboard layout. &lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
Note: in this configuration here nvidia wont read out&lt;br /&gt;
sane refresh and sync values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes given don't affect &lt;br /&gt;
the modes available and you will have all screen resolutions available,&lt;br /&gt;
but it might fail on other display devices. &lt;br /&gt;
&lt;br /&gt;
If you get a blank screen or strange refresh values, add # in front of the marked line to disable &lt;br /&gt;
this behaviour, so the nvidia driver will still read out sane resolutions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## The following settings can be changed on the fly&lt;br /&gt;
## by using synclient. Note that shm has to be enabled for this. &lt;br /&gt;
## All options are documented in the synaptics driver documentation. &lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	  &amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	  &amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot; &amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	  &amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	  &amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	  &amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	  &amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	  &amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	  &amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	  &amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	  &amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot; &amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	  &amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	  &amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	  &amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	  &amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	  &amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Lenovo&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Lenovo R61 Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA Quadro NVS 140M&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot;                &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot;   &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot;             &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;               &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot;            &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot;           &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot;                   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot;             &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37168</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37168"/>
		<updated>2008-03-26T19:32:13Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: revert, bad idea, even with my modified script which takes a keycode as argument&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37167</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37167"/>
		<updated>2008-03-26T19:28:08Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* default.sh (acpid) */ adapted on fake keystrokes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/local/bin/injectkey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/local/bin/injectkey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/local/bin/injectkey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== Fake keystrokes === &lt;br /&gt;
&lt;br /&gt;
To create fake keystrokes on ACPI events you can have a look at this article: &lt;br /&gt;
&lt;br /&gt;
[[How to inject fake keystrokes]]&lt;br /&gt;
&lt;br /&gt;
You can use the keystrokes on ACPI events for key combinations&lt;br /&gt;
without a X event but an acpi event.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37166</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37166"/>
		<updated>2008-03-26T19:26:52Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* ACPI Fakekey */  renamed, using thinkwiki fake keystroke app&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== Fake keystrokes === &lt;br /&gt;
&lt;br /&gt;
To create fake keystrokes on ACPI events you can have a look at this article: &lt;br /&gt;
&lt;br /&gt;
[[How to inject fake keystrokes]]&lt;br /&gt;
&lt;br /&gt;
You can use the keystrokes on ACPI events for key combinations&lt;br /&gt;
without a X event but an acpi event.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37128</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37128"/>
		<updated>2008-03-24T15:17:30Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
## Some of the following options are set by default in newer nvidia drivers&lt;br /&gt;
## are are kept for compatibility reasons. Please read the Appendix in the&lt;br /&gt;
## README of your current nvidia driver for further information&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## The following option enables using frequencies not specified in the EDID.&lt;br /&gt;
        ## In this case several additional screen resolutions will be possible. &lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37114</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37114"/>
		<updated>2008-03-23T16:52:15Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Sound: AD1984 */  version update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37082</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37082"/>
		<updated>2008-03-22T20:10:33Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  nvagp&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
        Option      &amp;quot;NvAGP&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37081</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37081"/>
		<updated>2008-03-22T19:11:24Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Power Management */  renamed to suspend&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Suspend ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37080</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37080"/>
		<updated>2008-03-22T19:10:54Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Power Management */  extra_pages_allowance&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the extra_pages_allowance might be too low. &lt;br /&gt;
In current TuxOnIce versions the option to raise this value&lt;br /&gt;
did not work anymore, that's why I put&lt;br /&gt;
&lt;br /&gt;
echo 1000 &amp;gt; /sys/power/tuxonice/extra_pages_allowance&lt;br /&gt;
&lt;br /&gt;
in my local.startup. &lt;br /&gt;
&lt;br /&gt;
You can get the correct value by trying to suspend&lt;br /&gt;
without it and reading /var/log/hibernate.log afterwards. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command.&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37079</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37079"/>
		<updated>2008-03-22T18:32:17Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: works without acpi-support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
&lt;br /&gt;
This is my /etc/hibernate/common.conf  file. &lt;br /&gt;
Note that all options not mentioned here are commented (#) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verbosity 0&lt;br /&gt;
LogFile /var/log/hibernate.log&lt;br /&gt;
LogVerbosity 3&lt;br /&gt;
HibernateVT 11&lt;br /&gt;
Distribution gentoo&lt;br /&gt;
# XDisplay :0&lt;br /&gt;
&lt;br /&gt;
### clock&lt;br /&gt;
SaveClock restore-only&lt;br /&gt;
&lt;br /&gt;
### hardware_tweaks&lt;br /&gt;
IbmAcpi yes&lt;br /&gt;
FullSpeedCPU yes&lt;br /&gt;
&lt;br /&gt;
### modules&lt;br /&gt;
# UnloadBlacklistedModules yes&lt;br /&gt;
LoadModules auto&lt;br /&gt;
&lt;br /&gt;
### xhacks&lt;br /&gt;
SwitchToTextMode yes&lt;br /&gt;
UseDummyXServer yes&lt;br /&gt;
# DummyXServerConfig xorg-dummy.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37078</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=37078"/>
		<updated>2008-03-22T17:48:11Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: suspend to disk works&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* Suspend to Disk (Hibernate)&lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
Suspend to Disk is more complicated. &lt;br /&gt;
Emerge a tux on ice kernel and try the configuration file&lt;br /&gt;
linked at the end of this page. Disable intel-agp in the kernel. &lt;br /&gt;
Make sure to load the nvidia module with NVreg_NvAGP=1 option. &lt;br /&gt;
Emerge acpi-support and disable hibernate-script. &lt;br /&gt;
Make sure that in /etc/hibernate/common.conf loading blacklisted&lt;br /&gt;
modules is disabled and don't use anything like vbetool. &lt;br /&gt;
&lt;br /&gt;
The machine can now be suspended to disk with the hibernate command. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 TOI Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36914</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36914"/>
		<updated>2008-03-09T18:24:58Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* ibm-acpi */  sudo changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (not working out of the box because of nvidia, will test with tux on ice)  &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
The default file permissions in /proc/acpi/ibm/* do not grant write access for users. I created the group &amp;quot;ibm&amp;quot;, added my users to it and now I chown root:ibm and chmod 0774 the files in /proc/acpi/ibm/ on startup. If you don't want to do this you might use sudo sh -c &amp;quot;echo &amp;quot;foo&amp;quot; &amp;gt; /proc/acpi/ibm/whatever&amp;quot;, but you need to install sudo and modify your sudoers file.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36913</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36913"/>
		<updated>2008-03-09T18:22:22Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Thinklight */ remove sudo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (not working out of the box because of nvidia, will test with tux on ice)  &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			echo off &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		else&lt;br /&gt;
			echo on &amp;gt; /proc/acpi/ibm/light&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
In the scripts on this page I use sudo to write to /proc/acpi/ibm/*. I prefer another way, I just created a group called ibm and I chown the files in /proc/acpi/ibm/ to root:ibm and chmod to 0774 on startup. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36912</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36912"/>
		<updated>2008-03-09T18:21:48Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth */  remove sudo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (not working out of the box because of nvidia, will test with tux on ice)  &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
In the scripts on this page I use sudo to write to /proc/acpi/ibm/*. I prefer another way, I just created a group called ibm and I chown the files in /proc/acpi/ibm/ to root:ibm and chmod to 0774 on startup. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36911</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36911"/>
		<updated>2008-03-09T18:12:38Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: ibm-acpi and minor changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (not working out of the box because of nvidia, will test with tux on ice)  &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event. &lt;br /&gt;
Take a look at the ibm-acpi section as well to do this on module load. &lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== ibm-acpi == &lt;br /&gt;
&lt;br /&gt;
I have ibm-acpi configured as a module in my kernel, as I load it with&lt;br /&gt;
&lt;br /&gt;
options thinkpad_acpi hotkey=enable,0xffffffff brightness_enable=1 fan_control=1&lt;br /&gt;
&lt;br /&gt;
to enable brightness controll via /proc/acpi/ibm on newer kernels and fan control. &lt;br /&gt;
The hotkey=enable,&amp;lt;mask&amp;gt; option is used instead of writing to /proc/acpi/ibm/hotkey. &lt;br /&gt;
&lt;br /&gt;
In the scripts on this page I use sudo to write to /proc/acpi/ibm/*. I prefer another way, I just created a group called ibm and I chown the files in /proc/acpi/ibm/ to root:ibm and chmod to 0774 on startup. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
       Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36817</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36817"/>
		<updated>2008-03-04T11:26:54Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Graphics: NVIDIA Quadro NVS 140M */  update to recent drivers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (should work) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19 up to 169.12, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with newer nvidia drivers (&amp;gt;=169.04)&lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
Using 169.12 or newer is recommended, as brightness control works there and some powermizer issues, which caused bad perfomance in applications like compiz-fusion, had been fixed.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36807</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36807"/>
		<updated>2008-03-03T22:46:03Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  missing quotation mark in xorg.conf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (should work) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36656</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36656"/>
		<updated>2008-02-28T13:16:53Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth */  LED Patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (should work) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
If you desperately want the wireless LED to work you can use &lt;br /&gt;
[http://bughost.org/bugzilla/attachment.cgi?id=1263 this] patch for a 2.6.24 kernel. &lt;br /&gt;
Make sure to enable LED Triggers and LED groups in your kernel configuration, &lt;br /&gt;
then there is a new option in the iwlwifi submenu. Works here, however, &lt;br /&gt;
it doesn't blink on activity as it would with windows.&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36655</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36655"/>
		<updated>2008-02-28T13:12:23Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: added more harddisk protection information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (should work) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It can be used for protecting your harddisk as well. &lt;br /&gt;
You first need to patch your kernel with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this patch] and then rebuild it. Make sure to diable the kernel internal hdaps module, emerge hdapsd and tp_smapi with the hdaps flag enabled, rc-update add hdapsd boot and then reboot. &lt;br /&gt;
&lt;br /&gt;
When shaking your notebook you should receive a message via dmesg that the hdd head has been parked. &lt;br /&gt;
You can also use a frontend like khdaps. &lt;br /&gt;
&lt;br /&gt;
Heads will only be parked with this method. However, in some situations and with some disk there will be a full spindown, which should be avoided as this might damage your harddisk when used too much. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36650</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36650"/>
		<updated>2008-02-27T22:50:34Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* General */  sucessfully tested harddrive protection, so added as working&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
* Harddisk protection (kernel patched with [http://www.fuchsnet.ch/files/hdaps-2.6.24.patch this])&lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (should work) &lt;br /&gt;
* Express Card Slot (should work, no devices for testing) &lt;br /&gt;
* Docking Station (should work according to several sources, no devices for testing)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36563</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36563"/>
		<updated>2008-02-24T12:59:03Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* xorg.conf */  added some resolutions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note: in this configuration here nvidia will read out&lt;br /&gt;
sane values out of your flat panel. &lt;br /&gt;
&lt;br /&gt;
In this configuration the modes and frequencies given don't affect &lt;br /&gt;
the modes available and you will only have 3 resolutions,&lt;br /&gt;
but it saves lots of time spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Remove the # in front of the marked line to disable parts of this behaviour (nvidia will still read out sane resolutions, read the nvidia documents to disable this behaviour as well), &lt;br /&gt;
which gives me 5 additional screen resolutions here. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
	HorizSync    28.0 - 61.0&lt;br /&gt;
	VertRefresh  43.0 - 62.0&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
&lt;br /&gt;
        ## Comment this out for more resolutions&lt;br /&gt;
        ## Make sure that HorizSync and VertRefresh fit to your monitor, &lt;br /&gt;
        ## As nvidia wont read out allowed values anymore &lt;br /&gt;
&lt;br /&gt;
        # Option      &amp;quot;UseEdidFreqs&amp;quot; &amp;quot;false&amp;quot;&lt;br /&gt;
&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36483</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36483"/>
		<updated>2008-02-17T21:24:53Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Thinklight */ typo in the external url, which is bad.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36468</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36468"/>
		<updated>2008-02-15T20:59:55Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Thinklight */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
There is a version slightly modified by a friend of mine&lt;br /&gt;
[http://www.fuchsnet.ch/files/thinklight.sh.com here] which has a lockfile and is slightly optimized. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36465</id>
		<title>Talk:Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36465"/>
		<updated>2008-02-15T14:36:35Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Fingerprint reader */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On my thinkpad R61, AHCI controller works on gentoo kernel 2.6.22r9 (i think i had to change /etc/fstab after installing in compatibility mode) and additionally you can install the AHCI driver on Windows 2000/XP (http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=migr-62909) and reactivate the controller in the bios. i don't really know if this always works, but with kernel 2.6.22r9 it did. Anybody else who has the same luck? then you/I may add this to the wiki. it is better you add it, because i'm german and my english is not so well. thank you.&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
I never said it would not work, &lt;br /&gt;
however, in my opinion there is no good reason for using it, &lt;br /&gt;
and as it leads to BSODs on Window Systems which do not&lt;br /&gt;
have the AHCI driver it is more safe to disable it. &lt;br /&gt;
&lt;br /&gt;
As for the english: I am swiss, so my (swiss)german&lt;br /&gt;
and french are better than my english... you can add it&lt;br /&gt;
if you'd like to, but I'd rather hear some more&lt;br /&gt;
comments on this of other users. &lt;br /&gt;
&lt;br /&gt;
Fuchs&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
== Fingerprint reader ==&lt;br /&gt;
&lt;br /&gt;
Could you please show the output of lsusb?&lt;br /&gt;
I've read that fingerprint scanner from R61 is not supported by thinkfinger.&lt;br /&gt;
&amp;lt;pre&amp;gt;# lsusb&lt;br /&gt;
Bus 007 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 006 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 005 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 004 Device 002: ID 067b:3507 Prolific Technology, Inc. PL3507 ATAPI6 Bridge &lt;br /&gt;
Bus 004 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 003 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 002 Device 002: ID 046d:c50e Logitech, Inc. MX-1000 Cordless Mouse Receiver&lt;br /&gt;
Bus 002 Device 001: ID 0000:0000  &lt;br /&gt;
Bus 001 Device 003: ID 147e:2016  &amp;lt;- this is probably the reader (?)&lt;br /&gt;
Bus 001 Device 002: ID 0a5c:2110 Broadcom Corp. &lt;br /&gt;
Bus 001 Device 001: ID 0000:0000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It might be that newer / older models have a new fingerprint reader, &lt;br /&gt;
either provide the thinkfinger people with any information you got&lt;br /&gt;
or try whether fprint works for this device. &lt;br /&gt;
&lt;br /&gt;
However, I am no big fan of fprint because of it's strange behaviour&lt;br /&gt;
when you like to use either a password or your finger. &lt;br /&gt;
&lt;br /&gt;
Fuchs&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36448</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36448"/>
		<updated>2008-02-12T18:50:31Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Sound: AD1984 */  2.6.24 changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...) &lt;br /&gt;
Please note that some mixer applications take the wrong mixer (the microphone) as the default, so you have to change the default / primary mixer in order to use things like kmilo. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note for Kernel 2.6.24:'''&lt;br /&gt;
Due to changes in thinkpad acpi the mute button does not longer work out of the box, &lt;br /&gt;
but it does generate a key event. So you have to bind it to a script which mutes&lt;br /&gt;
the headphone and speaker via amixer toggle &amp;lt;mixer&amp;gt;. &lt;br /&gt;
This is a known problem to the thinkpad-acpi developers and probably will&lt;br /&gt;
be resolved in the near future. &lt;br /&gt;
&lt;br /&gt;
I recommend using alsa-drivers 1.0.16_r2, as there is a new master mixer, &lt;br /&gt;
which has mute capabilities to mute headphones and speaker. &lt;br /&gt;
So you can either bind the key in a mixer application or you only have&lt;br /&gt;
to use one amixer command.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36440</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36440"/>
		<updated>2008-02-12T16:10:17Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...)  &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
with AHCI disabled or enabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you probably want to disable AHCI anyway, &lt;br /&gt;
at least until you have installed the ahci driver for Windows.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36439</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36439"/>
		<updated>2008-02-12T15:55:49Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Sound: AD1984 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. You can use xmodmap to bind a key to them and then either bind a amixer command to them, or set them as hotkeys in your mixer application (kmix, gnome-mixer, ...)  &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application.&lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
at least with AHCI disabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you want to disable AHCI anyway.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36438</id>
		<title>Installing Gentoo 2007.0 on a ThinkPad R61</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Installing_Gentoo_2007.0_on_a_ThinkPad_R61&amp;diff=36438"/>
		<updated>2008-02-12T15:54:12Z</updated>

		<summary type="html">&lt;p&gt;Fuchs: /* Configuration Files */  kernel config&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Model ==&lt;br /&gt;
Lenovo Thinkpad {{R61}} 7743-Y1B&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
This installation instruction describes the steps after a Gentoo 2007.0 base installation. &lt;br /&gt;
Please read the gentoo handbook for installation instructions&lt;br /&gt;
&lt;br /&gt;
====Working:====&lt;br /&gt;
&lt;br /&gt;
* Keyboard, UltraNav input (Touchpad and NavPoint) &lt;br /&gt;
* Drives&lt;br /&gt;
* X11 with nVidia including acceleration&lt;br /&gt;
* Network, wireless network and bluetooth &lt;br /&gt;
* Sound&lt;br /&gt;
* Suspend to RAM &lt;br /&gt;
* ThinkLight&lt;br /&gt;
* PCMCIA &lt;br /&gt;
* ACPI (Battery, CPU Frequency, Fan, Temperature, ...) &lt;br /&gt;
* Fingerprint scanner (includes login and screen lock) &lt;br /&gt;
* Fn Key combinations&lt;br /&gt;
* Hot swapping of optical drive (UltraBay) &lt;br /&gt;
* HDD Acceleration Meter (can be used as an input device)  &lt;br /&gt;
&lt;br /&gt;
====Not tested:====&lt;br /&gt;
&lt;br /&gt;
* Firewire (should work as it is recognized, no devices for testing)&lt;br /&gt;
* Suspend to disk (hibernate) &lt;br /&gt;
* Express Card Slot (should work) &lt;br /&gt;
* Harddisk protection (should work with patching)&lt;br /&gt;
* Docking Station (should work according to several sources)&lt;br /&gt;
&lt;br /&gt;
== Graphics: NVIDIA Quadro NVS 140M ==&lt;br /&gt;
&lt;br /&gt;
To install and configure the nVidia driver, just emerge nvidia-driver. &lt;br /&gt;
Tested with nvidia-driver-100.14.19, everything works fine, games run smooth. &lt;br /&gt;
&lt;br /&gt;
Framebuffer works fine with vga=869 which will set the resolution to 1440x900. &lt;br /&gt;
hwinfo --framebufer  displays all supported resolutions.  &lt;br /&gt;
&lt;br /&gt;
The brightness can be changed with the new nvidia driver&lt;br /&gt;
(169.04) which is a beta driver at the moment. &lt;br /&gt;
Does not work with older drivers, only known workaround&lt;br /&gt;
is to either use vesa / nv driver or to change the&lt;br /&gt;
brightness on a vt.&lt;br /&gt;
&lt;br /&gt;
== Sound: AD1984 ==&lt;br /&gt;
Did not work with older Versions of ALSA driver, works fine with ALSA 1.0.15 and should work&lt;br /&gt;
with ALSA 1.0.14 as well. The in-kernel ALSA works since 2.6.23. &lt;br /&gt;
&lt;br /&gt;
The mute button is hardwired and works, the volume up and volume down buttons &lt;br /&gt;
work as well but you need to configure them first. &lt;br /&gt;
&lt;br /&gt;
Note: After muting you have to press a volume up or down button to unmute, &lt;br /&gt;
and the mute status is not displayed in any mixer application. &lt;br /&gt;
&lt;br /&gt;
== Network: Intel E1000 NIC, IPW4965abgn WNIC, Bluetooth== &lt;br /&gt;
&lt;br /&gt;
The integrated e1000 LAN NIC works out of the box. &lt;br /&gt;
&lt;br /&gt;
For wireless you have to unmask and emerge the iwlwifi package &lt;br /&gt;
with the ipw4965 USEFlag enabled. &lt;br /&gt;
&lt;br /&gt;
Don't forget that the interface (wlan0) has to be set as up&lt;br /&gt;
(ifconfig wlan0 up) before scanning and associating works.&lt;br /&gt;
&lt;br /&gt;
Bluetooth works out of the box with blueZ.&lt;br /&gt;
You can disable / enable bluetooth via proc, &lt;br /&gt;
with a script similar to this one: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
bluetooth=`head -n 1 /proc/acpi/ibm/bluetooth | awk '{print $2}'`&lt;br /&gt;
case &amp;quot;$bluetooth&amp;quot; in&lt;br /&gt;
    disabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;enable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
	;;&lt;br /&gt;
    enabled)&lt;br /&gt;
        sudo sh -c &amp;quot;echo &amp;quot;disable&amp;quot; &amp;gt; /proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or directly with the proc interface. This script helps you&lt;br /&gt;
to bind it to the Fn+F5 key combination. &lt;br /&gt;
&lt;br /&gt;
Note that the hardware killswitch on the front works as well, &lt;br /&gt;
but disables both bluetooth and WLAN&lt;br /&gt;
&lt;br /&gt;
== Ports: PCMCIA, USB, IEEE 1394 Firewire == &lt;br /&gt;
&lt;br /&gt;
PCMCIA port works out of the box, tested with an audigy pcmcia. &lt;br /&gt;
I have no express slot cards available for testing. &lt;br /&gt;
&lt;br /&gt;
The left hand usb ports generate an IRQ nobody cared error from time to time, &lt;br /&gt;
Try to boot with irqpoll in your kernel line as suggested. &lt;br /&gt;
&lt;br /&gt;
A BIOS Update might help as well, it is recommended to use the&lt;br /&gt;
ThinkVantage Software Updater for windows for a BIOS Update. &lt;br /&gt;
The error disappeared here and USB works fine. &lt;br /&gt;
&lt;br /&gt;
Firewire is untested but should work, as the port is &lt;br /&gt;
recognized and the module loaded.&lt;br /&gt;
&lt;br /&gt;
== Drives ==&lt;br /&gt;
&lt;br /&gt;
The optical drive and hard drive work out of the box, &lt;br /&gt;
at least with AHCI disabled in the BIOS. &lt;br /&gt;
&lt;br /&gt;
If you run a dualboot system with windows &amp;lt;= 5.1 (XP) you want to disable AHCI anyway.&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
&lt;br /&gt;
=== TouchPad ===&lt;br /&gt;
Works out of the box here, with scrolling. &lt;br /&gt;
Have a look at my Xorg.conf section at the end&lt;br /&gt;
&lt;br /&gt;
Can be disabled via synclient when using the synaptics driver, &lt;br /&gt;
a possible solution is this script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
touchpad=`synclient -l | grep TouchpadOff | awk '{print $3}'`&lt;br /&gt;
case &amp;quot;$touchpad&amp;quot; in&lt;br /&gt;
    1)&lt;br /&gt;
        synclient TouchpadOff=0;&lt;br /&gt;
	echo &amp;quot;Touchpad Enabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
	;;&lt;br /&gt;
    0)&lt;br /&gt;
        synclient TouchpadOff=1;&lt;br /&gt;
	echo &amp;quot;Touchpad Disabled&amp;quot; | osd_cat -d 1 -c cyan --font=&amp;quot;-*-times-bold-r-*--34-240-*-*-p-*-*-*&amp;quot; -A center -p bottom&lt;br /&gt;
    ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which needs xosd to display the current state. &lt;br /&gt;
You can make it excecutable and map it to the fn+f8 button.&lt;br /&gt;
&lt;br /&gt;
=== Trackpoint ===&lt;br /&gt;
Works out of the box as well, with no scrolling however. &lt;br /&gt;
Can be configured via xorg.conf, I prefer using the middle button as mouse3. &lt;br /&gt;
&lt;br /&gt;
=== Keyboard ===&lt;br /&gt;
Works out of the box, most of the Fn Keys work. &lt;br /&gt;
&lt;br /&gt;
Hardwired:  Mute, Thinklight, Brightness &lt;br /&gt;
&lt;br /&gt;
Generates a keycode and can be configured: Volume Down, Volume Up, Fn+F2, Fn+F3, Fn+F4, Fn+F5, Fn+F7, Fn+F8, Fn+Arrows&lt;br /&gt;
&lt;br /&gt;
Does not generate a key event: Fn+F9, Fn+F12, Fn+Space&lt;br /&gt;
Those keys do produce an acpi event, so you can modifiy your&lt;br /&gt;
acpi configuration to bind them to commands.&lt;br /&gt;
&lt;br /&gt;
It is also possible to translate the acpi events to keyevents, have a look at the following configuration file: &lt;br /&gt;
&lt;br /&gt;
[[Installing_Gentoo_2007.0_on_a_ThinkPad_R61#default.sh_.28acpid.29|My example default.sh file for the missing keys is here]]&lt;br /&gt;
and there is a good, more complete howto&lt;br /&gt;
here: [http://gentoo-wiki.com/HARDWARE_Lenovo_Thinkpad_T61#Usage_of_acpid Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
Try whether  echo &amp;quot;0xffffffff&amp;quot; &amp;gt; /proc/acpi/ibm/hotkey &lt;br /&gt;
enables additional fn+fx keys to produce a key event&lt;br /&gt;
instead of only an acpi event.&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
Suspend to RAM worked out of the box here, echo 3 &amp;gt; /proc/acpi/sleep &lt;br /&gt;
puts the machine in suspend mode, opening it or pressing the power button wakes it up. &lt;br /&gt;
Worked with nvidia driver and in X11. All devices came back without problems, &lt;br /&gt;
wlan might have disconnected, but by using networkmanager, wicd or a good configuration&lt;br /&gt;
it should reconnect after waking up. Works here with wicd. &lt;br /&gt;
&lt;br /&gt;
== Integrated Fingerprint Reader ==&lt;br /&gt;
Emerge the thinkfinger package, add a user with the tf-tool. &lt;br /&gt;
Then you have to edit the /etc/pam.d/system-auth file by adding&lt;br /&gt;
&lt;br /&gt;
auth       sufficient   pam_thinkfinger.so&lt;br /&gt;
&lt;br /&gt;
between pam.unix and pam.env. &lt;br /&gt;
&lt;br /&gt;
Read the Gentoo-Wiki to use it with xscreensaver, &lt;br /&gt;
there is a good solution over [http://gentoo-wiki.com/HOWTO_Thinkfinger there]&lt;br /&gt;
&lt;br /&gt;
Note: kdm has problems with thinkfinger auth and might crash. &lt;br /&gt;
There are patches, but I didn't test them yet. gdm works fine here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hard Drive Active Protection ==&lt;br /&gt;
&lt;br /&gt;
The integrated harddrive active protection&lt;br /&gt;
acceleration meter can be used as a joystick or &lt;br /&gt;
to get information about movements of your thinkpad. &lt;br /&gt;
&lt;br /&gt;
Emerge the hdapsd (which includes a kernel module&lt;br /&gt;
you have to load) which will generate a joystick&lt;br /&gt;
and an event device.&lt;br /&gt;
&lt;br /&gt;
It could as well be used to protect your harddisk &lt;br /&gt;
from damage, but I have not tested this and I wont, &lt;br /&gt;
as I can't be arsed to use my backups just because&lt;br /&gt;
I did some experimenting with my hdd. &lt;br /&gt;
&lt;br /&gt;
== Thinklight ==&lt;br /&gt;
&lt;br /&gt;
The thinklight works out of the box with the&lt;br /&gt;
Fn+PgUp key, but it can be controlled as well via the proc interface. &lt;br /&gt;
&lt;br /&gt;
So you can write a nice script, which you can bind to events, &lt;br /&gt;
such as incoming emails, to let the light flash. &lt;br /&gt;
&lt;br /&gt;
A possible solution is this small script: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ -z &amp;quot;$1&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
	echo &amp;quot;IBM ThinkLight Control script.&amp;quot; &lt;br /&gt;
	echo &amp;quot;2007 by Christian \&amp;quot;Fuchs\&amp;quot; Loosli.&amp;quot;&lt;br /&gt;
	echo &amp;quot;&amp;quot;&lt;br /&gt;
	echo &amp;quot;usage: lightctl on | off | toggle | blink&amp;quot;&lt;br /&gt;
	echo &amp;quot;blink takes two arguments: times and time&amp;quot;&lt;br /&gt;
	echo &amp;quot;defaults (5 times, 0.5 seconds) are used if not specified&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else &lt;br /&gt;
	if [ $1 = &amp;quot;on&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
    	       sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
	if [ $1 = &amp;quot;off&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
   	       sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
        if [ $1 = &amp;quot;toggle&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
		status=`cat /proc/acpi/ibm/light | grep status | awk '{print $2}'`&lt;br /&gt;
&lt;br /&gt;
		if [ $status = &amp;quot;on&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			sudo sh -c &amp;quot;echo off &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			sudo sh -c &amp;quot;echo on &amp;gt; /proc/acpi/ibm/light&amp;quot;&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $1 = &amp;quot;blink&amp;quot; ]&lt;br /&gt;
	then&lt;br /&gt;
&lt;br /&gt;
		times=$2&lt;br /&gt;
		time=$3&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$2&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			times=4 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
		if [ -z &amp;quot;$3&amp;quot; ]&lt;br /&gt;
		then&lt;br /&gt;
			time=0.5 &lt;br /&gt;
		fi&lt;br /&gt;
&lt;br /&gt;
    	        for i in `seq 1 $times`;&lt;br /&gt;
    	        do&lt;br /&gt;
    		        $0 toggle;&lt;br /&gt;
                        sleep $time;&lt;br /&gt;
                        $0 toggle;&lt;br /&gt;
                        sleep $time&lt;br /&gt;
    	        done    &lt;br /&gt;
	fi&lt;br /&gt;
fi&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
which can be called to let the light blink or switch it off or on. &lt;br /&gt;
The blink part is nice for setting to events such as incoming&lt;br /&gt;
messages or emails. &lt;br /&gt;
&lt;br /&gt;
(note: the thinklight is a LED, so it should not care on &lt;br /&gt;
how fast and often you let it blink. But I am not responsible&lt;br /&gt;
if this script damages your thinklight. Use at own risk.&lt;br /&gt;
&lt;br /&gt;
== Power saving == &lt;br /&gt;
&lt;br /&gt;
First of all, turn off all things you are not using, &lt;br /&gt;
most of all bluetooth and W-LAN. &lt;br /&gt;
You can use the killswitch on the front, it works out of the box. &lt;br /&gt;
&lt;br /&gt;
You can use the application [http://www.lesswatts.org/projects/powertop/ powertop]&lt;br /&gt;
by Intel to look for processes which prevent the CPU from longer sleep states. &lt;br /&gt;
&lt;br /&gt;
It also gives you some recommendations on services to turn off. Do _not_ turn off the optical drive polling by HAL. &lt;br /&gt;
&lt;br /&gt;
Dimming the display also saves lots of power. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since 2.6.24 dynticks are available for x86_64. &lt;br /&gt;
&lt;br /&gt;
I managed to get powerconsumption down to: &lt;br /&gt;
&lt;br /&gt;
* 20W running normal with compiz, wlan &amp;amp; bluetooth enabled&lt;br /&gt;
&lt;br /&gt;
* 16.7W running a normal windowmanager&lt;br /&gt;
&lt;br /&gt;
* 14.5W with bluetooth and wlan disabled (killswitch) &lt;br /&gt;
&lt;br /&gt;
I had between 195 and 600 wakeups per second. &lt;br /&gt;
&lt;br /&gt;
Also hda-intel and s-ata power consumption was reduced in 2.6.24&lt;br /&gt;
&lt;br /&gt;
You can achieve about 2 - 3 hours of working time&lt;br /&gt;
(no compiling or other heavy CPU / GPU usage applications) &lt;br /&gt;
with the standard battery like this.&lt;br /&gt;
&lt;br /&gt;
== Configuration Files ==&lt;br /&gt;
&lt;br /&gt;
=== xorg.conf ===&lt;br /&gt;
Note that I use the XFont Server, you might have &lt;br /&gt;
to change the font path. &lt;br /&gt;
&lt;br /&gt;
Note as well that the modes given don't affect &lt;br /&gt;
the modes available, as in this configuration the nvidia driver&lt;br /&gt;
reads out the available resolutions which fit the monitor. &lt;br /&gt;
You will only have 3 resolutions, but it saves lots of time&lt;br /&gt;
spent on configuring frequencies otherwhise. &lt;br /&gt;
&lt;br /&gt;
Read the nvidia documentation on how to disable this behaviour if&lt;br /&gt;
you want the same resolutions as in windows or other OSes. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;ServerLayout&amp;quot;&lt;br /&gt;
	Identifier     &amp;quot;single head configuration&amp;quot;&lt;br /&gt;
	Screen         0 &amp;quot;Screen0&amp;quot; 0 0&lt;br /&gt;
        InputDevice    &amp;quot;Keyboard0&amp;quot; &amp;quot;CoreKeyboard&amp;quot;&lt;br /&gt;
	InputDevice    &amp;quot;Mouse0&amp;quot; &amp;quot;CorePointer&amp;quot; &lt;br /&gt;
        inputDevice    &amp;quot;Touchpad&amp;quot; &amp;quot;SendCoreEvents&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Files&amp;quot;&lt;br /&gt;
	FontPath     &amp;quot;unix/:-1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Module&amp;quot;&lt;br /&gt;
	Load  &amp;quot;dbe&amp;quot;&lt;br /&gt;
	Load  &amp;quot;extmod&amp;quot;&lt;br /&gt;
	Load  &amp;quot;glx&amp;quot;&lt;br /&gt;
	Load  &amp;quot;freetype&amp;quot;&lt;br /&gt;
	Load  &amp;quot;type1&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Keyboard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;kbd&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbModel&amp;quot; &amp;quot;pc102&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;XkbLayout&amp;quot; &amp;quot;ch&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
    Identifier	&amp;quot;Touchpad&amp;quot;&lt;br /&gt;
    Driver	&amp;quot;synaptics&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Protocol&amp;quot;	&amp;quot;auto-dev&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Device&amp;quot;	&amp;quot;/dev/input/mouse0&amp;quot;&lt;br /&gt;
    Option	&amp;quot;Emulate3Buttons&amp;quot;	&amp;quot;no&amp;quot;&lt;br /&gt;
    Option	&amp;quot;ZAxisMapping&amp;quot;	&amp;quot;4 5&amp;quot;&lt;br /&gt;
    Option	&amp;quot;LeftEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;RightEdge&amp;quot;	&amp;quot;5300&amp;quot;&lt;br /&gt;
    Option	&amp;quot;TopEdge&amp;quot;	&amp;quot;1700&amp;quot;&lt;br /&gt;
    Option	&amp;quot;BottomEdge&amp;quot;	&amp;quot;4200&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerLow&amp;quot;	&amp;quot;25&amp;quot;&lt;br /&gt;
    Option	&amp;quot;FingerHigh&amp;quot;	&amp;quot;30&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapTime&amp;quot;	&amp;quot;180&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxTapMove&amp;quot;	&amp;quot;220&amp;quot;&lt;br /&gt;
    Option	&amp;quot;VertScrollDelta&amp;quot;	&amp;quot;100&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MinSpeed&amp;quot;	&amp;quot;0.02&amp;quot;&lt;br /&gt;
    Option	&amp;quot;MaxSpeed&amp;quot;	&amp;quot;0.28&amp;quot;&lt;br /&gt;
    Option	&amp;quot;AccelFactor&amp;quot;	&amp;quot;0.0010&amp;quot;&lt;br /&gt;
    Option	&amp;quot;SHMConfig&amp;quot;	&amp;quot;on&amp;quot;&lt;br /&gt;
    Option	&amp;quot;UseSHM&amp;quot;	&amp;quot;true&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Mouse0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;mouse&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Protocol&amp;quot; &amp;quot;ExplorerPS/2&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Device&amp;quot; &amp;quot;/dev/input/mice&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;ZAxisMapping&amp;quot; &amp;quot;6 7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;buttons&amp;quot; &amp;quot;7&amp;quot;&lt;br /&gt;
	Option	    &amp;quot;Emulate3Buttons&amp;quot; &amp;quot;yes&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Monitor&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	VendorName   &amp;quot;Monitor Vendor&amp;quot;&lt;br /&gt;
	ModelName    &amp;quot;Flat Panel 1400x950&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;DPMS&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Device&amp;quot;&lt;br /&gt;
	Identifier  &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Driver      &amp;quot;nvidia&amp;quot;&lt;br /&gt;
	VendorName  &amp;quot;NVIDIA&amp;quot;&lt;br /&gt;
	BoardName   &amp;quot;NVIDIA GeForce FX (generic)&amp;quot;&lt;br /&gt;
	Option 	    &amp;quot;Coolbits&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;AllowGLXWithComposite&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RenderAccel&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option      &amp;quot;UseEvents&amp;quot;         &amp;quot;false&amp;quot;&lt;br /&gt;
	Option      &amp;quot;TripleBuffer&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;DamageEvents&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;BackingStore&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
	Option      &amp;quot;InitialPixmapPlacement&amp;quot; &amp;quot;2&amp;quot;&lt;br /&gt;
	Option      &amp;quot;RandRRotation&amp;quot; &amp;quot;true&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Screen&amp;quot;&lt;br /&gt;
	Identifier   &amp;quot;Screen0&amp;quot;&lt;br /&gt;
	Device       &amp;quot;Videocard0&amp;quot;&lt;br /&gt;
	Monitor      &amp;quot;Monitor0&amp;quot;&lt;br /&gt;
	DefaultDepth  24&lt;br /&gt;
	Option       &amp;quot;AddARGBGLXVisuals&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	Option	     &amp;quot;UseCompositeWrapper&amp;quot; &amp;quot;true&amp;quot;&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport  0 0&lt;br /&gt;
		Depth     24&lt;br /&gt;
		Modes    &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
		Viewport 0 0&lt;br /&gt;
		Depth 16&lt;br /&gt;
		Modes	&amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
	EndSubSection&lt;br /&gt;
	        SubSection &amp;quot;Display&amp;quot;&lt;br /&gt;
	        Viewport 0 0&lt;br /&gt;
		Depth 8&lt;br /&gt;
		Modes   &amp;quot;1440x900&amp;quot; &amp;quot;1024x768&amp;quot; &amp;quot;800x600&amp;quot; &lt;br /&gt;
		EndSubSection&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;Extensions&amp;quot;&lt;br /&gt;
    Option &amp;quot;Composite&amp;quot; &amp;quot;Enable&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
Section &amp;quot;DRI&amp;quot;&lt;br /&gt;
	Group        0&lt;br /&gt;
	Mode         0666&lt;br /&gt;
EndSection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xmodmap ===&lt;br /&gt;
&lt;br /&gt;
Note: you have to xmodmap /path/to/file &lt;br /&gt;
this file in your autostart. You might have different keycodes, use the application xev to display them. &lt;br /&gt;
It is highly recommended to use the XF86foobar buttons, as some applications will be preconfigured to them. &lt;br /&gt;
If you want to map them by yourself use Fxx, while xx &amp;gt; 12. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! additional Arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 233 = XF86Forward&lt;br /&gt;
keycode 234 = XF86Back&lt;br /&gt;
&lt;br /&gt;
! Fn+arrow keys&lt;br /&gt;
&lt;br /&gt;
keycode 144 = XF86AudioPrev&lt;br /&gt;
keycode 162 = XF86AudioPlay&lt;br /&gt;
keycode 153 = XF86AudioNext&lt;br /&gt;
keycode 164 = XF86AudioStop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Fn+Fx keys  F2, F3, F4, F5, F7, F8, F9, F12  in this order&lt;br /&gt;
&lt;br /&gt;
keycode 146 = XF86ScreenSaver&lt;br /&gt;
keycode 241 = XF86Display&lt;br /&gt;
keycode 223 = XF86Sleep&lt;br /&gt;
keycode 243 = XF86Send&lt;br /&gt;
keycode 214 = XF86Video&lt;br /&gt;
keycode 196 = XF86iTouch&lt;br /&gt;
keycode 197 = XF86Eject&lt;br /&gt;
keycode 165 = XF86Standby&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! Space bar&lt;br /&gt;
&lt;br /&gt;
keycode 148 = XF86ZoomIn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
! volume control (mute is hardwired)&lt;br /&gt;
&lt;br /&gt;
keycode 174 = XF86AudioLowerVolume&lt;br /&gt;
keycode 176 = XF86AudioRaiseVolume&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== default.sh (acpid) ===&lt;br /&gt;
&lt;br /&gt;
This is my slightly modified default.sh file to handle ibm hotbutton events. &lt;br /&gt;
Of course you can add the other buttons as well, however, as they produce key events there are easier ways for configuring the actions. However, an acpi solution is window manager / X independent. &lt;br /&gt;
&lt;br /&gt;
You can read out the key events, as they might differ on your model, &lt;br /&gt;
with the acpi_listen application. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;bash&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/acpi/default.sh&lt;br /&gt;
&lt;br /&gt;
set $*&lt;br /&gt;
&lt;br /&gt;
group=${1%%/*}&lt;br /&gt;
action=${1#*/}&lt;br /&gt;
device=$2&lt;br /&gt;
id=$3&lt;br /&gt;
value=$4&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$group&amp;quot; = &amp;quot;ibm&amp;quot; ]; then&lt;br /&gt;
	key=&amp;quot;$2&amp;quot;\ &amp;quot;$3&amp;quot;\ &amp;quot;$4&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
log_unhandled() {&lt;br /&gt;
	logger &amp;quot;ACPI event unhandled: $*&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case &amp;quot;$group&amp;quot; in&lt;br /&gt;
	button)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			power)&lt;br /&gt;
				/sbin/init 0&lt;br /&gt;
				;;&lt;br /&gt;
&lt;br /&gt;
			*)	log_unhandled $* &lt;br /&gt;
                                ;;&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	ibm)&lt;br /&gt;
		case &amp;quot;$action&amp;quot; in&lt;br /&gt;
			hotkey)&lt;br /&gt;
				case &amp;quot;$key&amp;quot; in&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001008&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 220	&lt;br /&gt;
						;;&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001009&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 221&lt;br /&gt;
						;;	&lt;br /&gt;
					&amp;quot;HKEY 00000080 00001014&amp;quot;)&lt;br /&gt;
						/usr/bin/acpi_fakekey 222&lt;br /&gt;
						;;		&lt;br /&gt;
					*)&lt;br /&gt;
						logger &amp;quot;acpid: $group/$action $key is not defined&amp;quot;&lt;br /&gt;
						;;&lt;br /&gt;
				&lt;br /&gt;
				esac&lt;br /&gt;
				;;&lt;br /&gt;
			*)	&lt;br /&gt;
                        ;;	&lt;br /&gt;
		esac&lt;br /&gt;
		;;&lt;br /&gt;
&lt;br /&gt;
	*)	log_unhandled $* &lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/bash&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I use acpi_fakekey to translate acpi to key events.&lt;br /&gt;
&lt;br /&gt;
=== ACPI Fakekey === &lt;br /&gt;
&lt;br /&gt;
With this nice app you can translate acpi events into key codes. &lt;br /&gt;
&lt;br /&gt;
I borrowed it from gentoos acpi-support, which borrowed it from Ubuntu people. &lt;br /&gt;
&lt;br /&gt;
You can it out of the sunrise overlay, I recommend only getting the&lt;br /&gt;
acpi-fakekey.c file and compile it. &lt;br /&gt;
&lt;br /&gt;
For the lazy guys: &lt;br /&gt;
&lt;br /&gt;
There is an explanation and the source code, &lt;br /&gt;
which I wont copy and paste here, on this page: &lt;br /&gt;
&lt;br /&gt;
[http://gentoo-wiki.com/HARDWARE_Asus_F3SV#ACPI_.26_Hotkeys Gentoo Wiki on Hotkeys]&lt;br /&gt;
&lt;br /&gt;
I use this in the file above to generate keycodes for Fn+F8, Fn+F9 and Fn+Space.&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
&lt;br /&gt;
[http://www.fuchsnet.ch/files/config 2.6.24 Kernel config]&lt;br /&gt;
&lt;br /&gt;
Please note: this configuration works for my setup, &lt;br /&gt;
it might not for yours.&lt;br /&gt;
&lt;br /&gt;
I use ext3 as my file system, make sure to compile in the support for the file system you are using, at least for the root partition. &lt;br /&gt;
&lt;br /&gt;
I also use external ALSA drivers. &lt;br /&gt;
But I use lots of stuff you probably will never use, such as several gamepads, &lt;br /&gt;
acl support for ext3, some ipv4 / ipv6 filters ... &lt;br /&gt;
You might want to remove those. &lt;br /&gt;
&lt;br /&gt;
This is the configuration for a 2.6.24 Kernel, it differs a little bit from the configuration of earlier kernels.&lt;/div&gt;</summary>
		<author><name>Fuchs</name></author>
		
	</entry>
</feed>