/[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.18 Revision 1.19
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.18 2006/02/16 18:45:09 nightmorph Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.19 2006/07/27 08:13:32 rane Exp $ -->
4<guide link="/doc/en/power-management-guide.xml"> 4<guide link="/doc/en/power-management-guide.xml">
5<title>Power Management Guide</title> 5<title>Power Management Guide</title>
6 6
7<author title="Author"> 7<author title="Author">
8 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail> 8 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail>
9</author>
10<author title="Editor">
11 <mail link="chriswhite@gentoo.org">Chris White</mail>
9</author> 12</author>
10 13
11<abstract> 14<abstract>
12Power Management is the key to extend battery run time on mobile systems like 15Power Management is the key to extend battery run time on mobile systems like
13laptops. This guide assists you setting it up on your laptop. 16laptops. This guide assists you setting it up on your laptop.
15 18
16<!-- The content of this document is licensed under the CC-BY-SA license --> 19<!-- The content of this document is licensed under the CC-BY-SA license -->
17<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 20<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
18<license/> 21<license/>
19 22
20<version>1.27</version> 23<version>1.28</version>
21<date>2006-02-16</date> 24<date>2006-07-26</date>
22 25
23<chapter> 26<chapter>
24<title>Introduction</title> 27<title>Introduction</title>
25<section> 28<section>
26<body> 29<body>
34intelligent Power Management policies. 37intelligent Power Management policies.
35</p> 38</p>
36 39
37</body> 40</body>
38</section> 41</section>
39
40<section> 42<section>
41<title>A quick overview</title> 43<title>A Quick Overview</title>
42<body> 44<body>
43 45
44<p> 46<p>
45Please notice that this guide describes Power Management for <e>laptops</e>. 47Please notice that this guide describes Power Management for <e>laptops</e>.
46While some sections might also suite for <e>servers</e>, others do not and may 48While some sections might also suite for <e>servers</e>, others do not and may
52As this guide has become rather long, here's a short overview helping you to 54As this guide has become rather long, here's a short overview helping you to
53find your way through it. 55find your way through it.
54</p> 56</p>
55 57
56<p> 58<p>
57The <e>Prerequisites</e> chapter talks about some requirements that should be 59The <uri link="#doc_chap2">Prerequisites</uri> chapter talks about some
58met before any of the following device individual sections will work. This 60requirements that should be met before any of the following device individual
59includes BIOS settings, kernel configuration and some simplifications in user 61sections will work. This includes BIOS settings, kernel configuration and some
60land. The following three chapters focus on devices that typically consume 62simplifications in user land. The following three chapters focus on devices
61most energy - processor, display and hard drive. Each can be configured 63that typically consume most energy - processor, display and hard drive. Each
62seperately. <e>CPU Power Management</e> shows how to adjust the processor's 64can be configured seperately. <uri link="#doc_chap3">CPU Power Management</uri>
63frequency to save a maximum of energy whithout losing too much performance. A 65shows how to adjust the processor's frequency to save a maximum of energy
64few different tricks prevent your hard drive from working unnecessarily often 66whithout losing too much performance. A few different tricks prevent your hard
65in <e>Disk Power Management</e> (decreasing noise level as a nice side 67drive from working unnecessarily often in <uri link="#doc_chap5">Disk Power
68Management</uri> (decreasing noise level as a nice side effect). Some notes on
66effect). Some notes on graphics cards, Wireless LAN and USB finish the device 69graphics cards, Wireless LAN and USB finish the device section in
67section in <e>Power Management for other devices</e> while another chapter is 70<uri link="#doc_chap6">Power Management For Other Devices</uri> while another
68dedicated to the (rather experimental) <e>sleep states</e>. Last not least 71chapter is dedicated to the (rather experimental) <uri link="#doc_chap7">sleep
69<e>Troubleshooting</e> lists common pitfalls. 72states</uri>. Last not least <uri link="#doc_chap8">Troubleshooting</uri>
73lists common pitfalls.
70</p> 74</p>
71 75
72</body> 76</body>
73</section>
74
75<section> 77</section>
78<section>
76<title>Power Budget for each component</title> 79<title>Power Budget For Each Component</title>
77<body> 80<body>
78 81
79<figure link="/images/energy-budget.png" short="Which component consumes how 82<figure link="/images/energy-budget.png" short="Which component consumes how
80much energy?" caption="Power budget for each component"/> 83much energy?" caption="Power budget for each component"/>
81 84
107</p> 110</p>
108 111
109</body> 112</body>
110</section> 113</section>
111<section> 114<section>
112<title>The BIOS part</title> 115<title>The BIOS Part</title>
113<body> 116<body>
114 117
115<p> 118<p>
116First have a look into your BIOS Power Management settings. The best way is to 119First have a look into your BIOS Power Management settings. The best way is to
117combine BIOS and operating system policies, but for the moment it's better to 120combine BIOS and operating system policies, but for the moment it's better to
121</p> 124</p>
122 125
123</body> 126</body>
124</section> 127</section>
125<section> 128<section>
126<title>Setting USE flags</title> 129<title>Setting USE Flags</title>
127<body> 130<body>
128 131
129<p> 132<p>
130Please check that the <c>acpi</c> USE flag is set in 133Please check that the <c>acpi</c> USE flag is set in
131<path>/etc/make.conf</path>. Other USE flags that might be interesting for your 134<path>/etc/make.conf</path>. Other USE flags that might be interesting for your
132system are <c>apm</c>, <c>lm_sensors</c>, <c>nforce2</c>, <c>nvidia</c>, 135system are <c>apm</c>, <c>lm_sensors</c>, <c>nforce2</c>, <c>nvidia</c>,
133<c>pmu</c>. See <path>/usr/portage/profiles/use*.desc</path> for details. If 136<c>pmu</c>. See <path>/usr/portage/profiles/use*.desc</path> for details. If
134you forgot to set one of these flags, you can recompile affected packages using 137you forgot to set one of these flags, you can recompile affected packages using
135the <c>--newuse</c> flag in <c>emerge</c>, see <c>man 1 emerge</c>. 138the <c>--newuse</c> flag in <c>emerge</c>, see <c>man emerge</c>.
136</p> 139</p>
137 140
138</body> 141</body>
139</section>
140<section> 142</section>
143<section>
141<title>Configuring the kernel</title> 144<title>Configuring The Kernel</title>
142<body> 145<body>
143 146
144<p> 147<p>
145ACPI (Advanced Configuration and Power Interface) support in the kernel is 148ACPI (Advanced Configuration and Power Interface) support in the kernel is
146still work in progress. Using a recent kernel will make sure you'll get the 149still work in progress. Using a recent kernel will make sure you'll get the
148</p> 151</p>
149 152
150<p> 153<p>
151There are different kernel sources in Portage. I'd recommend using 154There are different kernel sources in Portage. I'd recommend using
152<c>gentoo-sources</c> or <c>suspend2-sources</c>. The latter contains patches 155<c>gentoo-sources</c> or <c>suspend2-sources</c>. The latter contains patches
153for Software Suspend 2, see the chapter about sleep states for details. When 156for Software Suspend 2, see the chapter about <uri link="#doc_chap7">sleep
154configuring the kernel, activate at least these options: 157states</uri> for more details. When configuring the kernel, activate at least
158these options:
155</p> 159</p>
156 160
157<pre caption="Minimum kernel setup for Power Management (Kernel 2.6)"> 161<pre caption="Minimum kernel setup for Power Management (Kernel 2.6)">
158Power Management Options ---&gt; 162Power Management Options ---&gt;
159 [*] Power Management Support 163 [*] Power Management Support
201</p> 205</p>
202 206
203<p> 207<p>
204The kernel has to know how to enable CPU frequency scaling on your processor. As 208The kernel has to know how to enable CPU frequency scaling on your processor. As
205each type of CPU has a different interface, you've got to choose the right 209each type of CPU has a different interface, you've got to choose the right
206driver for your processor. Be careful here - enabling <e>Intel Pentium 4 clock 210driver for your processor. Be careful here - enabling <c>Intel Pentium 4 clock
207modulation</e> on a Pentium M system will lead to strange results for example. 211modulation</c> on a Pentium M system will lead to strange results for example.
208Consult the kernel documentation if you're unsure which one to take. 212Consult the kernel documentation if you're unsure which one to take.
209</p> 213</p>
210 214
211<p> 215<p>
212Compile your kernel, make sure the right modules get loaded at startup and boot 216Compile your kernel, make sure the right modules get loaded at startup and boot
225</pre> 229</pre>
226 230
227</body> 231</body>
228</section> 232</section>
229<section> 233<section>
230<title>Creating a "battery" runlevel</title> 234<title>Creating A "battery" Runlevel</title>
231<body> 235<body>
232 236
233<p> 237<p>
234The default policy will be to enable Power Management only when needed - 238The default policy will be to enable Power Management only when needed -
235running on batteries. To make the switch between AC and battery convenient, 239running on batteries. To make the switch between AC and battery convenient,
236create a runlevel <e>battery</e> that holds all the scripts starting and 240create a runlevel <c>battery</c> that holds all the scripts starting and
237stopping Power Management. 241stopping Power Management.
238</p> 242</p>
239 243
240<note> 244<note>
241You can safely skip this section if you don't like the idea of having another 245You can safely skip this section if you don't like the idea of having another
242runlevel. However, skipping this step will make the rest a bit trickier to set 246runlevel. However, skipping this step will make the rest a bit trickier to set
243up. The next sections assume a runlevel <e>battery</e> exists. 247up. The next sections assume a runlevel <c>battery</c> exists.
244</note> 248</note>
245 249
246<pre caption="Creating a battery runlevel"> 250<pre caption="Creating a battery runlevel">
247# <i>cd /etc/runlevels</i> 251# <i>cd /etc/runlevels</i>
248# <i>cp -a default battery</i> 252# <i>cp -a default battery</i>
249</pre> 253</pre>
250 254
251<p> 255<p>
252Finished. Your new runlevel <e>battery</e> contains everything like 256Finished. Your new runlevel <c>battery</c> contains everything like
253<e>default</e>, but there is no automatic switch between both yet. Time to 257<c>default</c>, but there is no automatic switch between both yet. Time to
254change it. 258change it.
255</p> 259</p>
256 260
257</body> 261</body>
258</section> 262</section>
259<section> 263<section>
260<title>Reacting on ACPI events</title> 264<title>Reacting On ACPI Events</title>
261<body> 265<body>
262 266
263<p> 267<p>
264Typical ACPI events are closing the lid, changing the power source or pressing 268Typical ACPI events are closing the lid, changing the power source or pressing
265the sleep button. An important event is changing the power source, which should 269the sleep button. An important event is changing the power source, which should
272<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/powermgmt-base</c> - make sure the
273package is installed on your system. 277package is installed on your system.
274</p> 278</p>
275 279
276<pre caption="Installing powermgt-base"> 280<pre caption="Installing powermgt-base">
277<i># emerge powermgmt-base</i> 281# <i>emerge powermgmt-base</i>
278</pre> 282</pre>
279 283
280<p> 284<p>
281You are now able to determine the power source by executing 285You are now able to determine the power source by executing
282<c>on_ac_power &amp;&amp; echo AC available || echo Running on batteries</c> in 286<c>on_ac_power &amp;&amp; echo AC available || echo Running on batteries</c> in
305 exit 1 309 exit 1
306fi 310fi
307 311
308if on_ac_power 312if on_ac_power
309then 313then
310 if [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]] 314 if [[ "$(&lt;/var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]]
311 then 315 then
312 logger "Switching to ${RUNLEVEL_AC} runlevel" 316 logger "Switching to ${RUNLEVEL_AC} runlevel"
313 /sbin/rc ${RUNLEVEL_AC} 317 /sbin/rc ${RUNLEVEL_AC}
314 fi 318 fi
315elif [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]] 319elif [[ "$(&lt;/var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]]
316then 320then
317 logger "Switching to ${RUNLEVEL_BATTERY} runlevel" 321 logger "Switching to ${RUNLEVEL_BATTERY} runlevel"
318 /sbin/rc ${RUNLEVEL_BATTERY} 322 /sbin/rc ${RUNLEVEL_BATTERY}
319fi 323fi
320</pre> 324</pre>
323Dont forget to run <c>chmod +x /etc/acpi/actions/pmg_switch_runlevel.sh</c> to 327Dont forget to run <c>chmod +x /etc/acpi/actions/pmg_switch_runlevel.sh</c> to
324make the script executable. The last thing that needs to be done is calling the 328make the script executable. The last thing that needs to be done is calling the
325script whenever the power source changes. That's done by catching ACPI events 329script whenever the power source changes. That's done by catching ACPI events
326with the help of <c>acpid</c>. First you need to know which events are 330with the help of <c>acpid</c>. First you need to know which events are
327generated when the power source changes. The events are called 331generated when the power source changes. The events are called
328<e>ac_adapter</e> and <e>battery</e> 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
329on yours. 333on yours.
330</p> 334</p>
331 335
332<pre caption="Determining ACPI events for changing the power source"> 336<pre caption="Determining ACPI events for changing the power source">
333<i># tail -f /var/log/acpid | grep "received event"</i> 337# <i>tail -f /var/log/acpid | grep "received event"</i>
334</pre> 338</pre>
335 339
336<p> 340<p>
337Run the command above and pull the power cable. You should see something 341Run the command above and pull the power cable. You should see something
338like this: 342like this:
342[Tue Sep 20 17:39:06 2005] received event "ac_adapter AC 00000080 00000000" 346[Tue Sep 20 17:39:06 2005] received event "ac_adapter AC 00000080 00000000"
343[Tue Sep 20 17:39:06 2005] received event "battery BAT0 00000080 00000001" 347[Tue Sep 20 17:39:06 2005] received event "battery BAT0 00000080 00000001"
344</pre> 348</pre>
345 349
346<p> 350<p>
347The interesting part is the quoted string after <e>received event</e>. It will 351The interesting part is the quoted string after <c>received event</c>. It will
348be 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
349worry 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
350any event is generated, runlevel changing will work. 354any event is generated, runlevel changing will work.
351</p> 355</p>
352 356
367<p> 371<p>
368Finally acpid has to be restarted to recognize the changes. 372Finally acpid has to be restarted to recognize the changes.
369</p> 373</p>
370 374
371<pre caption="Finishing runlevel switching with acpid"> 375<pre caption="Finishing runlevel switching with acpid">
372<i># /etc/init.d/acpid restart</i> 376# <i>/etc/init.d/acpid restart</i>
373</pre> 377</pre>
374 378
375<p> 379<p>
376Give it a try: Plug AC in and out and watch syslog for the "Switching to AC 380Give it a try: Plug AC in and out and watch syslog for the "Switching to AC
377mode" or "Switching to battery mode" messages. See the Troubleshooting 381mode" or "Switching to battery mode" messages. See the
378section if the script is not able to detect the power source correctly. 382<uri link="#doc_chap8">Troubleshooting section</uri> if the script is not
383able to detect the power source correctly.
379</p> 384</p>
380 385
381<p> 386<p>
382Due to the nature of the event mechanism, your laptop will boot into runlevel 387Due to the nature of the event mechanism, your laptop will boot into runlevel
383<e>default</e> regardless of the AC/battery state. This is fine when running 388<c>default</c> regardless of the AC/battery state. This is fine when running
384from AC, but we'd like to boot into the battery runlevel otherwise. One 389from AC, but we'd like to boot into the battery runlevel otherwise. One
385solution would be to add another entry to the boot loader with the parameter 390solution would be to add another entry to the boot loader with the parameter
386<c>softlevel=battery</c>, but it's likely to forget choosing it. A better way 391<c>softlevel=battery</c>, but it's likely to forget choosing it. A better way
387is faking an ACPI event in the end of the boot process and letting 392is faking an ACPI event in the end of the boot process and letting
388<path>pmg_switch_runlevel.sh</path> script decide whether a 393<path>pmg_switch_runlevel.sh</path> script decide whether a
418 423
419</body> 424</body>
420</section> 425</section>
421 426
422<section> 427<section>
423<title>Some technical terms</title> 428<title>Some Technical Terms</title>
424<body> 429<body>
425 430
426<p> 431<p>
427CPU frequency scaling brings up some technical terms that might be unknown to 432CPU frequency scaling brings up some technical terms that might be unknown to
428you. Here's a quick introduction. 433you. Here's a quick introduction.
429</p> 434</p>
430 435
431<p> 436<p>
432First of all, the kernel has to be able to change the processor's frequency. 437First of all, the kernel has to be able to change the processor's frequency.
433The <e>CPUfreq processor driver</e> knows the commands to do it on your CPU. 438The <b>CPUfreq processor driver</b> knows the commands to do it on your CPU.
434Thus it's important to choose the right one in your kernel. You should 439Thus it's important to choose the right one in your kernel. You should
435already have done it above. Once the kernel knows how to change frequencies, 440already have done it above. Once the kernel knows how to change frequencies,
436it has to know which frequency it should set. This is done according to the 441it has to know which frequency it should set. This is done according to the
437<e>policy</e> which consists of a <e>CPUfreq policy</e> and a 442<b>policy</b> which consists of a <b>CPUfreq policy</b> and a
438<e>governor</e>. A CPUfreq policy are just two numbers which define a range 443<b>governor</b>. A CPUfreq policy are just two numbers which define a range
439the frequency has to stay between - minimal and maximal frequency. The 444the frequency has to stay between - minimal and maximal frequency. The
440governor now decides which of the available frequencies in between minimal 445governor now decides which of the available frequencies in between minimal
441and maximal frequency to choose. For example, the <e>powersave governor</e> 446and maximal frequency to choose. For example, the <b>powersave governor</b>
442always chooses the lowest frequency available, the <e>performance 447always chooses the lowest frequency available, the <b>performance
443governor</e> the highest one. The <e>userspace governor</e> makes no decision 448governor</b> the highest one. The <b>userspace governor</b> makes no decision
444but chooses whatever the user (or a program in userspace) wants - which means 449but chooses whatever the user (or a program in userspace) wants - which means
445it reads the frequency from 450it reads the frequency from
446<path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</path>. 451<path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</path>.
447</p> 452</p>
448 453
449<p> 454<p>
450This doesn't sound like dynamic frequency changes yet and in fact it isn't. 455This doesn't sound like dynamic frequency changes yet and in fact it isn't.
451Dynamics however can be accomplished with various approaches. For example, 456Dynamics however can be accomplished with various approaches. For example,
452the <e>ondemand governor</e> makes its decisions depending on the current CPU 457the <b>ondemand governor</b> makes its decisions depending on the current CPU
453load. The same is done by various userland tools like <c>cpudyn</c>, 458load. The same is done by various userland tools like <c>cpudyn</c>,
454<c>cpufreqd</c>, <c>powernowd</c> and many more. ACPI events can be used to 459<c>cpufreqd</c>, <c>powernowd</c> and many more. ACPI events can be used to
455enable or disable dynamic frequency changes depending on power source. 460enable or disable dynamic frequency changes depending on power source.
456</p> 461</p>
457 462
458</body> 463</body>
459</section> 464</section>
460<section> 465<section>
461<title>Setting the frequency manually</title> 466<title>Setting The Frequency Manually</title>
462<body> 467<body>
463 468
464<p> 469<p>
465Decreasing CPU speed and voltage has two advantages: On the one hand less 470Decreasing CPU speed and voltage has two advantages: On the one hand less
466energy is consumed, on the other hand there is thermal improvement as your 471energy is consumed, on the other hand there is thermal improvement as your
469between performance loss and energy saving. 474between performance loss and energy saving.
470</p> 475</p>
471 476
472<note> 477<note>
473Not every laptop supports frequency scaling. If unsure, have a look at the list 478Not every laptop supports frequency scaling. If unsure, have a look at the list
474of supported processors in the <e>Troubleshooting</e> section to verify your's 479of supported processors in the <uri link="#doc_chap8">Troubleshooting</uri>
475is supported. 480section to verify yours is supported.
476</note> 481</note>
477 482
478<p> 483<p>
479It's time to test whether CPU frequency changing works. Let's install another 484It's time to test whether CPU frequency changing works. Let's install another
480tool which is very handy for debugging purposes: <c>sys-power/cpufrequtils</c> 485tool which is very handy for debugging purposes: <c>sys-power/cpufrequtils</c>
506 511
507<p> 512<p>
508Now play around with <c>cpufreq-set</c> to make sure frequency switching works. 513Now play around with <c>cpufreq-set</c> to make sure frequency switching works.
509Run <c>cpufreq-set -g ondemand</c> for example to activate the ondemand 514Run <c>cpufreq-set -g ondemand</c> for example to activate the ondemand
510governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as 515governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as
511expected, you might find help in the Troubleshooting section in the end of this 516expected, you might find help in the <uri link="#doc_chap8">Troubleshooting section</uri>
512guide. 517in the end of this guide.
513</p> 518</p>
514 519
515</body> 520</body>
516</section> 521</section>
517<section> 522<section>
521<p> 526<p>
522The above is quite nice, but not doable in daily life. Better let your system 527The above is quite nice, but not doable in daily life. Better let your system
523set the appropriate frequency automatically. There are many different 528set the appropriate frequency automatically. There are many different
524approaches to do this. The following table gives a quick overview to help you 529approaches to do this. The following table gives a quick overview to help you
525decide on one of them. It's roughly seperated in three categories 530decide on one of them. It's roughly seperated in three categories
526<e>kernel</e> for approaches that only need kernel support, <e>daemon</e> for 531<b>kernel</b> for approaches that only need kernel support, <b>daemon</b> for
527programs that run in the background and <e>graphical</e> for programs that 532programs that run in the background and <b>graphical</b> for programs that
528provide a GUI for easy configuration and changes. 533provide a GUI for easy configuration and changes.
529</p> 534</p>
530 535
531<table> 536<table>
532<tr> 537<tr>
730profile=ondemand 735profile=ondemand
731[/Rule] 736[/Rule]
732</pre> 737</pre>
733 738
734<p> 739<p>
735Now you can start the cpufreqd daemon. Add it to the <e>default</e> and 740Now you can start the cpufreqd daemon. Add it to the <c>default</c> and
736<e>battery</e> runlevel as well. 741<c>battery</c> runlevel as well.
737</p> 742</p>
738 743
739<pre caption="Starting cpufreqd"> 744<pre caption="Starting cpufreqd">
740# <i>rc-update add cpufreqd default battery</i> 745# <i>rc-update add cpufreqd default battery</i>
741# <i>rc</i> 746# <i>rc</i>
755confusion like switching between two frequencies all the time. 760confusion like switching between two frequencies all the time.
756</warn> 761</warn>
757 762
758</body> 763</body>
759</section> 764</section>
760
761<section> 765<section>
762<title>Verifying the result</title> 766<title>Verifying the result</title>
763
764<body> 767<body>
765 768
766<p> 769<p>
767The last thing to check is that your new policies do a good job. An easy way to 770The last thing to check is that your new policies do a good job. An easy way to
768do so is monitoring CPU speed while working with your laptop: 771do so is monitoring CPU speed while working with your laptop:
771<pre caption="Monitoring CPU speed"> 774<pre caption="Monitoring CPU speed">
772# <i>watch grep \"cpu MHz\" /proc/cpuinfo</i> 775# <i>watch grep \"cpu MHz\" /proc/cpuinfo</i>
773</pre> 776</pre>
774 777
775<p> 778<p>
776If <path>/proc/cpuinfo</path> doesn't get updated (see Troubleshooting), 779If <path>/proc/cpuinfo</path> doesn't get updated (see
777monitor the CPU frequency with: 780<uri link="#doc_chap8">Troubleshooting</uri>), monitor the CPU frequency with:
778</p> 781</p>
779 782
780<pre caption="Alternative CPU speed monitoring"> 783<pre caption="Alternative CPU speed monitoring">
781# <i>watch x86info -mhz</i> 784# <i>watch x86info -mhz</i>
782</pre> 785</pre>
783 786
784<p> 787<p>
785Depending on your setup, CPU speed should increase on heavy load, decrease on 788Depending on your setup, CPU speed should increase on heavy load, decrease on
786no activity or just stay at the same level. When using cpufreqd and verbosity 789no activity or just stay at the same level. When using <c>cpufreqd</c> and
787set to 5 or higher in <path>cpufreqd.conf</path> you'll get additional 790verbosity set to 5 or higher in <path>cpufreqd.conf</path> you'll get additional
788information about what's happening reported to syslog. 791information about what's happening reported to <c>syslog</c>.
789</p> 792</p>
790 793
791</body> 794</body>
792</section> 795</section>
793</chapter> 796</chapter>
851<body> 854<body>
852 855
853<p> 856<p>
854Probably more important is the backlight dimming. If you have access to the 857Probably more important is the backlight dimming. If you have access to the
855dimming settings via a tool, write a small script that dims the backlight in 858dimming settings via a tool, write a small script that dims the backlight in
856battery mode and place it in your <e>battery</e> runlevel. The following script 859battery mode and place it in your <c>battery</c> runlevel. The following script
857should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the 860should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the
858appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops, install 861appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops, install
859<c>app-laptop/acpitool</c> and skip configuration of ibm_acpi as described below. 862<c>app-laptop/acpitool</c> and skip configuration of <c>ibm_acpi</c> as described below.
860</p> 863</p>
861 864
862<warn> 865<warn>
863Support for setting brightness is marked experimental in ibm-acpi. It accesses 866Support for setting brightness is marked experimental in ibm-acpi. It accesses
864hardware directly and may cause severe harm to your system. Please read the 867hardware directly and may cause severe harm to your system. Please read the
870with the experimental parameter. 873with the experimental parameter.
871</p> 874</p>
872 875
873<pre caption="automatically loading the ibm_acpi module"> 876<pre caption="automatically loading the ibm_acpi module">
874<comment>(Please read the warnings above before doing this!)</comment> 877<comment>(Please read the warnings above before doing this!)</comment>
875<i># echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i> 878# <i>echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i>
876<i># /sbin/modules-update</i> 879# <i>/sbin/modules-update</i>
877<i># echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i> 880# <i>echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i>
878<i># modprobe ibm_acpi</i> 881# <i>modprobe ibm_acpi</i>
879</pre> 882</pre>
880 883
881<p> 884<p>
882This should work without error messages and a file 885This should work without error messages and a file
883<path>/proc/acpi/ibm/brightness</path> should be created after loading the 886<path>/proc/acpi/ibm/brightness</path> should be created after loading the
937When done, make sure brightness is adjusted automatically by adding it to the 940When done, make sure brightness is adjusted automatically by adding it to the
938battery runlevel. 941battery runlevel.
939</p> 942</p>
940 943
941<pre caption="Enabling automatic brightness adjustment"> 944<pre caption="Enabling automatic brightness adjustment">
942<i># chmod +x /etc/init.d/lcd-brightness</i> 945# <i>chmod +x /etc/init.d/lcd-brightness</i>
943<i># rc-update add lcd-brightness battery</i> 946# <i>rc-update add lcd-brightness battery</i>
944<i># rc</i> 947# <i>rc</i>
945</pre> 948</pre>
946 949
947</body> 950</body>
948</section> 951</section>
949</chapter> 952</chapter>
950 953
951<chapter> 954<chapter>
952<title>Disk Power Management</title> 955<title>Disk Power Management</title>
953<section> 956<section>
954<body> 957<body>
958
955<p> 959<p>
956Hard disks consume less energy in sleep mode. Therefore it makes sense to 960Hard disks consume less energy in sleep mode. Therefore it makes sense to
957activate power saving features whenever the hard disk is not used for a certain 961activate power saving features whenever the hard disk is not used for a certain
958amount of time. I'll show you two alternative possibilities to do it. First, 962amount of time. I'll show you two alternative possibilities to do it. First,
959laptop-mode will save most energy due to several measures which prevent or at 963laptop-mode will save most energy due to several measures which prevent or at
960least delay write accesses. The drawback is that due to the delayed write 964least delay write accesses. The drawback is that due to the delayed write
961accesses a power outage or kernel crash will be more dangerous for data loss. 965accesses a power outage or kernel crash will be more dangerous for data loss.
962If you don't like this, you have to make sure that there are no processes which 966If you don't like this, you have to make sure that there are no processes which
963write to your hard disk frequently. Afterwards you can enable power saving 967write to your hard disk frequently. Afterwards you can enable power saving
964features of your hard disk with hdparm as the second alternative. 968features of your hard disk with <c>hdparm</c> as the second alternative.
965</p> 969</p>
966 970
967</body> 971</body>
968</section> 972</section>
969
970<section> 973<section>
971<title>Increasing idle time - laptop-mode</title> 974<title>Increasing idle time - laptop-mode</title>
972<body> 975<body>
973 976
974<p> 977<p>
975Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches) 978Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches)
976include the so-called <e>laptop-mode</e>. When activated, dirty buffers are 979include the so-called <c>laptop-mode</c>. When activated, dirty buffers are
977written to disk on read calls or after 10 minutes (instead of 30 seconds). This 980written to disk on read calls or after 10 minutes (instead of 30 seconds). This
978minimizes the time the hard disk needs to be spun up. 981minimizes the time the hard disk needs to be spun up.
979</p> 982</p>
980 983
981<pre caption="Automated start of laptop-mode"> 984<pre caption="Automated start of laptop-mode">
992<p> 995<p>
993Recent versions (1.11 and later) of laptop-mode-tools include a new tool 996Recent versions (1.11 and later) of laptop-mode-tools include a new tool
994<c>lm-profiler</c>. It will monitor your system's disk usage and running 997<c>lm-profiler</c>. It will monitor your system's disk usage and running
995network services and suggests to disable unneeded ones. You can either disable 998network services and suggests to disable unneeded ones. You can either disable
996them through laptop-mode-tools builtin runlevel support (which will be reverted 999them through laptop-mode-tools builtin runlevel support (which will be reverted
997by Gentoo's <c>/sbin/rc</c>) or use your <e>default</e>/<e>battery</e> 1000by Gentoo's <c>/sbin/rc</c>) or use your <c>default</c>/<c>battery</c>
998runlevels (recommended). 1001runlevels (recommended).
999</p> 1002</p>
1000 1003
1001<pre caption="Sample output from running lm-profiler"> 1004<pre caption="Sample output from running lm-profiler">
1002# lm-profiler 1005# <i>lm-profiler</i>
1003Profiling session started. 1006Profiling session started.
1004Time remaining: 600 seconds 1007Time remaining: 600 seconds
1005[4296896.602000] amarokapp 1008[4296896.602000] amarokapp
1006Time remaining: 599 seconds 1009Time remaining: 599 seconds
1007[4296897.714000] sort 1010[4296897.714000] sort
1019<pre caption="lm-profiler suggests to disable some services"> 1022<pre caption="lm-profiler suggests to disable some services">
1020Program: "atd" 1023Program: "atd"
1021Reason: standard recommendation (program may not be running) 1024Reason: standard recommendation (program may not be running)
1022Init script: /etc/init.d/atd (GUESSED) 1025Init script: /etc/init.d/atd (GUESSED)
1023 1026
1024Do you want to disable this service in battery mode? [y/N]: n 1027Do you want to disable this service in battery mode? [y/N]: <i>n</i>
1025</pre> 1028</pre>
1026 1029
1027<p> 1030<p>
1028To disable atd as suggested in the example above, you would run <c>rc-update 1031To disable atd as suggested in the example above, you would run <c>rc-update
1029del atd battery</c>. Be careful not to disable services that are needed for 1032del atd battery</c>. Be careful not to disable services that are needed for
1030your system to run properly - lm-profiler is likely to generate some false 1033your system to run properly - <c>lm-profiler</c> is likely to generate some false
1031positives. Do not disable a service if you are unsure whether it's needed. 1034positives. Do not disable a service if you are unsure whether it's needed.
1032</p> 1035</p>
1033 1036
1034</body> 1037</body>
1035</section> 1038</section>
1036
1037<section> 1039<section>
1038<title>Limiting write accesses</title> 1040<title>Limiting Write Accesses</title>
1039<body> 1041<body>
1040 1042
1041<p> 1043<p>
1042If you don't want to use laptop-mode, you must take special care to disable 1044If you don't want to use laptop-mode, you must take special care to disable
1043services that write to your disk frequently - <c>syslogd</c> is a good 1045services that write to your disk frequently - <c>syslogd</c> is a good
1044candidate, for example. You probably don't want to shut it down completely, but 1046candidate, for example. You probably don't want to shut it down completely, but
1045it's possible to modify the config file so that "unnecessary" things don't get 1047it's possible to modify the config file so that "unnecessary" things don't get
1046logged and thus don't create disk traffic. Cups writes to disk periodically, so 1048logged and thus don't create disk traffic. <c>Cups</c> writes to disk periodically,
1047consider shutting it down and only enable it manually when needed. 1049so consider shutting it down and only enable it manually when needed.
1048</p> 1050</p>
1049 1051
1050<pre caption="Disabling cups in battery mode"> 1052<pre caption="Disabling cups in battery mode">
1051# <i>rc-update del cupsd battery</i> 1053# <i>rc-update del cupsd battery</i>
1052</pre> 1054</pre>
1057hdparm. 1059hdparm.
1058</p> 1060</p>
1059 1061
1060</body> 1062</body>
1061</section> 1063</section>
1062
1063<section> 1064<section>
1064<title>hdparm</title> 1065<title>hdparm</title>
1065<body> 1066<body>
1066 1067
1067<p> 1068<p>
1068The second possibility is using a small script and hdparm. Skip this if you 1069The second possibility is using a small script and <c>hdparm</c>. Skip this if you
1069are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>: 1070are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>:
1070</p> 1071</p>
1071 1072
1072<pre caption="Using hdparm for disk standby"> 1073<pre caption="Using hdparm for disk standby">
1073#!/sbin/runscript 1074#!/sbin/runscript
1105small values might wear out your drive and lose warranty. 1106small values might wear out your drive and lose warranty.
1106</impo> 1107</impo>
1107 1108
1108</body> 1109</body>
1109</section> 1110</section>
1110
1111<section> 1111<section>
1112<title>Other tricks</title> 1112<title>Other tricks</title>
1113<body> 1113<body>
1114 1114
1115<p> 1115<p>
1118heavily, otherwise you'll be in big problems. 1118heavily, otherwise you'll be in big problems.
1119</p> 1119</p>
1120 1120
1121<p> 1121<p>
1122If you don't want to use laptop-mode, it's still possible to minimize disk 1122If you don't want to use laptop-mode, it's still possible to minimize disk
1123access by mounting certain directories as <e>tmpfs</e> - write accesses are not 1123access by mounting certain directories as <c>tmpfs</c> - write accesses are not
1124stored on a disk, but in main memory and get lost with unmounting. Often it's 1124stored on a disk, but in main memory and get lost with unmounting. Often it's
1125useful to mount <path>/tmp</path> like this - you don't have to pay special 1125useful to mount <path>/tmp</path> like this - you don't have to pay special
1126attention as it gets cleared on every reboot regardless whether it was mounted 1126attention as it gets cleared on every reboot regardless whether it was mounted
1127on disk or in RAM. Just make sure you have enough RAM and no program (like a 1127on disk or in RAM. Just make sure you have enough RAM and no program (like a
1128download client or compress utility) needs extraordinary much space in 1128download client or compress utility) needs extraordinary much space in
1137<warn> 1137<warn>
1138Pay attention to the size parameter and modify it for your system. If you're 1138Pay attention to the size parameter and modify it for your system. If you're
1139unsure, don't try this at all, it can become a perfomance bottleneck easily. In 1139unsure, don't try this at all, it can become a perfomance bottleneck easily. In
1140case you want to mount <path>/var/log</path> like this, make sure to merge the 1140case you want to mount <path>/var/log</path> like this, make sure to merge the
1141log files to disk before unmounting. They are essential. Don't attempt to mount 1141log files to disk before unmounting. They are essential. Don't attempt to mount
1142/var/tmp like this. Portage uses it for compiling... 1142<path>/var/tmp</path> like this. Portage uses it for compiling...
1143</warn> 1143</warn>
1144 1144
1145</body> 1145</body>
1146</section> 1146</section>
1147</chapter> 1147</chapter>
1148 1148
1149<chapter> 1149<chapter>
1150<title>Power Management for other devices</title> 1150<title>Power Management For Other Devices</title>
1151<section> 1151<section>
1152<title>Graphics cards</title> 1152<title>Graphics Cards</title>
1153<body> 1153<body>
1154 1154
1155<p> 1155<p>
1156In case you own an ATI graphics card supporting PowerPlay (dynamic clock 1156In case you own an ATI graphics card supporting PowerPlay (dynamic clock
1157scaling for the the graphics processing unit GPU), you can activate this 1157scaling for the the graphics processing unit GPU), you can activate this
1173<title>Wireless Power Management</title> 1173<title>Wireless Power Management</title>
1174<body> 1174<body>
1175 1175
1176<p> 1176<p>
1177Wireless LAN cards consume quite a bit of energy. Put them in Power Management 1177Wireless LAN cards consume quite a bit of energy. Put them in Power Management
1178mode in analogy to the pmg_hda script. 1178mode in analogy to the <c>pmg_hda</c> script.
1179</p> 1179</p>
1180 1180
1181<note> 1181<note>
1182This script assumes your wireless interface is called <c>wlan0</c>; replace 1182This script assumes your wireless interface is called <c>wlan0</c>; replace
1183this with the actual name of your interface. 1183this with the actual name of your interface.
1240</body> 1240</body>
1241</section> 1241</section>
1242</chapter> 1242</chapter>
1243 1243
1244<chapter> 1244<chapter>
1245<title>Sleep states: sleep, standby, suspend to disk</title> 1245<title>Sleep States: sleep, standby, and suspend to disk</title>
1246<section> 1246<section>
1247<body> 1247<body>
1248 1248
1249<p> 1249<p>
1250ACPI defines different sleep states. The more important ones are 1250ACPI defines different sleep states. The more important ones are
1286<c>hibernate-script</c> to activate suspend or sleep mode. Let's install that 1286<c>hibernate-script</c> to activate suspend or sleep mode. Let's install that
1287first. 1287first.
1288</p> 1288</p>
1289 1289
1290<pre caption="Installing the hibernate-script"> 1290<pre caption="Installing the hibernate-script">
1291<i># emerge hibernate-script</i> 1291# <i>emerge hibernate-script</i>
1292</pre> 1292</pre>
1293 1293
1294<p> 1294<p>
1295Some configuration has to be done in <path>/etc/hibernate</path> The default 1295Some configuration has to be done in <path>/etc/hibernate</path> The default
1296package introduces two configuration files <path>hibernate.conf</path> and 1296package introduces two configuration files <path>hibernate.conf</path> and
1307</p> 1307</p>
1308 1308
1309<p> 1309<p>
1310Ready? Now is the last chance to backup any data you want to keep after 1310Ready? Now is the last chance to backup any data you want to keep after
1311executing the next command. Notice that you probably have to hit a special key 1311executing the next command. Notice that you probably have to hit a special key
1312like <e>Fn</e> to resume from sleep. 1312like <c>Fn</c> to resume from sleep.
1313</p> 1313</p>
1314 1314
1315<pre caption="Calling sleep"> 1315<pre caption="Calling sleep">
1316<i># hibernate-ram</i> 1316# <i>hibernate-ram</i>
1317</pre> 1317</pre>
1318 1318
1319<p> 1319<p>
1320If you're still reading, it seems to work. You can also setup standby (S1) in 1320If you're still reading, it seems to work. You can also setup standby (S1) in
1321a similar way by copying <path>ram.conf</path> to <path>standby.conf</path> 1321a similar way by copying <path>ram.conf</path> to <path>standby.conf</path>
1389<c>hibernate-cleanup</c> init script invalidates swsusp images during the 1389<c>hibernate-cleanup</c> init script invalidates swsusp images during the
1390boot process. 1390boot process.
1391</p> 1391</p>
1392 1392
1393<pre caption="Invalidating swsusp images during the boot process"> 1393<pre caption="Invalidating swsusp images during the boot process">
1394<i># rc-update add hibernate-cleanup boot</i> 1394# <i>rc-update add hibernate-cleanup boot</i>
1395</pre> 1395</pre>
1396 1396
1397<p> 1397<p>
1398To activate hibernate with swsusp, use the hibernate script and set 1398To activate hibernate with swsusp, use the hibernate script and set
1399<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/hibernate.conf</path>. 1399<c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/hibernate.conf</path>.
1410support as module and unload the modules before sending your laptop to sleep 1410support as module and unload the modules before sending your laptop to sleep
1411mode. There are configuration options for this in <path>hibernate.conf</path> 1411mode. There are configuration options for this in <path>hibernate.conf</path>
1412</p> 1412</p>
1413 1413
1414<pre caption="Hibernating with swsusp"> 1414<pre caption="Hibernating with swsusp">
1415<i># nano -w /etc/hibernate.conf</i> 1415# <i>nano -w /etc/hibernate.conf</i>
1416<comment>(Make sure you have a backup of your data)</comment> 1416<comment>(Make sure you have a backup of your data)</comment>
1417<i># hibernate</i> 1417# <i>hibernate</i>
1418</pre> 1418</pre>
1419 1419
1420<p> 1420<p>
1421The following section discusses the setup of suspend2 including fbsplash 1421The following section discusses the setup of suspend2 including fbsplash
1422support for a nice graphical progress bar during suspend and resume. 1422support for a nice graphical progress bar during suspend and resume.
1431<c>hibernate-cleanup</c> init script invalidates suspend2 images during the 1431<c>hibernate-cleanup</c> init script invalidates suspend2 images during the
1432boot process. 1432boot process.
1433</p> 1433</p>
1434 1434
1435<pre caption="Invalidating suspend2 images during the boot process"> 1435<pre caption="Invalidating suspend2 images during the boot process">
1436<i># rc-update add hibernate-cleanup boot</i> 1436# <i>rc-update add hibernate-cleanup boot</i>
1437</pre> 1437</pre>
1438 1438
1439<p>Now edit <path>/etc/hibernate/hibernate.conf</path>, enable the 1439<p>Now edit <path>/etc/hibernate/hibernate.conf</path>, enable the
1440<e>suspend2</e> section and comment everything in the <e>sysfs_power_state</e> 1440<c>suspend2</c> section and comment everything in the <c>sysfs_power_state</c>
1441and <e>acpi_sleep</e> sections. Do not enable the fbsplash part in global 1441and <c>acpi_sleep</c> sections. Do not enable the <c>fbsplash</c> part in global
1442options yet. 1442options yet.
1443</p> 1443</p>
1444 1444
1445<pre caption="Hibernating with suspend2"> 1445<pre caption="Hibernating with suspend2">
1446<i># nano -w /etc/hibernate.conf</i> 1446# <i>nano -w /etc/hibernate.conf</i>
1447<comment>(Make sure you have a backup of your data)</comment> 1447<comment>(Make sure you have a backup of your data)</comment>
1448<i># hibernate</i> 1448# <i>hibernate</i>
1449</pre> 1449</pre>
1450 1450
1451<p> 1451<p>
1452Please configure fbsplash now if you didn't do already. To enable fbsplash 1452Please configure <c>fbsplash</c> now if you didn't do already. To enable fbsplash
1453support during hibernation, the <c>sys-apps/suspend2-userui</c> package is 1453support during hibernation, the <c>sys-apps/suspend2-userui</c> package is
1454needed. Additionally, you've got to enable the <e>fbsplash</e> USE flag. 1454needed. Additionally, you've got to enable the <c>fbsplash</c> USE flag.
1455</p> 1455</p>
1456 1456
1457<pre caption="Installing suspend2-userui"> 1457<pre caption="Installing suspend2-userui">
1458<i># mkdir -p /etc/portage</i> 1458# <i>mkdir -p /etc/portage</i>
1459<i># echo sys-apps/suspend2-userui fbsplash >> /etc/portage/package.use</i> 1459# <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i>
1460<i># emerge suspend2-userui</i> 1460# <i>emerge suspend2-userui</i>
1461</pre> 1461</pre>
1462 1462
1463<p> 1463<p>
1464The ebuild tells you to make a symlink to the theme you want to use. For 1464The ebuild tells you to make a symlink to the theme you want to use. For
1465example, to use the <c>livecd-2005.1</c> theme, run the following command: 1465example, to use the <c>livecd-2005.1</c> theme, run the following command:
1466</p> 1466</p>
1467 1467
1468<pre caption="Using the livecd-2005.1 theme during hibernation"> 1468<pre caption="Using the livecd-2005.1 theme during hibernation">
1469<i># ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i> 1469# <i>ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i>
1470</pre> 1470</pre>
1471 1471
1472<p> 1472<p>
1473If you don't want a black screen in the first part of the resume process, you 1473If you don't want a black screen in the first part of the resume process, you
1474have to add the <c>suspend2ui_fbsplash</c> tool to your initrd image. Assuming 1474have to add the <c>suspend2ui_fbsplash</c> tool to your initrd image. Assuming
1476<path>/boot/fbsplash-emergence-1024x768</path>, here's how to do 1476<path>/boot/fbsplash-emergence-1024x768</path>, here's how to do
1477that. 1477that.
1478</p> 1478</p>
1479 1479
1480<pre caption="Adding suspend2ui_fbsplash to an initrd image"> 1480<pre caption="Adding suspend2ui_fbsplash to an initrd image">
1481<i># mount /boot</i> 1481# <i>mount /boot</i>
1482<i># mkdir ~/initrd.d</i> 1482# <i>mkdir ~/initrd.d</i>
1483<i># cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i> 1483# <i>cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i>
1484<i># cd ~/initrd.d</i> 1484# <i>cd ~/initrd.d</i>
1485<i># gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i> 1485# <i>gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i>
1486<i># rm fbsplash-emergence-1024x768</i> 1486# <i>rm fbsplash-emergence-1024x768</i>
1487<i># cp /usr/sbin/suspend2ui_fbsplash sbin/</i> 1487# <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i>
1488<i># find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i> 1488# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i>
1489</pre> 1489</pre>
1490 1490
1491<p> 1491<p>
1492Afterwards adjust <path>grub.conf</path> respectively <path>lilo.conf</path> 1492Afterwards adjust <path>grub.conf</path> respectively <path>lilo.conf</path>
1493so that your suspend2 kernel uses 1493so that your suspend2 kernel uses
1494<path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You 1494<path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You
1495can now test a dry run to see if everything is setup correctly. 1495can now test a dry run to see if everything is setup correctly.
1496</p> 1496</p>
1497 1497
1498<pre caption="Test run for fbsplash hibernation"> 1498<pre caption="Test run for fbsplash hibernation">
1499<i># suspend2ui_fbsplash -t</i> 1499# <i>suspend2ui_fbsplash -t</i>
1500</pre> 1500</pre>
1501 1501
1502<p> 1502<p>
1503Afterwards open <path>/etc/hibernate/hibernate.conf</path> again and activate 1503Afterwards open <path>/etc/hibernate/hibernate.conf</path> again and activate
1504the fbsplash options. Execute <c>hibernate</c> and enjoy. 1504the fbsplash options. Execute <c>hibernate</c> and enjoy.
1543Try to update the BIOS, especially if a broken DSDT is reported. You can also 1543Try to update the BIOS, especially if a broken DSDT is reported. You can also
1544try to fix it yourself (which is beyond the scope of this guide). 1544try to fix it yourself (which is beyond the scope of this guide).
1545</p> 1545</p>
1546 1546
1547<p> 1547<p>
1548<e>Q:</e> My laptop supports frequency scaling, but according to /proc/cpuinfo 1548<e>Q:</e> My laptop supports frequency scaling, but according to
1549the speed never changes. 1549<path>/proc/cpuinfo</path> the speed never changes.
1550</p> 1550</p>
1551 1551
1552<p> 1552<p>
1553<e>A:</e> Probably you have activated symmetric multiprocessing support 1553<e>A:</e> Probably you have activated symmetric multiprocessing support
1554(CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older 1554(CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older
1605<e>Q:</e> My system logger reports things like "logger: ACPI group battery / action 1605<e>Q:</e> My system logger reports things like "logger: ACPI group battery / action
1606battery is not defined". 1606battery is not defined".
1607</p> 1607</p>
1608 1608
1609<p> 1609<p>
1610<e>A:</e> This message is generated by the /etc/acpi/default.sh script that is 1610<e>A:</e> This message is generated by the <path>/etc/acpi/default.sh</path> script
1611shipped with acpid. You can safely ignore it. If you like to get rid of it, you 1611that is shipped with acpid. You can safely ignore it. If you like to get rid of it,
1612can comment the appropriate line in /etc/acpi/default.sh as shown below: 1612you can comment the appropriate line in <path>/etc/acpi/default.sh</path> as shown
1613below:
1613</p> 1614</p>
1614 1615
1615<pre caption="Disabling warnings about unknown acpi events"> 1616<pre caption="Disabling warnings about unknown acpi events">
1616 *) # logger "ACPI action $action is not defined" 1617 *) # logger "ACPI action $action is not defined"
1617</pre> 1618</pre>
1624<e>A:</e> This seems to be a kernel bug. Read on <uri 1625<e>A:</e> This seems to be a kernel bug. Read on <uri
1625link="http://bugme.osdl.org/show_bug.cgi?id=1752">here</uri>. 1626link="http://bugme.osdl.org/show_bug.cgi?id=1752">here</uri>.
1626</p> 1627</p>
1627 1628
1628<p> 1629<p>
1629<e>Q:</e> I activated the DynamicClocks option in <path>xorg.conf</path> and 1630<e>Q:</e> I activated the <c>DynamicClocks</c> option in <path>xorg.conf</path> and
1630now X.org crashes / the screen stays black / my laptop doesn't shutdown 1631now X.org crashes / the screen stays black / my laptop doesn't shutdown
1631properly. 1632properly.
1632</p> 1633</p>
1633 1634
1634<p> 1635<p>
1635<e>A:</e> This happens on some systems. You have to disable DynamicClocks. 1636<e>A:</e> This happens on some systems. You have to disable <c>DynamicClocks</c>.
1636</p> 1637</p>
1637 1638
1638<p> 1639<p>
1639<e>Q:</e> I want to use suspend2, but it tells me my swap partition is too 1640<e>Q:</e> I want to use suspend2, but it tells me my swap partition is too
1640small. Resizing is not an option. 1641small. Resizing is not an option.
1682 1683
1683<p> 1684<p>
1684<e>A:</e> Don't fear to contact me, <mail link="earthwings@gentoo.org">Dennis 1685<e>A:</e> Don't fear to contact me, <mail link="earthwings@gentoo.org">Dennis
1685Nienhüser</mail>, directly. The 1686Nienhüser</mail>, directly. The
1686<uri link="http://forums.gentoo.org">Gentoo Forums</uri> are a good place to 1687<uri link="http://forums.gentoo.org">Gentoo Forums</uri> are a good place to
1687get help as well. If you prefer IRC, try the <e>#gentoo-laptop</e> channel at 1688get help as well. If you prefer IRC, try the <c>#gentoo-laptop</c> channel at
1688<e>irc.freenode.net</e>. 1689<uri link="irc://irc.freenode.net">irc.freenode.net</uri>.
1689</p> 1690</p>
1690 1691
1691</body> 1692</body>
1692</section> 1693</section>
1693</chapter> 1694</chapter>

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20