/[gentoo]/xml/htdocs/doc/en/power-management-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/power-management-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.46
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.21 2006/08/17 00:45:29 rane Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.46 2011/03/28 10:26:10 nightmorph Exp $ -->
4<guide link="/doc/en/power-management-guide.xml"> 4
5<guide>
5<title>Power Management Guide</title> 6<title>Power Management Guide</title>
6 7
7<author title="Author"> 8<author title="Author">
8 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail> 9 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail>
9</author> 10</author>
10<author title="Editor"> 11<author title="Editor">
11 <mail link="chriswhite@gentoo.org">Chris White</mail> 12 <mail link="chriswhite@gentoo.org">Chris White</mail>
12</author> 13</author>
14<author title="Editor">
15 <mail link="nightmorph"/>
16</author>
13 17
14<abstract> 18<abstract>
15Power Management is the key to extend battery run time on mobile systems like 19Power Management is the key to extend battery run time on mobile systems like
16laptops. This guide assists you setting it up on your laptop. 20laptops. This guide assists you setting it up on your laptop.
17</abstract> 21</abstract>
18 22
19<!-- The content of this document is licensed under the CC-BY-SA license --> 23<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 24<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 25<license/>
22 26
23<version>1.28</version> 27<version>2</version>
24<date>2006-07-26</date> 28<date>2011-03-02</date>
25 29
26<chapter> 30<chapter>
27<title>Introduction</title> 31<title>Introduction</title>
28<section> 32<section>
29<body> 33<body>
59The <uri link="#doc_chap2">Prerequisites</uri> chapter talks about some 63The <uri link="#doc_chap2">Prerequisites</uri> chapter talks about some
60requirements that should be met before any of the following device individual 64requirements that should be met before any of the following device individual
61sections will work. This includes BIOS settings, kernel configuration and some 65sections will work. This includes BIOS settings, kernel configuration and some
62simplifications in user land. The following three chapters focus on devices 66simplifications in user land. The following three chapters focus on devices
63that typically consume most energy - processor, display and hard drive. Each 67that typically consume most energy - processor, display and hard drive. Each
64can be configured seperately. <uri link="#doc_chap3">CPU Power Management</uri> 68can be configured separately. <uri link="#doc_chap3">CPU Power Management</uri>
65shows how to adjust the processor's frequency to save a maximum of energy 69shows how to adjust the processor's frequency to save a maximum of energy
66without losing too much performance. A few different tricks prevent your hard 70without losing too much performance. A few different tricks prevent your hard
67drive from working unnecessarily often in <uri link="#doc_chap5">Disk Power 71drive from working unnecessarily often in <uri link="#doc_chap5">Disk Power
68Management</uri> (decreasing noise level as a nice side effect). Some notes on 72Management</uri> (decreasing noise level as a nice side effect). Some notes on
69graphics cards, Wireless LAN and USB finish the device section in <uri 73graphics cards, Wireless LAN and USB finish the device section in <uri
149most out of it. 153most out of it.
150</p> 154</p>
151 155
152<p> 156<p>
153There are different kernel sources in Portage. I'd recommend using 157There are different kernel sources in Portage. I'd recommend using
154<c>gentoo-sources</c> or <c>suspend2-sources</c>. The latter contains patches 158<c>gentoo-sources</c> or <c>tuxonice-sources</c>. The latter contains patches
155for Software Suspend 2, see the chapter about <uri link="#doc_chap7">sleep 159for TuxOnIce, see the chapter about <uri link="#doc_chap7">sleep states</uri>
156states</uri> for more details. When configuring the kernel, activate at least 160for more details. When configuring the kernel, activate at least these options:
157these options:
158</p> 161</p>
159 162
160<pre caption="Minimum kernel setup for Power Management (Kernel 2.6)"> 163<pre caption="Minimum kernel setup for Power Management (Kernel 2.6)">
161Power Management Options ---&gt; 164Power management and ACPI options ---&gt;
162 [*] Power Management Support 165[*] Power Management support
163 [ ] Software Suspend 166 [ ] Software Suspend
164 167
165 ACPI( Advanced Configuration and Power Interface ) Support ---&gt; 168 ACPI( Advanced Configuration and Power Interface ) Support ---&gt;
166 [*] ACPI Support 169 [ ] Deprecated /proc/acpi/ files
167 [ ] Sleep States
168 [ ] /proc/acpi/sleep (deprecated)
169 [*] AC Adapter 170 [*] AC Adapter
170 [*] Battery 171 [*] Battery
171 &lt;M&gt; Button 172 &lt;M&gt; Button
172 &lt;M&gt; Video 173 &lt;M&gt; Video
173 [ ] Generic Hotkey 174 [ ] Generic Hotkey
270</p> 271</p>
271 272
272<p> 273<p>
273First you need a script which changes the runlevel to <c>default</c> 274First you need a script which changes the runlevel to <c>default</c>
274respectively <c>battery</c> depending on the power source. The script uses the 275respectively <c>battery</c> depending on the power source. The script uses the
275<c>on_ac_power</c> command from <c>sys-power/powermgmt-base</c> - make sure the 276<c>on_ac_power</c> command from <c>sys-power/pm-utils</c> - make sure the
276package is installed on your system. 277package is installed on your system.
277</p> 278</p>
278 279
279<pre caption="Installing powermgt-base"> 280<pre caption="Installing pm-utils">
280# <i>emerge powermgmt-base</i> 281# <i>emerge pm-utils</i>
281</pre> 282</pre>
282 283
283<p> 284<p>
284You are now able to determine the power source by executing <c>on_ac_power 285You are now able to determine the power source by executing <c>on_ac_power
285&amp;&amp; echo AC available || echo Running on batteries</c> in a shell. The 286&amp;&amp; echo AC available || echo Running on batteries</c> in a shell. The
331<c>ac_adapter</c> and <c>battery</c> on most laptops, but it might be different 332<c>ac_adapter</c> and <c>battery</c> on most laptops, but it might be different
332on yours. 333on yours.
333</p> 334</p>
334 335
335<pre caption="Determining ACPI events for changing the power source"> 336<pre caption="Determining ACPI events for changing the power source">
336# <i>tail -f /var/log/acpid | grep "received event"</i> 337# <i>tail -f /var/log/messages | grep "ACPI event"</i>
337</pre> 338</pre>
338 339
339<p> 340<p>
340Run the command above and pull the power cable. You should see something like 341Run the command above and pull the power cable. You should see something like
341this: 342this:
342</p> 343</p>
343 344
344<pre caption="Sample output for power source changes"> 345<pre caption="Sample output for power source changes">
345[Tue Sep 20 17:39:06 2005] received event "ac_adapter AC 00000080 00000000" 346[Tue Sep 20 17:39:06 2005] ACPI event "ac_adapter AC 00000080 00000000"
346[Tue Sep 20 17:39:06 2005] received event "battery BAT0 00000080 00000001" 347[Tue Sep 20 17:39:06 2005] ACPI event "battery BAT0 00000080 00000001"
347</pre> 348</pre>
348 349
349<p> 350<p>
350The interesting part is the quoted string after <c>received event</c>. It will 351The interesting part is the quoted string after <c>ACPI event</c>. It will
351be matched by the event line in the files you are going to create below. Don't 352be matched by the event line in the files you are going to create below. Don't
352worry if your system generates multiple events or always the same. As long as 353worry if your system generates multiple events or always the same. As long as
353any event is generated, runlevel changing will work. 354any event is generated, runlevel changing will work.
354</p> 355</p>
355 356
458</p> 459</p>
459 460
460</body> 461</body>
461</section> 462</section>
462<section> 463<section>
463<title>Setting The Frequency Manually</title> 464<title>Setting The Frequency</title>
464<body> 465<body>
465 466
466<p> 467<p>
467Decreasing CPU speed and voltage has two advantages: On the one hand less 468Decreasing CPU speed and voltage has two advantages: On the one hand less
468energy is consumed, on the other hand there is thermal improvement as your 469energy is consumed, on the other hand there is thermal improvement as your
477section to verify yours is supported. 478section to verify yours is supported.
478</note> 479</note>
479 480
480<p> 481<p>
481It's time to test whether CPU frequency changing works. Let's install another 482It's time to test whether CPU frequency changing works. Let's install another
482tool which is very handy for debugging purposes: <c>sys-power/cpufrequtils</c> 483tool: <c>sys-power/cpufrequtils</c>.
483</p> 484</p>
484 485
485<pre caption="Checking CPU frequency"> 486<pre caption="Checking CPU frequency">
486# <i>emerge cpufrequtils</i> 487# <i>emerge cpufrequtils</i>
487# <i>cpufreq-info</i> 488# <i>cpufreq-info</i>
512governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as 513governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as
513expected, you might find help in the <uri link="#doc_chap8">Troubleshooting 514expected, you might find help in the <uri link="#doc_chap8">Troubleshooting
514section</uri> in the end of this guide. 515section</uri> in the end of this guide.
515</p> 516</p>
516 517
518<p>
519<c>cpufrequtils</c> can operate in an automatic mode (when you use the
520<b>ondemand</b> governor), you can also switch to the <b>userspace</b> governor
521if you want to manually set a specific speed. You can also statically set your
522CPU to its highest or lowest frequency by using the <b>performance</b>
523and <b>powersave</b> governors, respectively.
524</p>
525
526<pre caption="Changing CPU speeds">
527<comment>(Set the highest available frequency)</comment>
528# <i>cpufreq-set -g performance</i>
529<comment>(Set the lowest available frequency)</comment>
530# <i>cpufreq-set -g powersave</i>
531<comment>(Set a specific frequency)</comment>
532# <i>cpufreq-set -g userspace</i>
533# <i>cpufreq-set -f 2.00ghz</i>
534</pre>
535
517</body> 536</body>
518</section>
519<section> 537</section>
520<title>Automated frequency adaption</title> 538<section>
539<title>Other CPU Speed Utilities</title>
521<body> 540<body>
522 541
523<p> 542<p>
524The above is quite nice, but not doable in daily life. Better let your system 543While <c>cpufrequtils</c> may be the best all-around program, there are some
525set the appropriate frequency automatically. There are many different 544other choices available in Portage. The following table gives a quick overview
526approaches to do this. The following table gives a quick overview to help you 545of available CPU speed utilities. It's roughly separated in three categories
527decide on one of them. It's roughly separated in three categories <b>kernel</b>
528for approaches that only need kernel support, <b>daemon</b> for programs that 546<b>kernel</b> for approaches that only need kernel support, <b>daemon</b> for
529run in the background and <b>graphical</b> for programs that provide a GUI for 547programs that run in the background and <b>graphical</b> for programs that
530easy configuration and changes. 548provide a GUI for easy configuration and changes.
531</p> 549</p>
532 550
533<table> 551<table>
534<tr> 552<tr>
535 <th>Name</th> 553 <th>Name</th>
605 </ti> 623 </ti>
606</tr> 624</tr>
607<tr> 625<tr>
608 <ti> 626 <ti>
609 <uri 627 <uri
610 link="http://fatcat.ftj.agh.edu.pl/~nelchael/index.php?cat=projs&amp;subcat=ncpufreqd&amp;language=en">ncpufreqd</uri> 628 link="http://projects.simpledesigns.com.pl/project/ncpufreqd/">ncpufreqd</uri>
611 </ti> 629 </ti>
612 <ti>Daemon</ti> 630 <ti>Daemon</ti>
613 <ti>Temperature</ti> 631 <ti>Temperature</ti>
614 <ti>None</ti> 632 <ti>None</ti>
615 <ti>Powersave, performance</ti> 633 <ti>Powersave, performance</ti>
669</pre> 687</pre>
670 688
671<p> 689<p>
672<c>cpufreqd</c> can be configured by editing <path>/etc/cpufreqd.conf</path>. 690<c>cpufreqd</c> can be configured by editing <path>/etc/cpufreqd.conf</path>.
673The default one that ships with cpufreqd may look a bit confusing. I recommend 691The default one that ships with cpufreqd may look a bit confusing. I recommend
674replacing it with the one from Gentoo developer Henrik Brix Andersen (see 692replacing it with the one from former Gentoo developer Henrik Brix Andersen
675below). Please notice that you need cpufreqd-2.0.0 or later. Earlier versions 693(see below). Please notice that you need cpufreqd-2.0.0 or later. Earlier
676have a different syntax for the config file. 694versions have a different syntax for the config file.
677</p> 695</p>
678 696
679<pre caption="/etc/cpufreqd.conf (cpufreqd-2.0.0 and later)"> 697<pre caption="/etc/cpufreqd.conf (cpufreqd-2.0.0 and later)">
680[General] 698[General]
681pidfile=/var/run/cpufreqd.pid 699pidfile=/var/run/cpufreqd.pid
739<c>battery</c> runlevel as well. 757<c>battery</c> runlevel as well.
740</p> 758</p>
741 759
742<pre caption="Starting cpufreqd"> 760<pre caption="Starting cpufreqd">
743# <i>rc-update add cpufreqd default battery</i> 761# <i>rc-update add cpufreqd default battery</i>
744# <i>rc</i> 762# <i>/etc/init.d/cpufreqd start</i>
745</pre> 763</pre>
746 764
747<p> 765<p>
748Sometimes it can be desirable to select another policy than the daemon chooses, 766Sometimes it can be desirable to select another policy than the daemon chooses,
749for example when battery power is low, but you know that AC will be available 767for example when battery power is low, but you know that AC will be available
773# <i>watch grep \"cpu MHz\" /proc/cpuinfo</i> 791# <i>watch grep \"cpu MHz\" /proc/cpuinfo</i>
774</pre> 792</pre>
775 793
776<p> 794<p>
777If <path>/proc/cpuinfo</path> doesn't get updated (see <uri 795If <path>/proc/cpuinfo</path> doesn't get updated (see <uri
778link="#doc_chap8">Troubleshooting</uri>), monitor the CPU frequency with: 796link="#doc_chap8">Troubleshooting</uri>), monitor the CPU frequency with
797<c>sys-apps/x86info</c>:
779</p> 798</p>
780 799
781<pre caption="Alternative CPU speed monitoring"> 800<pre caption="Alternative CPU speed monitoring">
782# <i>watch x86info -mhz</i> 801# <i>watch x86info -mhz</i>
783</pre> 802</pre>
819<c>setterm -blank &lt;number-of-minutesM&gt;</c>, <c>setterm -powersave on</c> 838<c>setterm -blank &lt;number-of-minutesM&gt;</c>, <c>setterm -powersave on</c>
820and <c>setterm -powerdown &lt;number-of-minutesM&gt;</c>. For X.org, modify 839and <c>setterm -powerdown &lt;number-of-minutesM&gt;</c>. For X.org, modify
821<path>/etc/X11/xorg.conf</path> similar to this: 840<path>/etc/X11/xorg.conf</path> similar to this:
822</p> 841</p>
823 842
824<pre caption="LCD suspend settings in X.org and XFree86"> 843<pre caption="LCD suspend settings in X.org">
825Section "ServerLayout" 844Section "ServerFlags"
826 Identifier [...]
827 [...]
828 Option "BlankTime" "5" <comment># Blank the screen after 5 minutes (Fake)</comment> 845 Option "blank time" "5" <comment># Blank the screen after 5 minutes (Fake)</comment>
829 Option "StandbyTime" "10" <comment># Turn off screen after 10 minutes (DPMS)</comment> 846 Option "standby time" "10" <comment># Turn off screen after 10 minutes (DPMS)</comment>
830 Option "SuspendTime" "20" <comment># Full suspend after 20 minutes</comment> 847 Option "suspend time" "20" <comment># Full suspend after 20 minutes</comment>
831 Option "OffTime" "30" <comment># Turn off after half an hour</comment> 848 Option "off time" "30" <comment># Turn off after half an hour</comment>
832 [...] 849 [...]
833EndSection 850EndSection
834 851
835[...] 852[...]
836 853
837Section "Monitor" 854Section "Monitor"
838 Identifier [...] 855 Identifier [...]
839 Option "DPMS" "true" 856 Option "DPMS"
840 [...] 857 [...]
841EndSection 858EndSection
842</pre> 859</pre>
843
844<p>
845This is the same for XFree86 and <path>/etc/X11/XF86Config</path>.
846</p>
847 860
848</body> 861</body>
849</section> 862</section>
850<section> 863<section>
851<title>Backlight dimming</title> 864<title>Backlight dimming</title>
855Probably more important is the backlight dimming. If you have access to the 868Probably more important is the backlight dimming. If you have access to the
856dimming settings via a tool, write a small script that dims the backlight in 869dimming settings via a tool, write a small script that dims the backlight in
857battery mode and place it in your <c>battery</c> runlevel. The following script 870battery mode and place it in your <c>battery</c> runlevel. The following script
858should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the 871should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the
859appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops, 872appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops,
860install <c>app-laptop/acpitool</c> and skip configuration of <c>ibm_acpi</c> as 873install <c>sys-power/acpitool</c> and skip configuration of <c>thinkpad_acpi</c>
861described below. 874(formerly called <c>ibm_acpi</c>) as described below.
862</p> 875</p>
863 876
864<warn> 877<warn>
865Support for setting brightness is marked experimental in ibm-acpi. It accesses 878Support for setting brightness is marked experimental in thinkpad_acpi. It
866hardware directly and may cause severe harm to your system. Please read the 879accesses hardware directly and may cause severe harm to your system. Please
867<uri link="http://ibm-acpi.sourceforge.net/">ibm-acpi website</uri> 880read the <uri link="http://ibm-acpi.sourceforge.net/">thinkpad_acpi
881website</uri>
868</warn> 882</warn>
869 883
870<p> 884<p>
871To be able to set the brightness level, the ibm_acpi module has to be loaded 885To be able to set the brightness level, the thinkpad_acpi module has to be
872with the experimental parameter. 886loaded with the experimental parameter.
873</p> 887</p>
874 888
875<pre caption="automatically loading the ibm_acpi module"> 889<pre caption="automatically loading the thinkpad_acpi module">
876<comment>(Please read the warnings above before doing this!)</comment> 890<comment>(Please read the warnings above before doing this!)</comment>
877# <i>echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i> 891# <i>echo "options thinkpad_acpi experimental=1" >> /etc/modprobe.d/thinkpad_acpi</i>
878# <i>/sbin/modules-update</i> 892# <i>update-modules</i>
879# <i>echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i> 893# <i>echo thinkpad_acpi >> /etc/modules.autoload.d/kernel-2.6</i>
880# <i>modprobe ibm_acpi</i> 894# <i>modprobe thinkpad_acpi</i>
881</pre> 895</pre>
882 896
883<p> 897<p>
884This should work without error messages and a file 898This should work without error messages and a file
885<path>/proc/acpi/ibm/brightness</path> should be created after loading the 899<path>/proc/acpi/ibm/brightness</path> should be created after loading the
887the power source. 901the power source.
888</p> 902</p>
889 903
890<pre caption="/etc/conf.d/lcd-brightness"> 904<pre caption="/etc/conf.d/lcd-brightness">
891<comment># See /proc/acpi/ibm/brightness for available values</comment> 905<comment># See /proc/acpi/ibm/brightness for available values</comment>
892<comment># Please read /usr/src/linux/Documentation/ibm-acpi.txt</comment> 906<comment># Please read /usr/src/linux/Documentation/thinkpad-acpi.txt</comment>
893 907
894<comment># brigthness level in ac mode. Default is 7.</comment> 908<comment># brightness level in ac mode. Default is 7.</comment>
895BRIGHTNESS_AC=7 909BRIGHTNESS_AC=7
896 910
897<comment># brightness level in battery mode. Default is 4.</comment> 911<comment># brightness level in battery mode. Default is 4.</comment>
898BRIGHTNESS_BATTERY=4 912BRIGHTNESS_BATTERY=4
899</pre> 913</pre>
919 ebegin "Setting LCD brightness" 933 ebegin "Setting LCD brightness"
920 acpitool -l $LEVEL >/dev/null || ewarn "Unable to set lcd brightness" 934 acpitool -l $LEVEL >/dev/null || ewarn "Unable to set lcd brightness"
921 eend $? 935 eend $?
922 else 936 else
923 ewarn "Setting LCD brightness is not supported." 937 ewarn "Setting LCD brightness is not supported."
924 ewarn "For IBM Thinkpads, check that ibm_acpi is loaded into the kernel" 938 ewarn "For IBM Thinkpads, check that thinkpad_acpi is loaded into the kernel"
925 ewarn "For Toshiba laptops, you've got to install app-laptop/acpitool" 939 ewarn "For Toshiba laptops, you've got to install sys-power/acpitool"
926 fi 940 fi
927} 941}
928 942
929start() { 943start() {
930 set_brightness 944 set_brightness
972<section> 986<section>
973<title>Increasing idle time - laptop-mode</title> 987<title>Increasing idle time - laptop-mode</title>
974<body> 988<body>
975 989
976<p> 990<p>
977Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches)
978include the so-called <c>laptop-mode</c>. When activated, dirty buffers are 991Recent 2.6 kernels include the so-called <c>laptop-mode</c>. When activated,
979written to disk on read calls or after 10 minutes (instead of 30 seconds). This 992dirty buffers are written to disk on read calls or after 10 minutes (instead of
980minimizes the time the hard disk needs to be spun up. 99330 seconds). This minimizes the time the hard disk needs to be spun up.
981</p> 994</p>
982 995
983<pre caption="Automated start of laptop-mode"> 996<pre caption="Automated start of laptop-mode">
984# <i>emerge laptop-mode-tools</i> 997# <i>emerge laptop-mode-tools</i>
985</pre> 998</pre>
1065<section> 1078<section>
1066<title>hdparm</title> 1079<title>hdparm</title>
1067<body> 1080<body>
1068 1081
1069<p> 1082<p>
1070The second possibility is using a small script and <c>hdparm</c>. Skip this if 1083The second possibility is using <c>hdparm</c>. Skip this if
1071you are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>: 1084you are using laptop-mode. Otherwise, edit <path>/etc/conf.d/hdparm</path> and
1085add the following values to your drive entries. This example assumes your hard
1086drive is called <b>hda</b>:
1072</p> 1087</p>
1073 1088
1074<pre caption="Using hdparm for disk standby"> 1089<pre caption="Using /etc/conf.d/hdparm for disk standby">
1075#!/sbin/runscript 1090hda_args="-q -S12"
1076
1077depend() {
1078after hdparm
1079}
1080
1081start() {
1082ebegin "Activating Power Management for Hard Drives"
1083hdparm -q -S12 /dev/hda
1084eend $?
1085}
1086
1087stop () {
1088ebegin "Deactivating Power Management for Hard Drives"
1089hdparm -q -S253 /dev/hda
1090eend $?
1091}
1092</pre> 1091</pre>
1093 1092
1093<p>
1094This will activate power management for your hard drive. If you ever want to
1095deactivate power management, you can edit <path>/etc/conf.d/hdparm</path> and
1096change the values to <c>-q -S0</c>, or just run <c>hdparm -q -S0 /dev/hda</c>.
1094<p> 1097</p>
1095See <c>man hdparm</c> for the options. If your script is ready, add it to the 1098
1096battery runlevel. 1099<p>
1100See <c>man hdparm</c> for the options. Though you can always start <c>hdparm</c>
1101manually when you are on battery power by running <c>/etc/init.d/hdparm
1102start</c>, it's much easier to automate its startup and shutdown. To do so, add
1103<c>hdparm</c> to the battery runlevel so that it will automatically enable power
1104management.
1097</p> 1105</p>
1098 1106
1099<pre caption="Automate disk standby settings"> 1107<pre caption="Automate disk standby settings">
1100# <i>chmod +x /etc/init.d/pmg_hda</i>
1101# <i>/sbin/depscan.sh</i>
1102# <i>rc-update add pmg_hda battery</i> 1108# <i>rc-update add hdparm battery</i>
1103</pre> 1109</pre>
1104 1110
1105<impo> 1111<impo>
1106Be careful with sleep/spin down settings of your hard drive. Setting it to 1112Be careful with sleep/spin down settings of your hard drive. Setting it to
1107small values might wear out your drive and lose warranty. 1113small values might wear out your drive and lose warranty.
1153<title>Graphics Cards</title> 1159<title>Graphics Cards</title>
1154<body> 1160<body>
1155 1161
1156<p> 1162<p>
1157In case you own an ATI graphics card supporting PowerPlay (dynamic clock 1163In case you own an ATI graphics card supporting PowerPlay (dynamic clock
1158scaling for the the graphics processing unit GPU), you can activate this 1164scaling for the graphics processing unit GPU), you can activate this
1159feature in X.org. Open <path>/etc/X11/xorg.conf</path> and add (or enable) the 1165feature in X.org. Open <path>/etc/X11/xorg.conf</path> and add (or enable) the
1160<c>DynamicClocks</c> option in the Device section. Please notice that this 1166<c>DynamicClocks</c> option in the Device section. Please notice that this
1161feature will lead to crashes on some systems. 1167feature will lead to crashes on some systems.
1162</p> 1168</p>
1163 1169
1174<title>Wireless Power Management</title> 1180<title>Wireless Power Management</title>
1175<body> 1181<body>
1176 1182
1177<p> 1183<p>
1178Wireless LAN cards consume quite a bit of energy. Put them in Power Management 1184Wireless LAN cards consume quite a bit of energy. Put them in Power Management
1179mode in analogy to the <c>pmg_hda</c> script. 1185mode just like your hard drives.
1180</p> 1186</p>
1181 1187
1182<note> 1188<note>
1183This script assumes your wireless interface is called <c>wlan0</c>; replace 1189This script assumes your wireless interface is called <c>wlan0</c>; replace
1184this with the actual name of your interface. 1190this with the actual name of your interface.
1185</note> 1191</note>
1186 1192
1187<pre caption="WLAN Power Management automated">
1188#!/sbin/runscript
1189start() {
1190 ebegin "Activating Power Management for Wireless LAN"
1191 iwconfig wlan0 power on
1192 eend $?
1193}
1194
1195stop () {
1196 ebegin "Deactivating Power Management for Wireless LAN"
1197 iwconfig wlan0 power off
1198 eend $?
1199}
1200</pre>
1201
1202<p>
1203Starting this script will activate power saving features for wlan0. Save it as
1204<path>/etc/init.d/pmg_wlan0</path> and add it to the battery runlevel like the
1205disk script above. See <c>man iwconfig</c> for details and more options like
1206the period between wakeups or timeout settings. If your driver and access point
1207support changing the beacon time, this is a good starting point to save even
1208more energy.
1209</p> 1193<p>
1210 1194Add the following option to <path>/etc/conf.d/net</path> to automatically enable
1211<pre caption="Power Management for WLAN"> 1195power management for your wireless card:
1212# <i>chmod +x /etc/init.d/pmg_wlan0</i>
1213# <i>/sbin/depscan.sh</i>
1214# <i>rc-update add pmg_wlan0 battery</i>
1215</pre> 1196</p>
1197
1198<pre caption="Automated WLAN Power Management">
1199iwconfig_wlan0="power on"
1200</pre>
1201
1202<p>
1203See <c>man iwconfig</c> for details and more options like the period between
1204wakeups or timeout settings. If your driver and access point support changing
1205the beacon time, this is a good starting point to save even more energy.
1206</p>
1216 1207
1217</body> 1208</body>
1218</section> 1209</section>
1219<section> 1210<section>
1220<title>USB Power Management</title> 1211<title>USB Power Management</title>
1275</p> 1266</p>
1276 1267
1277<pre caption="Kernel configuration for the various suspend types"> 1268<pre caption="Kernel configuration for the various suspend types">
1278 Power Management Options ---&gt; 1269 Power Management Options ---&gt;
1279 [*] Power Management support 1270 [*] Power Management support
1280 ACPI (Advanced Configuration and Power Interface) Support ---&gt; 1271 [*] Suspend to RAM and standby
1281 [*] ACPI Support
1282 [*] Sleep States
1283</pre> 1272</pre>
1284 1273
1285<p> 1274<p>
1286Once your kernel is properly configured, you can use the 1275Once your kernel is properly configured, you can use the
1287<c>hibernate-script</c> to activate suspend or sleep mode. Let's install that 1276<c>hibernate-script</c> to activate suspend or sleep mode. Let's install that
1291<pre caption="Installing the hibernate-script"> 1280<pre caption="Installing the hibernate-script">
1292# <i>emerge hibernate-script</i> 1281# <i>emerge hibernate-script</i>
1293</pre> 1282</pre>
1294 1283
1295<p> 1284<p>
1296Some configuration has to be done in <path>/etc/hibernate</path> The default 1285Some configuration has to be done in <path>/etc/hibernate</path>. The default
1297package introduces two configuration files <path>hibernate.conf</path> and 1286package introduces a few configuration files for each sleep state. Options that
1298<path>ram.conf</path>. 1287are common to all suspend methods are placed in <path>common.conf</path>; make
1299</p> 1288sure this file is properly set up for your system.
1300
1301<p> 1289</p>
1302To configure sleep, edit <path>ram.conf</path> in <path>/etc/hibernate</path>. 1290
1303<c>UseSysfsPowerState mem</c> is already setup correctly, but you have to go
1304through the rest of the configuration file and set it up for your system. The
1305comments and option names will guide you. If you use nfs or samba shares over
1306the network, make sure to shutdown the appropriate init scripts to avoid
1307timeouts.
1308</p> 1291<p>
1292To configure sleep, edit <path>sysfs-ram.conf</path> in
1293<path>/etc/hibernate</path>. <c>UseSysfsPowerState mem</c> is already setup
1294correctly, but if you need to make further changes to this particular sleep
1295state (or any other sleep state) you should add them to
1296<path>/etc/hibernate/hibernate.conf</path>. The comments and option names will
1297guide you. If you use nfs or samba shares over the network, make sure to
1298shutdown the appropriate init scripts to avoid timeouts.
1299</p>
1300
1301<note>
1302For more information on setting up sleep states, read <c>man
1303hibernate.conf</c>.
1304</note>
1309 1305
1310<p> 1306<p>
1311Ready? Now is the last chance to backup any data you want to keep after 1307Ready? Now is the last chance to backup any data you want to keep after
1312executing the next command. Notice that you probably have to hit a special key 1308executing the next command. Notice that you probably have to hit a special key
1313like <c>Fn</c> to resume from sleep. 1309like <c>Fn</c> to resume from sleep.
1317# <i>hibernate-ram</i> 1313# <i>hibernate-ram</i>
1318</pre> 1314</pre>
1319 1315
1320<p> 1316<p>
1321If you're still reading, it seems to work. You can also setup standby (S1) in a 1317If you're still reading, it seems to work. You can also setup standby (S1) in a
1322similar way by copying <path>ram.conf</path> to <path>standby.conf</path> and 1318similar way by editing <path>sysfs-ram.conf</path> and changing
1323creating a symlink <path>/usr/sbin/hibernate-standby</path> pointing to 1319"UseSysfsPowerState mem" to "UseSysfsPowerState standby". S3 and S4 are the more
1324<path>/usr/sbin/hibernate</path>. S3 and S4 are the more interesting sleep
1325states due to greater energy savings however. 1320interesting sleep states due to greater energy savings however.
1326</p> 1321</p>
1327 1322
1328</body> 1323</body>
1329</section> 1324</section>
1330<section> 1325<section>
1343Shutdown any NFS or samba server/client before hibernating. 1338Shutdown any NFS or samba server/client before hibernating.
1344</warn> 1339</warn>
1345 1340
1346<p> 1341<p>
1347There are two different implementations for S4. The original one is swsusp, 1342There are two different implementations for S4. The original one is swsusp,
1348then there is the newer suspend2 with a nicer interface (including fbsplash 1343then there is the newer tuxonice (formerly suspend2) with a nicer interface
1349support). A <uri link="http://suspend2.net/features.html#compare"> feature 1344(including fbsplash support). A <uri
1350comparison</uri> is available at the <uri link="http://suspend2.net"> suspend2 1345link="http://tuxonice.net/features.html#compare">feature comparison</uri> is
1346available at the <uri link="http://www.tuxonice.net">tuxonice homepage</uri>.
1351Homepage</uri>. There used to be Suspend-to-Disk (pmdisk), a fork of swsusp, 1347There used to be Suspend-to-Disk (pmdisk), a fork of swsusp, but it has been
1352but it has been merged back. 1348merged back.
1353</p>
1354
1355<p> 1349</p>
1350
1351<p>
1356Suspend2 is not included in the mainline kernel yet, therefore you either have 1352TuxOnIce is not included in the mainline kernel yet, therefore you either have
1357to patch your kernel sources with the patches provided by <uri 1353to patch your kernel sources with the patches provided by <uri
1358link="http://suspend2.net">suspend2.net</uri> or use 1354link="http://www.tuxonice.net">tuxonice.net</uri> or use
1359<c>sys-kernel/suspend2-sources</c>. 1355<c>sys-kernel/tuxonice-sources</c>.
1360</p>
1361
1362<p> 1356</p>
1357
1358<p>
1363The kernel part for both swusp and suspend2 is as follows: 1359The kernel part for both swusp and TuxOnIce is as follows:
1364</p> 1360</p>
1365 1361
1366<pre caption="Kernel configuration for the various suspend types"> 1362<pre caption="Kernel configuration for the various suspend types">
1367Power Management Options ---&gt; 1363Power Management support ---&gt;
1368 <comment>(hibernate with swsusp)</comment> 1364 <comment>(hibernate with swsusp)</comment>
1369 [*] Software Suspend 1365 [*] Hibernation (aka 'suspend to disk')
1370 <comment>(replace /dev/SWAP with your swap partition)</comment> 1366 <comment>(replace /dev/SWAP with your swap partition)</comment>
1371 (/dev/SWAP) Default resume partition 1367 (/dev/SWAP) Default resume partition
1372 1368
1373 <comment>(hibernate with suspend2)</comment> 1369 <comment>(hibernate with TuxOnIce)</comment>
1374 Software Suspend 2 1370 Enhanced Hibernation (TuxOnIce)
1375 --- Image Storage (you need at least one writer) 1371 --- Image Storage (you need at least one allocator)
1376 [*] File Writer 1372 [*] File Allocator
1377 [*] Swap Writer 1373 [*] Swap Allocator
1378 --- General Options 1374 --- General Options
1379 [*] LZF image compression 1375 [*] Compression support
1380 <comment>(replace /dev/SWAP with your swap partition)</comment>
1381 (swap:/dev/SWAP) Default resume device name
1382 [ ] Allow Keep Image Mode 1376 [ ] Allow Keep Image Mode
1377 [*] Replace swsusp by default
1383</pre> 1378</pre>
1384 1379
1385<p> 1380<p>
1386The configuration for swsusp is rather easy. If you didn't store the location 1381The configuration for swsusp is rather easy. If you didn't store the location
1387of your swap partition in the kernel config, you can also pass it as a 1382of your swap partition in the kernel config, you can also pass it as a
1395# <i>rc-update add hibernate-cleanup boot</i> 1390# <i>rc-update add hibernate-cleanup boot</i>
1396</pre> 1391</pre>
1397 1392
1398<p> 1393<p>
1399To activate hibernate with swsusp, use the hibernate script and set 1394To activate hibernate with swsusp, use the hibernate script and set
1400<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/hibernate.conf</path>. 1395<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/sysfs-disk</path>.
1401</p> 1396</p>
1402 1397
1403<warn> 1398<warn>
1404Backup your data before doing this. Run <c>sync</c> before executing one of the 1399Backup your data before doing this. Run <c>sync</c> before executing one of the
1405commands to have cached data written to disk. First try it outside of X, then 1400commands to have cached data written to disk. First try it outside of X, then
1407</warn> 1402</warn>
1408 1403
1409<p> 1404<p>
1410If you experience kernel panics due to uhci or similar, try to compile USB 1405If you experience kernel panics due to uhci or similar, try to compile USB
1411support as module and unload the modules before sending your laptop to sleep 1406support as module and unload the modules before sending your laptop to sleep
1412mode. There are configuration options for this in <path>hibernate.conf</path> 1407mode. There are configuration options for this in <path>common.conf</path>
1413</p> 1408</p>
1414 1409
1415<pre caption="Hibernating with swsusp"> 1410<pre caption="Hibernating with swsusp">
1416# <i>nano -w /etc/hibernate.conf</i> 1411# <i>nano -w /etc/hibernate/common.conf</i>
1417<comment>(Make sure you have a backup of your data)</comment> 1412<comment>(Make sure you have a backup of your data)</comment>
1418# <i>hibernate</i> 1413# <i>hibernate</i>
1419</pre> 1414</pre>
1420 1415
1421<p> 1416<p>
1422The following section discusses the setup of suspend2 including fbsplash 1417The following section discusses the setup of TuxOnIce including fbsplash support
1423support for a nice graphical progress bar during suspend and resume. 1418for a nice graphical progress bar during suspend and resume.
1424</p> 1419</p>
1425 1420
1426<p> 1421<p>
1427The first part of the configuration is similar to the configuration of swsusp. 1422The first part of the configuration is similar to the configuration of swsusp.
1428In case you didn't store the location of your swap partition in the kernel 1423In case you didn't store the location of your swap partition in the kernel
1429config, you have to pass it as a kernel parameter with the 1424config, you have to pass it as a kernel parameter with the
1430<c>resume2=swap:/dev/SWAP</c> directive. If booting is not possible due to a 1425<c>resume=swap:/dev/SWAP</c> directive. If booting is not possible due to a
1431broken image, append the <c>noresume2</c> parameter. Additionally, the 1426broken image, append the <c>noresume</c> parameter. Additionally, the
1432<c>hibernate-cleanup</c> init script invalidates suspend2 images during the 1427<c>hibernate-cleanup</c> init script invalidates TuxOnIce images during the boot
1433boot process. 1428process.
1434</p> 1429</p>
1435 1430
1436<pre caption="Invalidating suspend2 images during the boot process"> 1431<pre caption="Invalidating TuxOnIce images during the boot process">
1437# <i>rc-update add hibernate-cleanup boot</i> 1432# <i>rc-update add hibernate-cleanup boot</i>
1438</pre> 1433</pre>
1439 1434
1440<p> 1435<p>
1441Now edit <path>/etc/hibernate/hibernate.conf</path>, enable the <c>suspend2</c> 1436Now edit <path>/etc/hibernate/tuxonice.conf</path>, enable the <c>TuxOnIce</c>
1442section and comment everything in the <c>sysfs_power_state</c> and 1437options you need. Do not enable the <c>fbsplash</c> options in
1443<c>acpi_sleep</c> sections. Do not enable the <c>fbsplash</c> part in global 1438<c>common.conf</c> just yet.
1444options yet.
1445</p> 1439</p>
1446 1440
1447<pre caption="Hibernating with suspend2"> 1441<pre caption="Hibernating with TuxOnIce">
1448# <i>nano -w /etc/hibernate.conf</i> 1442# <i>nano -w /etc/hibernate/tuxonice.conf</i>
1449<comment>(Make sure you have a backup of your data)</comment> 1443<comment>(Make sure you have a backup of your data)</comment>
1450# <i>hibernate</i> 1444# <i>hibernate</i>
1451</pre> 1445</pre>
1452 1446
1453<p> 1447<p>
1454Please configure <c>fbsplash</c> now if you didn't do already. To enable 1448Please configure <c>fbsplash</c> now if you didn't do already. To enable
1455fbsplash support during hibernation, the <c>sys-apps/suspend2-userui</c> 1449fbsplash support during hibernation, the <c>sys-apps/tuxonice-userui</c> package
1456package is needed. Additionally, you've got to enable the <c>fbsplash</c> USE 1450is needed. Additionally, you've got to enable the <c>fbsplash</c> USE flag.
1457flag.
1458</p> 1451</p>
1459 1452
1460<pre caption="Installing suspend2-userui"> 1453<pre caption="Installing tuxonice-userui">
1461# <i>mkdir -p /etc/portage</i>
1462# <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i> 1454# <i>echo "sys-apps/tuxonice-userui fbsplash" >> /etc/portage/package.use</i>
1463# <i>emerge suspend2-userui</i> 1455# <i>emerge tuxonice-userui</i>
1464</pre> 1456</pre>
1465 1457
1466<p> 1458<p>
1467The ebuild tells you to make a symlink to the theme you want to use. For 1459The ebuild tells you to make a symlink to the theme you want to use. For
1468example, to use the <c>livecd-2005.1</c> theme, run the following command: 1460example, to use the <c>livecd-2005.1</c> theme, run the following command:
1469</p> 1461</p>
1470 1462
1471<pre caption="Using the livecd-2005.1 theme during hibernation"> 1463<pre caption="Using the livecd-2005.1 theme during hibernation">
1472# <i>ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i> 1464# <i>ln -sfn /etc/splash/livecd-2005.1 /etc/splash/tuxonice</i>
1473</pre> 1465</pre>
1474 1466
1475<p> 1467<p>
1476If you don't want a black screen in the first part of the resume process, you 1468If you don't want a black screen in the first part of the resume process, you
1477have to add the <c>suspend2ui_fbsplash</c> tool to your initrd image. Assuming 1469have to add the <c>tuxoniceui_fbsplash</c> tool to your initrd image. Assuming
1478you created the initrd image with <c>splash_geninitramfs</c> and saved it as 1470you created the initrd image with <c>splash_geninitramfs</c> and saved it as
1479<path>/boot/fbsplash-emergence-1024x768</path>, here's how to do that. 1471<path>/boot/fbsplash-emergence-1024x768</path>, here's how to do that.
1480</p> 1472</p>
1481 1473
1482<pre caption="Adding suspend2ui_fbsplash to an initrd image"> 1474<pre caption="Adding tuxoniceui_fbsplash to an initrd image">
1483# <i>mount /boot</i> 1475# <i>mount /boot</i>
1484# <i>mkdir ~/initrd.d</i> 1476# <i>mkdir ~/initrd.d</i>
1485# <i>cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i> 1477# <i>cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i>
1486# <i>cd ~/initrd.d</i> 1478# <i>cd ~/initrd.d</i>
1487# <i>gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i> 1479# <i>gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i>
1488# <i>rm fbsplash-emergence-1024x768</i> 1480# <i>rm fbsplash-emergence-1024x768</i>
1489# <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i> 1481# <i>cp /usr/sbin/tuxoniceui_fbsplash sbin/</i>
1490# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i> 1482# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-tuxonice-emergence-1024x768</i>
1491</pre> 1483</pre>
1492 1484
1493<p> 1485<p>
1494Afterwards adjust <path>grub.conf</path> respectively <path>lilo.conf</path> so 1486Afterwards adjust <path>grub.conf</path> (or <path>lilo.conf</path>) so that
1495that your suspend2 kernel uses 1487your TuxOnIce kernel uses
1496<path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You 1488<path>/boot/fbsplash-tuxonice-emergence-1024x768</path> as initrd image. You can
1497can now test a dry run to see if everything is setup correctly. 1489now test a dry run to see if everything is setup correctly.
1498</p> 1490</p>
1499 1491
1500<pre caption="Test run for fbsplash hibernation"> 1492<pre caption="Test run for fbsplash hibernation">
1501# <i>suspend2ui_fbsplash -t</i> 1493# <i>tuxoniceui_fbsplash -t</i>
1502</pre> 1494</pre>
1503 1495
1504<p> 1496<p>
1505Afterwards open <path>/etc/hibernate/hibernate.conf</path> again and activate 1497Afterwards open <path>/etc/hibernate/common.conf</path> and activate the
1506the fbsplash options. Execute <c>hibernate</c> and enjoy. 1498fbsplash options. Execute <c>hibernate</c> and enjoy.
1507</p> 1499</p>
1508 1500
1509</body> 1501</body>
1510</section> 1502</section>
1511</chapter> 1503</chapter>
1522</p> 1514</p>
1523 1515
1524<p> 1516<p>
1525<e>A:</e> Make sure your processor supports CPU frequency scaling and you chose 1517<e>A:</e> Make sure your processor supports CPU frequency scaling and you chose
1526the right CPUFreq driver for your processor. Here is a list of processors that 1518the right CPUFreq driver for your processor. Here is a list of processors that
1527are supported by cpufreq (kernel 2.6.7): ARM Integrator, ARM-SA1100, 1519are supported by cpufreq (kernel 2.6.7): ARM Integrator, ARM-SA1100, ARM-SA1110,
1528ARM-SA1110, AMD Elan - SC400, SC410, AMD mobile K6-2+, AMD mobile K6-3+, AMD 1520AMD Elan - SC400, SC410, AMD mobile K6-2+, AMD mobile K6-3+, AMD mobile Duron,
1529mobile Duron, AMD mobile Athlon, AMD Opteron, AMD Athlon 64, Cyrix Media GXm, 1521AMD mobile Athlon, AMD Opteron, AMD Athlon 64, Cyrix Media GXm, Intel mobile
1530Intel mobile PIII and Intel mobile PIII-M on certain chipsets, Intel Pentium 4, 1522PIII and Intel mobile PIII-M on certain chipsets, Intel Pentium 4, Intel Xeon,
1531Intel Xeon, Intel Pentium M (Centrino), National Semiconductors Geode GX, 1523Intel Pentium M (Centrino), National Semiconductors Geode GX, Transmeta Crusoe,
1532Transmeta Crusoe, VIA Cyrix 3 / C3, UltraSPARC-III, SuperH SH-3, SH-4, several 1524VIA Cyrix 3 / C3, UltraSPARC-III, SuperH SH-3, SH-4, several "PowerBook" and
1533"PowerBook" and "iBook2" and various processors on some ACPI 2.0-compatible 1525"iBook2" and various processors on some ACPI 2.0-compatible systems (only if
1534systems (only if "ACPI Processor Performance States" are available to the 1526"ACPI Processor Performance States" are available to the ACPI/BIOS interface).
1535ACPI/BIOS interface).
1536</p> 1527</p>
1537 1528
1538<p> 1529<p>
1539<e>Q:</e> My laptop supports frequency scaling, but 1530<e>Q:</e> My laptop supports frequency scaling, but
1540<path>/sys/devices/system/cpu/cpu0/cpufreq/</path> is empty. 1531<path>/sys/devices/system/cpu/cpu0/cpufreq/</path> is empty.
1553 1544
1554<p> 1545<p>
1555<e>A:</e> Probably you have activated symmetric multiprocessing support 1546<e>A:</e> Probably you have activated symmetric multiprocessing support
1556(CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older 1547(CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older
1557kernels had a bug causing this. In that case, run <c>emerge x86info</c>, update 1548kernels had a bug causing this. In that case, run <c>emerge x86info</c>, update
1558your kernel as asked and check the current frequency with 1549your kernel as asked and check the current frequency with <c>x86info -mhz</c>.
1559<c>x86info -mhz</c>.
1560</p> 1550</p>
1561 1551
1562<p> 1552<p>
1563<e>Q:</e> I can change the CPU frequency, but the range is not as wide as in 1553<e>Q:</e> I can change the CPU frequency, but the range is not as wide as in
1564another OS. 1554another OS.
1565</p> 1555</p>
1566 1556
1567<p> 1557<p>
1568<e>A:</e> You can combine frequency scaling with ACPI throttling to get a lower 1558<e>A:</e> You can combine frequency scaling with ACPI throttling to get a lower
1569minimum frequency. Notice that throttling doesn't save much energy and is 1559minimum frequency. Notice that throttling doesn't save much energy and is mainly
1570mainly used for thermal management (keeping your laptop cool and quiet). You 1560used for thermal management (keeping your laptop cool and quiet). You can read
1571can read the current throttling state with <c>cat 1561the current throttling state with <c>cat /proc/acpi/processor/CPU/throttling</c>
1572/proc/acpi/processor/CPU/throttling</c> and change it with <c>echo -n "0:x" > 1562and change it with <c>echo -n "0:x" > /proc/acpi/processor/CPU/limit</c>, where
1573/proc/acpi/processor/CPU/limit</c>, where x is one of the Tx states listed in 1563x is one of the Tx states listed in
1574<path>/proc/acpi/processor/CPU/throttling</path>. 1564<path>/proc/acpi/processor/CPU/throttling</path>.
1575</p> 1565</p>
1576 1566
1577<p> 1567<p>
1578<e>Q:</e> When configuring the kernel, powersave, performance and userspace 1568<e>Q:</e> When configuring the kernel, powersave, performance and userspace
1638<e>A:</e> This happens on some systems. You have to disable 1628<e>A:</e> This happens on some systems. You have to disable
1639<c>DynamicClocks</c>. 1629<c>DynamicClocks</c>.
1640</p> 1630</p>
1641 1631
1642<p> 1632<p>
1643<e>Q:</e> I want to use suspend2, but it tells me my swap partition is too 1633<e>Q:</e> I want to use TuxOnIce, but it tells me my swap partition is too
1644small. Resizing is not an option. 1634small. Resizing is not an option.
1645</p> 1635</p>
1646 1636
1647<p> 1637<p>
1648<e>A:</e> If there is enough free space on your system, you can use the 1638<e>A:</e> If there is enough free space on your system, you can use the
1649filewriter instead of the swapwriter. The <c>hibernate-script</c> supports it 1639filewriter instead of the swapwriter. The <c>hibernate-script</c> supports it as
1650as well. More information can be found in 1640well. More information can be found in
1651<path>/usr/src/linux/Documentation/power/suspend2.txt</path>. 1641<path>/usr/src/linux/Documentation/power/tuxonice.txt</path>.
1652</p> 1642</p>
1653 1643
1654<p> 1644<p>
1655<e>Q:</e> I just bought a brand new battery, but it only lasts for some 1645<e>Q:</e> I just bought a brand new battery, but it only lasts for some
1656minutes! What am I doing wrong? 1646minutes! What am I doing wrong?
1686 1676
1687<p> 1677<p>
1688<e>A:</e> Don't fear to contact me, <mail link="earthwings@gentoo.org">Dennis 1678<e>A:</e> Don't fear to contact me, <mail link="earthwings@gentoo.org">Dennis
1689Nienhüser</mail>, directly. The <uri link="http://forums.gentoo.org">Gentoo 1679Nienhüser</mail>, directly. The <uri link="http://forums.gentoo.org">Gentoo
1690Forums</uri> are a good place to get help as well. If you prefer IRC, try the 1680Forums</uri> are a good place to get help as well. If you prefer IRC, try the
1691<c>#gentoo-laptop</c> channel at <uri 1681<c>#gentoo-laptop</c> <uri link="irc://irc.gentoo.org">channel</uri>.
1692link="irc://irc.freenode.net">irc.freenode.net</uri>.
1693</p> 1682</p>
1694 1683
1695</body> 1684</body>
1696</section> 1685</section>
1697</chapter> 1686</chapter>

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20