<?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=Pberndt</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=Pberndt"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/wiki/Special:Contributions/Pberndt"/>
	<updated>2026-04-05T18:05:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=ACPI_action_script_optimized_for_R51&amp;diff=30784</id>
		<title>ACPI action script optimized for R51</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=ACPI_action_script_optimized_for_R51&amp;diff=30784"/>
		<updated>2007-06-26T19:40:12Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Updated to a new version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a complete [[acpid]] and [[tpb]] script optimized for a Thinkpad [[Category:R51|R51]]. It is intended to be used by advanced users (as, for example, it gives control over the CPU frequency to the user instead of running a frequency daemon)&lt;br /&gt;
&lt;br /&gt;
It's features include&lt;br /&gt;
* screen blanking / screensaver&lt;br /&gt;
* hibernate / suspend&lt;br /&gt;
* (un)load wlan driver&lt;br /&gt;
* enable/disable lcd/vga&lt;br /&gt;
* change CPU frequency&lt;br /&gt;
* ... See the beginning lines of the script for more detailled information.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # ACPI handler script default.sh&lt;br /&gt;
 # Optimized for Thinkpad R51&lt;br /&gt;
 #&lt;br /&gt;
 # Copyright (c) Phillip Berndt, 2007&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 ## Configuration #####################################################&lt;br /&gt;
 # X11 access for osd_cat and xset dpms&lt;br /&gt;
 USER=&amp;quot;foo&amp;quot;					# Main user of this PC&lt;br /&gt;
 export XAUTHORITY=&amp;quot;/home/foo/.Xauthority&amp;quot;	# X authority file&lt;br /&gt;
 export DISPLAY=&amp;quot;auto&amp;quot;				# Default display&lt;br /&gt;
 &lt;br /&gt;
 # Screen saver&lt;br /&gt;
 LOCKAPP=&amp;quot;/usr/bin/xlock&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # WLAN device driver&lt;br /&gt;
 WLAN_MODULE=&amp;quot;ipw2200&amp;quot;&lt;br /&gt;
 WLAN_PARAMS=&amp;quot;&amp;quot;&lt;br /&gt;
 # or: WLAN_PARAMS=&amp;quot;rtap_iface=1&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Which application to run on &amp;quot;zoom&amp;quot; key&lt;br /&gt;
 # In my case, start a network autoconfiguration tool AS ROOT!!&lt;br /&gt;
 # You might want to use &amp;quot;su ${USER} -c &amp;lt;foo&amp;gt;&amp;quot; here&lt;br /&gt;
 zoom_do() {&lt;br /&gt;
 	xterm -title &amp;quot;Network autoconfiguration&amp;quot; -e /usr/local/lib/net/network &amp;amp;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 # File for OSD disabling&lt;br /&gt;
 OSD_DISABLE_FILE=&amp;quot;/var/lib/misc/acpid_osd_disable&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 ## Help ##############################################################&lt;br /&gt;
 # &lt;br /&gt;
 # Installation:&lt;br /&gt;
 #  Copy to /etc/acpi/default.sh for acpid and symlink to tpb.sh to use it&lt;br /&gt;
 #  as a callback script for tpb.&lt;br /&gt;
 #  Run&lt;br /&gt;
 #     echo enable,0xffff &amp;gt;/proc/acpi/ibm/hotkey&lt;br /&gt;
 #     /usr/bin/tpb -d --callback=&amp;quot;/etc/acpi/tpb/tpb.sh&amp;quot; -m on -x off&lt;br /&gt;
 #  on startup.&lt;br /&gt;
 #&lt;br /&gt;
 # This script has the following configuration:&lt;br /&gt;
 #  * F1: Change between performance and powersave govenor (CPU)&lt;br /&gt;
 #  * F2: dpms force off (Blank screen)&lt;br /&gt;
 #  * F3: Lock screen&lt;br /&gt;
 #  * F4: Suspend to ram&lt;br /&gt;
 #  * F5: Bluetooth on/off&lt;br /&gt;
 #  * F7: VGA out on/off&lt;br /&gt;
 #  * F8: LCD on/off&lt;br /&gt;
 #  * F11: Deactivate OSD&lt;br /&gt;
 #  * F12: Suspend to disk&lt;br /&gt;
 #  * Change to performance on AC-plug-in&lt;br /&gt;
 #  * Change to powersave on AC-unplug&lt;br /&gt;
 #  * Hibernate on battery power &amp;lt; 5%&lt;br /&gt;
 #  * Spindown HDD on lid close&lt;br /&gt;
 #  * Poweroff after pressing the power button TWO times&lt;br /&gt;
 #  * Load and unload wlan driver on &amp;quot;Access IBM&amp;quot; button&lt;br /&gt;
 #&lt;br /&gt;
 # You'll need the following tools to use all features:&lt;br /&gt;
 #&lt;br /&gt;
 #  * /usr/sbin/hibernate	Hibernate script&lt;br /&gt;
 #  * /usr/sbin/radeontool	Radeon graphics settings&lt;br /&gt;
 #  * /usr/bin/osd_cat		cat'like X11 tool&lt;br /&gt;
 #  * /usr/bin/xset		Xset (Not installed by default with modular Xorg)&lt;br /&gt;
 ######################################################################&lt;br /&gt;
 &lt;br /&gt;
 export PATH=/bin/mem:/bin:/usr/bin:/sbin&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$(basename $0)&amp;quot; == &amp;quot;tpb.sh&amp;quot; ]; then&lt;br /&gt;
 	ACTION=&amp;quot;$1&amp;quot;&lt;br /&gt;
 	PARAMETER=&amp;quot;$2&amp;quot;&lt;br /&gt;
 	logger &amp;quot;Got TPB Event: Action ${ACTION}, Parameter: ${PARAMETER}&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
 	GROUP=&amp;quot;${1/\/*/}&amp;quot;&lt;br /&gt;
 	ACTION=&amp;quot;${1/*\//}&amp;quot;&lt;br /&gt;
 	PARAMETER=&amp;quot;$4&amp;quot;&lt;br /&gt;
 	logger &amp;quot;Got ACPI Event: In Group ${GROUP} action ${ACTION}, Parameter: ${PARAMETER}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Functions #########################################################&lt;br /&gt;
 # OSD cat&lt;br /&gt;
 if [ &amp;quot;${DISPLAY}&amp;quot; == &amp;quot;auto&amp;quot; ]; then&lt;br /&gt;
 	X=&amp;quot;$(ls /tmp/.X11-unix/X* | head -n1)&amp;quot;;&lt;br /&gt;
 	[ &amp;quot;${X}&amp;quot; != &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; export DISPLAY=&amp;quot;:${X/\/tmp\/.X11-unix\/X/}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${DISPLAY}&amp;quot; != &amp;quot;auto&amp;quot; ] &amp;amp;&amp;amp; which osd_cat &amp;amp;&amp;gt;/dev/null; then&lt;br /&gt;
 	osd() {&lt;br /&gt;
 		[ -f ${OSD_DISABLE_FILE} ] &amp;amp;&amp;amp; return&lt;br /&gt;
 		pkill osd_cat&lt;br /&gt;
 		echo $@ | osd_cat -p bottom -A center -c green -O 1 -u black -f &amp;quot;-adobe-helvetica-bold-r-normal-*-*-320-*-*-p-*-iso8859-1&amp;quot; &amp;amp;&lt;br /&gt;
 	}&lt;br /&gt;
 else&lt;br /&gt;
 	osd() {&lt;br /&gt;
 		logger &amp;quot;OSD cat: $@&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Suspend to ram&lt;br /&gt;
 suspram() {&lt;br /&gt;
 		# Prepare suspend (Power saving hacks)&lt;br /&gt;
 		chvt 1&lt;br /&gt;
 		echo -n eject &amp;gt; /proc/acpi/ibm/bay&lt;br /&gt;
 		ethtool -s eth0 wol d&lt;br /&gt;
 		&lt;br /&gt;
 		# Suspend&lt;br /&gt;
 		sleep 1&lt;br /&gt;
 		echo mem &amp;gt; /sys/power/state&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ## Handlers ##########################################################&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;thinkpad&amp;quot; ]; then&lt;br /&gt;
 	# Load wlan driver&lt;br /&gt;
 	if [ -d /sys/module/${WLAN_MODULE} ]; then&lt;br /&gt;
 		modprobe -r ${WLAN_MODULE}&lt;br /&gt;
 		osd &amp;quot;${WLAN_MODULE} unloaded&amp;quot;&lt;br /&gt;
 	else&lt;br /&gt;
 		modprobe ${WLAN_MODULE} ${WLAN_PARAMS}&lt;br /&gt;
 		osd &amp;quot;${WLAN_MODULE} loaded&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;zoom&amp;quot; ]; then&lt;br /&gt;
 	zoom_do&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Closing the laptop (Or opening it ;))&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;lid&amp;quot; ]; then&lt;br /&gt;
 	if [ &amp;quot;$(cat /proc/acpi/button/lid/LID/state | grep open)&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 		# Enable the LCD&lt;br /&gt;
 		xset dpms force on&lt;br /&gt;
 	else&lt;br /&gt;
 		# Immerdiately spindown the harddrive to prevent loosing data&lt;br /&gt;
 		# due to drive problems. I'd prefer to power it down, but it&lt;br /&gt;
 		# needs a very long time to power on again.&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 		sync&lt;br /&gt;
 		hdparm -y /dev/hda&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Special IBM hotkeys&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;hotkey&amp;quot; ]; then&lt;br /&gt;
 	# Change speed&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001001&amp;quot; ]; then&lt;br /&gt;
 		DO=&amp;quot;performance&amp;quot;&lt;br /&gt;
 		grep &amp;quot;performance&amp;quot; &amp;quot;/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&amp;quot; &amp;amp;&amp;gt;/dev/null &amp;amp;&amp;amp; DO=&amp;quot;powersave&amp;quot;&lt;br /&gt;
 		echo ${DO} &amp;gt; &amp;quot;/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&amp;quot;&lt;br /&gt;
 		osd &amp;quot;Governor is now ${DO}&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Blank screen&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001002&amp;quot; ]; then&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Blank screen buton (Sleep instead)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001003&amp;quot; ]; then&lt;br /&gt;
 		chvt 1&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 		su ${USER} -c &amp;quot;${LOCKAPP}&amp;quot; &amp;amp;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Suspend-To-Ram on sleep&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001004&amp;quot; ]; then&lt;br /&gt;
 		suspram&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Bluetooth&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001005&amp;quot; ]; then&lt;br /&gt;
 		DO=&amp;quot;disable&amp;quot;&lt;br /&gt;
 		grep -q &amp;quot;disabled&amp;quot; &amp;quot;/proc/acpi/ibm/bluetooth&amp;quot; &amp;amp;&amp;amp; DO=&amp;quot;enable&amp;quot;&lt;br /&gt;
 		echo ${DO} &amp;gt; &amp;quot;/proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
 		osd &amp;quot;Bluetooth ${DO}d&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Display (External)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001007&amp;quot; ]; then&lt;br /&gt;
 		if /usr/sbin/radeontool dac | grep -q &amp;quot;looks on&amp;quot;; then&lt;br /&gt;
 			/usr/sbin/radeontool dac off&lt;br /&gt;
 			echo &amp;quot;crt_disable&amp;quot; &amp;gt; /proc/acpi/ibm/video&lt;br /&gt;
 			osd &amp;quot;Video switch (off)&amp;quot;&lt;br /&gt;
 		else&lt;br /&gt;
 			/usr/sbin/radeontool dac on&lt;br /&gt;
 			echo &amp;quot;crt_enable&amp;quot; &amp;gt; /proc/acpi/ibm/video&lt;br /&gt;
 			osd &amp;quot;Video switch (on)&amp;quot;&lt;br /&gt;
 		fi&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Display (Internal)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001008&amp;quot; ]; then&lt;br /&gt;
 		if /usr/sbin/radeontool light | grep -q &amp;quot;looks on&amp;quot;; then&lt;br /&gt;
 			/usr/sbin/radeontool light off&lt;br /&gt;
 			osd &amp;quot;Internal video switch (off)&amp;quot;&lt;br /&gt;
 		else&lt;br /&gt;
 			/usr/sbin/radeontool light on&lt;br /&gt;
 			osd &amp;quot;Internal video switch (on)&amp;quot;&lt;br /&gt;
 		fi&lt;br /&gt;
 &lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# (De)activate OSD&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;0000100b&amp;quot; ]; then&lt;br /&gt;
 		if [ -f ${OSD_DISABLE_FILE} ]; then&lt;br /&gt;
 			rm ${OSD_DISABLE_FILE}&lt;br /&gt;
 			osd &amp;quot;OSD activated&amp;quot;&lt;br /&gt;
 		else&lt;br /&gt;
 			osd &amp;quot;OSD deactivated&amp;quot;&lt;br /&gt;
 			touch ${OSD_DISABLE_FILE}&lt;br /&gt;
 		fi&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Hibernate button&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;0000100c&amp;quot; ]; then&lt;br /&gt;
 		/usr/sbin/hibernate&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 # Battery actions&lt;br /&gt;
 if [ &amp;quot;${GROUP}&amp;quot; == &amp;quot;battery&amp;quot; ]; then&lt;br /&gt;
 	# $ACTION is the battery i.e. BAT0&lt;br /&gt;
 	# Get remaining capacity&lt;br /&gt;
 	capacityPercent=$(/usr/bin/acpitool -b | grep \#$[${ACTION/*[A-Z]/} + 1] | egrep -o [0-9.]+% | egrep -o ^[0-9]+)&lt;br /&gt;
 &lt;br /&gt;
 	# OSD info&lt;br /&gt;
 	osd &amp;quot;Battery Event: ${capacityPercent}%&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 	# Hibernate on low battery&lt;br /&gt;
 	if [ &amp;quot;${capacityPercent}&amp;quot; -lt 5 ]; then&lt;br /&gt;
 		/usr/sbin/hibernate -f&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Power button&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;power&amp;quot; ]; then&lt;br /&gt;
 	if [ ! -e /var/run/poweroff ]; then&lt;br /&gt;
 		date &amp;quot;+%s&amp;quot; &amp;gt; /var/run/poweroff&lt;br /&gt;
 	else&lt;br /&gt;
 		DIFF=$[ $(date &amp;quot;+%s&amp;quot;) - $(cat &amp;quot;/var/run/poweroff&amp;quot;) ]&lt;br /&gt;
 		date &amp;quot;+%s&amp;quot; &amp;gt; /var/run/poweroff&lt;br /&gt;
 &lt;br /&gt;
 		if [ ${DIFF} -lt 5 ]; then&lt;br /&gt;
 			/sbin/poweroff&lt;br /&gt;
 		fi&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # AC Control&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;ac_adapter&amp;quot; ]; then&lt;br /&gt;
 	if [ &amp;quot;`cat /proc/acpi/ac_adapter/AC/state | grep on-line`&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 		echo -n &amp;quot;performance&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
 		osd &amp;quot;Powering from AC&amp;quot;&lt;br /&gt;
 	else&lt;br /&gt;
 		echo -n &amp;quot;powersave&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
 		osd &amp;quot;Powering from Battery&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;br /&gt;
[[Category:R51]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=ACPI_action_script_optimized_for_R51&amp;diff=30526</id>
		<title>ACPI action script optimized for R51</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=ACPI_action_script_optimized_for_R51&amp;diff=30526"/>
		<updated>2007-06-17T17:54:51Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a complete [[acpid]] and [[tpb]] script optimized for a Thinkpad [[Category:R51|R51]]. It is intended to be used by advanced users (as, for example, it gives control over the CPU frequency to the user instead of running a frequency daemon)&lt;br /&gt;
&lt;br /&gt;
It's features include&lt;br /&gt;
* screen blanking / screensaver&lt;br /&gt;
* hibernate / suspend&lt;br /&gt;
* (un)load wlan driver&lt;br /&gt;
* enable/disable lcd/vga&lt;br /&gt;
* change CPU frequency&lt;br /&gt;
* ... See the beginning lines of the script for more detailled information.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 # ACPI handler script default.sh&lt;br /&gt;
 # Optimized for Thinkpad R51&lt;br /&gt;
 #&lt;br /&gt;
 # Copyright (c) Phillip Berndt, 2007&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 ## Configuration #####################################################&lt;br /&gt;
 # X11 access for osd_cat and xset dpms&lt;br /&gt;
 USER=&amp;quot;foo&amp;quot;					# Main user of this PC&lt;br /&gt;
 export XAUTHORITY=&amp;quot;/home/foo/.Xauthority&amp;quot;	# X authority file&lt;br /&gt;
 export DISPLAY=&amp;quot;auto&amp;quot;				# Default display&lt;br /&gt;
 &lt;br /&gt;
 # Screen saver&lt;br /&gt;
 # You might want to insert xlock here.&lt;br /&gt;
 LOCKAPP=&amp;quot;/usr/local/bin/alock -auth pam -bg blank -cursor none&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # WLAN device driver&lt;br /&gt;
 WLAN_MODULE=&amp;quot;ipw2200&amp;quot;&lt;br /&gt;
 WLAN_PARAMS=&amp;quot;&amp;quot;&lt;br /&gt;
 # or: WLAN_PARAMS=&amp;quot;rtap_iface=1&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # Which application to run on &amp;quot;zoom&amp;quot; key&lt;br /&gt;
 # In my case, start a network autoconfiguration tool AS ROOT!!&lt;br /&gt;
 # You might want to use &amp;quot;su ${USER} -c &amp;lt;foo&amp;gt;&amp;quot; here&lt;br /&gt;
 zoom_do() {&lt;br /&gt;
 	xterm -title &amp;quot;Network autoconfiguration&amp;quot; -e /usr/local/lib/net/network&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ## Help ##############################################################&lt;br /&gt;
 # &lt;br /&gt;
 # Installation:&lt;br /&gt;
 #  Copy to /etc/acpi/default.sh for acpid and symlink to tpb.sh to use it&lt;br /&gt;
 #  as a callback script for tpb.&lt;br /&gt;
 #  Run&lt;br /&gt;
 #     echo enable,0xffff &amp;gt;/proc/acpi/ibm/hotkey&lt;br /&gt;
 #     /usr/bin/tpb -d --callback=&amp;quot;/etc/acpi/tpb/tpb.sh&amp;quot; -m on -x off&lt;br /&gt;
 #  on startup.&lt;br /&gt;
 #&lt;br /&gt;
 # This script enables the following features:&lt;br /&gt;
 #  * F1: Change to performance or powersave govenor (CPU)&lt;br /&gt;
 #  * F2: dpms force off (Blank screen)&lt;br /&gt;
 #  * F3: Lock screen&lt;br /&gt;
 #  * F4: Suspend to ram&lt;br /&gt;
 #  * F5: Bluetooth on/off&lt;br /&gt;
 #  * F7: VGA out on/off&lt;br /&gt;
 #  * F8: LCD on/off&lt;br /&gt;
 #  * F12: Suspend to disk&lt;br /&gt;
 #  * Change to performance on AC-plug-in&lt;br /&gt;
 #  * Change to powersave on AC-unplug&lt;br /&gt;
 #  * Hibernate on battery power &amp;lt; 5%&lt;br /&gt;
 #  * Spindown HDD on lid close&lt;br /&gt;
 #  * Poweroff after pressing the power button TWO times&lt;br /&gt;
 #  * Load and unload wlan driver on &amp;quot;Access IBM&amp;quot; button&lt;br /&gt;
 #&lt;br /&gt;
 # You'll need the following tools to use all features:&lt;br /&gt;
 #&lt;br /&gt;
 #  * /usr/sbin/hibernate	Hibernate script&lt;br /&gt;
 #  * /usr/sbin/radeontool	Radeon graphics settings&lt;br /&gt;
 #  * /usr/bin/osd_cat		cat'like X11 tool&lt;br /&gt;
 #  * /usr/bin/xset		Xset (Not installed by default with modular Xorg)&lt;br /&gt;
 ######################################################################&lt;br /&gt;
 &lt;br /&gt;
 export PATH=/bin/mem:/bin:/usr/bin:/sbin&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$(basename $0)&amp;quot; == &amp;quot;tpb.sh&amp;quot; ]; then&lt;br /&gt;
 	ACTION=&amp;quot;$1&amp;quot;&lt;br /&gt;
 	PARAMETER=&amp;quot;$2&amp;quot;&lt;br /&gt;
 	logger &amp;quot;Got TPB Event: Action ${ACTION}, Parameter: ${PARAMETER}&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
 	GROUP=&amp;quot;${1/\/*/}&amp;quot;&lt;br /&gt;
 	ACTION=&amp;quot;${1/*\//}&amp;quot;&lt;br /&gt;
 	PARAMETER=&amp;quot;$4&amp;quot;&lt;br /&gt;
 	logger &amp;quot;Got ACPI Event: In Group ${GROUP} action ${ACTION}, Parameter: ${PARAMETER}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 ## Functions #########################################################&lt;br /&gt;
 # OSD cat&lt;br /&gt;
 if [ &amp;quot;${DISPLAY}&amp;quot; == &amp;quot;auto&amp;quot; ]; then&lt;br /&gt;
 	X=&amp;quot;$(ls /tmp/.X11-unix/X* | head -n1)&amp;quot;;&lt;br /&gt;
 	[ &amp;quot;${X}&amp;quot; != &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; export DISPLAY=&amp;quot;:${X/\/tmp\/.X11-unix\/X/}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${DISPLAY}&amp;quot; != &amp;quot;auto&amp;quot; ] &amp;amp;&amp;amp; which osd_cat &amp;amp;&amp;gt;/dev/null; then&lt;br /&gt;
 	osd() {&lt;br /&gt;
 		pkill osd_cat&lt;br /&gt;
 		echo $@ | osd_cat -p bottom -A center -c green -O 1 -u black -f \&lt;br /&gt;
 			&amp;quot;-adobe-helvetica-bold-r-normal-*-*-320-*-*-p-*-iso8859-1&amp;quot; &amp;amp;&lt;br /&gt;
 	}&lt;br /&gt;
 else&lt;br /&gt;
 	osd() {&lt;br /&gt;
 		logger &amp;quot;OSD cat: $@&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Suspend to ram&lt;br /&gt;
 suspram() {&lt;br /&gt;
 	# Prepare suspend (Power saving hacks)&lt;br /&gt;
 	chvt 1&lt;br /&gt;
 	echo -n eject &amp;gt; /proc/acpi/ibm/bay&lt;br /&gt;
 	ethtool -s eth0 wol d&lt;br /&gt;
 		&lt;br /&gt;
 	# Suspend&lt;br /&gt;
 	sleep 1&lt;br /&gt;
 	echo mem &amp;gt; /sys/power/state&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ## Handlers ##########################################################&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;thinkpad&amp;quot; ]; then&lt;br /&gt;
 	# Load wlan driver&lt;br /&gt;
 	if [ -d /sys/module/${WLAN_MODULE} ]; then&lt;br /&gt;
 		modprobe -r ${WLAN_MODULE}&lt;br /&gt;
 		osd &amp;quot;${WLAN_MODULE} unloaded&amp;quot;&lt;br /&gt;
 	else&lt;br /&gt;
 		modprobe ${WLAN_MODULE} ${WLAN_PARAMS}&lt;br /&gt;
 		osd &amp;quot;${WLAN_MODULE} loaded&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;zoom&amp;quot; ]; then&lt;br /&gt;
 	zoom_do&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Closing the laptop (Or opening it ;))&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;lid&amp;quot; ]; then&lt;br /&gt;
 	if [ &amp;quot;$(cat /proc/acpi/button/lid/LID/state | grep open)&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 		# Enable the LCD&lt;br /&gt;
 		xset dpms force on&lt;br /&gt;
 	else&lt;br /&gt;
 		# Immediately spindown the harddrive to prevent loosing data&lt;br /&gt;
 		# due to drive problems. I'd prefer to power it down, but it&lt;br /&gt;
 		# needs a very long time to power on again.&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 		sync&lt;br /&gt;
 		hdparm -y /dev/hda&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Special IBM hotkeys&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;hotkey&amp;quot; ]; then&lt;br /&gt;
 	# Change speed&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001001&amp;quot; ]; then&lt;br /&gt;
 		DO=&amp;quot;performance&amp;quot;&lt;br /&gt;
 		grep &amp;quot;performance&amp;quot; &amp;quot;/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&amp;quot; &amp;amp;&amp;gt;/dev/null &amp;amp;&amp;amp; DO=&amp;quot;powersave&amp;quot;&lt;br /&gt;
 		echo ${DO} &amp;gt; &amp;quot;/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&amp;quot;&lt;br /&gt;
 		osd &amp;quot;Governor is now ${DO}&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Blank screen&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001002&amp;quot; ]; then&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Blank screen buton (Sleep instead)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001003&amp;quot; ]; then&lt;br /&gt;
 		chvt 1&lt;br /&gt;
 		xset dpms force off&lt;br /&gt;
 		su ${USER} -c &amp;quot;${LOCKAPP}&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Suspend-To-Ram on sleep&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001004&amp;quot; ]; then&lt;br /&gt;
 		suspram&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Bluetooth&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001005&amp;quot; ]; then&lt;br /&gt;
 		DO=&amp;quot;disable&amp;quot;&lt;br /&gt;
 		grep -q &amp;quot;disabled&amp;quot; &amp;quot;/proc/acpi/ibm/bluetooth&amp;quot; &amp;amp;&amp;amp; DO=&amp;quot;enable&amp;quot;&lt;br /&gt;
 		echo ${DO} &amp;gt; &amp;quot;/proc/acpi/ibm/bluetooth&amp;quot;&lt;br /&gt;
 		osd &amp;quot;Bluetooth ${DO}d&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Display (External)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001007&amp;quot; ]; then&lt;br /&gt;
 		if /usr/sbin/radeontool dac | grep -q &amp;quot;looks on&amp;quot;; then&lt;br /&gt;
 			/usr/sbin/radeontool dac off&lt;br /&gt;
 			echo &amp;quot;crt_disable&amp;quot; &amp;gt; /proc/acpi/ibm/video&lt;br /&gt;
 			osd &amp;quot;Video switch (off)&amp;quot;&lt;br /&gt;
 		else&lt;br /&gt;
 			/usr/sbin/radeontool dac on&lt;br /&gt;
 			echo &amp;quot;crt_enable&amp;quot; &amp;gt; /proc/acpi/ibm/video&lt;br /&gt;
 			osd &amp;quot;Video switch (on)&amp;quot;&lt;br /&gt;
 		fi&lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Display (Internal)&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;00001008&amp;quot; ]; then&lt;br /&gt;
 		if /usr/sbin/radeontool light | grep -q &amp;quot;looks on&amp;quot;; then&lt;br /&gt;
 			/usr/sbin/radeontool light off&lt;br /&gt;
 			osd &amp;quot;Internal video switch (off)&amp;quot;&lt;br /&gt;
 		else&lt;br /&gt;
 			/usr/sbin/radeontool light on&lt;br /&gt;
 			osd &amp;quot;Internal video switch (on)&amp;quot;&lt;br /&gt;
 		fi&lt;br /&gt;
 &lt;br /&gt;
 	fi&lt;br /&gt;
 &lt;br /&gt;
 	# Hibernate button&lt;br /&gt;
 	if [ &amp;quot;${PARAMETER}&amp;quot; == &amp;quot;0000100c&amp;quot; ]; then&lt;br /&gt;
 		/usr/sbin/hibernate&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 # Battery actions&lt;br /&gt;
 if [ &amp;quot;${GROUP}&amp;quot; == &amp;quot;battery&amp;quot; ]; then&lt;br /&gt;
 	# $ACTION is the battery i.e. BAT0&lt;br /&gt;
 	# Get remaining capacity&lt;br /&gt;
 	capacityPercent=$(/usr/bin/acpitool -b | grep \#$[${ACTION/*[A-Z]/} + 1] | egrep -o [0-9.]+% | egrep -o ^[0-9]+)&lt;br /&gt;
 &lt;br /&gt;
 	# OSD info&lt;br /&gt;
 	osd &amp;quot;Battery Event: ${capacityPercent}%&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 	# Hibernate on low battery&lt;br /&gt;
 	if [ &amp;quot;${capacityPercent}&amp;quot; -lt 5 ]; then&lt;br /&gt;
 		/usr/sbin/hibernate -f&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # Power button&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;power&amp;quot; ]; then&lt;br /&gt;
 	if [ ! -e /var/run/poweroff ]; then&lt;br /&gt;
 		date &amp;quot;+%s&amp;quot; &amp;gt; /var/run/poweroff&lt;br /&gt;
 	else&lt;br /&gt;
 		DIFF=$[ $(date &amp;quot;+%s&amp;quot;) - $(cat &amp;quot;/var/run/poweroff&amp;quot;) ]&lt;br /&gt;
 		date &amp;quot;+%s&amp;quot; &amp;gt; /var/run/poweroff&lt;br /&gt;
 &lt;br /&gt;
 		if [ ${DIFF} -lt 5 ]; then&lt;br /&gt;
 			/sbin/poweroff&lt;br /&gt;
 		fi&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 # AC Control&lt;br /&gt;
 if [ &amp;quot;${ACTION}&amp;quot; == &amp;quot;AC&amp;quot; ]; then&lt;br /&gt;
 	if [ &amp;quot;`cat /proc/acpi/ac_adapter/AC/state | grep on-line`&amp;quot; != &amp;quot;&amp;quot; ]; then&lt;br /&gt;
 		echo -n &amp;quot;performance&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
 		osd &amp;quot;Powering from AC&amp;quot;&lt;br /&gt;
 	else&lt;br /&gt;
 		echo -n &amp;quot;powersave&amp;quot; &amp;gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&lt;br /&gt;
 		osd &amp;quot;Powering from Battery&amp;quot;&lt;br /&gt;
 	fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripts]]&lt;br /&gt;
[[Category:R51]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29601</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29601"/>
		<updated>2007-05-05T17:46:44Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: ebuild added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with the [[ibm-acpi]] driver (You should have a directory called {{path|/sys/class/backlight/ibm/}} or {{path|/sys/class/backlight/thinkpad_screen/}}).&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://www.pberndt.com/Programme/Linux/brightd/_download/latest.phpc brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
The following is an example which shows how to install brightd manually. The prefered way to install brightd on gentoo is to use the [http://bugs.gentoo.org/show_bug.cgi?id=177214 ebuild from bugzilla].&lt;br /&gt;
 $ wget -o /dev/null -O brightd.tar.bz2 &amp;quot;http://www.pberndt.com/raw/Programme/Linux/brightd/_download/brightd-0.3_pre2.tar.bz2&amp;quot;&lt;br /&gt;
 $ tar xjf brightd.tar.bz2&lt;br /&gt;
 $ cd brightd-*/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ make install&lt;br /&gt;
 install -Ds brightd //usr/bin/brightd&lt;br /&gt;
 install -D brightd.1 //usr/share/man/man1/brightd.1&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /sys&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/*/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/*/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working. Have a look at the &amp;quot;-x&amp;quot; parameter if you intend to start the daemon from an init-script.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;br /&gt;
&lt;br /&gt;
== Possible problems ==&lt;br /&gt;
=== brightd does not fade, screensaver deactivated ===&lt;br /&gt;
On my Debian Sid box, brightd can run for hours and just do nothing. This happens because it thinks the screensaver is deactivated and screen shouldn't be faded (useful while watching videos).&lt;br /&gt;
But in fact the screensaver isn't deactivated. To solve this problem, just execute the following command before starting bright:&lt;br /&gt;
&lt;br /&gt;
{{cmduser|xset s default}}&lt;br /&gt;
&lt;br /&gt;
=== brightd says it is fading, but does not ===&lt;br /&gt;
On my Z61m {{path|/sys/class/backlight/ibm/brightness}} is 0 after the laptop boots up. As long it is 0, brightd does nothing, because it thinks, brightness is already as low as possible, so I need to initialize the brightness-level before using brightd:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 7&amp;gt;/sys/class/backlight/ibm/brightness}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29600</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29600"/>
		<updated>2007-05-05T14:46:23Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Updated to a new revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with the [[ibm-acpi]] driver (You should have a directory called {{path|/sys/class/backlight/ibm/}} or {{path|/sys/class/backlight/thinkpad_screen/}}).&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://www.pberndt.com/Programme/Linux/brightd/_download/latest.phpc brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd.tar.bz2 &amp;quot;http://www.pberndt.com/raw/Programme/Linux/brightd/_download/brightd-0.3_pre2.tar.bz2&amp;quot;&lt;br /&gt;
 $ tar xjf brightd.tar.bz2&lt;br /&gt;
 $ cd brightd-*/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ make install&lt;br /&gt;
 install -Ds brightd //usr/bin/brightd&lt;br /&gt;
 install -D brightd.1 //usr/share/man/man1/brightd.1&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /sys&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/*/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/*/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working. Have a look at the &amp;quot;-x&amp;quot; parameter if you intend to start the daemon from an init-script.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;br /&gt;
&lt;br /&gt;
== Possible problems ==&lt;br /&gt;
=== brightd does not fade, screensaver deactivated ===&lt;br /&gt;
On my Debian Sid box, brightd can run for hours and just do nothing. This happens because it thinks the screensaver is deactivated and screen shouldn't be faded (useful while watching videos).&lt;br /&gt;
But in fact the screensaver isn't deactivated. To solve this problem, just execute the following command before starting bright:&lt;br /&gt;
&lt;br /&gt;
{{cmduser|xset s default}}&lt;br /&gt;
&lt;br /&gt;
=== brightd says it is fading, but does not ===&lt;br /&gt;
On my Z61m {{path|/sys/class/backlight/ibm/brightness}} is 0 after the laptop boots up. As long it is 0, brightd does nothing, because it thinks, brightness is already as low as possible, so I need to initialize the brightness-level before using brightd:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 7&amp;gt;/sys/class/backlight/ibm/brightness}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29510</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29510"/>
		<updated>2007-04-26T20:43:45Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Versionbump to 0.2, new kernel interface for brightness in 2.6.22&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with the [[ibm-acpi]] driver (You should have a directory called {{path|/sys/class/backlight/ibm/}} or {{path|/sys/class/backlight/thinkpad_screen/}}).&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://www.pberndt.com/Programme/Linux/brightd/_download/brightd-0.2.tar.bz2 brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd-0.1.tar.bz2 &amp;quot;http://www.pberndt.com/Programme/Linux/brightd/_download/brightd-0.2.tar.bz2?ct=raw&amp;amp;sub=att&amp;quot;&lt;br /&gt;
 $ tar xjf brightd-0.1.tar.bz2&lt;br /&gt;
 $ cd brightd-0.1/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ cp brightd /usr/local/bin/&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /sys&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/*/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/*/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.1-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;br /&gt;
&lt;br /&gt;
== Possible problems ==&lt;br /&gt;
=== brightd does not fade, screensaver deactivated ===&lt;br /&gt;
On my Debian Sid box, brightd can run for hours and just do nothing. This happens because it thinks the screensaver is deactivated and screen shouldn't be faded (useful while watching videos).&lt;br /&gt;
But in fact the screensaver isn't deactivated. To solve this problem, just execute the following command before starting bright:&lt;br /&gt;
&lt;br /&gt;
{{cmduser|xset s default}}&lt;br /&gt;
&lt;br /&gt;
=== brightd says it is fading, but does not ===&lt;br /&gt;
On my Z61m {{path|/sys/class/backlight/ibm/brightness}} is 0 after the laptop boots up. As long it is 0, brightd does nothing, because it thinks, brightness is already as low as possible, so I need to initialize the brightness-level before using brightd:&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|echo 7&amp;gt;/sys/class/backlight/ibm/brightness}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29334</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29334"/>
		<updated>2007-04-15T18:45:32Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Forget something&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with IBM ACPI extensions. (You should have a directory called {{path|/sys/class/backlight/ibm/}})&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://pberndt.com/Programme/Linux/brightd/_download/brightd.tar.bz2 brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd-0.1.tar.bz2 &amp;quot;http://www.pberndt.com/Programme/Linux/brightd/_download/brightd-0.1.tar.bz2?ct=raw&amp;amp;sub=att&amp;quot;&lt;br /&gt;
 $ tar xjf brightd-0.1.tar.bz2&lt;br /&gt;
 $ cd brightd-0.1/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ cp brightd /usr/local/bin/&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /proc&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/ibm/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/ibm/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29333</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29333"/>
		<updated>2007-04-15T18:44:49Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Forget something&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with IBM ACPI extensions. (You should have a directory called {{path|/sys/class/backlight/ibm/}})&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://pberndt.com/Programme/Linux/brightd/_download/brightd.tar.bz2 brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd.tar.bz2 &amp;quot;http://www.pberndt.com/Programme/Linux/brightd/_download/brightd-0.1.tar.bz2?ct=raw&amp;amp;sub=att&amp;quot;&lt;br /&gt;
 $ tar xjf brightd-0.1.tar.bz2&lt;br /&gt;
 $ cd brightd-0.1/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ cp brightd /usr/local/bin/&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /proc&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/ibm/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/ibm/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29332</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=29332"/>
		<updated>2007-04-15T18:44:26Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Updated to a new revision&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with IBM ACPI extensions. (You should have a file called {{path|/proc/acpi/ibm/brightness}})&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://pberndt.com/Programme/Linux/brightd/_download/brightd.tar.bz2 brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/sys/class/backlight/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd.tar.bz2 &amp;quot;http://www.pberndt.com/Programme/Linux/brightd/_download/brightd-0.1.tar.bz2?ct=raw&amp;amp;sub=att&amp;quot;&lt;br /&gt;
 $ tar xjf brightd-0.1.tar.bz2&lt;br /&gt;
 $ cd brightd-0.1/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ cp brightd /usr/local/bin/&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /proc&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /sys/class/backlight/ibm/brightness&lt;br /&gt;
         chgrp wheel /sys/class/backlight/ibm/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Debian Sid ==&lt;br /&gt;
brightd isn't yet in the official Debian archives ([http://bugs.debian.org/419329 an ITP was filled]), but you can get precompiled binaries for unstable from [[User:Zhenech|Zhenech]]'s page.&lt;br /&gt;
&lt;br /&gt;
{{cmduser|wget http://debian.die-welt.net/pool/main/brightd/brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
{{cmdroot|dpkg -i brightd_0.0.20070226-1_i386.deb}}&lt;br /&gt;
&lt;br /&gt;
Done. Relogin into your X session and brightd will be started. You can change this and other settings by editing {{path|/etc/default/brightd}}.&lt;br /&gt;
{{NOTE|Changing permissions is not needed, because the binary is installed suid-root.}}&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=TuxOnIce&amp;diff=27211</id>
		<title>TuxOnIce</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=TuxOnIce&amp;diff=27211"/>
		<updated>2006-12-23T17:06:37Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: /* Model-specific Status */ Added R51&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
===Software Suspend 2 - swsusp2===&lt;br /&gt;
Software Suspend 2, sometimes also called &amp;quot;swsusp2&amp;quot; and &amp;quot;suspend2&amp;quot;, is an implementation of suspend-to-disk functionality in the form of a Linux kernel patch and several userspace utilities. It is an alternative to both the BIOS-driven hibernation feature found on most ThinkPad models, and the [[swsusp]] &amp;quot;software suspend&amp;quot; functionality built into recent Linux kernels.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Compared to the alternatives, Software Suspend 2 has some unique [http://suspend2.net/features features]:&lt;br /&gt;
* Saving the memory image into a swap file, a swap partition or normal a file on any filesystem.&lt;br /&gt;
* Cancelling a suspend in progress.&lt;br /&gt;
* Different bugs -- if the alternatives don't work, try this one!&lt;br /&gt;
&lt;br /&gt;
It also have the following advantages over [[swsusp]] (these features are also provided, in principle, by the not-yet-stable [[uswsusp]]):&lt;br /&gt;
* The ability to compress the memory image as it is written to disk, thereby reducing suspend and resume times.	 &lt;br /&gt;
* Control over amount of RAM written to disk -- can (optionally) discard cached disk blocks to reduce suspend and resume times.&lt;br /&gt;
* Textual and graphical UI (optional).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since it is implemented purely in software, Software Suspend 2 is in principle machine-independent and should work on all modern ThinkPad models. However, in some cases problematic drivers need to be unloaded before suspension. This is handled by the &amp;lt;tt&amp;gt;hibernate&amp;lt;/tt&amp;gt; script (see below).&lt;br /&gt;
&lt;br /&gt;
==Availability / Project Homepage==&lt;br /&gt;
* [http://suspend2.net/ Project home page]&lt;br /&gt;
&lt;br /&gt;
==Model-specific Status==&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellpadding=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;border:1px; background:grey;&amp;quot;&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Thinkpad Model &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Type &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Operating System &lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Kernel Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Suspend2 Version&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Success&lt;br /&gt;
! style=&amp;quot;background:#efefef;&amp;quot;| Note&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| {{T60p}}&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| 2.6.18.1&lt;br /&gt;
| 2.2.9&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| Requires &amp;quot;ProcSetting extra_pages_allowance 7500&amp;quot; in hibernate.conf, SATA mode set to compatibility in BIOS and the DMA fix from [[Problems with SATA and Linux]]&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{T60}}&lt;br /&gt;
| 2007-77G&lt;br /&gt;
|&lt;br /&gt;
| 2.6.17.14&lt;br /&gt;
| 2.2.7.4&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| Requires &amp;quot;ProcSetting extra_pages_allowance 7500&amp;quot; in hibernate.conf&lt;br /&gt;
|- style=&amp;quot;background: white;&amp;quot;&lt;br /&gt;
| {{T42}}&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{T43}}&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{T21}}&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| need to unload the sound module (&amp;lt;tt&amp;gt;snd-cs46xx&amp;lt;/tt&amp;gt;) on suspend. May want to enable UseDummyXServer if running X&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{T21}}&lt;br /&gt;
| 2647-4BG &lt;br /&gt;
| Ubuntu 6.10 Edgy Eft&lt;br /&gt;
| 2.6.17.10&lt;br /&gt;
| 2.2.7.6&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| I used experimental [http://3v1n0.tuxfamily.org/dists/edgy/suspend2/ Trevino's kernel packages]&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot; &lt;br /&gt;
| {{X41T}}&lt;br /&gt;
| &lt;br /&gt;
| Fedore Core 4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| requires SATA resume patch and the SATA drivers compiled as built-in or in initrd (see [[Problems with SATA and Linux]]) and a {{path|hibernate.conf}} fix (see [[Installing Fedora Core 4 on a ThinkPad X41 Tablet]])&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{X22}}&lt;br /&gt;
| &lt;br /&gt;
| Ubuntu Breezy&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| see [[Installing Ubuntu (Breezy) on a ThinkPad X22]]&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{G41}}&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| see [[Installing Debian on a ThinkPad G41]]&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{R51}}&lt;br /&gt;
| 1829&lt;br /&gt;
|&lt;br /&gt;
| 2.6.19.1-suspend2-2.2.9&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{R51e}}&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 2.6.16-suspend2-r8&lt;br /&gt;
|&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| Requires &amp;quot;ProcSetting extra_pages_allowance 8000&amp;quot; in hibernate.conf&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{R52}}&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 2.6.17.1&lt;br /&gt;
| 2.2.7&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
| FC5 with kernel [http://mhensler.de/swsusp/download_en.php 2.6.17-1.2145_1.rhfc5.cubbi_suspend2]&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
| {{T23}}&lt;br /&gt;
| 2647-9KU &lt;br /&gt;
| Debian Etch&lt;br /&gt;
| 2.6.17.4&lt;br /&gt;
| 2.2.7&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes &lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|{{X60s}}&lt;br /&gt;
| 1702-55G &lt;br /&gt;
| Arch Linux&lt;br /&gt;
| 2.6.17.13&lt;br /&gt;
| 2.2.8&lt;br /&gt;
! style =&amp;quot;color:green;&amp;quot;| Yes&lt;br /&gt;
|I use the [http://iphitus.loudas.com/beyond.html beyond] patchset&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background: white; color:black;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation Instructions==&lt;br /&gt;
The [http://suspend2.net/ project home page] has a detailed HOWTO and FAQ. The following are just a few highlights.&lt;br /&gt;
&lt;br /&gt;
===Patching mkinitrd===&lt;br /&gt;
If your systems uses an &amp;lt;tt&amp;gt;initrd&amp;lt;/tt&amp;gt; file (most do), you'll need to patch or replace your &amp;lt;tt&amp;gt;initrd&amp;lt;/tt&amp;gt;-creation script.&lt;br /&gt;
&lt;br /&gt;
*{{Fedora}} 4: in {{path|/sbin/mkinitrd}}, find this line:&lt;br /&gt;
 echo &amp;quot;echo Mounted /proc filesystem&amp;quot; &amp;gt;&amp;gt; $RCFILE&lt;br /&gt;
and add the following immediately afterwards:&lt;br /&gt;
 echo &amp;quot;echo &amp;gt; /sys/power/suspend2/do_resume&amp;quot; &amp;gt;&amp;gt;$RCFILE&lt;br /&gt;
*{{Fedora}} 5: in {{path|/sbin/mkinitrd}}, find this line:&lt;br /&gt;
 if [ -z &amp;quot;$noresume&amp;quot; -a -n &amp;quot;$swsuspdev&amp;quot; ]; then&lt;br /&gt;
and add the following immediately ''before'' the above:&lt;br /&gt;
 emit &amp;quot;echo 1 &amp;gt; /sys/power/suspend2/do_resume&amp;quot;&lt;br /&gt;
You can also use the [http://atrpms.net/dist/fc5/mkinitrd-suspend2/ mkinitrd-suspend2] package from atrpms.&lt;br /&gt;
*{{Debian}}: copy [http://dagobah.ucc.asn.au/swsusp/2.0.0.102/swsusp-initrd.sh swsusp-initrd.sh] script to your {{path|/etc/mkinitrd/scripts}} directory before creating initrd image.&lt;br /&gt;
&lt;br /&gt;
Make sure you regenerate your &amp;lt;tt&amp;gt;initrd&amp;lt;/tt&amp;gt; file (using &amp;lt;tt&amp;gt;mkinitrd&amp;lt;/tt&amp;gt; or by reinstalling the kernel) after patching &amp;lt;tt&amp;gt;mkinitrd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Hibernate script===&lt;br /&gt;
Software Suspend 2 works best with the &amp;lt;tt&amp;gt;hibernate&amp;lt;/tt&amp;gt; script (available from the project home page), which takes care of auxiliary tasks needed on many systems (e.g., unloading problematic modules and restoring video modes).&lt;br /&gt;
&lt;br /&gt;
====Availability====&lt;br /&gt;
*{{Gentoo}}: emerge hibernate-script&lt;br /&gt;
*{{Fedora}}: kernel and hibernate RPMs are available at http://mhensler.de/swsusp/&lt;br /&gt;
*{{Ubuntu}}: packages for Ubuntu Dapper Drake (kernel, hibernate, suspend2ui-userui): http://dagobah.ucc.asn.au/dapper-kernels/&lt;br /&gt;
*{{Ubuntu}}: experimental packages for Ubuntu Edgy Eft (kernel, hibernate, suspend2ui-userui): http://3v1n0.tuxfamily.org/dists/edgy/suspend2/&lt;br /&gt;
*PLD: poldek -iv hibernate&lt;br /&gt;
*Other: check the home page for packages (deb, i386 rpm, tgz, and source rpm) from http://www.suspend2.net&lt;br /&gt;
&lt;br /&gt;
==Configuration tips==&lt;br /&gt;
===RediSafe-like functionality===&lt;br /&gt;
The hibernate functionality on some ThinkPad BIOSes offers the useful &amp;quot;RediSafe&amp;quot; feature, which suspends to both RAM and disk. This way you get quick resumes (directly from RAM), plus the safey of suspend-to-disk in case the battery runs out.&lt;br /&gt;
&lt;br /&gt;
Software Suspend 2 provides this feature too; simply add the following to {{path|/etc/hibernate/suspend2.conf}}:&lt;br /&gt;
 PowerdownMethod 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Patches]] [[Category:Drivers]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=HDAPS&amp;diff=27164</id>
		<title>HDAPS</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=HDAPS&amp;diff=27164"/>
		<updated>2006-12-20T16:04:36Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: /* Other */ Reorganized &amp;amp; added another workspace switcher&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
=== HDAPS - IBM Active Protection System Linux Driver ===&lt;br /&gt;
This is the Linux driver for monitoring the acceleratometer known as [[Active Protection System|IBM Active Protection System]].&lt;br /&gt;
&lt;br /&gt;
The driver only enables reading of the acceleration data. It does '''not''' perform [[#Harddisk Protection|automatic disk head parking]]. But there are already some other useful [[#Applications|applications]] for HDAPS, using the {{path|/sys}} interface it provides.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
*provides accelerometer values via sysfs&lt;br /&gt;
*provides a joystick type input device&lt;br /&gt;
&lt;br /&gt;
=== Project Homepage / Availability ===&lt;br /&gt;
*[http://hdaps.sourceforge.net/ Project Homepage]&lt;br /&gt;
*The driver is included in the 2.6-mm series of kernels since August, 26th 2005.&lt;br /&gt;
*The driver is now in the mainline (2.6.14).&lt;br /&gt;
*The [[tp_smapi]] package contains some patches to this driver. These are necessary for some recent models, and recommended for all.&lt;br /&gt;
&lt;br /&gt;
=== Status ===&lt;br /&gt;
A driver is included in recent Linux kernels and is actively maintained. &lt;br /&gt;
&lt;br /&gt;
=== How to install the driver ===&lt;br /&gt;
If you are using a version of the Linux kernel &amp;lt; 2.6.14, please upgrade. I struggled long and hard to get the driver working with an old version of the kernel, and it was a mess. I gave up, upgraded my kernel, and one recompile later, HDAPS was working.&lt;br /&gt;
&lt;br /&gt;
=== Harddisk Protection ===&lt;br /&gt;
As mentioned above, the hdaps kernel driver is only responsible for reading the accelerometer data and exporting it through the sysfs interface. In order to use this information to protect the disk, some additional steps are required.&lt;br /&gt;
&lt;br /&gt;
See [[How to protect the harddisk through APS]].&lt;br /&gt;
&lt;br /&gt;
=== Input device support ===&lt;br /&gt;
The hdaps driver in the lastest kernels (2.6.14 and later?) also exports a joystick type input device, which can be used by games.&lt;br /&gt;
&lt;br /&gt;
=== Applications ===&lt;br /&gt;
====Disk head parking====&lt;br /&gt;
You will need the kernel patch and userspace daemon. The GUI monitoring is optional.&lt;br /&gt;
* Kernel patch (apply using 'patch -p1 -l &amp;lt; hdaps_xx.patch')&lt;br /&gt;
**[http://lwn.net/Articles/154923/ disk park patch] &amp;lt;tt&amp;gt;an experimental patch for parking the disk (Linux 2.6.14 for 2.6.15 see below)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://jenster.dyndns.org/files/blk_freeze-01-nodetection-for-2.6.14.patch disk park patch adapted for the t41p model] &amp;lt;tt&amp;gt; kernel 2.6.14 *([http://sourceforge.net/mailarchive/message.php?msg_id=13214288 capability detection disabled], no libata support)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://jenster.dyndns.org/files/blk_freeze-01-nodetection-for-2.6.15.patch disk park patch adapted for the t41p model] &amp;lt;tt&amp;gt; kernel 2.6.15 *([http://sourceforge.net/mailarchive/message.php?msg_id=13214288 capability detection disabled], no libata support)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect.20060118.patch sata/ide disk protection patch for 2.6.15]&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect.20060430.patch Latest sata/ide disk protection patch for 2.6.16]&lt;br /&gt;
**[http://whoopie.gmxhome.de/linux/patches/2.6.16-tj/05-hdaps_protect-20060430-for-2.6.16-tj.patch Latest sata/ide disk protection patch for use with the libata hotplug 2.6.16.16 patches] - See [[How_to_hotswap_UltraBay_devices]]&lt;br /&gt;
**[http://whoopie.gmxhome.de/linux/patches/2.6.17.14-tj/03-hdaps_protect-20060430-for-2.6.17-tj.patch Latest sata/ide disk protection patch for use with the libata hotplug 2.6.17.4 patches] - See [[How_to_hotswap_UltraBay_devices]]&lt;br /&gt;
**[http://exitzero.de/t41p-configs/hdaps_protect-2.6.17.1-20060625.patch Untested patch for 2.6.17.1]: see [http://thread.gmane.org/gmane.linux.drivers.hdaps.devel/708/focus=708]&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect-2.6.18.3-2.patch Latest sata/ide disk protection patch for 2.6.18.3]&lt;br /&gt;
**[http://article.gmane.org/gmane.linux.kernel/470413 Latest sata/ide disk protection patch for 2.6.19-rc6]&lt;br /&gt;
*Userspace daemon&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdapsd-20060409.c  userspace parking daemon]&lt;br /&gt;
**[ftp://rohrmoser-engineering.de/pub/  hdapsd-&amp;lt;date&amp;gt;.c  is an improved version of the daemon, which computes an adaptive sensivity threshold]&lt;br /&gt;
*GUI monitoring&lt;br /&gt;
**[http://www.oakcourt.dyndns.org/projects/khdapsmon/ khdapsmon] &amp;lt;tt&amp;gt;KDE System Tray app similar to the Windows one (also at [http://www.kde-apps.org/content/show.php?content=34134 kde-apps.org])&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://roy.marples.name/node/269 khdapmonitor] Another userfriendly KDE System Tray Monitor&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/gnome-hdaps-applet-20060120.tar.gz gnome-hdaps-applet] &amp;lt;tt&amp;gt;visual display of disk protection status in gnome panel&amp;lt;/tt&amp;gt;&lt;br /&gt;
See [[How to protect the harddisk through APS]] for more information.&lt;br /&gt;
&lt;br /&gt;
====Security &amp;amp; safety====&lt;br /&gt;
*[[Script for theft alarm using HDAPS]]&lt;br /&gt;
&lt;br /&gt;
====Tilt monitoring====&lt;br /&gt;
*[http://www.mulliner.org/collin/gkibm-acpi.php gkhdaps] &amp;lt;tt&amp;gt;a GKrellM applet displaying tilt data&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[http://rlove.org/log/2005082203.html gnome-tilt] &amp;lt;tt&amp;gt;a gnome applet showing tilt data&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Visualisation (of ThinkPad orientation)====&lt;br /&gt;
*[http://rlove.org/log/2005082401.html hdaps-gl] &amp;lt;tt&amp;gt;a little app animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[https://sourceforge.net/project/showfiles.php?group_id=138242 hdapsgl-applet] &amp;lt;tt&amp;gt; a GNOME applet animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[https://sourceforge.net/project/showfiles.php?group_id=138242 wmadhps] &amp;lt;tt&amp;gt;a WindowMaker DockApp animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[http://www.cs.cmu.edu/~ecc/gyro.tar.gz OpenGL gyroscope hack] &amp;lt;tt&amp;gt;keeps your display levelled when tilting the ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Games====&lt;br /&gt;
*[http://icculus.org/neverball/ Neverball] is quite fun with HDAPS. (You'll need to have the HDAPS joystick device)&lt;br /&gt;
*Turn your ThinkPad into a Jedi Weapon (hey, it [http://isnoop.net/blog/2006/05/20/macsaber-turn-your-mac-into-a-jedi-weapon works for Mac laptops])&lt;br /&gt;
&lt;br /&gt;
====Other====&lt;br /&gt;
&lt;br /&gt;
*[http://blog.micampe.it/articles/2006/06/04/here-comes-the-smackpad smack.py] - switch workspace by smacking your laptop, inspired by the [http://blog.medallia.com/2006/05/smacbook_pro.html SmackBook] (uses EWMH)&lt;br /&gt;
**an [http://weblogs.mozillazine.org/gerv/archives/2006/09/stablilised_smackpad.html improved version] adds stabilization (by comparing smacks to previous ones, uses EWMH)&lt;br /&gt;
**another [http://pberndt.com/Programme/Linux/pyhdaps/index.html approach] adds stabilization (by requiring a certain type of value deflection, uses xmacroplay)&lt;br /&gt;
**[http://www.gnome.org/~fherrera/gtollina.c GTollina] is another smack program for use with compiz (video [http://www.gnome.org/~fherrera/blog/gtollina.html here]).&lt;br /&gt;
*[http://blog.odonnell.nu/61.html xmms-smack.py] - move through your xmms playlist by smacking, based on the two smack scripts above.&lt;br /&gt;
*[http://www-128.ibm.com/developerworks/linux/library/l-knockage.html?ca=dgr-lnxw02aKnockBasedCommands KnockBasedCommands] - Execute commands by tapping your laptop.&lt;br /&gt;
&lt;br /&gt;
=== Interesting links related to this project ===&lt;br /&gt;
* [https://lists.sourceforge.net/lists/listinfo/hdaps-devel HDAPS mailinglist and its archive]&lt;br /&gt;
* #hdaps channel on irc.freenode.org&lt;br /&gt;
* [https://sourceforge.net/projects/hdaps/ hdaps projects] overview of userspace programs using hdaps&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=TPAD-HDFIRM IBM ThinkPads hardware drive firmware site]&lt;br /&gt;
* [http://www.paul.sladen.org/thinkpad-r31/accelerometer.html http://www.paul.sladen.org/thinkpad-r31/accelerometer/]&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=119845 Gentoo ebuild for hdaps driver and daemon including a initscript*&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137345 Gentoo ebuild for gkhdaps gkrell plugin&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137350 Gentoo ebuild for hdaps-gl application&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137351 Gentoo ebuild for gnome hdapsgl-applet&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137352 Gentoo ebuild for gnome tilt application&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137353 Gentoo ebuild for wmhdaps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Drivers]] [[Category:Z61m]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=HDAPS&amp;diff=27089</id>
		<title>HDAPS</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=HDAPS&amp;diff=27089"/>
		<updated>2006-12-18T15:35:57Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: /* Games */ Patch is not needed anymore, Neverball has /dev/input/JS* support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
=== HDAPS - IBM Active Protection System Linux Driver ===&lt;br /&gt;
This is the Linux driver for monitoring the acceleratometer known as [[Active Protection System|IBM Active Protection System]].&lt;br /&gt;
&lt;br /&gt;
The driver only enables reading of the acceleration data. It does '''not''' perform [[#Harddisk Protection|automatic disk head parking]]. But there are already some other useful [[#Applications|applications]] for HDAPS, using the {{path|/sys}} interface it provides.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
*provides accelerometer values via sysfs&lt;br /&gt;
*provides a joystick type input device&lt;br /&gt;
&lt;br /&gt;
=== Project Homepage / Availability ===&lt;br /&gt;
*[http://hdaps.sourceforge.net/ Project Homepage]&lt;br /&gt;
*The driver is included in the 2.6-mm series of kernels since August, 26th 2005.&lt;br /&gt;
*The driver is now in the mainline (2.6.14).&lt;br /&gt;
*The [[tp_smapi]] package contains some patches to this driver. These are necessary for some recent models, and recommended for all.&lt;br /&gt;
&lt;br /&gt;
=== Status ===&lt;br /&gt;
A driver is included in recent Linux kernels and is actively maintained. &lt;br /&gt;
&lt;br /&gt;
=== How to install the driver ===&lt;br /&gt;
If you are using a version of the Linux kernel &amp;lt; 2.6.14, please upgrade. I struggled long and hard to get the driver working with an old version of the kernel, and it was a mess. I gave up, upgraded my kernel, and one recompile later, HDAPS was working.&lt;br /&gt;
&lt;br /&gt;
=== Harddisk Protection ===&lt;br /&gt;
As mentioned above, the hdaps kernel driver is only responsible for reading the accelerometer data and exporting it through the sysfs interface. In order to use this information to protect the disk, some additional steps are required.&lt;br /&gt;
&lt;br /&gt;
See [[How to protect the harddisk through APS]].&lt;br /&gt;
&lt;br /&gt;
=== Input device support ===&lt;br /&gt;
The hdaps driver in the lastest kernels (2.6.14 and later?) also exports a joystick type input device, which can be used by games.&lt;br /&gt;
&lt;br /&gt;
=== Applications ===&lt;br /&gt;
====Disk head parking====&lt;br /&gt;
You will need the kernel patch and userspace daemon. The GUI monitoring is optional.&lt;br /&gt;
* Kernel patch (apply using 'patch -p1 -l &amp;lt; hdaps_xx.patch')&lt;br /&gt;
**[http://lwn.net/Articles/154923/ disk park patch] &amp;lt;tt&amp;gt;an experimental patch for parking the disk (Linux 2.6.14 for 2.6.15 see below)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://jenster.dyndns.org/files/blk_freeze-01-nodetection-for-2.6.14.patch disk park patch adapted for the t41p model] &amp;lt;tt&amp;gt; kernel 2.6.14 *([http://sourceforge.net/mailarchive/message.php?msg_id=13214288 capability detection disabled], no libata support)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://jenster.dyndns.org/files/blk_freeze-01-nodetection-for-2.6.15.patch disk park patch adapted for the t41p model] &amp;lt;tt&amp;gt; kernel 2.6.15 *([http://sourceforge.net/mailarchive/message.php?msg_id=13214288 capability detection disabled], no libata support)&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect.20060118.patch sata/ide disk protection patch for 2.6.15]&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect.20060430.patch Latest sata/ide disk protection patch for 2.6.16]&lt;br /&gt;
**[http://whoopie.gmxhome.de/linux/patches/2.6.16-tj/05-hdaps_protect-20060430-for-2.6.16-tj.patch Latest sata/ide disk protection patch for use with the libata hotplug 2.6.16.16 patches] - See [[How_to_hotswap_UltraBay_devices]]&lt;br /&gt;
**[http://whoopie.gmxhome.de/linux/patches/2.6.17.14-tj/03-hdaps_protect-20060430-for-2.6.17-tj.patch Latest sata/ide disk protection patch for use with the libata hotplug 2.6.17.4 patches] - See [[How_to_hotswap_UltraBay_devices]]&lt;br /&gt;
**[http://exitzero.de/t41p-configs/hdaps_protect-2.6.17.1-20060625.patch Untested patch for 2.6.17.1]: see [http://thread.gmane.org/gmane.linux.drivers.hdaps.devel/708/focus=708]&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdaps_protect-2.6.18.3-2.patch Latest sata/ide disk protection patch for 2.6.18.3]&lt;br /&gt;
**[http://article.gmane.org/gmane.linux.kernel/470413 Latest sata/ide disk protection patch for 2.6.19-rc6]&lt;br /&gt;
*Userspace daemon&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/hdapsd-20060409.c  userspace parking daemon]&lt;br /&gt;
**[ftp://rohrmoser-engineering.de/pub/  hdapsd-&amp;lt;date&amp;gt;.c  is an improved version of the daemon, which computes an adaptive sensivity threshold]&lt;br /&gt;
*GUI monitoring&lt;br /&gt;
**[http://www.oakcourt.dyndns.org/projects/khdapsmon/ khdapsmon] &amp;lt;tt&amp;gt;KDE System Tray app similar to the Windows one (also at [http://www.kde-apps.org/content/show.php?content=34134 kde-apps.org])&amp;lt;/tt&amp;gt;&lt;br /&gt;
**[http://roy.marples.name/node/269 khdapmonitor] Another userfriendly KDE System Tray Monitor&lt;br /&gt;
**[http://www.dresco.co.uk/hdaps/gnome-hdaps-applet-20060120.tar.gz gnome-hdaps-applet] &amp;lt;tt&amp;gt;visual display of disk protection status in gnome panel&amp;lt;/tt&amp;gt;&lt;br /&gt;
See [[How to protect the harddisk through APS]] for more information.&lt;br /&gt;
&lt;br /&gt;
====Security &amp;amp; safety====&lt;br /&gt;
*[[Script for theft alarm using HDAPS]]&lt;br /&gt;
&lt;br /&gt;
====Tilt monitoring====&lt;br /&gt;
*[http://www.mulliner.org/collin/gkibm-acpi.php gkhdaps] &amp;lt;tt&amp;gt;a GKrellM applet displaying tilt data&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[http://rlove.org/log/2005082203.html gnome-tilt] &amp;lt;tt&amp;gt;a gnome applet showing tilt data&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Visualisation (of ThinkPad orientation)====&lt;br /&gt;
*[http://rlove.org/log/2005082401.html hdaps-gl] &amp;lt;tt&amp;gt;a little app animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[https://sourceforge.net/project/showfiles.php?group_id=138242 hdapsgl-applet] &amp;lt;tt&amp;gt; a GNOME applet animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[https://sourceforge.net/project/showfiles.php?group_id=138242 wmadhps] &amp;lt;tt&amp;gt;a WindowMaker DockApp animating a 3D-ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
*[http://www.cs.cmu.edu/~ecc/gyro.tar.gz OpenGL gyroscope hack] &amp;lt;tt&amp;gt;keeps your display levelled when tilting the ThinkPad&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Games====&lt;br /&gt;
*[http://icculus.org/neverball/ Neverball] is quite fun with HDAPS. (You'll need to have the HDAPS joystick device)&lt;br /&gt;
*Turn your ThinkPad into a Jedi Weapon (hey, it [http://isnoop.net/blog/2006/05/20/macsaber-turn-your-mac-into-a-jedi-weapon works for Mac laptops])&lt;br /&gt;
&lt;br /&gt;
====Other====&lt;br /&gt;
&lt;br /&gt;
*[http://blog.micampe.it/articles/2006/06/04/here-comes-the-smackpad smack.py] - switch workspace by smacking your laptop, inspired by the [http://blog.medallia.com/2006/05/smacbook_pro.html SmackBook] (an [http://weblogs.mozillazine.org/gerv/archives/2006/09/stablilised_smackpad.html improved version] adds stabilization])&lt;br /&gt;
*[http://www.gnome.org/~fherrera/gtollina.c GTollina] - another smack program for use with compiz (video [http://www.gnome.org/~fherrera/blog/gtollina.html here]).&lt;br /&gt;
*[http://blog.odonnell.nu/61.html xmms-smack.py] - move through your xmms playlist by smacking, based on the two smack scripts above.&lt;br /&gt;
*[http://www-128.ibm.com/developerworks/linux/library/l-knockage.html?ca=dgr-lnxw02aKnockBasedCommands KnockBasedCommands] - Execute commands by tapping your laptop.&lt;br /&gt;
&lt;br /&gt;
=== Interesting links related to this project ===&lt;br /&gt;
* [https://lists.sourceforge.net/lists/listinfo/hdaps-devel HDAPS mailinglist and its archive]&lt;br /&gt;
* #hdaps channel on irc.freenode.org&lt;br /&gt;
* [https://sourceforge.net/projects/hdaps/ hdaps projects] overview of userspace programs using hdaps&lt;br /&gt;
* [http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=TPAD-HDFIRM IBM ThinkPads hardware drive firmware site]&lt;br /&gt;
* [http://www.paul.sladen.org/thinkpad-r31/accelerometer.html http://www.paul.sladen.org/thinkpad-r31/accelerometer/]&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=119845 Gentoo ebuild for hdaps driver and daemon including a initscript*&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137345 Gentoo ebuild for gkhdaps gkrell plugin&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137350 Gentoo ebuild for hdaps-gl application&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137351 Gentoo ebuild for gnome hdapsgl-applet&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137352 Gentoo ebuild for gnome tilt application&lt;br /&gt;
* http://bugs.gentoo.org/show_bug.cgi?id=137353 Gentoo ebuild for wmhdaps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:R60]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:T60p]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]] [[Category:Drivers]] [[Category:Z61m]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_reduce_power_consumption&amp;diff=26963</id>
		<title>How to reduce power consumption</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_reduce_power_consumption&amp;diff=26963"/>
		<updated>2006-12-12T21:01:45Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: /* Graphics */ Added a link to Automatically_reduce_brightness&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Reducing system power consumption will extend battery life, reduce system temperature and (on some models) reduce system fan noise. This page summarizes the known techniques for reducing power consumption on ThinkPad laptops under Linux. The power numbers given (in Watt) are very rough and model-specific.&lt;br /&gt;
&lt;br /&gt;
===System power states===&lt;br /&gt;
* [[Power Management]]&lt;br /&gt;
* [[How to make use of Power Management features]]&lt;br /&gt;
&lt;br /&gt;
===CPU===&lt;br /&gt;
* [[How to make use of Dynamic Frequency Scaling]]&lt;br /&gt;
* [[Pentium M undervolting and underclocking]]&lt;br /&gt;
&lt;br /&gt;
===Graphics===&lt;br /&gt;
* [[How to make use of Graphics Chips Power Management features]]&lt;br /&gt;
* [[Problem with high power drain in ACPI sleep]]&lt;br /&gt;
* [[Rovclock]]&lt;br /&gt;
* Reduce LCD brightness (~1-4W difference)&lt;br /&gt;
** Do this [[Automatically_reduce_brightness|automatically]] after a period of inactivity&lt;br /&gt;
* Disable CRT output (~0.5W difference)&lt;br /&gt;
&lt;br /&gt;
===Hard disk===&lt;br /&gt;
Spinning down the disk saves about 1W.&lt;br /&gt;
* [[Laptop-mode]]&lt;br /&gt;
* [[How to make use of Harddisk Power Management features]]&lt;br /&gt;
&lt;br /&gt;
===Optical drive===&lt;br /&gt;
The optical drive consumes about 1W even when not accessed.&lt;br /&gt;
* [[How to hotswap UltraBay devices|Eject the UltraBay optical drive]], or just turn off its power supply (i.e., run the appropriate eject script but leave the drive inserted).&lt;br /&gt;
* [[How to set optical drive speed|Reduce the spinning speed of the optical drive]].&lt;br /&gt;
&lt;br /&gt;
===System fan===&lt;br /&gt;
Consumes about 0.5W when running.&lt;br /&gt;
* [[ACPI fan control script]]&lt;br /&gt;
&lt;br /&gt;
===Wireless network===&lt;br /&gt;
Consumes up to ~4W.&lt;br /&gt;
* Activate power saving on the wireless network card&lt;br /&gt;
** For [[Intel PRO/Wireless 2200BG Mini-PCI Adapter]] and [[Intel PRO/Wireless 2915ABG Mini-PCI Adapter]], see instructions for the [[ipw2200]] driver.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
Causes significant power draw due to bus mastering (affects CPU C-state).  Disable by unloading modules,&lt;br /&gt;
or unbinding the devices in sysfs.&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
Consumes about 0.3W.&lt;br /&gt;
* [[How to enable AC97 power saving]]&lt;br /&gt;
&lt;br /&gt;
==Related toptics==&lt;br /&gt;
* [[How to measure power consumption]]&lt;br /&gt;
* [[Script_for_monitoring_power_consumption]]&lt;br /&gt;
* Battery [[maintenance]]&lt;br /&gt;
&lt;br /&gt;
==External resources==&lt;br /&gt;
* [http://www.gentoo.org/doc/en/power-management-guide.xml Power Management Guide] from the Gentoo Linux documentation&lt;br /&gt;
* [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2005-November/030478.html When/where/what for low power consumption?] (thread on Linux-Thinkpad)&lt;br /&gt;
* ''8hours of battery life on your lap(top)'' ([http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.odp ODP]/[http://atrey.karlin.mff.cuni.cz/~pavel/swsusp/8hours.pdf PDF]), a presentation by Pavel Machek&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=26962</id>
		<title>Automatically reduce brightness</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Automatically_reduce_brightness&amp;diff=26962"/>
		<updated>2006-12-12T21:00:17Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Created the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The idea ==&lt;br /&gt;
When watching someone working with an iBook I noticed that the brightness automatically faded to the lowest level after a few seconds of inactivity. I think that this is a simple way to save power. I wrote a c-daemon which uses the XScreenSaver extension to check whether the user is active. If he is not, it lowers the brightness to a specific level. When he is active again, the brightness is reset to the previous level.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
A recent kernel with IBM ACPI extensions. (You should have a file called {{path|/proc/acpi/ibm/brightness}})&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
# Download the [http://pberndt.com/Programme/Linux/brightd/_download/brightd.tar.bz2 brightness control daemon]&lt;br /&gt;
# Unpack it and chdir into the {{path|brightd}} directory&lt;br /&gt;
# Call {{cmduser|make}}&lt;br /&gt;
# Move the {{path|brightd}} executable into a directory like {{path|/usr/local/bin}}&lt;br /&gt;
# Put {{cmduser|brightd -d}} into your {{path|~/.Xsession}} (or another distro-specific startup script)&lt;br /&gt;
# Change the permissions of {{path|/proc/acpi/ibm/brightness}} so that your user can write to that file&lt;br /&gt;
&lt;br /&gt;
See the README for more detailled instructions and command line parameters.&lt;br /&gt;
&lt;br /&gt;
== Example installation for Gentoo linux and XFCE4 ==&lt;br /&gt;
 $ wget -o /dev/null -O brightd.tar.bz2 &amp;quot;http://pberndt.com/Programme/Linux/brightd/_download/brightd.tar.bz2?ct=raw&amp;amp;sub=att&amp;quot;&lt;br /&gt;
 $ tar xjf brightd.tar.bz2&lt;br /&gt;
 $ cd brightd/&lt;br /&gt;
 $ make&lt;br /&gt;
 gcc -lX11 -lXss -o brightd brightd.c&lt;br /&gt;
 $ cp brightd /usr/local/bin/&lt;br /&gt;
 $ cd /etc/xdg/xfce4&lt;br /&gt;
 $ vi xinitrc&lt;br /&gt;
 73Gi&lt;br /&gt;
 /usr/local/bin/brightd -s 5 -w 2 -d&lt;br /&gt;
 &amp;lt;escape&amp;gt;:x &lt;br /&gt;
 $ cd /etc/init.d/&lt;br /&gt;
 $ cat &amp;gt; permissions&lt;br /&gt;
 start() {&lt;br /&gt;
         ebegin &amp;quot;Setting permissions on /proc&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
         chmod g+w /proc/acpi/ibm/brightness&lt;br /&gt;
         chgrp wheel /proc/acpi/ibm/brightness&lt;br /&gt;
 &lt;br /&gt;
         eend $?&lt;br /&gt;
 }&lt;br /&gt;
 $ chmod a+x permissions&lt;br /&gt;
 $ rc-update add permissions boot&lt;br /&gt;
 $ ./permissions start&lt;br /&gt;
&lt;br /&gt;
Done. Restart X to see it working.&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User:Pberndt&amp;diff=23713</id>
		<title>User:Pberndt</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User:Pberndt&amp;diff=23713"/>
		<updated>2006-07-26T20:42:52Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About me==&lt;br /&gt;
My homepage: [http://www.pberndt.com pberndt.com]&amp;lt;br&amp;gt;&lt;br /&gt;
Contact:     pberndt ''at'' jabber ''dot'' ccc ''dot'' de; for email and so on see [http://www.pberndt.com/%DCber%20mich/Kontakt.html my homepage]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=23712</id>
		<title>User talk:Pberndt</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=23712"/>
		<updated>2006-07-26T20:42:41Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Deleted&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Talk:How_to_compile_an_experimental_X_server&amp;diff=23086</id>
		<title>Talk:How to compile an experimental X server</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Talk:How_to_compile_an_experimental_X_server&amp;diff=23086"/>
		<updated>2006-07-07T19:11:44Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Never mind this comment. Could not resist.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Other approach==&lt;br /&gt;
Or, if you want to play with an unstable system, use a distribution, which can help you doing that, for example [http://www.gentoo.org/ Gentoo] or [http://www.sourcemage.org/ Sourcemage].&lt;br /&gt;
You won't need a script that way:&lt;br /&gt;
 root@gentoo ~ $ echo &amp;quot;x11-base/xorg-x11 ~x86&amp;quot; &amp;gt; /etc/portage/package.keywords&lt;br /&gt;
 root@gentoo ~ $ emerge -avuD xorg-x11&lt;br /&gt;
(scnr. I know that you'll have to unmask a few more packages in reality. I know that you can do something similar in other distributions. I just don't understand why you are not using your package manager [unless you've got an LFS...])&lt;br /&gt;
&lt;br /&gt;
--[[User:Pberndt|Pberndt]] 21:11, 7 July 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=How_to_protect_the_harddisk_through_APS&amp;diff=23027</id>
		<title>How to protect the harddisk through APS</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=How_to_protect_the_harddisk_through_APS&amp;diff=23027"/>
		<updated>2006-07-01T12:46:24Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
This page tells you how to make the [[Active Protection System]] work under Linux to protect your harddrive from damage in case of a notebook drop or other kind of impact while it is running.&lt;br /&gt;
&lt;br /&gt;
Specific instructions for {{Fedora}} can be found [[Installing_Fedora_Core_5_on_a_ThinkPad_X41_Tablet#Harddrive_Active_Protection_System_.28HDAPS.29|here]].&lt;br /&gt;
&lt;br /&gt;
== How APS works in Linux ==&lt;br /&gt;
APS in Linux consists of four components on the software side:&lt;br /&gt;
* The [[HDAPS]] driver (included in recent kernels). It exports a sysfs interface providing the acceleration values.&lt;br /&gt;
* The [http://www.dresco.co.uk/hdaps/ &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt;] disk protection kernel patch, which exports a sysfs interface that enables an ide or sata disk to be protected by a userspace process.&lt;br /&gt;
* The [http://www.dresco.co.uk/hdaps/ &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;] disk protection userspace daemon. It monitors the acceleration values through the HDAPS interface and automatically initiates disk protection through the hdaps_protect interface - given that the movement exceeds a user specified threshold.&lt;br /&gt;
* Optional: the [http://www.oakcourt.dyndns.org/projects/khdapsmon/ &amp;lt;tt&amp;gt;khdapsmon&amp;lt;/tt&amp;gt; KDE System Tray applet] or the [http://www.dresco.co.uk/hdaps/ &amp;lt;tt&amp;gt;gnome-hdaps-applet&amp;lt;/tt&amp;gt;]. These applets provide a visual indication of the disk protection status and also a graphical interface for adjusting configuration options for &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
As mentioned above, the hdaps kernel driver found in recent kernels is only responsible for reading the accelerometer data and exporting it through the sysfs interface. &lt;br /&gt;
&lt;br /&gt;
In order to use this information to protect the disk, some additional steps are required.&lt;br /&gt;
&lt;br /&gt;
* Download and build the latest hdaps_protect disk protection kernel patches.&lt;br /&gt;
* Enable the drivers in the kernel (requires kernel rebuild).&lt;br /&gt;
* Download, build and configure the hdapsd userspace daemon.&lt;br /&gt;
* Download and build one of the applets to get a real-time representation of the disk protection status.&lt;br /&gt;
&lt;br /&gt;
===Getting the files===&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! Latest Sources&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;gnome-hdaps-applet&amp;lt;/tt&amp;gt;: http://www.dresco.co.uk/hdaps&lt;br /&gt;
*&amp;lt;tt&amp;gt;khdapsmon&amp;lt;/tt&amp;gt;: http://www.oakcourt.dyndns.org/projects/khdapsmon/&lt;br /&gt;
|-&lt;br /&gt;
! {{Debian}}&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;khdapsmon&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;gnome-hdaps-applet&amp;lt;/tt&amp;gt;:&lt;br /&gt;
:{{cmdroot|deb http://www.oakcourt.dyndns.org/debian/ ./}}&lt;br /&gt;
:{{cmdroot|deb-src http://www.oakcourt.dyndns.org/debian/ ./}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Fedora}}&lt;br /&gt;
| see instructions [[Installing_Fedora_Core_5_on_a_ThinkPad_X41_Tablet#Harddrive_Active_Protection_System_.28HDAPS.29|here]]&lt;br /&gt;
*kernel RPM packages including &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt;: http://www.dresco.co.uk/hdaps/ &lt;br /&gt;
*kernel RPM packages including &amp;lt;tt&amp;gt;hdaps_protect&amp;lt;/tt&amp;gt; and [[Software Suspend 2]]: http://mhensler.de/swsusp/download/yum/development/fc5/ (build 2084_2 and up)&lt;br /&gt;
|-&lt;br /&gt;
! {{Gentoo}}&lt;br /&gt;
|&lt;br /&gt;
*&amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; ebuild: http://bugs.gentoo.org/show_bug.cgi?id=119845&lt;br /&gt;
*&amp;lt;tt&amp;gt;khdapsmon&amp;lt;/tt&amp;gt; ebuild: http://bugs.gentoo.org/show_bug.cgi?id=124175&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding kernel support ===&lt;br /&gt;
A kernel patch is required for disk head parking and queue freezing.&lt;br /&gt;
&lt;br /&gt;
==== Manually patching and compiling a kernel ====&lt;br /&gt;
As root, do:&lt;br /&gt;
:{{cmdroot|cd /usr/src/linux}}&lt;br /&gt;
:{{cmdroot|patch -p1 &amp;lt; ~/hdaps_protect.20060409.patch}}&lt;br /&gt;
:{{cmdroot|make clean}}&lt;br /&gt;
:{{cmdroot|make}}&lt;br /&gt;
:{{cmdroot|make modules_install}}&lt;br /&gt;
&lt;br /&gt;
=== Installing hdapsd ===&lt;br /&gt;
==== Manual compilation from source ====&lt;br /&gt;
* Download the &amp;lt;tt&amp;gt;hdapsd&amp;lt;/tt&amp;gt; sources (see above)&lt;br /&gt;
* Compile using {{cmdroot|gcc -o hdapsd hdapsd-*.c}}&lt;br /&gt;
* Run {{cmdroot|./hdapsd -d sda -s 12 -a}} (replace &amp;lt;tt&amp;gt;sda&amp;lt;/tt&amp;gt; with your hard disk device; run {{cmdroot|./hdapsd}} without arguments for help)&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
{{Gentoo}} users can try the ebuild attached to [http://bugs.gentoo.org/show_bug.cgi?id=119845 gentoo bug 119845].&lt;br /&gt;
{{NOTE|1=hdapsd was added to the official portage tree on the 26th June 2006.}}&lt;br /&gt;
*Add hdapsd support in your kernel: device drivers -&amp;gt; hardware monitoring -&amp;gt; ... (you need it as a module if you want to use tp_smapi and hdaps, see tp_smapi topic)&lt;br /&gt;
*Download the ebuild, use same ebuild date as the kernel-patch.&lt;br /&gt;
*Make known the portage an extern ebuild path and add the following line to {{path|/etc/make.conf}}:&lt;br /&gt;
 PORTDIR_OVERLAY=&amp;quot;/usr/local/portage/&amp;quot; (or any other location)&lt;br /&gt;
*Create directory {{path|/usr/local/portage}} and {{path|/usr/local/portage/app-laptop/}}&lt;br /&gt;
*Copy the downloaded ebuild to {{path|/usr/local/portage/app-laptop}} ({{path|/usr/local/portage/app-laptop/hdapsd}} should now exists)&lt;br /&gt;
*Make portage known the new ebuild and creat digist with:&lt;br /&gt;
:{{cmdroot|ebuild /usr/local/portage/app-laptop/hdapsd/hdapsd-20060326.ebuild digest}}&lt;br /&gt;
*Optional: Copy source file to portage distfiles (if no internet connection is available): &lt;br /&gt;
:{{cmdroot|cp hdapsd-20060326.c /usr/portage/distfiles}}&lt;br /&gt;
*Accept the x86 keyword for this package: {{cmdroot|echo &amp;quot;app-laptop/hdapsd ~x86&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.keywords}}&lt;br /&gt;
*Install hdapsd with: {{cmdroot|emerge hdapsd}}.&lt;br /&gt;
*Edit {{path|/etc/conf.d/hdapsd}} (change your harddrive if neccessary: mine is sda, and change the value from 5, 5 is to sensitive, 12 is a good value in my opinion).&lt;br /&gt;
*start deamon with: {{cmdroot|/etc/init.d/hdapsd start}}&lt;br /&gt;
*Optional: add to default runlevel: {{cmdroot|rc-update add hdapsd default, rc-update add hdapsd battery}}&lt;br /&gt;
Write an eMail to abartel[Ã¤d]htwm.de, if you want to get my hdapsd-20060326.ebuild and please upload it.&lt;br /&gt;
&lt;br /&gt;
=== Building an applet ===&lt;br /&gt;
====hdaps-gl====&lt;br /&gt;
*Make sure you have installed hdaps [and loaded] and ?opengl?&lt;br /&gt;
*Download &amp;lt;tt&amp;gt;hdaps-gl-0.0.5&amp;lt;/tt&amp;gt; from the web.&lt;br /&gt;
*Extract files to {{path|/opt/hdaps-gl}}.&lt;br /&gt;
*{{cmdroot|make}}&lt;br /&gt;
*Start the applet: {{cmdroot|./hdaps-gl}}&lt;br /&gt;
&lt;br /&gt;
====khdapsmon====&lt;br /&gt;
This application uses GNU autotools, so building it is the same as any other autotooled program:&lt;br /&gt;
*extract the source somewhere and change to that directory,&lt;br /&gt;
*run {{cmdroot|./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install}}.&lt;br /&gt;
See [[#Getting the files|above]] for Debian packages and a Gentoo ebuild.&lt;br /&gt;
&lt;br /&gt;
====gnome-hdaps-applet====&lt;br /&gt;
=====Debian/Ubuntu=====&lt;br /&gt;
Packages available at site listed above (with source packages that can do the building for you)&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
See the [[Problem with APS harddisk parking]] page for troubleshooting APS issues.&lt;br /&gt;
{{NOTE|1=If you use [[tp_smapi]], remember to include the option &amp;lt;tt&amp;gt;HDAPS=1&amp;lt;/tt&amp;gt; when [[Tp_smapi#Installation|installing tp_smapi]]. Also, you might need to build the hdaps driver as module.}}&lt;br /&gt;
&lt;br /&gt;
==Further Information==&lt;br /&gt;
*Additonal information and support is available through the [[Mailinglists#HDAPS Developers Mailinglist|hdaps-devel]] mailinglist and its archive.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:R50]] [[Category:R50p]] [[Category:R51]] [[Category:R52]] [[Category:T41]] [[Category:T41p]] [[Category:T42]] [[Category:T42p]] [[Category:T43]] [[Category:T43p]] [[Category:T60]] [[Category:X40]] [[Category:X41]] [[Category:X41 Tablet]] [[Category:X60]] [[Category:X60s]] [[Category:Z60m]] [[Category:Z60t]]&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=22919</id>
		<title>User talk:Pberndt</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=22919"/>
		<updated>2006-06-26T16:37:08Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Edited, does not use html anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About me==&lt;br /&gt;
My homepage: [http://www.pberndt.com pberndt.com]&amp;lt;br&amp;gt;&lt;br /&gt;
Contact:     pberndt ''at'' jabber ''dot'' ccc ''dot'' de; for email and so on see [http://www.pberndt.com/%DCber%20mich/Kontakt.html my homepage]&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=22918</id>
		<title>User talk:Pberndt</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=User_talk:Pberndt&amp;diff=22918"/>
		<updated>2006-06-26T16:34:45Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About me==&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;My homepage&amp;lt;/dt&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;a href=&amp;quot;http://www.pberndt.com&amp;quot;&amp;gt;pberndt.com&amp;lt;/a&amp;gt;&amp;lt;/dd&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Contact&amp;lt;/dt&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;pberndt &amp;lt;em&amp;gt;at&amp;lt;/em&amp;gt; jabber &amp;lt;em&amp;gt;dot&amp;lt;/em&amp;gt; ccc &amp;lt;em&amp;gt;dot&amp;lt;/em&amp;gt; de&amp;lt;br/&amp;gt;&lt;br /&gt;
or email, see &amp;lt;a href=&amp;quot;http://www.pberndt.com/%DCber%20mich/Kontakt.html&amp;quot;&amp;gt;my homepage&amp;lt;/a&amp;gt; for further contact data&amp;lt;/dd&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Problem_with_high_power_drain_in_ACPI_sleep&amp;diff=22917</id>
		<title>Problem with high power drain in ACPI sleep</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Problem_with_high_power_drain_in_ACPI_sleep&amp;diff=22917"/>
		<updated>2006-06-26T16:31:42Z</updated>

		<summary type="html">&lt;p&gt;Pberndt: Added other ideas, specially for R51/Linux&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;&amp;quot; | __TOC__&lt;br /&gt;
|style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
==Problem description==&lt;br /&gt;
Several people realized that their ThinkPads eat up too much power while suspended to ram via ACPI. Compared to APM suspend to ram the power drain is experienced to be about 10 times as high, 2-5 Watts. This empties the battery within one or two days.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Affected Models==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2&amp;quot; style=&amp;quot;float:right;margin-left:20px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#ffcfbc;&amp;quot; | affected models&lt;br /&gt;
! style=&amp;quot;vertical-align:top;background-color:#cfefcf;&amp;quot; | unaffected models &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;background-color:#fff0e0;&amp;quot; |&lt;br /&gt;
* {{R32}}&lt;br /&gt;
** 2658-BQG&lt;br /&gt;
* {{R40}}&lt;br /&gt;
** 2722-3GG&lt;br /&gt;
** 2722-5MG&lt;br /&gt;
** 2722-B3G&lt;br /&gt;
** 2722-CDG&lt;br /&gt;
** 2897-GWU&lt;br /&gt;
** 2722-6YU&lt;br /&gt;
** 2722-CDG&lt;br /&gt;
* {{R50}}&lt;br /&gt;
** 1829-7RG&lt;br /&gt;
** 1829-6DM&lt;br /&gt;
** 1836-3SU&lt;br /&gt;
* {{R51}}&lt;br /&gt;
** 1829-9MG&lt;br /&gt;
** 1829-EHG&lt;br /&gt;
** 1829-R6G&lt;br /&gt;
** 1830-DG4&lt;br /&gt;
** 1836-Q6U&lt;br /&gt;
* {{T23}}&lt;br /&gt;
**2647-???&lt;br /&gt;
* {{T30}}&lt;br /&gt;
** 2366-81A&lt;br /&gt;
** 2366-97U&lt;br /&gt;
** 2366-FBU&lt;br /&gt;
** 2366-96G&lt;br /&gt;
*{{T40}}&lt;br /&gt;
**2373-19G&lt;br /&gt;
**2373-22G&lt;br /&gt;
**2373-42G&lt;br /&gt;
**2373-75G &lt;br /&gt;
**2373-82U&lt;br /&gt;
**2373-92U&lt;br /&gt;
**2373-A1U&lt;br /&gt;
**2373-MU3&lt;br /&gt;
*{{T40p}}&lt;br /&gt;
**2373-G1U &lt;br /&gt;
**2373-G3U&lt;br /&gt;
**2373-G3G&lt;br /&gt;
**2373-G1G&lt;br /&gt;
**2373-G5G&lt;br /&gt;
* {{T41}}&lt;br /&gt;
**2379-DJU&lt;br /&gt;
**2373-3KG&lt;br /&gt;
**2373-9HU&lt;br /&gt;
**2373-4FG&lt;br /&gt;
**2373-4PG&lt;br /&gt;
**2373-1FG&lt;br /&gt;
**2373-2FG&lt;br /&gt;
**2373-2GG&lt;br /&gt;
**2373-6U4&lt;br /&gt;
**2373-7JU&lt;br /&gt;
**2373-CY0&lt;br /&gt;
**2373-TG5&lt;br /&gt;
**2373-3HM&lt;br /&gt;
**2373-4GU&lt;br /&gt;
* {{T41p}}&lt;br /&gt;
**2373-9FU&lt;br /&gt;
* {{T42}}&lt;br /&gt;
**2373-C19&lt;br /&gt;
**2373-CTO&lt;br /&gt;
**2378-DTU&lt;br /&gt;
**2378-DUU&lt;br /&gt;
**2378-XXE&lt;br /&gt;
**2378-R4U&lt;br /&gt;
**2373-FWG&lt;br /&gt;
**2374-ZEP&lt;br /&gt;
**2373-F2G&lt;br /&gt;
**2373-VUW&lt;br /&gt;
**[[2373-6ZG]]&lt;br /&gt;
* {{X21}}&lt;br /&gt;
**2662-BSG&lt;br /&gt;
* {{X32}}&lt;br /&gt;
**2884-A3U&lt;br /&gt;
*{{X41T}}&lt;br /&gt;
** 1869-5CU&lt;br /&gt;
| style=&amp;quot;vertical-align:top;background-color:#e9f9e9;&amp;quot; |&lt;br /&gt;
*[[:Category:A22m | A22m]]&lt;br /&gt;
**2628&lt;br /&gt;
*[[:Category:A31 | A31]]&lt;br /&gt;
**2652-D5G&lt;br /&gt;
*[[:Category:R50p | R50p]]&lt;br /&gt;
*[[:Category:R52 | R52]]&lt;br /&gt;
**1858-6MM&lt;br /&gt;
*[[:Category:T41 | T41]]&lt;br /&gt;
**2373-GEU&lt;br /&gt;
*[[:Category:T41p | T41p]]&lt;br /&gt;
**2373-GKG&lt;br /&gt;
**2373-GGG&lt;br /&gt;
**[[2373-GHG]]&lt;br /&gt;
*[[:Category:T42 | T42]]&lt;br /&gt;
**[[2373-M1G]]&lt;br /&gt;
**[[2373-WBZ]]&lt;br /&gt;
**[[2373-F7G]]&lt;br /&gt;
**[[2378-DXU]]&lt;br /&gt;
**[[2378-FVU]]&lt;br /&gt;
**[[2378-RTU]]&lt;br /&gt;
**[[2378-RRU]]&lt;br /&gt;
*[[:Category:T42p | T42p]]&lt;br /&gt;
**[[2373-HTG]]&lt;br /&gt;
**[[2373-W6M]]&lt;br /&gt;
**[[2373-GTG]]&lt;br /&gt;
**[[2373-GXG]]&lt;br /&gt;
**2373-KXM&lt;br /&gt;
*[[:Category:T43 | T43]]&lt;br /&gt;
**[[2668-W12]]&lt;br /&gt;
*[[:Category:T43p | T43p]]&lt;br /&gt;
**[[2668-G2G]]&lt;br /&gt;
*[[:Category:X40 | X40]]&lt;br /&gt;
**2371&lt;br /&gt;
|}&lt;br /&gt;
*Different symptoms have been reported for different models. In some models the origin of the power drain is obvious ([[Problem with LCD backlight remaining on during ACPI sleep|backlight on during suspend]]), in other models there is no obvious reason.&lt;br /&gt;
&lt;br /&gt;
*On some models/configurations the higher power drain couldn't even be realized or was at least significantly lower.&lt;br /&gt;
&lt;br /&gt;
*The T4x ThinkPad series and other Radeon based models suspend to ram just fine, and there are no components that are obviously left powered up. The [[UltraBay]] and network light is on, but that is the same under windows (but under APM sleep to RAM those lights are OFF). For these models the higher power drain is caused by a driver problem and can be fixed in software. This fix has not yet made its way into the official kernel (as of linux 2.6.12).&lt;br /&gt;
&lt;br /&gt;
The table on the right gives an overview of the models suffering from the mysterious power drain. To find out about your model, you may use the following [[ACPI sleep power drain test script | script]]. It creates a file {{path|/var/log/battery.log}} which will tell you if you are affected or not.&lt;br /&gt;
&lt;br /&gt;
==Affected Operating Systems==&lt;br /&gt;
*Linux, all flavours.&lt;br /&gt;
*Windows, for some models as well (only when using non-IBM drivers).&lt;br /&gt;
*FreeBSD (on the A22M)&lt;br /&gt;
&lt;br /&gt;
==Status==&lt;br /&gt;
*The cause of the mysterious power drain is the Radeon GPU, which requires extra steps to suspend properly. Unfortunately, this fix might break non-ThinkPad machines and therefore is not yet in the official kernel sources.&lt;br /&gt;
*The official bugzilla entry for the radeon suspend issue is in the [http://bugme.osdl.org/show_bug.cgi?id=3022 OSDL Bugzilla]. There you can find a patch which will solve the power drain issue.&lt;br /&gt;
{{WARN|This solution enables doing suspend-to-D2 on non-PPC-machines, which is not properly documented! Be careful and have a look at the discussion for kernel bug 3022 (see above) before applying the patch. By default, the patch enables the suspend-to-D2 only on machines where it is known to work. This behaviour can be overridden with a module option.}}&lt;br /&gt;
{{NOTE|This solution is on its way for inclusion into the mainline Linux kernel, but the whitelist required for its inclusion needs your help.  Please send mail to ''patroclo7 at gmail.com'' with the output of '''lspci -d &amp;quot;1002:*&amp;quot; -vn''' on affected machines ''only''.  Refer to [http://thread.gmane.org/gmane.linux.hardware.thinkpad/25355 the linux-thinkpad ML post requesting this information] for more information. This is mostly urgent if you happen to own an X21 or a R50.}}&lt;br /&gt;
*Most certainly, the DSDT is not at fault. (Interesting to note: The DSDT from BIOS 3.13 (Nov 04) for the T42p compiles without bugs.)&lt;br /&gt;
*Some additional power savings can be achieved by turning off the wake-on-lan ({{cmdroot|ethtool -s eth0 wol d}}). The power drain of the wol feature is far smaller than the radeon bug, but can be noticeable.&lt;br /&gt;
&lt;br /&gt;
==Solutions==&lt;br /&gt;
===For ThinkPads with Radeon graphic chips===&lt;br /&gt;
You must use a patched version of the radeon frame buffer, even if you are only interested in using the X window system. This modified radeon frame buffer then suspends the radeon chip correctly during ACPI sleep. This patch is not yet in the official (kernel.org) kernels.&lt;br /&gt;
&lt;br /&gt;
The [http://bugme.osdl.org/attachment.cgi?id=8220&amp;amp;action=view patch] contains a list of ThinkPads where it is known to work, and by default only activates on these machines. If you think that your computer would profit from the patch as well, you can force it by including the module parameter {{bootparm|force_sleep|1}}. If it doesn't work this can result in system hangs.&lt;br /&gt;
&lt;br /&gt;
====Technical Background====&lt;br /&gt;
The patch removes the CONFIG_PPC_PMAC condition for enabling D2 sleep in {{path|drivers/video/aty/radeon_pm.c}} as discussed in [http://bugme.osdl.org/show_bug.cgi?id=3022 kernel bug 3022]. &lt;br /&gt;
&lt;br /&gt;
====Fedora Core====&lt;br /&gt;
* Fedora Core 4: Fedora ships a patched radeon frame buffer (radeonfb.ko), but you must enable it yourself. {{Fedora}} compiles it as a module rather than including it in the kernel, therefore you cannot activate it at boot time without a custom initrd. You must arrange for the module to be loaded before X starts (for example, using an init script).&lt;br /&gt;
* Fedora Core 3: this is also true for updated kernels (at least for kernel-2.6.12-1.1376_FC3) but '''not''' for the initially shipped version.&lt;br /&gt;
&lt;br /&gt;
There are precompiled patched kernels [http://www.sas.upenn.edu/~vbraun/computing/T41/kernel.html available] as well, that do not need an initrd modification:&lt;br /&gt;
*[http://carrot.hep.upenn.edu/~vbraun/kernel-T4x/i386/kernel-T4x-2.6.11.11-26.i386.rpm linux 2.6.11 for Fedora Core 3]&lt;br /&gt;
*[http://carrot.hep.upenn.edu/~vbraun/kernel-T4x/i386/kernel-T4x-2.6.12.2-2.i386.rpm linux 2.6.12 for Fedora Core 4]&lt;br /&gt;
These kernels contain additional ThinkPad-related patches, including [[Software Suspend 2]] and trackpoint support. Suspend to disk and suspend to ram should work with them. If your ThinkPad model is not yet whitelisted in the patch, you might have to enable the radeon fix by including the parameter {{bootparm|video|2=radeonfb:force_sleep}} on the kernel command line.&lt;br /&gt;
&lt;br /&gt;
If you try, please send the result (hang yes/no, battery drain yes/no) with the precise model number (i.e. IBM ThinkPad T41 2379-DJU) to &amp;lt;tt&amp;gt;vbraun at physics dot upenn dot edu&amp;lt;/tt&amp;gt;, it would be nice if your subject line would include &amp;quot;RADEONFB:&amp;quot; to make sure that I do not miss any emails.&lt;br /&gt;
&lt;br /&gt;
=====testing radeonfb without changing initrd=====&lt;br /&gt;
If you want to try the radeon frame buffer, you can enable it as follows:&lt;br /&gt;
*First, switch to a console ({{key|Ctrl}}{{key|Alt}}{{key|F1}}) and log in as root.&lt;br /&gt;
*Stop X: {{cmdroot|init 3}}&lt;br /&gt;
*Now you can load the module: {{cmdroot|1=modprobe radeonfb force_sleep=1}}&lt;br /&gt;
*Finally, resume X: {{cmdroot|init 5}}&lt;br /&gt;
&lt;br /&gt;
=====including radeonfb into your initrd=====&lt;br /&gt;
As an alternative you can build your customized initrd. This is as simple as running&lt;br /&gt;
:{{cmdroot|1=mkinitrd --with=radeonfb /boot/&amp;lt;name-of-your-new-initrd&amp;gt; `uname -r`}}&lt;br /&gt;
and replacing the initrd in {{path|/boot/grub/grub.conf}} with your new one. You also need to add the kernel command line argument {{bootparm|video|2=radeonfb:force_sleep}}.&lt;br /&gt;
&lt;br /&gt;
====Gentoo====&lt;br /&gt;
After installing the patch on {{Gentoo}} (it works fine with gentoo-sources: {{cmdroot|cd /usr/src/linux/drivers/video/aty}}, and execute {{cmdroot|patch -p4 &amp;lt; &amp;lt;patchname&amp;gt;}}, then recompile the kernel), one needs to add {{bootparm|video|radeonfb:force_sleep}} to the kernel parameters.&lt;br /&gt;
&lt;br /&gt;
====Another possible solution====&lt;br /&gt;
It is possible that [[radeontool]] will help some people with this case.&lt;br /&gt;
(simply run radeontool light off before suspend and radeontool light on after resume).&lt;br /&gt;
A radeontool patch for freebsd is here: http://www.init-main.com/radeontool.patch (by Takanori Watanabe).&lt;br /&gt;
&lt;br /&gt;
===For models without radeon graphics===&lt;br /&gt;
The Problem seems to be solved when you use the [http://www.srcf.ucam.org/~mjg59/vbetool/ vbetool] to turn the LCD off before suspending ...&lt;br /&gt;
:{{cmdroot|vbetool dpms off}}&lt;br /&gt;
and turning it on afterwards again...&lt;br /&gt;
:{{cmdroot|vbetool dpms on}}&lt;br /&gt;
You have to change to a normal console before turning the LCD off.&lt;br /&gt;
Additionally you have to deactivate the Wake-On-Lan feature like mentioned above ...&lt;br /&gt;
:{{cmdroot|ethtool -s eth0 wol d}}&lt;br /&gt;
With these commands used together the &amp;quot;testing script&amp;quot; reports no high power drain while suspending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Other problems causing the power drain==&lt;br /&gt;
On my [[R51]] using Gentoo Linux, the high power drain was not caused by the graphics adaptor but by several components not powered down properly before putting the Thinkpad into S3.&lt;br /&gt;
&lt;br /&gt;
If the above did not help you, this might do:&lt;br /&gt;
&lt;br /&gt;
Walk through&lt;br /&gt;
 /sys/devices/*/*/power/state&lt;br /&gt;
and try to disable each of it, every time checking the power drain. (See linux/Documentation/power/devices.txt for values to write into the state-files. 3 should be the value you want to try)&lt;br /&gt;
Do the same for other components (Like the Ultrabay, etc.). Please add your experiences here.&lt;br /&gt;
&lt;br /&gt;
===R51: Ultrabay and networking===&lt;br /&gt;
On my system, ultrabay and networking light were still on while in S3. So were the devices theirselves.&lt;br /&gt;
 echo -n eject &amp;gt; /proc/acpi/ibm/bay     # Disable ultrabay&lt;br /&gt;
 ethtool -s eth0 wol d                  # Disable Wake-On-Lan (And so the eth-adaptor)&lt;br /&gt;
 echo mem &amp;gt; /sys/power/state            # Sleep&lt;br /&gt;
&lt;br /&gt;
For me, this lowered the power drain from &amp;gt;700mW to 338 mW.&lt;/div&gt;</summary>
		<author><name>Pberndt</name></author>
		
	</entry>
</feed>