1 |
nightmorph 06/02/12 11:53:08 |
2 |
|
3 |
Modified: xml/htdocs/doc/en power-management-guide.xml |
4 |
Log: |
5 |
Power management guide updated for bug 122017 |
6 |
|
7 |
Revision Changes Path |
8 |
1.17 +253 -123 xml/htdocs/doc/en/power-management-guide.xml |
9 |
|
10 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml?rev=1.17&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
11 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml?rev=1.17&content-type=text/plain&cvsroot=gentoo |
12 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/power-management-guide.xml.diff?r1=1.16&r2=1.17&cvsroot=gentoo |
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.16 |
18 |
retrieving revision 1.17 |
19 |
diff -u -r1.16 -r1.17 |
20 |
--- power-management-guide.xml 1 Jan 2006 11:51:43 -0000 1.16 |
21 |
+++ power-management-guide.xml 12 Feb 2006 11:53:08 -0000 1.17 |
22 |
@@ -1,11 +1,11 @@ |
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.16 2006/01/01 11:51:43 neysx Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.17 2006/02/12 11:53:08 nightmorph Exp $ --> |
27 |
<guide link="/doc/en/power-management-guide.xml"> |
28 |
<title>Power Management Guide</title> |
29 |
|
30 |
<author title="Author"> |
31 |
- <mail link="fragfred@×××.de">Dennis Nienhüser</mail> |
32 |
+ <mail link="earthwings@g.o">Dennis Nienhüser</mail> |
33 |
</author> |
34 |
|
35 |
<abstract> |
36 |
@@ -17,13 +17,12 @@ |
37 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
38 |
<license/> |
39 |
|
40 |
-<version>1.25</version> |
41 |
-<date>2005-10-02</date> |
42 |
+<version>1.26</version> |
43 |
+<date>2006-02-12</date> |
44 |
|
45 |
<chapter> |
46 |
<title>Introduction</title> |
47 |
<section> |
48 |
-<title>Why Power Management?</title> |
49 |
<body> |
50 |
|
51 |
<p> |
52 |
@@ -95,12 +94,11 @@ |
53 |
<chapter> |
54 |
<title>Prerequisites</title> |
55 |
<section> |
56 |
-<title>What has to be done first</title> |
57 |
<body> |
58 |
|
59 |
<p> |
60 |
-Before going into the details on making individual devices Power Management |
61 |
-aware, make sure certain requirements are met. After controlling the BIOS |
62 |
+Before discussing the details of making individual devices Power Management |
63 |
+aware, make sure certain requirements are met. After controlling BIOS |
64 |
settings, some kernel options want to be enabled - these are in short ACPI, |
65 |
sleep states and CPU frequency scaling. As power saving most of the time comes |
66 |
along with performance loss or increased latency, it should only be enabled |
67 |
@@ -125,6 +123,21 @@ |
68 |
</body> |
69 |
</section> |
70 |
<section> |
71 |
+<title>Setting USE flags</title> |
72 |
+<body> |
73 |
+ |
74 |
+<p> |
75 |
+Please check that the <c>acpi</c> USE flag is set in |
76 |
+<path>/etc/make.conf</path>. Other USE flags that might be interesting for your |
77 |
+system are <c>apm</c>, <c>lm_sensors</c>, <c>nforce2</c>, <c>nvidia</c>, |
78 |
+<c>pmu</c>. See <path>/usr/portage/profiles/use*.desc</path> for details. If |
79 |
+you forgot to set one of these flags, you can recompile affected packages using |
80 |
+the <c>--newuse</c> flag in <c>emerge</c>, see <c>man 1 emerge</c>. |
81 |
+</p> |
82 |
+ |
83 |
+</body> |
84 |
+</section> |
85 |
+<section> |
86 |
<title>Configuring the kernel</title> |
87 |
<body> |
88 |
|
89 |
@@ -282,27 +295,27 @@ |
90 |
|
91 |
if [ ! -d "/etc/runlevels/${RUNLEVEL_AC}" ] |
92 |
then |
93 |
- logger "${0}: Runlevel ${RUNLEVEL_AC} does not exist. Aborting." |
94 |
- exit 1 |
95 |
+ logger "${0}: Runlevel ${RUNLEVEL_AC} does not exist. Aborting." |
96 |
+ exit 1 |
97 |
fi |
98 |
|
99 |
if [ ! -d "/etc/runlevels/${RUNLEVEL_BATTERY}" ] |
100 |
then |
101 |
- logger "${0}: Runlevel ${RUNLEVEL_BATTERY} does not exist. Aborting." |
102 |
- exit 1 |
103 |
+ logger "${0}: Runlevel ${RUNLEVEL_BATTERY} does not exist. Aborting." |
104 |
+ exit 1 |
105 |
fi |
106 |
|
107 |
if on_ac_power |
108 |
then |
109 |
if [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]] |
110 |
- then |
111 |
- logger "Switching to ${RUNLEVEL_AC} runlevel" |
112 |
- /sbin/rc ${RUNLEVEL_AC} |
113 |
- fi |
114 |
+ then |
115 |
+ logger "Switching to ${RUNLEVEL_AC} runlevel" |
116 |
+ /sbin/rc ${RUNLEVEL_AC} |
117 |
+ fi |
118 |
elif [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]] |
119 |
then |
120 |
- logger "Switching to ${RUNLEVEL_BATTERY} runlevel" |
121 |
- /sbin/rc ${RUNLEVEL_BATTERY} |
122 |
+ logger "Switching to ${RUNLEVEL_BATTERY} runlevel" |
123 |
+ /sbin/rc ${RUNLEVEL_BATTERY} |
124 |
fi |
125 |
</pre> |
126 |
|
127 |
@@ -394,6 +407,19 @@ |
128 |
<chapter> |
129 |
<title>CPU Power Management</title> |
130 |
<section> |
131 |
+<body> |
132 |
+ |
133 |
+<p> |
134 |
+Mobile processors can operate at different frequencies. Some allow changing |
135 |
+voltage as well. Most of the time your CPU doesn't need to run at full speed |
136 |
+and scaling it down will save much energy - often without any performance |
137 |
+decrease. |
138 |
+</p> |
139 |
+ |
140 |
+</body> |
141 |
+</section> |
142 |
+ |
143 |
+<section> |
144 |
<title>Some technical terms</title> |
145 |
<body> |
146 |
|
147 |
@@ -554,11 +580,14 @@ |
148 |
<tr> |
149 |
<ti><uri link="http://sourceforge.net/projects/cpufreqd/">cpufreqd</uri></ti> |
150 |
<ti>Daemon</ti> |
151 |
- <ti>Battery state, CPU load, temperature, running programs</ti> |
152 |
+ <ti>Battery state, CPU load, temperature, running programs and more</ti> |
153 |
<ti>All available</ti> |
154 |
<ti>None</ti> |
155 |
<ti> |
156 |
- Sophisticated (but also complicated) setup. |
157 |
+ Sophisticated (but somewhat complicated) setup. Extendible through plugins |
158 |
+ like sensor monitoring (lm_sensors) or coordinating some NVidia based |
159 |
+ graphics card memory and core. Cpufreqd is SMP aware and can optionally be |
160 |
+ controlled manually at runtime. |
161 |
</ti> |
162 |
</tr> |
163 |
<tr> |
164 |
@@ -640,55 +669,64 @@ |
165 |
<c>cpufreqd</c> can be configured by editing <path>/etc/cpufreqd.conf</path>. |
166 |
The default one that ships with cpufreqd may look a bit confusing. I recommend |
167 |
replacing it with the one from Gentoo developer Henrik Brix Andersen (see |
168 |
-below). |
169 |
+below). Please notice that you need cpufreqd-2.0.0 or later. Earlier versions |
170 |
+have a different syntax for the config file. |
171 |
</p> |
172 |
|
173 |
-<pre caption="/etc/cpufreqd.conf"> |
174 |
+<pre caption="/etc/cpufreqd.conf (cpufreqd-2.0.0 and later)"> |
175 |
[General] |
176 |
pidfile=/var/run/cpufreqd.pid |
177 |
-poll_interval=2 |
178 |
-pm_type=acpi |
179 |
+poll_interval=3 |
180 |
+enable_plugins=acpi_ac, acpi_battery |
181 |
verbosity=5 |
182 |
+[/General] |
183 |
|
184 |
[Profile] |
185 |
name=ondemand |
186 |
minfreq=0% |
187 |
maxfreq=100% |
188 |
policy=ondemand |
189 |
+[/Profile] |
190 |
|
191 |
[Profile] |
192 |
name=conservative |
193 |
minfreq=0% |
194 |
maxfreq=100% |
195 |
policy=conservative |
196 |
+[/Profile] |
197 |
|
198 |
[Profile] |
199 |
name=powersave |
200 |
minfreq=0% |
201 |
maxfreq=100% |
202 |
policy=powersave |
203 |
+[/Profile] |
204 |
|
205 |
[Profile] |
206 |
name=performance |
207 |
minfreq=0% |
208 |
maxfreq=100% |
209 |
policy=performance |
210 |
+[/Profile] |
211 |
|
212 |
[Rule] |
213 |
name=battery |
214 |
ac=off |
215 |
profile=conservative |
216 |
+[/Rule] |
217 |
|
218 |
[Rule] |
219 |
name=battery_low |
220 |
ac=off |
221 |
battery_interval=0-10 |
222 |
profile=powersave |
223 |
+[/Rule] |
224 |
|
225 |
[Rule] |
226 |
name=ac |
227 |
ac=on |
228 |
profile=ondemand |
229 |
+[/Rule] |
230 |
</pre> |
231 |
|
232 |
<p> |
233 |
@@ -701,6 +739,15 @@ |
234 |
# <i>rc</i> |
235 |
</pre> |
236 |
|
237 |
+<p> |
238 |
+Sometimes it can be desirable to select another policy than the daemon chooses, |
239 |
+for example when battery power is low, but you know that AC will be available |
240 |
+soon. In that case you can turn on cpufreqd's manual mode with |
241 |
+<c>cpufreqd-set manual</c> and select one of your configured policies (as |
242 |
+listed by <c>cpufreqd-get</c>). You can leave manual mode by executing |
243 |
+<c>cpufreqd-set dynamic</c>. |
244 |
+</p> |
245 |
+ |
246 |
<warn> |
247 |
Do not run more than one of the above programs at the same time. It may cause |
248 |
confusion like switching between two frequencies all the time. |
249 |
@@ -746,7 +793,6 @@ |
250 |
<chapter> |
251 |
<title>LCD Power Management</title> |
252 |
<section> |
253 |
-<title>Energy consumer no. 1</title> |
254 |
<body> |
255 |
|
256 |
<p> |
257 |
@@ -757,13 +803,19 @@ |
258 |
possibility to control the backlight dimming. |
259 |
</p> |
260 |
|
261 |
+</body> |
262 |
+</section> |
263 |
+<section> |
264 |
+<title>Standby settings</title> |
265 |
+<body> |
266 |
+ |
267 |
<p> |
268 |
-First thing to check is the standby/suspend/off timings of the display. As this |
269 |
-depends heavily on your windowmanager, I'll let you figure it out yourself. |
270 |
-Just two common places: Blanking the terminal can be done with <c>setterm |
271 |
--blank <number-of-minutesM></c>, <c>setterm -powersave on</c> and |
272 |
-<c>setterm -powerdown <number-of-minutesM></c>. |
273 |
-For X.org, modify <path>/etc/X11/xorg.conf</path> similar to this: |
274 |
+The first thing to check is the standby/suspend/off timings of the display. As |
275 |
+this depends heavily on your windowmanager, I'll let you figure it out |
276 |
+yourself. Just two common places: Blanking the terminal can be done with |
277 |
+<c>setterm -blank <number-of-minutesM></c>, <c>setterm -powersave on</c> |
278 |
+and <c>setterm -powerdown <number-of-minutesM></c>. For X.org, modify |
279 |
+<path>/etc/X11/xorg.conf</path> similar to this: |
280 |
</p> |
281 |
|
282 |
<pre caption="LCD suspend settings in X.org and XFree86"> |
283 |
@@ -790,12 +842,19 @@ |
284 |
This is the same for XFree86 and <path>/etc/X11/XF86Config</path>. |
285 |
</p> |
286 |
|
287 |
+</body> |
288 |
+</section> |
289 |
+<section> |
290 |
+<title>Backlight dimming</title> |
291 |
+<body> |
292 |
+ |
293 |
<p> |
294 |
Probably more important is the backlight dimming. If you have access to the |
295 |
dimming settings via a tool, write a small script that dims the backlight in |
296 |
battery mode and place it in your <e>battery</e> runlevel. The following script |
297 |
-should work on most IBM Thinkpads. It needs the <c>app-laptop/ibm-acpi</c> |
298 |
-package or the appropriate option in your kernel has to be enabled. |
299 |
+should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the |
300 |
+appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops, install |
301 |
+<c>app-laptop/acpitool</c> and skip configuration of ibm_acpi as described below. |
302 |
</p> |
303 |
|
304 |
<warn> |
305 |
@@ -811,7 +870,6 @@ |
306 |
|
307 |
<pre caption="automatically loading the ibm_acpi module"> |
308 |
<comment>(Please read the warnings above before doing this!)</comment> |
309 |
-<i># emerge ibm-acpi</i> |
310 |
<i># echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i> |
311 |
<i># /sbin/modules-update</i> |
312 |
<i># echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i> |
313 |
@@ -827,7 +885,7 @@ |
314 |
|
315 |
<pre caption="/etc/conf.d/lcd-brightness"> |
316 |
<comment># See /proc/acpi/ibm/brightness for available values</comment> |
317 |
-<comment># Please read /usr/share/doc/ibm-acpi-*/README.gz</comment> |
318 |
+<comment># Please read /usr/src/linux/Documentation/ibm-acpi.txt</comment> |
319 |
|
320 |
<comment># brigthness level in ac mode. Default is 7.</comment> |
321 |
BRIGHTNESS_AC=7 |
322 |
@@ -852,9 +910,15 @@ |
323 |
ebegin "Setting LCD brightness" |
324 |
echo "level ${LEVEL}" > /proc/acpi/ibm/brightness |
325 |
eend $? |
326 |
+ elif [[ -e /usr/bin/acpitool && -n $(acpitool -T | grep "LCD brightness") ]] |
327 |
+ then |
328 |
+ ebegin "Setting LCD brightness" |
329 |
+ acpitool -l $LEVEL >/dev/null || ewarn "Unable to set lcd brightness" |
330 |
+ eend $? |
331 |
else |
332 |
ewarn "Setting LCD brightness is not supported." |
333 |
- ewarn "Check that ibm_acpi is loaded into the kernel" |
334 |
+ ewarn "For IBM Thinkpads, check that ibm_acpi is loaded into the kernel" |
335 |
+ ewarn "For Toshiba laptops, you've got to install app-laptop/acpitool" |
336 |
fi |
337 |
} |
338 |
|
339 |
@@ -885,59 +949,141 @@ |
340 |
<chapter> |
341 |
<title>Disk Power Management</title> |
342 |
<section> |
343 |
-<title>Sleep when idle</title> |
344 |
+<body> |
345 |
+<p> |
346 |
+Hard disks consume less energy in sleep mode. Therefore it makes sense to |
347 |
+activate power saving features whenever the hard disk is not used for a certain |
348 |
+amount of time. I'll show you two alternative possibilities to do it. First, |
349 |
+laptop-mode will save most energy due to several measures which prevent or at |
350 |
+least delay write accesses. The drawback is that due to the delayed write |
351 |
+accesses a power outage or kernel crash will be more dangerous for data loss. |
352 |
+If you don't like this, you have to make sure that there are no processes which |
353 |
+write to your hard disk frequently. Afterwards you can enable power saving |
354 |
+features of your hard disk with hdparm as the second alternative. |
355 |
+</p> |
356 |
+ |
357 |
+</body> |
358 |
+</section> |
359 |
+ |
360 |
+<section> |
361 |
+<title>Increasing idle time - laptop-mode</title> |
362 |
<body> |
363 |
|
364 |
<p> |
365 |
-Let's bring the hard disk to sleep as early as possible whenever it is not |
366 |
-needed. I'll show you two possibilities to do it. First <c>cpudyn</c> supports |
367 |
-Disk Power Management. Uncomment the lines in the "Disk Options" section in |
368 |
-<path>/etc/conf.d/cpudyn</path>. To put your first disk to sleep after 60 |
369 |
-seconds of no activity, you would modify it like this: |
370 |
+Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches) |
371 |
+include the so-called <e>laptop-mode</e>. When activated, dirty buffers are |
372 |
+written to disk on read calls or after 10 minutes (instead of 30 seconds). This |
373 |
+minimizes the time the hard disk needs to be spun up. |
374 |
</p> |
375 |
|
376 |
-<pre caption="Using cpudyn for disk standby"> |
377 |
-<comment>################################################ |
378 |
-# DISK OPTIONS |
379 |
-# (disabled by default) |
380 |
-################################################ |
381 |
+<pre caption="Automated start of laptop-mode"> |
382 |
+# <i>emerge laptop-mode-tools</i> |
383 |
+</pre> |
384 |
|
385 |
-# |
386 |
-# Timeout to put the disk in standby mode if there was no |
387 |
-# io during that period (in seconds) |
388 |
-# |
389 |
-</comment> |
390 |
-TIMEOUT=60 |
391 |
-<comment> |
392 |
-# |
393 |
-# Specified disks to spindown (comma separated devices) |
394 |
-# |
395 |
-</comment> |
396 |
-DISKS=/dev/hda |
397 |
+<p> |
398 |
+<c>laptop-mode-tools</c> has its configuration file in |
399 |
+<path>/etc/laptop-mode/laptop-mode.conf</path>. Adjust it the way you like it, |
400 |
+it's well commented. Run <c>rc-update add laptop_mode battery</c> to start it |
401 |
+automatically. |
402 |
+</p> |
403 |
+ |
404 |
+<p> |
405 |
+Recent versions (1.11 and later) of laptop-mode-tools include a new tool |
406 |
+<c>lm-profiler</c>. It will monitor your system's disk usage and running |
407 |
+network services and suggests to disable unneeded ones. You can either disable |
408 |
+them through laptop-mode-tools builtin runlevel support (which will be reverted |
409 |
+by Gentoo's <c>/sbin/rc</c>) or use your <e>default</e>/<e>battery</e> |
410 |
+runlevels (recommended). |
411 |
+</p> |
412 |
+ |
413 |
+<pre caption="Sample output from running lm-profiler"> |
414 |
+# lm-profiler |
415 |
+Profiling session started. |
416 |
+Time remaining: 600 seconds |
417 |
+[4296896.602000] amarokapp |
418 |
+Time remaining: 599 seconds |
419 |
+[4296897.714000] sort |
420 |
+[4296897.970000] mv |
421 |
+Time remaining: 598 seconds |
422 |
+Time remaining: 597 seconds |
423 |
+[4296900.482000] reiserfs/0 |
424 |
+</pre> |
425 |
+ |
426 |
+<p> |
427 |
+After profiling your system for ten minutes, lm-profiler will present a list of |
428 |
+services which might have caused disk accesses during that time. |
429 |
+</p> |
430 |
+ |
431 |
+<pre caption="lm-profiler suggests to disable some services"> |
432 |
+Program: "atd" |
433 |
+Reason: standard recommendation (program may not be running) |
434 |
+Init script: /etc/init.d/atd (GUESSED) |
435 |
+ |
436 |
+Do you want to disable this service in battery mode? [y/N]: n |
437 |
</pre> |
438 |
|
439 |
<p> |
440 |
-The second possibility is using a small script and hdparm. Create |
441 |
-<path>/etc/init.d/pm.hda</path> like this: |
442 |
+To disable atd as suggested in the example above, you would run <c>rc-update |
443 |
+del atd battery</c>. Be careful not to disable services that are needed for |
444 |
+your system to run properly - lm-profiler is likely to generate some false |
445 |
+positives. Do not disable a service if you are unsure whether it's needed. |
446 |
+</p> |
447 |
+ |
448 |
+</body> |
449 |
+</section> |
450 |
+ |
451 |
+<section> |
452 |
+<title>Limiting write accesses</title> |
453 |
+<body> |
454 |
+ |
455 |
+<p> |
456 |
+If you don't want to use laptop-mode, you must take special care to disable |
457 |
+services that write to your disk frequently - <c>syslogd</c> is a good |
458 |
+candidate, for example. You probably don't want to shut it down completely, but |
459 |
+it's possible to modify the config file so that "unnecessary" things don't get |
460 |
+logged and thus don't create disk traffic. Cups writes to disk periodically, so |
461 |
+consider shutting it down and only enable it manually when needed. |
462 |
+</p> |
463 |
+ |
464 |
+<pre caption="Disabling cups in battery mode"> |
465 |
+# <i>rc-update del cupsd battery</i> |
466 |
+</pre> |
467 |
+ |
468 |
+<p> |
469 |
+You can also use <c>lm-profiler</c> from laptop-mode-tools (see above) to find |
470 |
+services to disable. Once you eliminated all of them, go on with configuring |
471 |
+hdparm. |
472 |
+</p> |
473 |
+ |
474 |
+</body> |
475 |
+</section> |
476 |
+ |
477 |
+<section> |
478 |
+<title>hdparm</title> |
479 |
+<body> |
480 |
+ |
481 |
+<p> |
482 |
+The second possibility is using a small script and hdparm. Skip this if you |
483 |
+are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>: |
484 |
</p> |
485 |
|
486 |
<pre caption="Using hdparm for disk standby"> |
487 |
#!/sbin/runscript |
488 |
|
489 |
depend() { |
490 |
- after hdparm |
491 |
+after hdparm |
492 |
} |
493 |
|
494 |
start() { |
495 |
- ebegin "Activating Power Management for Hard Drives" |
496 |
- hdparm -q -S12 /dev/hda |
497 |
- eend $? |
498 |
+ebegin "Activating Power Management for Hard Drives" |
499 |
+hdparm -q -S12 /dev/hda |
500 |
+eend $? |
501 |
} |
502 |
|
503 |
stop () { |
504 |
- ebegin "Deactivating Power Management for Hard Drives" |
505 |
- hdparm -q -S253 /dev/hda |
506 |
- eend $? |
507 |
+ebegin "Deactivating Power Management for Hard Drives" |
508 |
+hdparm -q -S253 /dev/hda |
509 |
+eend $? |
510 |
} |
511 |
</pre> |
512 |
|
513 |
@@ -947,9 +1093,9 @@ |
514 |
</p> |
515 |
|
516 |
<pre caption="Automate disk standby settings"> |
517 |
-# <i>chmod +x /etc/init.d/pm.hda</i> |
518 |
+# <i>chmod +x /etc/init.d/pmg_hda</i> |
519 |
# <i>/sbin/depscan.sh</i> |
520 |
-# <i>rc-update add pm.hda battery</i> |
521 |
+# <i>rc-update add pmg_hda battery</i> |
522 |
</pre> |
523 |
|
524 |
<impo> |
525 |
@@ -959,49 +1105,12 @@ |
526 |
|
527 |
</body> |
528 |
</section> |
529 |
-<section> |
530 |
-<title>Increasing idle time - laptop-mode</title> |
531 |
-<body> |
532 |
- |
533 |
-<p> |
534 |
-Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches) |
535 |
-include the so-called <e>laptop-mode</e>. When activated, dirty buffers are |
536 |
-written to disk on read calls or after 10 minutes (instead of 30 seconds). This |
537 |
-minimizes the time the hard disk needs to be spun up. |
538 |
-</p> |
539 |
|
540 |
-<pre caption="Automated start of laptop-mode"> |
541 |
-# <i>emerge laptop-mode-tools</i> |
542 |
-</pre> |
543 |
- |
544 |
-<p> |
545 |
-<c>laptop-mode-tools</c> has it's configuration file in |
546 |
-<path>/etc/laptop-mode/laptop-mode.conf</path>. Adjust it the way you like it, |
547 |
-it's well commented. Run <c>rc-update add laptop_mode battery</c> to start it |
548 |
-automatically. |
549 |
-</p> |
550 |
- |
551 |
-</body> |
552 |
-</section> |
553 |
<section> |
554 |
<title>Other tricks</title> |
555 |
<body> |
556 |
|
557 |
<p> |
558 |
-Besides putting your disk to sleep state as early as possible, it is a good |
559 |
-idea to minimize disk accesses. Have a look at processes that write to your |
560 |
-disk frequently - the syslogd is a good candidate. You probably don't want to |
561 |
-shut it down completely, but it's possible to modify the config file so that |
562 |
-"unnecessary" things don't get logged and thus don't create disk traffic. Cups |
563 |
-writes to disk periodically, so consider shutting it down and only enable it |
564 |
-manually when needed. |
565 |
-</p> |
566 |
- |
567 |
-<pre caption="Disabling cups in battery mode"> |
568 |
-# <i>rc-update del cupsd battery</i> |
569 |
-</pre> |
570 |
- |
571 |
-<p> |
572 |
Another possibility is to deactivate swap in battery mode. Before writing a |
573 |
swapon/swapoff switcher, make sure there is enough RAM and swap isn't used |
574 |
heavily, otherwise you'll be in big problems. |
575 |
@@ -1063,15 +1172,20 @@ |
576 |
<body> |
577 |
|
578 |
<p> |
579 |
-Wireless LAN cards consume quite a few energy. Put them in Power Management |
580 |
-mode in analogy to the pm.hda script. |
581 |
+Wireless LAN cards consume quite a bit of energy. Put them in Power Management |
582 |
+mode in analogy to the pmg_hda script. |
583 |
</p> |
584 |
|
585 |
+<note> |
586 |
+This script assumes your wireless interface is called <c>wlan0</c>; replace |
587 |
+this with the actual name of your interface. |
588 |
+</note> |
589 |
+ |
590 |
<pre caption="WLAN Power Management automated"> |
591 |
#!/sbin/runscript |
592 |
start() { |
593 |
ebegin "Activating Power Management for Wireless LAN" |
594 |
- iwconfig wlan0 power on power max period 3 |
595 |
+ iwconfig wlan0 power on |
596 |
eend $? |
597 |
} |
598 |
|
599 |
@@ -1083,18 +1197,18 @@ |
600 |
</pre> |
601 |
|
602 |
<p> |
603 |
-Starting this script will put wlan0 in Power Management mode, going to sleep at |
604 |
-the latest three seconds after no traffic. |
605 |
-Save it as <path>/etc/init.d/pm.wlan0</path> and add it to the battery runlevel |
606 |
-like the disk script above. See <c>man iwconfig</c> for details and more |
607 |
-options. If your driver and access point support changing the beacon time, this |
608 |
-is a good starting point to save even more energy. |
609 |
+Starting this script will activate power saving features for wlan0. Save it as |
610 |
+<path>/etc/init.d/pmg_wlan0</path> and add it to the battery runlevel like the |
611 |
+disk script above. See <c>man iwconfig</c> for details and more options like |
612 |
+the period between wakeups or timeout settings. If your driver and access point |
613 |
+support changing the beacon time, this is a good starting point to save even |
614 |
+more energy. |
615 |
</p> |
616 |
|
617 |
<pre caption="Power Management for WLAN"> |
618 |
-# <i>chmod +x /etc/init.d/pm.wlan0</i> |
619 |
+# <i>chmod +x /etc/init.d/pmg_wlan0</i> |
620 |
# <i>/sbin/depscan.sh</i> |
621 |
-# <i>rc-update add pm.wlan0 battery</i> |
622 |
+# <i>rc-update add pmg_wlan0 battery</i> |
623 |
</pre> |
624 |
|
625 |
</body> |
626 |
@@ -1128,7 +1242,6 @@ |
627 |
<chapter> |
628 |
<title>Sleep states: sleep, standby, suspend to disk</title> |
629 |
<section> |
630 |
-<title>Overview</title> |
631 |
<body> |
632 |
|
633 |
<p> |
634 |
@@ -1167,7 +1280,7 @@ |
635 |
</pre> |
636 |
|
637 |
<p> |
638 |
-Once your kernel is prepared like above, you can use the |
639 |
+Once your kernel is properly configured, you can use the |
640 |
<c>hibernate-script</c> to activate suspend or sleep mode. Let's install that |
641 |
first. |
642 |
</p> |
643 |
@@ -1396,7 +1509,6 @@ |
644 |
<chapter> |
645 |
<title>Troubleshooting</title> |
646 |
<section> |
647 |
-<title>If things go wrong...</title> |
648 |
<body> |
649 |
|
650 |
<p> |
651 |
@@ -1488,6 +1600,21 @@ |
652 |
</p> |
653 |
|
654 |
<p> |
655 |
+<e>Q:</e> My system logger reports things like "logger: ACPI group battery / action |
656 |
+battery is not defined". |
657 |
+</p> |
658 |
+ |
659 |
+<p> |
660 |
+<e>A:</e> This message is generated by the /etc/acpi/default.sh script that is |
661 |
+shipped with acpid. You can safely ignore it. If you like to get rid of it, you |
662 |
+can comment the appropriate line in /etc/acpi/default.sh as shown below: |
663 |
+</p> |
664 |
+ |
665 |
+<pre caption="Disabling warnings about unknown acpi events"> |
666 |
+ *) # logger "ACPI action $action is not defined" |
667 |
+</pre> |
668 |
+ |
669 |
+<p> |
670 |
<e>Q:</e> I have a Dell Inspiron 51XX and I don't get any ACPI events. |
671 |
</p> |
672 |
|
673 |
@@ -1552,8 +1679,11 @@ |
674 |
</p> |
675 |
|
676 |
<p> |
677 |
-<e>A:</e> Don't fear to contact me, <mail link="fragfred@×××.de">Dennis |
678 |
-Nienhüser</mail>, directly. |
679 |
+<e>A:</e> Don't fear to contact me, <mail link="earthwings@g.o">Dennis |
680 |
+Nienhüser</mail>, directly. The |
681 |
+<uri link="http://forums.gentoo.org">Gentoo Forums</uri> are a good place to |
682 |
+get help as well. If you prefer IRC, try the <e>#gentoo-laptop</e> channel at |
683 |
+<e>irc.freenode.net</e>. |
684 |
</p> |
685 |
|
686 |
</body> |
687 |
|
688 |
|
689 |
|
690 |
-- |
691 |
gentoo-doc-cvs@g.o mailing list |