From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
by nuthatch.gentoo.org with esmtp (Exim 4.50)
id 1EVVWg-0006Y7-0P
for garchives@archives.gentoo.org; Fri, 28 Oct 2005 14:48:14 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
by robin.gentoo.org (8.13.5/8.13.5) with SMTP id j9SEm8UZ002888;
Fri, 28 Oct 2005 14:48:08 GMT
Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30])
by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j9SEm7cY005181
for ; Fri, 28 Oct 2005 14:48:07 GMT
Message-Id: <200510281448.j9SEm7cY005181@robin.gentoo.org>
Received: from lark.gentoo.osuosl.org ([140.211.166.177] helo=lark.gentoo.org)
by smtp.gentoo.org with smtp (Exim 4.43)
id 1EVVWY-0004zV-OP
for gentoo-doc-cvs@lists.gentoo.org; Fri, 28 Oct 2005 14:48:06 +0000
Received: by lark.gentoo.org (sSMTP sendmail emulation); Fri, 28 Oct 2005 14:48:06 +0000
From: "Stefano Rossi"
Date: Fri, 28 Oct 2005 14:48:06 +0000
To: gentoo-doc-cvs@lists.gentoo.org
Subject: [gentoo-doc-cvs] cvs commit: power-management-guide.xml
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
List-Id: Gentoo Linux mail
X-BeenThere: gentoo-doc-cvs@gentoo.org
Reply-to: docs-team@lists.gentoo.org
X-Archives-Salt: 00d5dff5-a824-4a2c-8b2e-2fae170da9b3
X-Archives-Hash: f983ae194e3fb107b83a0de88a84bed3
so 05/10/28 14:48:06
Modified: xml/htdocs/doc/en power-management-guide.xml
Log:
#106878 update for this guide
Revision Changes Path
1.15 +409 -157 xml/htdocs/doc/en/power-management-guide.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml?rev=1.15&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml?rev=1.15&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml.diff?r1=1.14&r2=1.15&cvsroot=gentoo
Index: power-management-guide.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- power-management-guide.xml 10 Jun 2005 18:45:21 -0000 1.14
+++ power-management-guide.xml 28 Oct 2005 14:48:06 -0000 1.15
@@ -1,7 +1,7 @@
-
-
+
+
Power Management Guide
@@ -14,11 +14,11 @@
-
+
-1.24
-2005-06-10
+1.25
+2005-10-02
Introduction
@@ -27,7 +27,7 @@
-Capacity and lifetime of laptop batteries has improved much in the last years.
+Capacity and lifetime of laptop batteries have improved much in the last years.
Nevertheless modern processors consume much more energy than older ones and
each laptop generation introduces more devices hungry for energy. That's why
Power Management is more important than ever. Increasing battery run time
@@ -58,16 +58,16 @@
The Prerequisites chapter talks about some requirements that should be
met before any of the following device individual sections will work. This
includes BIOS settings, kernel configuration and some simplifications in user
-land. The following three chapters focus on devices that typically consume most
-energy - processor, display and hard drive. Each can be configured seperately.
-CPU Power Management shows how to adjust the processor's frequency to
-save a maximum of energy whithout losing too much performance. A few different
-tricks prevent your hard drive from working unnecessarily often in Disk Power
-Management (decreasing noise level as a nice side effect). Some notes on
-Wireless LAN and USB finish the device section in Power Management for other
-devices while another chapter is dedicated to the (rather experimental)
-sleep states. Last not least Troubleshooting lists common
-pitfalls.
+land. The following three chapters focus on devices that typically consume
+most energy - processor, display and hard drive. Each can be configured
+seperately. CPU Power Management shows how to adjust the processor's
+frequency to save a maximum of energy whithout losing too much performance. A
+few different tricks prevent your hard drive from working unnecessarily often
+in Disk Power Management (decreasing noise level as a nice side
+effect). Some notes on graphics cards, Wireless LAN and USB finish the device
+section in Power Management for other devices while another chapter is
+dedicated to the (rather experimental) sleep states. Last not least
+Troubleshooting lists common pitfalls.
@@ -135,42 +135,55 @@
-In kernel config, activate at least these options:
+There are different kernel sources in Portage. I'd recommend using
+gentoo-sources or suspend2-sources. The latter contains patches
+for Software Suspend 2, see the chapter about sleep states for details. When
+configuring the kernel, activate at least these options:
Power Management Options --->
[*] Power Management Support
[ ] Software Suspend
- [ ] Suspend-to-Disk Support
ACPI( Advanced Configuration and Power Interface ) Support --->
[*] ACPI Support
[ ] Sleep States
+ [ ] /proc/acpi/sleep (deprecated)
[*] AC Adapter
[*] Battery
<M> Button
+ <M> Video
+ [ ] Generic Hotkey
<M> Fan
<M> Processor
<M> Thermal Zone
< > ASUS/Medion Laptop Extras
+ < > IBM ThinkPad Laptop Extras
< > Toshiba Laptop Extras
+ (0) Disable ACPI for systems before Jan 1st this year
[ ] Debug Statements
+ [*] Power Management Timer Support
+ < > ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)
CPU Frequency Scaling --->
[*] CPU Frequency scaling
+ [ ] Enable CPUfreq debugging
+ < > CPU frequency translation statistics
+ [ ] CPU frequency translation statistics details
Default CPUFreq governor (userspace)
<*> 'performance' governor
<*> 'powersave' governor
<*> 'ondemand' cpufreq policy governor
+ <*> 'conservative' cpufreq governor
<*> CPU frequency table helpers
<M> ACPI Processor P-States driver
<*> CPUFreq driver for your processor
-Decide yourself whether you want to enable Software Suspend, Suspend-to-Disk and
-Sleep States (see below). If you own an ASUS, Medion or Toshiba laptop, enable
+Decide yourself whether you want to enable Software Suspend, and Sleep States
+(see below). If you own an ASUS, Medion, IBM Thinkpad or Toshiba laptop, enable
the appropriate section.
@@ -237,8 +250,25 @@
Typical ACPI events are closing the lid, changing the power source or pressing
the sleep button. An important event is changing the power source, which should
-cause a runlevel switch. Create the following files to switch between
-default and battery runlevel depending on the power source:
+cause a runlevel switch. A small script will take care of it.
+
+
+
+First you need a script which changes the runlevel to default
+respectively battery depending on the power source. The script uses the
+on_ac_power command from sys-power/powermgmt-base - make sure the
+package is installed on your system.
+
+
+
+# emerge powermgmt-base
+
+
+
+You are now able to determine the power source by executing
+on_ac_power && echo AC available || echo Running on batteries in
+a shell. The script below is responsible for changing runlevels. Save it as
+/etc/acpi/actions/pmg_switch_runlevel.sh.
@@ -276,29 +306,56 @@
fi
+
+Dont forget to run chmod +x /etc/acpi/actions/pmg_switch_runlevel.sh to
+make the script executable. The last thing that needs to be done is calling the
+script whenever the power source changes. That's done by catching ACPI events
+with the help of acpid. First you need to know which events are
+generated when the power source changes. The events are called
+ac_adapter and battery on most laptops, but it might be different
+on yours.
+
+
+
+# tail -f /var/log/acpid | grep "received event"
+
+
+
+Run the command above and pull the power cable. You should see something
+like this:
+
+
+
+[Tue Sep 20 17:39:06 2005] received event "ac_adapter AC 00000080 00000000"
+[Tue Sep 20 17:39:06 2005] received event "battery BAT0 00000080 00000001"
+
+
+
+The interesting part is the quoted string after received event. It will
+be matched by the event line in the files you are going to create below. Don't
+worry if your system generates multiple events or always the same. As long as
+any event is generated, runlevel changing will work.
+
+
# replace "ac_adapter" below with the event generated on your laptop
-# See /var/log/acpid
+# For example, ac_adapter.* will match ac_adapter AC 00000080 00000000
event=ac_adapter.*
action=/etc/acpi/actions/pmg_switch_runlevel.sh %e
--
gentoo-doc-cvs@gentoo.org mailing list