1 |
rane 06/07/27 08:13:32 |
2 |
|
3 |
Modified: power-management-guide.xml |
4 |
Log: |
5 |
#123776, fixed the coding style a lot |
6 |
|
7 |
Revision Changes Path |
8 |
1.19 xml/htdocs/doc/en/power-management-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?rev=1.19&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?rev=1.19&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?r1=1.18&r2=1.19 |
13 |
|
14 |
Index: power-management-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v |
17 |
retrieving revision 1.18 |
18 |
retrieving revision 1.19 |
19 |
diff -u -r1.18 -r1.19 |
20 |
--- power-management-guide.xml 16 Feb 2006 18:45:09 -0000 1.18 |
21 |
+++ power-management-guide.xml 27 Jul 2006 08:13:32 -0000 1.19 |
22 |
@@ -1,12 +1,15 @@ |
23 |
<?xml version='1.0' encoding="UTF-8"?> |
24 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.18 2006/02/16 18:45:09 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.19 2006/07/27 08:13:32 rane Exp $ --> |
27 |
<guide link="/doc/en/power-management-guide.xml"> |
28 |
<title>Power Management Guide</title> |
29 |
|
30 |
<author title="Author"> |
31 |
<mail link="earthwings@g.o">Dennis Nienhüser</mail> |
32 |
</author> |
33 |
+<author title="Editor"> |
34 |
+ <mail link="chriswhite@g.o">Chris White</mail> |
35 |
+</author> |
36 |
|
37 |
<abstract> |
38 |
Power Management is the key to extend battery run time on mobile systems like |
39 |
@@ -17,8 +20,8 @@ |
40 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
41 |
<license/> |
42 |
|
43 |
-<version>1.27</version> |
44 |
-<date>2006-02-16</date> |
45 |
+<version>1.28</version> |
46 |
+<date>2006-07-26</date> |
47 |
|
48 |
<chapter> |
49 |
<title>Introduction</title> |
50 |
@@ -36,9 +39,8 @@ |
51 |
|
52 |
</body> |
53 |
</section> |
54 |
- |
55 |
<section> |
56 |
-<title>A quick overview</title> |
57 |
+<title>A Quick Overview</title> |
58 |
<body> |
59 |
|
60 |
<p> |
61 |
@@ -54,26 +56,27 @@ |
62 |
</p> |
63 |
|
64 |
<p> |
65 |
-The <e>Prerequisites</e> chapter talks about some requirements that should be |
66 |
-met before any of the following device individual sections will work. This |
67 |
-includes BIOS settings, kernel configuration and some simplifications in user |
68 |
-land. The following three chapters focus on devices that typically consume |
69 |
-most energy - processor, display and hard drive. Each can be configured |
70 |
-seperately. <e>CPU Power Management</e> shows how to adjust the processor's |
71 |
-frequency to save a maximum of energy whithout losing too much performance. A |
72 |
-few different tricks prevent your hard drive from working unnecessarily often |
73 |
-in <e>Disk Power Management</e> (decreasing noise level as a nice side |
74 |
-effect). Some notes on graphics cards, Wireless LAN and USB finish the device |
75 |
-section in <e>Power Management for other devices</e> while another chapter is |
76 |
-dedicated to the (rather experimental) <e>sleep states</e>. Last not least |
77 |
-<e>Troubleshooting</e> lists common pitfalls. |
78 |
+The <uri link="#doc_chap2">Prerequisites</uri> chapter talks about some |
79 |
+requirements that should be met before any of the following device individual |
80 |
+sections will work. This includes BIOS settings, kernel configuration and some |
81 |
+simplifications in user land. The following three chapters focus on devices |
82 |
+that typically consume most energy - processor, display and hard drive. Each |
83 |
+can be configured seperately. <uri link="#doc_chap3">CPU Power Management</uri> |
84 |
+shows how to adjust the processor's frequency to save a maximum of energy |
85 |
+whithout losing too much performance. A few different tricks prevent your hard |
86 |
+drive from working unnecessarily often in <uri link="#doc_chap5">Disk Power |
87 |
+Management</uri> (decreasing noise level as a nice side effect). Some notes on |
88 |
+graphics cards, Wireless LAN and USB finish the device section in |
89 |
+<uri link="#doc_chap6">Power Management For Other Devices</uri> while another |
90 |
+chapter is dedicated to the (rather experimental) <uri link="#doc_chap7">sleep |
91 |
+states</uri>. Last not least <uri link="#doc_chap8">Troubleshooting</uri> |
92 |
+lists common pitfalls. |
93 |
</p> |
94 |
|
95 |
</body> |
96 |
</section> |
97 |
- |
98 |
<section> |
99 |
-<title>Power Budget for each component</title> |
100 |
+<title>Power Budget For Each Component</title> |
101 |
<body> |
102 |
|
103 |
<figure link="/images/energy-budget.png" short="Which component consumes how |
104 |
@@ -109,7 +112,7 @@ |
105 |
</body> |
106 |
</section> |
107 |
<section> |
108 |
-<title>The BIOS part</title> |
109 |
+<title>The BIOS Part</title> |
110 |
<body> |
111 |
|
112 |
<p> |
113 |
@@ -123,7 +126,7 @@ |
114 |
</body> |
115 |
</section> |
116 |
<section> |
117 |
-<title>Setting USE flags</title> |
118 |
+<title>Setting USE Flags</title> |
119 |
<body> |
120 |
|
121 |
<p> |
122 |
@@ -132,13 +135,13 @@ |
123 |
system are <c>apm</c>, <c>lm_sensors</c>, <c>nforce2</c>, <c>nvidia</c>, |
124 |
<c>pmu</c>. See <path>/usr/portage/profiles/use*.desc</path> for details. If |
125 |
you forgot to set one of these flags, you can recompile affected packages using |
126 |
-the <c>--newuse</c> flag in <c>emerge</c>, see <c>man 1 emerge</c>. |
127 |
+the <c>--newuse</c> flag in <c>emerge</c>, see <c>man emerge</c>. |
128 |
</p> |
129 |
|
130 |
</body> |
131 |
</section> |
132 |
<section> |
133 |
-<title>Configuring the kernel</title> |
134 |
+<title>Configuring The Kernel</title> |
135 |
<body> |
136 |
|
137 |
<p> |
138 |
@@ -150,8 +153,9 @@ |
139 |
<p> |
140 |
There are different kernel sources in Portage. I'd recommend using |
141 |
<c>gentoo-sources</c> or <c>suspend2-sources</c>. The latter contains patches |
142 |
-for Software Suspend 2, see the chapter about sleep states for details. When |
143 |
-configuring the kernel, activate at least these options: |
144 |
+for Software Suspend 2, see the chapter about <uri link="#doc_chap7">sleep |
145 |
+states</uri> for more details. When configuring the kernel, activate at least |
146 |
+these options: |
147 |
</p> |
148 |
|
149 |
<pre caption="Minimum kernel setup for Power Management (Kernel 2.6)"> |
150 |
@@ -203,8 +207,8 @@ |
151 |
<p> |
152 |
The kernel has to know how to enable CPU frequency scaling on your processor. As |
153 |
each type of CPU has a different interface, you've got to choose the right |
154 |
-driver for your processor. Be careful here - enabling <e>Intel Pentium 4 clock |
155 |
-modulation</e> on a Pentium M system will lead to strange results for example. |
156 |
+driver for your processor. Be careful here - enabling <c>Intel Pentium 4 clock |
157 |
+modulation</c> on a Pentium M system will lead to strange results for example. |
158 |
Consult the kernel documentation if you're unsure which one to take. |
159 |
</p> |
160 |
|
161 |
@@ -227,20 +231,20 @@ |
162 |
</body> |
163 |
</section> |
164 |
<section> |
165 |
-<title>Creating a "battery" runlevel</title> |
166 |
+<title>Creating A "battery" Runlevel</title> |
167 |
<body> |
168 |
|
169 |
<p> |
170 |
The default policy will be to enable Power Management only when needed - |
171 |
running on batteries. To make the switch between AC and battery convenient, |
172 |
-create a runlevel <e>battery</e> that holds all the scripts starting and |
173 |
+create a runlevel <c>battery</c> that holds all the scripts starting and |
174 |
stopping Power Management. |
175 |
</p> |
176 |
|
177 |
<note> |
178 |
You can safely skip this section if you don't like the idea of having another |
179 |
runlevel. However, skipping this step will make the rest a bit trickier to set |
180 |
-up. The next sections assume a runlevel <e>battery</e> exists. |
181 |
+up. The next sections assume a runlevel <c>battery</c> exists. |
182 |
</note> |
183 |
|
184 |
<pre caption="Creating a battery runlevel"> |
185 |
@@ -249,15 +253,15 @@ |
186 |
</pre> |
187 |
|
188 |
<p> |
189 |
-Finished. Your new runlevel <e>battery</e> contains everything like |
190 |
-<e>default</e>, but there is no automatic switch between both yet. Time to |
191 |
+Finished. Your new runlevel <c>battery</c> contains everything like |
192 |
+<c>default</c>, but there is no automatic switch between both yet. Time to |
193 |
change it. |
194 |
</p> |
195 |
|
196 |
</body> |
197 |
</section> |
198 |
<section> |
199 |
-<title>Reacting on ACPI events</title> |
200 |
+<title>Reacting On ACPI Events</title> |
201 |
<body> |
202 |
|
203 |
<p> |
204 |
@@ -274,7 +278,7 @@ |
205 |
</p> |
206 |
|
207 |
<pre caption="Installing powermgt-base"> |
208 |
-<i># emerge powermgmt-base</i> |
209 |
+# <i>emerge powermgmt-base</i> |
210 |
</pre> |
211 |
|
212 |
<p> |
213 |
@@ -307,12 +311,12 @@ |
214 |
|
215 |
if on_ac_power |
216 |
then |
217 |
- if [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]] |
218 |
+ if [[ "$(</var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]] |
219 |
then |
220 |
logger "Switching to ${RUNLEVEL_AC} runlevel" |
221 |
/sbin/rc ${RUNLEVEL_AC} |
222 |
fi |
223 |
-elif [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]] |
224 |
+elif [[ "$(</var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]] |
225 |
then |
226 |
logger "Switching to ${RUNLEVEL_BATTERY} runlevel" |
227 |
/sbin/rc ${RUNLEVEL_BATTERY} |
228 |
@@ -325,12 +329,12 @@ |
229 |
script whenever the power source changes. That's done by catching ACPI events |
230 |
with the help of <c>acpid</c>. First you need to know which events are |
231 |
generated when the power source changes. The events are called |
232 |
-<e>ac_adapter</e> and <e>battery</e> on most laptops, but it might be different |
233 |
+<c>ac_adapter</c> and <c>battery</c> on most laptops, but it might be different |
234 |
on yours. |
235 |
</p> |
236 |
|
237 |
<pre caption="Determining ACPI events for changing the power source"> |
238 |
-<i># tail -f /var/log/acpid | grep "received event"</i> |
239 |
+# <i>tail -f /var/log/acpid | grep "received event"</i> |
240 |
</pre> |
241 |
|
242 |
<p> |
243 |
@@ -344,7 +348,7 @@ |
244 |
</pre> |
245 |
|
246 |
<p> |
247 |
-The interesting part is the quoted string after <e>received event</e>. It will |
248 |
+The interesting part is the quoted string after <c>received event</c>. It will |
249 |
be matched by the event line in the files you are going to create below. Don't |
250 |
worry if your system generates multiple events or always the same. As long as |
251 |
any event is generated, runlevel changing will work. |
252 |
@@ -369,18 +373,19 @@ |
253 |
</p> |
254 |
|
255 |
<pre caption="Finishing runlevel switching with acpid"> |
256 |
-<i># /etc/init.d/acpid restart</i> |
257 |
+# <i>/etc/init.d/acpid restart</i> |
258 |
</pre> |
259 |
|
260 |
<p> |
261 |
Give it a try: Plug AC in and out and watch syslog for the "Switching to AC |
262 |
-mode" or "Switching to battery mode" messages. See the Troubleshooting |
263 |
-section if the script is not able to detect the power source correctly. |
264 |
+mode" or "Switching to battery mode" messages. See the |
265 |
+<uri link="#doc_chap8">Troubleshooting section</uri> if the script is not |
266 |
+able to detect the power source correctly. |
267 |
</p> |
268 |
|
269 |
<p> |
270 |
Due to the nature of the event mechanism, your laptop will boot into runlevel |
271 |
-<e>default</e> regardless of the AC/battery state. This is fine when running |
272 |
+<c>default</c> regardless of the AC/battery state. This is fine when running |
273 |
from AC, but we'd like to boot into the battery runlevel otherwise. One |
274 |
solution would be to add another entry to the boot loader with the parameter |
275 |
<c>softlevel=battery</c>, but it's likely to forget choosing it. A better way |
276 |
@@ -420,7 +425,7 @@ |
277 |
</section> |
278 |
|
279 |
<section> |
280 |
-<title>Some technical terms</title> |
281 |
+<title>Some Technical Terms</title> |
282 |
<body> |
283 |
|
284 |
<p> |
285 |
@@ -430,17 +435,17 @@ |
286 |
|
287 |
<p> |
288 |
First of all, the kernel has to be able to change the processor's frequency. |
289 |
-The <e>CPUfreq processor driver</e> knows the commands to do it on your CPU. |
290 |
+The <b>CPUfreq processor driver</b> knows the commands to do it on your CPU. |
291 |
Thus it's important to choose the right one in your kernel. You should |
292 |
already have done it above. Once the kernel knows how to change frequencies, |
293 |
it has to know which frequency it should set. This is done according to the |
294 |
-<e>policy</e> which consists of a <e>CPUfreq policy</e> and a |
295 |
-<e>governor</e>. A CPUfreq policy are just two numbers which define a range |
296 |
+<b>policy</b> which consists of a <b>CPUfreq policy</b> and a |
297 |
+<b>governor</b>. A CPUfreq policy are just two numbers which define a range |
298 |
the frequency has to stay between - minimal and maximal frequency. The |
299 |
governor now decides which of the available frequencies in between minimal |
300 |
-and maximal frequency to choose. For example, the <e>powersave governor</e> |
301 |
-always chooses the lowest frequency available, the <e>performance |
302 |
-governor</e> the highest one. The <e>userspace governor</e> makes no decision |
303 |
+and maximal frequency to choose. For example, the <b>powersave governor</b> |
304 |
+always chooses the lowest frequency available, the <b>performance |
305 |
+governor</b> the highest one. The <b>userspace governor</b> makes no decision |
306 |
but chooses whatever the user (or a program in userspace) wants - which means |
307 |
it reads the frequency from |
308 |
<path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</path>. |
309 |
@@ -449,7 +454,7 @@ |
310 |
<p> |
311 |
This doesn't sound like dynamic frequency changes yet and in fact it isn't. |
312 |
Dynamics however can be accomplished with various approaches. For example, |
313 |
-the <e>ondemand governor</e> makes its decisions depending on the current CPU |
314 |
+the <b>ondemand governor</b> makes its decisions depending on the current CPU |
315 |
load. The same is done by various userland tools like <c>cpudyn</c>, |
316 |
<c>cpufreqd</c>, <c>powernowd</c> and many more. ACPI events can be used to |
317 |
enable or disable dynamic frequency changes depending on power source. |
318 |
@@ -458,7 +463,7 @@ |
319 |
</body> |
320 |
</section> |
321 |
<section> |
322 |
-<title>Setting the frequency manually</title> |
323 |
+<title>Setting The Frequency Manually</title> |
324 |
<body> |
325 |
|
326 |
<p> |
327 |
@@ -471,8 +476,8 @@ |
328 |
|
329 |
<note> |
330 |
Not every laptop supports frequency scaling. If unsure, have a look at the list |
331 |
-of supported processors in the <e>Troubleshooting</e> section to verify your's |
332 |
-is supported. |
333 |
+of supported processors in the <uri link="#doc_chap8">Troubleshooting</uri> |
334 |
+section to verify yours is supported. |
335 |
</note> |
336 |
|
337 |
<p> |
338 |
@@ -508,8 +513,8 @@ |
339 |
Now play around with <c>cpufreq-set</c> to make sure frequency switching works. |
340 |
Run <c>cpufreq-set -g ondemand</c> for example to activate the ondemand |
341 |
governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as |
342 |
-expected, you might find help in the Troubleshooting section in the end of this |
343 |
-guide. |
344 |
+expected, you might find help in the <uri link="#doc_chap8">Troubleshooting section</uri> |
345 |
+in the end of this guide. |
346 |
</p> |
347 |
|
348 |
</body> |
349 |
@@ -523,8 +528,8 @@ |
350 |
set the appropriate frequency automatically. There are many different |
351 |
approaches to do this. The following table gives a quick overview to help you |
352 |
decide on one of them. It's roughly seperated in three categories |
353 |
-<e>kernel</e> for approaches that only need kernel support, <e>daemon</e> for |
354 |
-programs that run in the background and <e>graphical</e> for programs that |
355 |
+<b>kernel</b> for approaches that only need kernel support, <b>daemon</b> for |
356 |
+programs that run in the background and <b>graphical</b> for programs that |
357 |
provide a GUI for easy configuration and changes. |
358 |
</p> |
359 |
|
360 |
@@ -732,8 +737,8 @@ |
361 |
</pre> |
362 |
|
363 |
<p> |
364 |
-Now you can start the cpufreqd daemon. Add it to the <e>default</e> and |
365 |
-<e>battery</e> runlevel as well. |
366 |
+Now you can start the cpufreqd daemon. Add it to the <c>default</c> and |
367 |
+<c>battery</c> runlevel as well. |
368 |
</p> |
369 |
|
370 |
<pre caption="Starting cpufreqd"> |
371 |
@@ -757,10 +762,8 @@ |
372 |
|
373 |
</body> |
374 |
</section> |
375 |
- |
376 |
<section> |
377 |
<title>Verifying the result</title> |
378 |
- |
379 |
<body> |
380 |
|
381 |
<p> |
382 |
@@ -773,8 +776,8 @@ |
383 |
</pre> |
384 |
|
385 |
<p> |
386 |
-If <path>/proc/cpuinfo</path> doesn't get updated (see Troubleshooting), |
387 |
-monitor the CPU frequency with: |
388 |
+If <path>/proc/cpuinfo</path> doesn't get updated (see |
389 |
+<uri link="#doc_chap8">Troubleshooting</uri>), monitor the CPU frequency with: |
390 |
</p> |
391 |
|
392 |
<pre caption="Alternative CPU speed monitoring"> |
393 |
@@ -783,9 +786,9 @@ |
394 |
|
395 |
<p> |
396 |
Depending on your setup, CPU speed should increase on heavy load, decrease on |
397 |
-no activity or just stay at the same level. When using cpufreqd and verbosity |
398 |
-set to 5 or higher in <path>cpufreqd.conf</path> you'll get additional |
399 |
-information about what's happening reported to syslog. |
400 |
+no activity or just stay at the same level. When using <c>cpufreqd</c> and |
401 |
+verbosity set to 5 or higher in <path>cpufreqd.conf</path> you'll get additional |
402 |
+information about what's happening reported to <c>syslog</c>. |
403 |
</p> |
404 |
|
405 |
</body> |
406 |
@@ -853,10 +856,10 @@ |
407 |
<p> |
408 |
Probably more important is the backlight dimming. If you have access to the |
409 |
dimming settings via a tool, write a small script that dims the backlight in |
410 |
-battery mode and place it in your <e>battery</e> runlevel. The following script |
411 |
+battery mode and place it in your <c>battery</c> runlevel. The following script |
412 |
should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the |
413 |
appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops, install |
414 |
-<c>app-laptop/acpitool</c> and skip configuration of ibm_acpi as described below. |
415 |
+<c>app-laptop/acpitool</c> and skip configuration of <c>ibm_acpi</c> as described below. |
416 |
</p> |
417 |
|
418 |
<warn> |
419 |
@@ -872,10 +875,10 @@ |
420 |
|
421 |
<pre caption="automatically loading the ibm_acpi module"> |
422 |
<comment>(Please read the warnings above before doing this!)</comment> |
423 |
-<i># echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i> |
424 |
-<i># /sbin/modules-update</i> |
425 |
-<i># echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i> |
426 |
-<i># modprobe ibm_acpi</i> |
427 |
+# <i>echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i> |
428 |
+# <i>/sbin/modules-update</i> |
429 |
+# <i>echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i> |
430 |
+# <i>modprobe ibm_acpi</i> |
431 |
</pre> |
432 |
|
433 |
<p> |
434 |
@@ -939,9 +942,9 @@ |
435 |
</p> |
436 |
|
437 |
<pre caption="Enabling automatic brightness adjustment"> |
438 |
-<i># chmod +x /etc/init.d/lcd-brightness</i> |
439 |
-<i># rc-update add lcd-brightness battery</i> |
440 |
-<i># rc</i> |
441 |
+# <i>chmod +x /etc/init.d/lcd-brightness</i> |
442 |
+# <i>rc-update add lcd-brightness battery</i> |
443 |
+# <i>rc</i> |
444 |
</pre> |
445 |
|
446 |
</body> |
447 |
@@ -952,6 +955,7 @@ |
448 |
<title>Disk Power Management</title> |
449 |
<section> |
450 |
<body> |
451 |
+ |
452 |
<p> |
453 |
Hard disks consume less energy in sleep mode. Therefore it makes sense to |
454 |
activate power saving features whenever the hard disk is not used for a certain |
455 |
@@ -961,19 +965,18 @@ |
456 |
accesses a power outage or kernel crash will be more dangerous for data loss. |
457 |
If you don't like this, you have to make sure that there are no processes which |
458 |
write to your hard disk frequently. Afterwards you can enable power saving |
459 |
-features of your hard disk with hdparm as the second alternative. |
460 |
+features of your hard disk with <c>hdparm</c> as the second alternative. |
461 |
</p> |
462 |
|
463 |
</body> |
464 |
</section> |
465 |
- |
466 |
<section> |
467 |
<title>Increasing idle time - laptop-mode</title> |
468 |
<body> |
469 |
|
470 |
<p> |
471 |
Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches) |
472 |
-include the so-called <e>laptop-mode</e>. When activated, dirty buffers are |
473 |
+include the so-called <c>laptop-mode</c>. When activated, dirty buffers are |
474 |
written to disk on read calls or after 10 minutes (instead of 30 seconds). This |
475 |
minimizes the time the hard disk needs to be spun up. |
476 |
</p> |
477 |
@@ -994,12 +997,12 @@ |
478 |
<c>lm-profiler</c>. It will monitor your system's disk usage and running |
479 |
network services and suggests to disable unneeded ones. You can either disable |
480 |
them through laptop-mode-tools builtin runlevel support (which will be reverted |
481 |
-by Gentoo's <c>/sbin/rc</c>) or use your <e>default</e>/<e>battery</e> |
482 |
+by Gentoo's <c>/sbin/rc</c>) or use your <c>default</c>/<c>battery</c> |
483 |
runlevels (recommended). |
484 |
</p> |
485 |
|
486 |
<pre caption="Sample output from running lm-profiler"> |
487 |
-# lm-profiler |
488 |
+# <i>lm-profiler</i> |
489 |
Profiling session started. |
490 |
Time remaining: 600 seconds |
491 |
[4296896.602000] amarokapp |
492 |
@@ -1021,21 +1024,20 @@ |
493 |
Reason: standard recommendation (program may not be running) |
494 |
Init script: /etc/init.d/atd (GUESSED) |
495 |
|
496 |
-Do you want to disable this service in battery mode? [y/N]: n |
497 |
+Do you want to disable this service in battery mode? [y/N]: <i>n</i> |
498 |
</pre> |
499 |
|
500 |
<p> |
501 |
To disable atd as suggested in the example above, you would run <c>rc-update |
502 |
del atd battery</c>. Be careful not to disable services that are needed for |
503 |
-your system to run properly - lm-profiler is likely to generate some false |
504 |
+your system to run properly - <c>lm-profiler</c> is likely to generate some false |
505 |
positives. Do not disable a service if you are unsure whether it's needed. |
506 |
</p> |
507 |
|
508 |
</body> |
509 |
</section> |
510 |
- |
511 |
<section> |
512 |
-<title>Limiting write accesses</title> |
513 |
+<title>Limiting Write Accesses</title> |
514 |
<body> |
515 |
|
516 |
<p> |
517 |
@@ -1043,8 +1045,8 @@ |
518 |
services that write to your disk frequently - <c>syslogd</c> is a good |
519 |
candidate, for example. You probably don't want to shut it down completely, but |
520 |
it's possible to modify the config file so that "unnecessary" things don't get |
521 |
-logged and thus don't create disk traffic. Cups writes to disk periodically, so |
522 |
-consider shutting it down and only enable it manually when needed. |
523 |
+logged and thus don't create disk traffic. <c>Cups</c> writes to disk periodically, |
524 |
+so consider shutting it down and only enable it manually when needed. |
525 |
</p> |
526 |
|
527 |
<pre caption="Disabling cups in battery mode"> |
528 |
@@ -1059,13 +1061,12 @@ |
529 |
|
530 |
</body> |
531 |
</section> |
532 |
- |
533 |
<section> |
534 |
<title>hdparm</title> |
535 |
<body> |
536 |
|
537 |
<p> |
538 |
-The second possibility is using a small script and hdparm. Skip this if you |
539 |
+The second possibility is using a small script and <c>hdparm</c>. Skip this if you |
540 |
are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>: |
541 |
</p> |
542 |
|
543 |
@@ -1107,7 +1108,6 @@ |
544 |
|
545 |
</body> |
546 |
</section> |
547 |
- |
548 |
<section> |
549 |
<title>Other tricks</title> |
550 |
<body> |
551 |
@@ -1120,7 +1120,7 @@ |
552 |
|
553 |
<p> |
554 |
If you don't want to use laptop-mode, it's still possible to minimize disk |
555 |
-access by mounting certain directories as <e>tmpfs</e> - write accesses are not |
556 |
+access by mounting certain directories as <c>tmpfs</c> - write accesses are not |
557 |
stored on a disk, but in main memory and get lost with unmounting. Often it's |
558 |
useful to mount <path>/tmp</path> like this - you don't have to pay special |
559 |
attention as it gets cleared on every reboot regardless whether it was mounted |
560 |
@@ -1139,7 +1139,7 @@ |
561 |
unsure, don't try this at all, it can become a perfomance bottleneck easily. In |
562 |
case you want to mount <path>/var/log</path> like this, make sure to merge the |
563 |
log files to disk before unmounting. They are essential. Don't attempt to mount |
564 |
-/var/tmp like this. Portage uses it for compiling... |
565 |
+<path>/var/tmp</path> like this. Portage uses it for compiling... |
566 |
</warn> |
567 |
|
568 |
</body> |
569 |
@@ -1147,9 +1147,9 @@ |
570 |
</chapter> |
571 |
|
572 |
<chapter> |
573 |
-<title>Power Management for other devices</title> |
574 |
+<title>Power Management For Other Devices</title> |
575 |
<section> |
576 |
-<title>Graphics cards</title> |
577 |
+<title>Graphics Cards</title> |
578 |
<body> |
579 |
|
580 |
<p> |
581 |
@@ -1175,7 +1175,7 @@ |
582 |
|
583 |
<p> |
584 |
Wireless LAN cards consume quite a bit of energy. Put them in Power Management |
585 |
-mode in analogy to the pmg_hda script. |
586 |
+mode in analogy to the <c>pmg_hda</c> script. |
587 |
</p> |
588 |
|
589 |
<note> |
590 |
@@ -1242,7 +1242,7 @@ |
591 |
</chapter> |
592 |
|
593 |
<chapter> |
594 |
-<title>Sleep states: sleep, standby, suspend to disk</title> |
595 |
+<title>Sleep States: sleep, standby, and suspend to disk</title> |
596 |
<section> |
597 |
<body> |
598 |
|
599 |
@@ -1288,7 +1288,7 @@ |
600 |
</p> |
601 |
|
602 |
<pre caption="Installing the hibernate-script"> |
603 |
-<i># emerge hibernate-script</i> |
604 |
+# <i>emerge hibernate-script</i> |
605 |
</pre> |
606 |
|
607 |
<p> |
608 |
@@ -1309,11 +1309,11 @@ |
609 |
<p> |
610 |
Ready? Now is the last chance to backup any data you want to keep after |
611 |
executing the next command. Notice that you probably have to hit a special key |
612 |
-like <e>Fn</e> to resume from sleep. |
613 |
+like <c>Fn</c> to resume from sleep. |
614 |
</p> |
615 |
|
616 |
<pre caption="Calling sleep"> |
617 |
-<i># hibernate-ram</i> |
618 |
+# <i>hibernate-ram</i> |
619 |
</pre> |
620 |
|
621 |
<p> |
622 |
@@ -1391,7 +1391,7 @@ |
623 |
</p> |
624 |
|
625 |
<pre caption="Invalidating swsusp images during the boot process"> |
626 |
-<i># rc-update add hibernate-cleanup boot</i> |
627 |
+# <i>rc-update add hibernate-cleanup boot</i> |
628 |
</pre> |
629 |
|
630 |
<p> |
631 |
@@ -1412,9 +1412,9 @@ |
632 |
</p> |
633 |
|
634 |
<pre caption="Hibernating with swsusp"> |
635 |
-<i># nano -w /etc/hibernate.conf</i> |
636 |
+# <i>nano -w /etc/hibernate.conf</i> |
637 |
<comment>(Make sure you have a backup of your data)</comment> |
638 |
-<i># hibernate</i> |
639 |
+# <i>hibernate</i> |
640 |
</pre> |
641 |
|
642 |
<p> |
643 |
@@ -1433,31 +1433,31 @@ |
644 |
</p> |
645 |
|
646 |
<pre caption="Invalidating suspend2 images during the boot process"> |
647 |
-<i># rc-update add hibernate-cleanup boot</i> |
648 |
+# <i>rc-update add hibernate-cleanup boot</i> |
649 |
</pre> |
650 |
|
651 |
<p>Now edit <path>/etc/hibernate/hibernate.conf</path>, enable the |
652 |
-<e>suspend2</e> section and comment everything in the <e>sysfs_power_state</e> |
653 |
-and <e>acpi_sleep</e> sections. Do not enable the fbsplash part in global |
654 |
+<c>suspend2</c> section and comment everything in the <c>sysfs_power_state</c> |
655 |
+and <c>acpi_sleep</c> sections. Do not enable the <c>fbsplash</c> part in global |
656 |
options yet. |
657 |
</p> |
658 |
|
659 |
<pre caption="Hibernating with suspend2"> |
660 |
-<i># nano -w /etc/hibernate.conf</i> |
661 |
+# <i>nano -w /etc/hibernate.conf</i> |
662 |
<comment>(Make sure you have a backup of your data)</comment> |
663 |
-<i># hibernate</i> |
664 |
+# <i>hibernate</i> |
665 |
</pre> |
666 |
|
667 |
<p> |
668 |
-Please configure fbsplash now if you didn't do already. To enable fbsplash |
669 |
+Please configure <c>fbsplash</c> now if you didn't do already. To enable fbsplash |
670 |
support during hibernation, the <c>sys-apps/suspend2-userui</c> package is |
671 |
-needed. Additionally, you've got to enable the <e>fbsplash</e> USE flag. |
672 |
+needed. Additionally, you've got to enable the <c>fbsplash</c> USE flag. |
673 |
</p> |
674 |
|
675 |
<pre caption="Installing suspend2-userui"> |
676 |
-<i># mkdir -p /etc/portage</i> |
677 |
-<i># echo sys-apps/suspend2-userui fbsplash >> /etc/portage/package.use</i> |
678 |
-<i># emerge suspend2-userui</i> |
679 |
+# <i>mkdir -p /etc/portage</i> |
680 |
+# <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i> |
681 |
+# <i>emerge suspend2-userui</i> |
682 |
</pre> |
683 |
|
684 |
<p> |
685 |
@@ -1466,7 +1466,7 @@ |
686 |
</p> |
687 |
|
688 |
<pre caption="Using the livecd-2005.1 theme during hibernation"> |
689 |
-<i># ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i> |
690 |
+# <i>ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i> |
691 |
</pre> |
692 |
|
693 |
<p> |
694 |
@@ -1478,14 +1478,14 @@ |
695 |
</p> |
696 |
|
697 |
<pre caption="Adding suspend2ui_fbsplash to an initrd image"> |
698 |
-<i># mount /boot</i> |
699 |
-<i># mkdir ~/initrd.d</i> |
700 |
-<i># cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i> |
701 |
-<i># cd ~/initrd.d</i> |
702 |
-<i># gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i> |
703 |
-<i># rm fbsplash-emergence-1024x768</i> |
704 |
-<i># cp /usr/sbin/suspend2ui_fbsplash sbin/</i> |
705 |
-<i># find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i> |
706 |
+# <i>mount /boot</i> |
707 |
+# <i>mkdir ~/initrd.d</i> |
708 |
+# <i>cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i> |
709 |
+# <i>cd ~/initrd.d</i> |
710 |
+# <i>gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i> |
711 |
+# <i>rm fbsplash-emergence-1024x768</i> |
712 |
+# <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i> |
713 |
+# <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i> |
714 |
</pre> |
715 |
|
716 |
<p> |
717 |
@@ -1496,7 +1496,7 @@ |
718 |
</p> |
719 |
|
720 |
<pre caption="Test run for fbsplash hibernation"> |
721 |
-<i># suspend2ui_fbsplash -t</i> |
722 |
+# <i>suspend2ui_fbsplash -t</i> |
723 |
</pre> |
724 |
|
725 |
<p> |
726 |
@@ -1545,8 +1545,8 @@ |
727 |
</p> |
728 |
|
729 |
<p> |
730 |
-<e>Q:</e> My laptop supports frequency scaling, but according to /proc/cpuinfo |
731 |
-the speed never changes. |
732 |
+<e>Q:</e> My laptop supports frequency scaling, but according to |
733 |
+<path>/proc/cpuinfo</path> the speed never changes. |
734 |
</p> |
735 |
|
736 |
<p> |
737 |
@@ -1607,9 +1607,10 @@ |
738 |
</p> |
739 |
|
740 |
<p> |
741 |
-<e>A:</e> This message is generated by the /etc/acpi/default.sh script that is |
742 |
-shipped with acpid. You can safely ignore it. If you like to get rid of it, you |
743 |
-can comment the appropriate line in /etc/acpi/default.sh as shown below: |
744 |
+<e>A:</e> This message is generated by the <path>/etc/acpi/default.sh</path> script |
745 |
+that is shipped with acpid. You can safely ignore it. If you like to get rid of it, |
746 |
+you can comment the appropriate line in <path>/etc/acpi/default.sh</path> as shown |
747 |
+below: |
748 |
</p> |
749 |
|
750 |
<pre caption="Disabling warnings about unknown acpi events"> |
751 |
@@ -1626,13 +1627,13 @@ |
752 |
</p> |
753 |
|
754 |
<p> |
755 |
-<e>Q:</e> I activated the DynamicClocks option in <path>xorg.conf</path> and |
756 |
+<e>Q:</e> I activated the <c>DynamicClocks</c> option in <path>xorg.conf</path> and |
757 |
now X.org crashes / the screen stays black / my laptop doesn't shutdown |
758 |
properly. |
759 |
</p> |
760 |
|
761 |
<p> |
762 |
-<e>A:</e> This happens on some systems. You have to disable DynamicClocks. |
763 |
+<e>A:</e> This happens on some systems. You have to disable <c>DynamicClocks</c>. |
764 |
</p> |
765 |
|
766 |
<p> |
767 |
@@ -1684,8 +1685,8 @@ |
768 |
<e>A:</e> Don't fear to contact me, <mail link="earthwings@g.o">Dennis |
769 |
Nienhüser</mail>, directly. The |
770 |
<uri link="http://forums.gentoo.org">Gentoo Forums</uri> are a good place to |
771 |
-get help as well. If you prefer IRC, try the <e>#gentoo-laptop</e> channel at |
772 |
-<e>irc.freenode.net</e>. |
773 |
+get help as well. If you prefer IRC, try the <c>#gentoo-laptop</c> channel at |
774 |
+<uri link="irc://irc.freenode.net">irc.freenode.net</uri>. |
775 |
</p> |
776 |
|
777 |
</body> |
778 |
|
779 |
|
780 |
|
781 |
-- |
782 |
gentoo-doc-cvs@g.o mailing list |