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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.26 - (hide annotations) (download) (as text)
Mon Apr 16 05:39:54 2007 UTC (8 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.25: +7 -4 lines
File MIME type: application/xml
changed modules-update command to update-modules, per the runtime warning about modules-update being deprecated. weird. seems update-modules used to be the name anyway years ago, see lpi 101 part 2.

1 swift 1.1 <?xml version='1.0' encoding="UTF-8"?>
2     <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 nightmorph 1.26 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.25 2007/03/15 19:24:34 nightmorph Exp $ -->
4 so 1.15 <guide link="/doc/en/power-management-guide.xml">
5 swift 1.1 <title>Power Management Guide</title>
6    
7 swift 1.4 <author title="Author">
8 nightmorph 1.17 <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail>
9 swift 1.1 </author>
10 rane 1.19 <author title="Editor">
11     <mail link="chriswhite@gentoo.org">Chris White</mail>
12     </author>
13 nightmorph 1.26 <author title="Editor">
14     <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
15     </author>
16 swift 1.1
17     <abstract>
18     Power Management is the key to extend battery run time on mobile systems like
19     laptops. This guide assists you setting it up on your laptop.
20     </abstract>
21    
22     <!-- The content of this document is licensed under the CC-BY-SA license -->
23 so 1.15 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
24 swift 1.1 <license/>
25    
26 nightmorph 1.26 <version>1.32</version>
27     <date>2007-04-15</date>
28 swift 1.1
29     <chapter>
30     <title>Introduction</title>
31     <section>
32     <body>
33    
34     <p>
35 so 1.15 Capacity and lifetime of laptop batteries have improved much in the last years.
36 swift 1.1 Nevertheless modern processors consume much more energy than older ones and
37     each laptop generation introduces more devices hungry for energy. That's why
38     Power Management is more important than ever. Increasing battery run time
39     doesn't necessarily mean buying another battery. Much can be achieved applying
40     intelligent Power Management policies.
41     </p>
42    
43     </body>
44     </section>
45     <section>
46 rane 1.19 <title>A Quick Overview</title>
47 swift 1.1 <body>
48    
49     <p>
50     Please notice that this guide describes Power Management for <e>laptops</e>.
51     While some sections might also suite for <e>servers</e>, others do not and may
52     even cause harm. Please do not apply anything from this guide to a server
53     unless you really know what you are doing.
54     </p>
55    
56     <p>
57     As this guide has become rather long, here's a short overview helping you to
58     find your way through it.
59     </p>
60    
61     <p>
62 rane 1.19 The <uri link="#doc_chap2">Prerequisites</uri> chapter talks about some
63     requirements that should be met before any of the following device individual
64     sections will work. This includes BIOS settings, kernel configuration and some
65     simplifications in user land. The following three chapters focus on devices
66     that typically consume most energy - processor, display and hard drive. Each
67     can be configured seperately. <uri link="#doc_chap3">CPU Power Management</uri>
68     shows how to adjust the processor's frequency to save a maximum of energy
69 rane 1.21 without losing too much performance. A few different tricks prevent your hard
70 rane 1.19 drive from working unnecessarily often in <uri link="#doc_chap5">Disk Power
71     Management</uri> (decreasing noise level as a nice side effect). Some notes on
72 rane 1.20 graphics cards, Wireless LAN and USB finish the device section in <uri
73     link="#doc_chap6">Power Management For Other Devices</uri> while another
74 rane 1.19 chapter is dedicated to the (rather experimental) <uri link="#doc_chap7">sleep
75 rane 1.20 states</uri>. Last not least <uri link="#doc_chap8">Troubleshooting</uri> lists
76     common pitfalls.
77 swift 1.1 </p>
78    
79     </body>
80     </section>
81     <section>
82 rane 1.19 <title>Power Budget For Each Component</title>
83 swift 1.1 <body>
84    
85 swift 1.2 <figure link="/images/energy-budget.png" short="Which component consumes how
86 swift 1.1 much energy?" caption="Power budget for each component"/>
87    
88     <p>
89     Nearly every component can operate in different states - off, sleep, idle,
90     active to name a few - consuming a different amount of energy. Major parts are
91     consumed by the LCD display, CPU, chipset and hard drives. Often one is able to
92     activate OS-independent Power Management in the BIOS, but an intelligent setup
93     in the operating system adapting to different situations can achieve much more.
94     </p>
95    
96     </body>
97     </section>
98     </chapter>
99    
100     <chapter>
101     <title>Prerequisites</title>
102     <section>
103     <body>
104    
105     <p>
106 nightmorph 1.17 Before discussing the details of making individual devices Power Management
107 rane 1.20 aware, make sure certain requirements are met. After controlling BIOS settings,
108     some kernel options want to be enabled - these are in short ACPI, sleep states
109     and CPU frequency scaling. As power saving most of the time comes along with
110     performance loss or increased latency, it should only be enabled when running
111     on batteries. That's where a new runlevel <e>battery</e> comes in handy.
112 swift 1.1 </p>
113    
114     </body>
115     </section>
116     <section>
117 rane 1.19 <title>The BIOS Part</title>
118 swift 1.1 <body>
119    
120     <p>
121     First have a look into your BIOS Power Management settings. The best way is to
122     combine BIOS and operating system policies, but for the moment it's better to
123     disable most of the BIOS part. This makes sure it doesn't interfere with your
124     policies. Don't forget to re-check BIOS settings after you configured
125     everything else.
126     </p>
127    
128     </body>
129     </section>
130     <section>
131 rane 1.19 <title>Setting USE Flags</title>
132 nightmorph 1.17 <body>
133    
134     <p>
135     Please check that the <c>acpi</c> USE flag is set in
136     <path>/etc/make.conf</path>. Other USE flags that might be interesting for your
137     system are <c>apm</c>, <c>lm_sensors</c>, <c>nforce2</c>, <c>nvidia</c>,
138     <c>pmu</c>. See <path>/usr/portage/profiles/use*.desc</path> for details. If
139     you forgot to set one of these flags, you can recompile affected packages using
140 rane 1.19 the <c>--newuse</c> flag in <c>emerge</c>, see <c>man emerge</c>.
141 nightmorph 1.17 </p>
142    
143     </body>
144     </section>
145     <section>
146 rane 1.19 <title>Configuring The Kernel</title>
147 swift 1.1 <body>
148    
149     <p>
150     ACPI (Advanced Configuration and Power Interface) support in the kernel is
151     still work in progress. Using a recent kernel will make sure you'll get the
152     most out of it.
153     </p>
154    
155     <p>
156 rane 1.20 There are different kernel sources in Portage. I'd recommend using
157 so 1.15 <c>gentoo-sources</c> or <c>suspend2-sources</c>. The latter contains patches
158 rane 1.19 for Software Suspend 2, see the chapter about <uri link="#doc_chap7">sleep
159     states</uri> for more details. When configuring the kernel, activate at least
160     these options:
161 swift 1.1 </p>
162    
163     <pre caption="Minimum kernel setup for Power Management (Kernel 2.6)">
164     Power Management Options ---&gt;
165     [*] Power Management Support
166     [ ] Software Suspend
167    
168     ACPI( Advanced Configuration and Power Interface ) Support ---&gt;
169     [*] ACPI Support
170     [ ] Sleep States
171 so 1.15 [ ] /proc/acpi/sleep (deprecated)
172 neysx 1.12 [*] AC Adapter
173     [*] Battery
174 swift 1.1 &lt;M&gt; Button
175 so 1.15 &lt;M&gt; Video
176     [ ] Generic Hotkey
177 swift 1.1 &lt;M&gt; Fan
178     &lt;M&gt; Processor
179     &lt;M&gt; Thermal Zone
180     &lt; &gt; ASUS/Medion Laptop Extras
181 so 1.15 &lt; &gt; IBM ThinkPad Laptop Extras
182 swift 1.1 &lt; &gt; Toshiba Laptop Extras
183 so 1.15 (0) Disable ACPI for systems before Jan 1st this year
184 swift 1.1 [ ] Debug Statements
185 so 1.15 [*] Power Management Timer Support
186     &lt; &gt; ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)
187 rane 1.20
188 swift 1.1 CPU Frequency Scaling ---&gt;
189     [*] CPU Frequency scaling
190 so 1.15 [ ] Enable CPUfreq debugging
191     &lt; &gt; CPU frequency translation statistics
192     [ ] CPU frequency translation statistics details
193 swift 1.1 Default CPUFreq governor (userspace)
194     &lt;*&gt; 'performance' governor
195     &lt;*&gt; 'powersave' governor
196 swift 1.8 &lt;*&gt; 'ondemand' cpufreq policy governor
197 so 1.15 &lt;*&gt; 'conservative' cpufreq governor
198 swift 1.1 &lt;*&gt; CPU frequency table helpers
199     &lt;M&gt; ACPI Processor P-States driver
200     &lt;*&gt; <i>CPUFreq driver for your processor</i>
201     </pre>
202    
203     <p>
204 so 1.15 Decide yourself whether you want to enable Software Suspend, and Sleep States
205     (see below). If you own an ASUS, Medion, IBM Thinkpad or Toshiba laptop, enable
206 neysx 1.12 the appropriate section.
207 swift 1.8 </p>
208    
209     <p>
210 rane 1.20 The kernel has to know how to enable CPU frequency scaling on your processor.
211     As each type of CPU has a different interface, you've got to choose the right
212 rane 1.19 driver for your processor. Be careful here - enabling <c>Intel Pentium 4 clock
213     modulation</c> on a Pentium M system will lead to strange results for example.
214 swift 1.8 Consult the kernel documentation if you're unsure which one to take.
215 swift 1.1 </p>
216    
217     <p>
218     Compile your kernel, make sure the right modules get loaded at startup and boot
219 rane 1.20 into your new ACPI-enabled kernel. Next run <c>emerge sys-power/acpid</c> to
220     get the acpi daemon. This one informs you about events like switching from AC
221     to battery or closing the lid. Make sure the modules are loaded if you didn't
222     compile them into the kernel and start acpid by executing <c>/etc/init.d/acpid
223     start</c>. Run <c>rc-update add acpid default</c> to load it on startup. You'll
224     soon see how to use it.
225 swift 1.1 </p>
226    
227     <pre caption="Installing acpid">
228 yoswink 1.10 # <i>emerge sys-power/acpid</i>
229 swift 1.1 # <i>/etc/init.d/acpid start</i>
230     # <i>rc-update add acpid default</i>
231     </pre>
232    
233     </body>
234     </section>
235     <section>
236 rane 1.19 <title>Creating A "battery" Runlevel</title>
237 swift 1.1 <body>
238    
239     <p>
240     The default policy will be to enable Power Management only when needed -
241     running on batteries. To make the switch between AC and battery convenient,
242 rane 1.19 create a runlevel <c>battery</c> that holds all the scripts starting and
243 swift 1.1 stopping Power Management.
244     </p>
245    
246     <note>
247     You can safely skip this section if you don't like the idea of having another
248     runlevel. However, skipping this step will make the rest a bit trickier to set
249 rane 1.19 up. The next sections assume a runlevel <c>battery</c> exists.
250 swift 1.1 </note>
251    
252     <pre caption="Creating a battery runlevel">
253     # <i>cd /etc/runlevels</i>
254     # <i>cp -a default battery</i>
255     </pre>
256    
257     <p>
258 rane 1.19 Finished. Your new runlevel <c>battery</c> contains everything like
259     <c>default</c>, but there is no automatic switch between both yet. Time to
260 swift 1.1 change it.
261     </p>
262    
263     </body>
264     </section>
265     <section>
266 rane 1.19 <title>Reacting On ACPI Events</title>
267 swift 1.1 <body>
268    
269     <p>
270     Typical ACPI events are closing the lid, changing the power source or pressing
271 swift 1.8 the sleep button. An important event is changing the power source, which should
272 so 1.15 cause a runlevel switch. A small script will take care of it.
273     </p>
274    
275     <p>
276     First you need a script which changes the runlevel to <c>default</c>
277     respectively <c>battery</c> depending on the power source. The script uses the
278     <c>on_ac_power</c> command from <c>sys-power/powermgmt-base</c> - make sure the
279     package is installed on your system.
280     </p>
281    
282     <pre caption="Installing powermgt-base">
283 rane 1.19 # <i>emerge powermgmt-base</i>
284 so 1.15 </pre>
285    
286     <p>
287 rane 1.20 You are now able to determine the power source by executing <c>on_ac_power
288     &amp;&amp; echo AC available || echo Running on batteries</c> in a shell. The
289     script below is responsible for changing runlevels. Save it as
290 so 1.15 <path>/etc/acpi/actions/pmg_switch_runlevel.sh</path>.
291 swift 1.8 </p>
292    
293 neysx 1.12 <pre caption="/etc/acpi/actions/pmg_switch_runlevel.sh">
294 swift 1.8 #!/bin/bash
295    
296 neysx 1.12 <comment># BEGIN configuration</comment>
297 swift 1.8 RUNLEVEL_AC="default"
298     RUNLEVEL_BATTERY="battery"
299 neysx 1.12 <comment># END configuration</comment>
300 swift 1.8
301 swift 1.1
302 neysx 1.12 if [ ! -d "/etc/runlevels/${RUNLEVEL_AC}" ]
303     then
304 nightmorph 1.17 logger "${0}: Runlevel ${RUNLEVEL_AC} does not exist. Aborting."
305     exit 1
306 neysx 1.12 fi
307 swift 1.8
308 neysx 1.12 if [ ! -d "/etc/runlevels/${RUNLEVEL_BATTERY}" ]
309     then
310 nightmorph 1.17 logger "${0}: Runlevel ${RUNLEVEL_BATTERY} does not exist. Aborting."
311     exit 1
312 neysx 1.12 fi
313 swift 1.1
314 neysx 1.12 if on_ac_power
315     then
316 rane 1.19 if [[ "$(&lt;/var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]]
317 nightmorph 1.17 then
318     logger "Switching to ${RUNLEVEL_AC} runlevel"
319     /sbin/rc ${RUNLEVEL_AC}
320     fi
321 rane 1.19 elif [[ "$(&lt;/var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]]
322 neysx 1.12 then
323 nightmorph 1.17 logger "Switching to ${RUNLEVEL_BATTERY} runlevel"
324     /sbin/rc ${RUNLEVEL_BATTERY}
325 neysx 1.12 fi
326 swift 1.8 </pre>
327    
328 so 1.15 <p>
329     Dont forget to run <c>chmod +x /etc/acpi/actions/pmg_switch_runlevel.sh</c> to
330     make the script executable. The last thing that needs to be done is calling the
331     script whenever the power source changes. That's done by catching ACPI events
332     with the help of <c>acpid</c>. First you need to know which events are
333     generated when the power source changes. The events are called
334 rane 1.19 <c>ac_adapter</c> and <c>battery</c> on most laptops, but it might be different
335 so 1.15 on yours.
336     </p>
337    
338     <pre caption="Determining ACPI events for changing the power source">
339 rane 1.19 # <i>tail -f /var/log/acpid | grep "received event"</i>
340 so 1.15 </pre>
341    
342     <p>
343 rane 1.20 Run the command above and pull the power cable. You should see something like
344     this:
345 so 1.15 </p>
346    
347     <pre caption="Sample output for power source changes">
348     [Tue Sep 20 17:39:06 2005] received event "ac_adapter AC 00000080 00000000"
349     [Tue Sep 20 17:39:06 2005] received event "battery BAT0 00000080 00000001"
350     </pre>
351    
352     <p>
353 rane 1.19 The interesting part is the quoted string after <c>received event</c>. It will
354 so 1.15 be matched by the event line in the files you are going to create below. Don't
355     worry if your system generates multiple events or always the same. As long as
356     any event is generated, runlevel changing will work.
357     </p>
358    
359 swift 1.8 <pre caption="/etc/acpi/events/pmg_ac_adapter">
360 neysx 1.12 <comment># replace "ac_adapter" below with the event generated on your laptop</comment>
361 so 1.15 <comment># For example, ac_adapter.* will match ac_adapter AC 00000080 00000000</comment>
362 swift 1.8 event=ac_adapter.*
363 neysx 1.12 action=/etc/acpi/actions/pmg_switch_runlevel.sh %e
364 swift 1.8 </pre>
365    
366     <pre caption="/etc/acpi/events/pmg_battery">
367 neysx 1.12 <comment># replace "battery" below with the event generated on your laptop</comment>
368 so 1.15 <comment># For example, battery.* will match battery BAT0 00000080 00000001</comment>
369 swift 1.8 event=battery.*
370 neysx 1.12 action=/etc/acpi/actions/pmg_switch_runlevel.sh %e
371 swift 1.8 </pre>
372 swift 1.1
373 swift 1.8 <p>
374 so 1.15 Finally acpid has to be restarted to recognize the changes.
375 swift 1.8 </p>
376 swift 1.1
377 swift 1.8 <pre caption="Finishing runlevel switching with acpid">
378 rane 1.19 # <i>/etc/init.d/acpid restart</i>
379 swift 1.1 </pre>
380    
381     <p>
382     Give it a try: Plug AC in and out and watch syslog for the "Switching to AC
383 rane 1.20 mode" or "Switching to battery mode" messages. See the <uri
384     link="#doc_chap8">Troubleshooting section</uri> if the script is not able to
385     detect the power source correctly.
386 swift 1.1 </p>
387    
388     <p>
389     Due to the nature of the event mechanism, your laptop will boot into runlevel
390 rane 1.19 <c>default</c> regardless of the AC/battery state. This is fine when running
391 rane 1.20 from AC, but we'd like to boot into the battery runlevel otherwise. One
392     solution would be to add another entry to the boot loader with the parameter
393 so 1.15 <c>softlevel=battery</c>, but it's likely to forget choosing it. A better way
394 rane 1.20 is faking an ACPI event in the end of the boot process and letting
395     <path>pmg_switch_runlevel.sh</path> script decide whether a runlevel change is
396     necessary. Open <path>/etc/conf.d/local.start</path> in your favourite editor
397     and add these lines:
398 swift 1.1 </p>
399    
400 so 1.15 <pre caption="Runlevel adjustment at boot time by editing local.start">
401 swift 1.1 <comment># Fake acpi event to switch runlevel if running on batteries</comment>
402 neysx 1.12 /etc/acpi/actions/pmg_switch_runlevel.sh "battery/battery"
403 swift 1.1 </pre>
404    
405     <p>
406 rane 1.20 Prepared like this you can activate Power Management policies for individual
407 swift 1.1 devices.
408     </p>
409    
410     </body>
411     </section>
412     </chapter>
413    
414     <chapter>
415     <title>CPU Power Management</title>
416     <section>
417 nightmorph 1.17 <body>
418    
419     <p>
420     Mobile processors can operate at different frequencies. Some allow changing
421     voltage as well. Most of the time your CPU doesn't need to run at full speed
422     and scaling it down will save much energy - often without any performance
423     decrease.
424     </p>
425    
426     </body>
427     </section>
428     <section>
429 rane 1.19 <title>Some Technical Terms</title>
430 swift 1.8 <body>
431    
432     <p>
433     CPU frequency scaling brings up some technical terms that might be unknown to
434     you. Here's a quick introduction.
435     </p>
436    
437     <p>
438 so 1.15 First of all, the kernel has to be able to change the processor's frequency.
439 rane 1.19 The <b>CPUfreq processor driver</b> knows the commands to do it on your CPU.
440 rane 1.20 Thus it's important to choose the right one in your kernel. You should already
441     have done it above. Once the kernel knows how to change frequencies, it has to
442     know which frequency it should set. This is done according to the <b>policy</b>
443     which consists of a <b>CPUfreq policy</b> and a <b>governor</b>. A CPUfreq
444     policy are just two numbers which define a range the frequency has to stay
445     between - minimal and maximal frequency. The governor now decides which of the
446     available frequencies in between minimal and maximal frequency to choose. For
447     example, the <b>powersave governor</b> always chooses the lowest frequency
448     available, the <b>performance governor</b> the highest one. The <b>userspace
449     governor</b> makes no decision but chooses whatever the user (or a program in
450     userspace) wants - which means it reads the frequency from
451 swift 1.8 <path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed</path>.
452     </p>
453    
454     <p>
455     This doesn't sound like dynamic frequency changes yet and in fact it isn't.
456 rane 1.20 Dynamics however can be accomplished with various approaches. For example, the
457     <b>ondemand governor</b> makes its decisions depending on the current CPU load.
458     The same is done by various userland tools like <c>cpudyn</c>, <c>cpufreqd</c>,
459     <c>powernowd</c> and many more. ACPI events can be used to enable or disable
460     dynamic frequency changes depending on power source.
461 swift 1.8 </p>
462    
463     </body>
464     </section>
465     <section>
466 rane 1.19 <title>Setting The Frequency Manually</title>
467 swift 1.1 <body>
468    
469     <p>
470     Decreasing CPU speed and voltage has two advantages: On the one hand less
471     energy is consumed, on the other hand there is thermal improvement as your
472     system doesn't get as hot as running on full speed. The main disadvantage is
473     obviously the loss of performance. Decreasing processor speed is a trade off
474     between performance loss and energy saving.
475     </p>
476    
477     <note>
478     Not every laptop supports frequency scaling. If unsure, have a look at the list
479 rane 1.19 of supported processors in the <uri link="#doc_chap8">Troubleshooting</uri>
480     section to verify yours is supported.
481 swift 1.1 </note>
482    
483     <p>
484 neysx 1.12 It's time to test whether CPU frequency changing works. Let's install another
485     tool which is very handy for debugging purposes: <c>sys-power/cpufrequtils</c>
486 swift 1.1 </p>
487    
488 neysx 1.12 <pre caption="Checking CPU frequency">
489     # <i>emerge cpufrequtils</i>
490     # <i>cpufreq-info</i>
491 swift 1.1 </pre>
492    
493     <p>
494 neysx 1.12 Here is an example output:
495 swift 1.1 </p>
496    
497 neysx 1.12 <pre caption="Sample output from cpufreq-info">
498 so 1.15 cpufrequtils 0.3: cpufreq-info (C) Dominik Brodowski 2004
499 neysx 1.12 Report errors and bugs to linux@brodo.de, please.
500     analyzing CPU 0:
501     driver: centrino
502     CPUs which need to switch frequency at the same time: 0
503     hardware limits: 600 MHz - 1.40 GHz
504     available frequency steps: 600 MHz, 800 MHz, 1000 MHz, 1.20 GHz, 1.40 GHz
505 so 1.15 available cpufreq governors: conservative, ondemand, powersave, userspace, performance
506 neysx 1.12 current policy: frequency should be within 924 MHz and 1.40 GHz.
507     The governor "performance" may decide which speed to use
508     within this range.
509 so 1.15 current CPU frequency is 1.40 GHz.
510 neysx 1.12 </pre>
511    
512 swift 1.1 <p>
513 neysx 1.12 Now play around with <c>cpufreq-set</c> to make sure frequency switching works.
514     Run <c>cpufreq-set -g ondemand</c> for example to activate the ondemand
515     governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as
516 rane 1.20 expected, you might find help in the <uri link="#doc_chap8">Troubleshooting
517     section</uri> in the end of this guide.
518 swift 1.1 </p>
519    
520     </body>
521     </section>
522     <section>
523     <title>Automated frequency adaption</title>
524     <body>
525    
526     <p>
527     The above is quite nice, but not doable in daily life. Better let your system
528 so 1.15 set the appropriate frequency automatically. There are many different
529     approaches to do this. The following table gives a quick overview to help you
530 rane 1.21 decide on one of them. It's roughly separated in three categories <b>kernel</b>
531 rane 1.20 for approaches that only need kernel support, <b>daemon</b> for programs that
532     run in the background and <b>graphical</b> for programs that provide a GUI for
533     easy configuration and changes.
534 swift 1.1 </p>
535    
536     <table>
537     <tr>
538     <th>Name</th>
539 swift 1.8 <th>Category</th>
540     <th>Switch decision</th>
541     <th>Kernel governors</th>
542     <th>Further governors</th>
543     <th>Comments</th>
544     </tr>
545     <tr>
546     <ti>'ondemand' governor</ti>
547     <ti>Kernel</ti>
548     <ti>CPU load</ti>
549     <ti>N.A.</ti>
550     <ti>N.A.</ti>
551     <ti>
552 so 1.15 Chooses maximal frequency on CPU load and slowly steps down when the CPU is
553     idle. Further tuning through files in
554 swift 1.8 <path>/sys/devices/system/cpu/cpu0/cpufreq/ondemand/</path>. Still requires
555     userland tools (programs, scripts) if governor switching or similar is
556     desired.
557     </ti>
558 swift 1.1 </tr>
559     <tr>
560 so 1.15 <ti>'conservative' governor</ti>
561     <ti>Kernel</ti>
562     <ti>CPU load</ti>
563     <ti>N.A.</ti>
564     <ti>N.A.</ti>
565     <ti>
566 neysx 1.16 Unlike the ondemand governor, conversative doesn't jump to maximum
567     frequency when CPU load is high, but increases the frequency step by step.
568     Further tuning through files in
569     <path>/sys/devices/system/cpu/cpu0/cpufreq/ondemand/</path>. Still requires
570     userland tools (programs, scripts) if governor switching or similar is
571     desired.
572 so 1.15 </ti>
573     </tr>
574     <tr>
575 swift 1.1 <ti><uri link="http://mnm.uib.es/~gallir/cpudyn/">cpudyn</uri></ti>
576 swift 1.8 <ti>Daemon</ti>
577     <ti>CPU load</ti>
578 neysx 1.12 <ti>Performance, powersave</ti>
579 swift 1.8 <ti>Dynamic</ti>
580     <ti>
581     Also supports disk standby - notice however that <e>laptop mode</e> in most
582     cases will do a better job.
583     </ti>
584 swift 1.1 </tr>
585     <tr>
586 swift 1.8 <ti><uri link="http://sourceforge.net/projects/cpufreqd/">cpufreqd</uri></ti>
587     <ti>Daemon</ti>
588 nightmorph 1.17 <ti>Battery state, CPU load, temperature, running programs and more</ti>
589 swift 1.8 <ti>All available</ti>
590     <ti>None</ti>
591     <ti>
592 nightmorph 1.17 Sophisticated (but somewhat complicated) setup. Extendible through plugins
593     like sensor monitoring (lm_sensors) or coordinating some NVidia based
594     graphics card memory and core. Cpufreqd is SMP aware and can optionally be
595     controlled manually at runtime.
596 swift 1.8 </ti>
597     </tr>
598     <tr>
599     <ti>
600     <uri link="http://www.deater.net/john/powernowd.html">powernowd</uri>
601     </ti>
602     <ti>Daemon</ti>
603     <ti>CPU load</ti>
604     <ti>None</ti>
605     <ti>Passive, sine, aggressive</ti>
606     <ti>
607     Supports SMP.
608     </ti>
609 swift 1.1 </tr>
610     <tr>
611 so 1.15 <ti>
612 rane 1.20 <uri
613     link="http://fatcat.ftj.agh.edu.pl/~nelchael/index.php?cat=projs&amp;subcat=ncpufreqd&amp;language=en">ncpufreqd</uri>
614 so 1.15 </ti>
615     <ti>Daemon</ti>
616     <ti>Temperature</ti>
617     <ti>None</ti>
618     <ti>Powersave, performance</ti>
619     <ti>
620     Toggles the used governor between performance and powersave depending on
621     system temperature. Very useful on laptops with notorious heat problems.
622     </ti>
623     </tr>
624     <tr>
625 swift 1.1 <ti><uri link="http://www.goop.org/~jeremy/speedfreq/">speedfreq</uri></ti>
626 swift 1.8 <ti>Daemon</ti>
627     <ti>CPU load</ti>
628     <ti>None</ti>
629     <ti>Dynamic, powersave, performance, fixed speed</ti>
630     <ti>
631 so 1.15 Easy to configure with a nice client/server interface. Requires a 2.6
632     kernel. Unmaintained, broken and thus removed from Portage. Please switch
633     to cpufreqd if you're still using it.
634 swift 1.8 </ti>
635     </tr>
636     <tr>
637     <ti><uri link="http://cpuspeedy.sourceforge.net/">gtk-cpuspeedy</uri></ti>
638     <ti>Graphical</ti>
639     <ti>None</ti>
640     <ti>None</ti>
641     <ti>None</ti>
642 swift 1.1 <ti>
643 swift 1.8 Gnome application, a graphical tool to set CPU frequency manually. It does
644 neysx 1.12 not offer any automation.
645 swift 1.1 </ti>
646     </tr>
647     <tr>
648 swift 1.8 <ti>klaptopdaemon</ti>
649     <ti>Graphical</ti>
650     <ti>Battery state</ti>
651     <ti>All available</ti>
652     <ti>None</ti>
653     <ti>
654     KDE only, 'ondemand' governor required for dynamic frequency scaling.
655     </ti>
656 swift 1.1 </tr>
657     </table>
658    
659     <p>
660 so 1.15 While adjusting the frequency to the current load looks simple at a first
661     glance, it's not such a trivial task. A bad algorithm can cause switching
662     between two frequencies all the time or wasting energy when setting frequency
663 rane 1.20 to an unnecessary high level.
664 swift 1.1 </p>
665    
666     <p>
667 neysx 1.12 Which one to choose? If you have no idea about it, try <c>cpufreqd</c>:
668 swift 1.1 </p>
669    
670     <pre caption="Installing cpufreqd">
671     # <i>emerge cpufreqd</i>
672     </pre>
673    
674     <p>
675 neysx 1.12 <c>cpufreqd</c> can be configured by editing <path>/etc/cpufreqd.conf</path>.
676     The default one that ships with cpufreqd may look a bit confusing. I recommend
677 nightmorph 1.22 replacing it with the one from former Gentoo developer Henrik Brix Andersen
678     (see below). Please notice that you need cpufreqd-2.0.0 or later. Earlier
679     versions have a different syntax for the config file.
680 swift 1.1 </p>
681    
682 nightmorph 1.17 <pre caption="/etc/cpufreqd.conf (cpufreqd-2.0.0 and later)">
683 swift 1.1 [General]
684     pidfile=/var/run/cpufreqd.pid
685 nightmorph 1.17 poll_interval=3
686     enable_plugins=acpi_ac, acpi_battery
687 nightmorph 1.18 enable_remote=1
688     remote_group=wheel
689 neysx 1.12 verbosity=5
690 nightmorph 1.17 [/General]
691 swift 1.1
692     [Profile]
693 neysx 1.12 name=ondemand
694     minfreq=0%
695     maxfreq=100%
696     policy=ondemand
697 nightmorph 1.17 [/Profile]
698 swift 1.1
699     [Profile]
700 so 1.15 name=conservative
701     minfreq=0%
702     maxfreq=100%
703     policy=conservative
704 nightmorph 1.17 [/Profile]
705 so 1.15
706     [Profile]
707 neysx 1.12 name=powersave
708     minfreq=0%
709     maxfreq=100%
710 swift 1.1 policy=powersave
711 nightmorph 1.17 [/Profile]
712 swift 1.1
713     [Profile]
714 neysx 1.12 name=performance
715     minfreq=0%
716     maxfreq=100%
717     policy=performance
718 nightmorph 1.17 [/Profile]
719 swift 1.1
720     [Rule]
721 neysx 1.12 name=battery
722     ac=off
723 so 1.15 profile=conservative
724 nightmorph 1.17 [/Rule]
725 swift 1.1
726     [Rule]
727 neysx 1.12 name=battery_low
728 swift 1.1 ac=off
729 neysx 1.12 battery_interval=0-10
730     profile=powersave
731 nightmorph 1.17 [/Rule]
732 swift 1.1
733     [Rule]
734 neysx 1.12 name=ac
735     ac=on
736 so 1.15 profile=ondemand
737 nightmorph 1.17 [/Rule]
738 neysx 1.12 </pre>
739    
740     <p>
741 rane 1.19 Now you can start the cpufreqd daemon. Add it to the <c>default</c> and
742     <c>battery</c> runlevel as well.
743 swift 1.1 </p>
744    
745 neysx 1.12 <pre caption="Starting cpufreqd">
746     # <i>rc-update add cpufreqd default battery</i>
747     # <i>rc</i>
748     </pre>
749    
750 nightmorph 1.17 <p>
751     Sometimes it can be desirable to select another policy than the daemon chooses,
752     for example when battery power is low, but you know that AC will be available
753 rane 1.20 soon. In that case you can turn on cpufreqd's manual mode with <c>cpufreqd-set
754     manual</c> and select one of your configured policies (as listed by
755     <c>cpufreqd-get</c>). You can leave manual mode by executing <c>cpufreqd-set
756     dynamic</c>.
757 nightmorph 1.17 </p>
758    
759 neysx 1.12 <warn>
760     Do not run more than one of the above programs at the same time. It may cause
761     confusion like switching between two frequencies all the time.
762     </warn>
763    
764 swift 1.8 </body>
765     </section>
766     <section>
767     <title>Verifying the result</title>
768     <body>
769    
770 swift 1.1 <p>
771     The last thing to check is that your new policies do a good job. An easy way to
772 swift 1.8 do so is monitoring CPU speed while working with your laptop:
773 swift 1.1 </p>
774    
775     <pre caption="Monitoring CPU speed">
776 yoswink 1.13 # <i>watch grep \"cpu MHz\" /proc/cpuinfo</i>
777 swift 1.1 </pre>
778    
779     <p>
780 rane 1.20 If <path>/proc/cpuinfo</path> doesn't get updated (see <uri
781     link="#doc_chap8">Troubleshooting</uri>), monitor the CPU frequency with:
782 swift 1.1 </p>
783    
784     <pre caption="Alternative CPU speed monitoring">
785 neysx 1.12 # <i>watch x86info -mhz</i>
786 swift 1.1 </pre>
787    
788     <p>
789     Depending on your setup, CPU speed should increase on heavy load, decrease on
790 rane 1.19 no activity or just stay at the same level. When using <c>cpufreqd</c> and
791 rane 1.20 verbosity set to 5 or higher in <path>cpufreqd.conf</path> you'll get
792     additional information about what's happening reported to <c>syslog</c>.
793 swift 1.1 </p>
794    
795     </body>
796     </section>
797     </chapter>
798    
799     <chapter>
800     <title>LCD Power Management</title>
801     <section>
802     <body>
803    
804     <p>
805 rane 1.20 As you can see in <uri link="#doc_chap1_fig1">figure 1.1</uri>, the LCD
806     display consumes the biggest part of energy (might not be the case for
807     non-mobile CPU's). Thus it's quite important not only to shut the display off
808     when not needed, but also to reduce it's backlight if possible. Most laptops
809     offer the possibility to control the backlight dimming.
810 swift 1.1 </p>
811    
812 nightmorph 1.17 </body>
813     </section>
814     <section>
815     <title>Standby settings</title>
816     <body>
817    
818 swift 1.1 <p>
819 nightmorph 1.17 The first thing to check is the standby/suspend/off timings of the display. As
820     this depends heavily on your windowmanager, I'll let you figure it out
821 rane 1.20 yourself. Just two common places: Blanking the terminal can be done with
822 nightmorph 1.17 <c>setterm -blank &lt;number-of-minutesM&gt;</c>, <c>setterm -powersave on</c>
823     and <c>setterm -powerdown &lt;number-of-minutesM&gt;</c>. For X.org, modify
824     <path>/etc/X11/xorg.conf</path> similar to this:
825 swift 1.1 </p>
826    
827 so 1.15 <pre caption="LCD suspend settings in X.org and XFree86">
828 swift 1.1 Section "ServerLayout"
829     Identifier [...]
830     [...]
831     Option "BlankTime" "5" <comment># Blank the screen after 5 minutes (Fake)</comment>
832     Option "StandbyTime" "10" <comment># Turn off screen after 10 minutes (DPMS)</comment>
833     Option "SuspendTime" "20" <comment># Full suspend after 20 minutes</comment>
834     Option "OffTime" "30" <comment># Turn off after half an hour</comment>
835     [...]
836     EndSection
837    
838     [...]
839    
840     Section "Monitor"
841     Identifier [...]
842     Option "DPMS" "true"
843     [...]
844     EndSection
845     </pre>
846    
847     <p>
848     This is the same for XFree86 and <path>/etc/X11/XF86Config</path>.
849     </p>
850    
851 nightmorph 1.17 </body>
852     </section>
853     <section>
854     <title>Backlight dimming</title>
855     <body>
856    
857 swift 1.1 <p>
858     Probably more important is the backlight dimming. If you have access to the
859     dimming settings via a tool, write a small script that dims the backlight in
860 rane 1.19 battery mode and place it in your <c>battery</c> runlevel. The following script
861 nightmorph 1.17 should work on most IBM Thinkpads and Toshiba laptops. You've got to enable the
862 rane 1.20 appropriate option in your kernel (IBM Thinkpads only). For Toshiba laptops,
863 nightmorph 1.23 install <c>sys-power/acpitool</c> and skip configuration of <c>ibm_acpi</c> as
864 rane 1.20 described below.
865 neysx 1.12 </p>
866    
867     <warn>
868     Support for setting brightness is marked experimental in ibm-acpi. It accesses
869     hardware directly and may cause severe harm to your system. Please read the
870     <uri link="http://ibm-acpi.sourceforge.net/">ibm-acpi website</uri>
871     </warn>
872    
873     <p>
874     To be able to set the brightness level, the ibm_acpi module has to be loaded
875     with the experimental parameter.
876     </p>
877    
878     <pre caption="automatically loading the ibm_acpi module">
879     <comment>(Please read the warnings above before doing this!)</comment>
880 rane 1.19 # <i>echo "options ibm_acpi experimental=1" >> /etc/modules.d/ibm_acpi</i>
881 nightmorph 1.26 # <i>/sbin/update-modules</i>
882 rane 1.19 # <i>echo ibm_acpi >> /etc/modules.autoload.d/kernel-2.6</i>
883     # <i>modprobe ibm_acpi</i>
884 neysx 1.12 </pre>
885    
886     <p>
887     This should work without error messages and a file
888     <path>/proc/acpi/ibm/brightness</path> should be created after loading the
889 rane 1.20 module. An init script will take care of choosing the brightness according to
890     the power source.
891 neysx 1.12 </p>
892    
893     <pre caption="/etc/conf.d/lcd-brightness">
894     <comment># See /proc/acpi/ibm/brightness for available values</comment>
895 nightmorph 1.17 <comment># Please read /usr/src/linux/Documentation/ibm-acpi.txt</comment>
896 neysx 1.12
897 nightmorph 1.23 <comment># brightness level in ac mode. Default is 7.</comment>
898 neysx 1.12 BRIGHTNESS_AC=7
899    
900     <comment># brightness level in battery mode. Default is 4.</comment>
901     BRIGHTNESS_BATTERY=4
902     </pre>
903    
904     <pre caption="/etc/init.d/lcd-brightness">
905     #!/sbin/runscript
906    
907     set_brightness() {
908     if on_ac_power
909     then
910     LEVEL=${BRIGHTNESS_AC:-7}
911     else
912     LEVEL=${BRIGHTNESS_BATTERY:-4}
913     fi
914    
915     if [ -f /proc/acpi/ibm/brightness ]
916     then
917     ebegin "Setting LCD brightness"
918     echo "level ${LEVEL}" > /proc/acpi/ibm/brightness
919     eend $?
920 nightmorph 1.17 elif [[ -e /usr/bin/acpitool &amp;&amp; -n $(acpitool -T | grep "LCD brightness") ]]
921     then
922     ebegin "Setting LCD brightness"
923     acpitool -l $LEVEL >/dev/null || ewarn "Unable to set lcd brightness"
924     eend $?
925 neysx 1.12 else
926     ewarn "Setting LCD brightness is not supported."
927 nightmorph 1.17 ewarn "For IBM Thinkpads, check that ibm_acpi is loaded into the kernel"
928 nightmorph 1.23 ewarn "For Toshiba laptops, you've got to install sys-power/acpitool"
929 neysx 1.12 fi
930     }
931    
932     start() {
933     set_brightness
934     }
935    
936     stop () {
937     set_brightness
938     }
939     </pre>
940    
941     <p>
942     When done, make sure brightness is adjusted automatically by adding it to the
943     battery runlevel.
944 swift 1.1 </p>
945    
946 neysx 1.12 <pre caption="Enabling automatic brightness adjustment">
947 rane 1.19 # <i>chmod +x /etc/init.d/lcd-brightness</i>
948     # <i>rc-update add lcd-brightness battery</i>
949     # <i>rc</i>
950 neysx 1.12 </pre>
951    
952 swift 1.1 </body>
953     </section>
954     </chapter>
955    
956     <chapter>
957     <title>Disk Power Management</title>
958     <section>
959 nightmorph 1.17 <body>
960 rane 1.19
961 nightmorph 1.17 <p>
962     Hard disks consume less energy in sleep mode. Therefore it makes sense to
963     activate power saving features whenever the hard disk is not used for a certain
964     amount of time. I'll show you two alternative possibilities to do it. First,
965     laptop-mode will save most energy due to several measures which prevent or at
966     least delay write accesses. The drawback is that due to the delayed write
967     accesses a power outage or kernel crash will be more dangerous for data loss.
968     If you don't like this, you have to make sure that there are no processes which
969     write to your hard disk frequently. Afterwards you can enable power saving
970 rane 1.19 features of your hard disk with <c>hdparm</c> as the second alternative.
971 nightmorph 1.17 </p>
972    
973     </body>
974     </section>
975     <section>
976     <title>Increasing idle time - laptop-mode</title>
977 swift 1.1 <body>
978    
979     <p>
980 nightmorph 1.17 Recent kernels (2.6.6 and greater, recent 2.4 ones and others with patches)
981 rane 1.19 include the so-called <c>laptop-mode</c>. When activated, dirty buffers are
982 nightmorph 1.17 written to disk on read calls or after 10 minutes (instead of 30 seconds). This
983     minimizes the time the hard disk needs to be spun up.
984 swift 1.1 </p>
985    
986 nightmorph 1.17 <pre caption="Automated start of laptop-mode">
987     # <i>emerge laptop-mode-tools</i>
988     </pre>
989 swift 1.1
990 nightmorph 1.17 <p>
991     <c>laptop-mode-tools</c> has its configuration file in
992     <path>/etc/laptop-mode/laptop-mode.conf</path>. Adjust it the way you like it,
993     it's well commented. Run <c>rc-update add laptop_mode battery</c> to start it
994     automatically.
995     </p>
996    
997     <p>
998     Recent versions (1.11 and later) of laptop-mode-tools include a new tool
999     <c>lm-profiler</c>. It will monitor your system's disk usage and running
1000     network services and suggests to disable unneeded ones. You can either disable
1001     them through laptop-mode-tools builtin runlevel support (which will be reverted
1002 rane 1.19 by Gentoo's <c>/sbin/rc</c>) or use your <c>default</c>/<c>battery</c>
1003 nightmorph 1.17 runlevels (recommended).
1004     </p>
1005    
1006     <pre caption="Sample output from running lm-profiler">
1007 rane 1.19 # <i>lm-profiler</i>
1008 nightmorph 1.17 Profiling session started.
1009     Time remaining: 600 seconds
1010     [4296896.602000] amarokapp
1011     Time remaining: 599 seconds
1012     [4296897.714000] sort
1013     [4296897.970000] mv
1014     Time remaining: 598 seconds
1015     Time remaining: 597 seconds
1016     [4296900.482000] reiserfs/0
1017     </pre>
1018    
1019     <p>
1020     After profiling your system for ten minutes, lm-profiler will present a list of
1021     services which might have caused disk accesses during that time.
1022     </p>
1023    
1024     <pre caption="lm-profiler suggests to disable some services">
1025     Program: "atd"
1026     Reason: standard recommendation (program may not be running)
1027     Init script: /etc/init.d/atd (GUESSED)
1028    
1029 rane 1.19 Do you want to disable this service in battery mode? [y/N]: <i>n</i>
1030 swift 1.1 </pre>
1031    
1032     <p>
1033 nightmorph 1.17 To disable atd as suggested in the example above, you would run <c>rc-update
1034     del atd battery</c>. Be careful not to disable services that are needed for
1035 rane 1.20 your system to run properly - <c>lm-profiler</c> is likely to generate some
1036     false positives. Do not disable a service if you are unsure whether it's
1037     needed.
1038 nightmorph 1.17 </p>
1039    
1040     </body>
1041     </section>
1042     <section>
1043 rane 1.19 <title>Limiting Write Accesses</title>
1044 nightmorph 1.17 <body>
1045    
1046     <p>
1047     If you don't want to use laptop-mode, you must take special care to disable
1048     services that write to your disk frequently - <c>syslogd</c> is a good
1049     candidate, for example. You probably don't want to shut it down completely, but
1050     it's possible to modify the config file so that "unnecessary" things don't get
1051 rane 1.20 logged and thus don't create disk traffic. <c>Cups</c> writes to disk
1052     periodically, so consider shutting it down and only enable it manually when
1053     needed.
1054 nightmorph 1.17 </p>
1055    
1056     <pre caption="Disabling cups in battery mode">
1057     # <i>rc-update del cupsd battery</i>
1058     </pre>
1059    
1060     <p>
1061     You can also use <c>lm-profiler</c> from laptop-mode-tools (see above) to find
1062     services to disable. Once you eliminated all of them, go on with configuring
1063     hdparm.
1064     </p>
1065    
1066     </body>
1067     </section>
1068     <section>
1069     <title>hdparm</title>
1070     <body>
1071    
1072     <p>
1073 rane 1.20 The second possibility is using a small script and <c>hdparm</c>. Skip this if
1074     you are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>:
1075 swift 1.1 </p>
1076    
1077     <pre caption="Using hdparm for disk standby">
1078     #!/sbin/runscript
1079 neysx 1.12
1080     depend() {
1081 nightmorph 1.17 after hdparm
1082 neysx 1.12 }
1083    
1084 swift 1.1 start() {
1085 nightmorph 1.17 ebegin "Activating Power Management for Hard Drives"
1086     hdparm -q -S12 /dev/hda
1087     eend $?
1088 swift 1.1 }
1089    
1090     stop () {
1091 nightmorph 1.17 ebegin "Deactivating Power Management for Hard Drives"
1092     hdparm -q -S253 /dev/hda
1093     eend $?
1094 swift 1.1 }
1095     </pre>
1096    
1097     <p>
1098     See <c>man hdparm</c> for the options. If your script is ready, add it to the
1099     battery runlevel.
1100     </p>
1101    
1102     <pre caption="Automate disk standby settings">
1103 nightmorph 1.17 # <i>chmod +x /etc/init.d/pmg_hda</i>
1104 swift 1.1 # <i>/sbin/depscan.sh</i>
1105 nightmorph 1.17 # <i>rc-update add pmg_hda battery</i>
1106 swift 1.1 </pre>
1107    
1108     <impo>
1109     Be careful with sleep/spin down settings of your hard drive. Setting it to
1110     small values might wear out your drive and lose warranty.
1111     </impo>
1112    
1113     </body>
1114     </section>
1115     <section>
1116     <title>Other tricks</title>
1117     <body>
1118    
1119     <p>
1120     Another possibility is to deactivate swap in battery mode. Before writing a
1121     swapon/swapoff switcher, make sure there is enough RAM and swap isn't used
1122     heavily, otherwise you'll be in big problems.
1123     </p>
1124    
1125     <p>
1126     If you don't want to use laptop-mode, it's still possible to minimize disk
1127 rane 1.19 access by mounting certain directories as <c>tmpfs</c> - write accesses are not
1128 swift 1.1 stored on a disk, but in main memory and get lost with unmounting. Often it's
1129     useful to mount <path>/tmp</path> like this - you don't have to pay special
1130     attention as it gets cleared on every reboot regardless whether it was mounted
1131     on disk or in RAM. Just make sure you have enough RAM and no program (like a
1132     download client or compress utility) needs extraordinary much space in
1133     <path>/tmp</path>. To activate this, enable tmpfs support in your kernel and
1134     add a line to <path>/etc/fstab</path> like this:
1135     </p>
1136    
1137     <pre caption="Editing /etc/fstab to make /tmp even more volatile">
1138     none /tmp tmpfs size=32m 0 0
1139     </pre>
1140    
1141     <warn>
1142     Pay attention to the size parameter and modify it for your system. If you're
1143 rane 1.21 unsure, don't try this at all, it can become a performance bottleneck easily. In
1144 swift 1.1 case you want to mount <path>/var/log</path> like this, make sure to merge the
1145     log files to disk before unmounting. They are essential. Don't attempt to mount
1146 rane 1.19 <path>/var/tmp</path> like this. Portage uses it for compiling...
1147 swift 1.1 </warn>
1148    
1149     </body>
1150     </section>
1151     </chapter>
1152    
1153     <chapter>
1154 rane 1.19 <title>Power Management For Other Devices</title>
1155 swift 1.1 <section>
1156 rane 1.19 <title>Graphics Cards</title>
1157 so 1.15 <body>
1158    
1159     <p>
1160     In case you own an ATI graphics card supporting PowerPlay (dynamic clock
1161 nightmorph 1.25 scaling for the graphics processing unit GPU), you can activate this
1162 rane 1.20 feature in X.org. Open <path>/etc/X11/xorg.conf</path> and add (or enable) the
1163     <c>DynamicClocks</c> option in the Device section. Please notice that this
1164     feature will lead to crashes on some systems.
1165 so 1.15 </p>
1166    
1167     <pre caption="Enabling ATI PowerPlay support in X.org">
1168     Section "Device"
1169     [...]
1170     Option "DynamicClocks" "on"
1171     EndSection
1172     </pre>
1173    
1174     </body>
1175     </section>
1176     <section>
1177 swift 1.1 <title>Wireless Power Management</title>
1178     <body>
1179    
1180     <p>
1181 nightmorph 1.17 Wireless LAN cards consume quite a bit of energy. Put them in Power Management
1182 rane 1.19 mode in analogy to the <c>pmg_hda</c> script.
1183 swift 1.1 </p>
1184    
1185 nightmorph 1.17 <note>
1186     This script assumes your wireless interface is called <c>wlan0</c>; replace
1187     this with the actual name of your interface.
1188     </note>
1189    
1190 swift 1.1 <pre caption="WLAN Power Management automated">
1191     #!/sbin/runscript
1192     start() {
1193     ebegin "Activating Power Management for Wireless LAN"
1194 nightmorph 1.17 iwconfig wlan0 power on
1195 swift 1.1 eend $?
1196     }
1197    
1198     stop () {
1199     ebegin "Deactivating Power Management for Wireless LAN"
1200     iwconfig wlan0 power off
1201     eend $?
1202     }
1203     </pre>
1204    
1205     <p>
1206 nightmorph 1.17 Starting this script will activate power saving features for wlan0. Save it as
1207     <path>/etc/init.d/pmg_wlan0</path> and add it to the battery runlevel like the
1208     disk script above. See <c>man iwconfig</c> for details and more options like
1209     the period between wakeups or timeout settings. If your driver and access point
1210     support changing the beacon time, this is a good starting point to save even
1211     more energy.
1212 swift 1.1 </p>
1213    
1214 swift 1.8 <pre caption="Power Management for WLAN">
1215 nightmorph 1.17 # <i>chmod +x /etc/init.d/pmg_wlan0</i>
1216 swift 1.8 # <i>/sbin/depscan.sh</i>
1217 nightmorph 1.17 # <i>rc-update add pmg_wlan0 battery</i>
1218 swift 1.8 </pre>
1219    
1220 swift 1.1 </body>
1221     </section>
1222     <section>
1223     <title>USB Power Management</title>
1224     <body>
1225    
1226     <p>
1227     There are two problems with USB devices regarding energy consumption: First,
1228     devices like USB mice, digital cameras or USB sticks consume energy while
1229     plugged in. You cannot avoid this (nevertheless remove them in case they're not
1230     needed). Second, when there are USB devices plugged in, the USB host controller
1231     periodically accesses the bus which in turn prevents the CPU from going into
1232 rane 1.20 sleep mode. The kernel offers an experimental option to enable suspension of
1233 so 1.15 USB devices through driver calls or one of the <path>power/state</path> files
1234     in <path>/sys</path>.
1235 swift 1.1 </p>
1236    
1237 so 1.15 <pre caption="Enabling USB suspend support in the kernel">
1238     Device Drivers
1239     USB support
1240     [*] Support for Host-side USB
1241     [*] USB suspend/resume (EXPERIMENTAL)
1242     </pre>
1243    
1244 swift 1.1 </body>
1245     </section>
1246     </chapter>
1247    
1248     <chapter>
1249 rane 1.19 <title>Sleep States: sleep, standby, and suspend to disk</title>
1250 swift 1.1 <section>
1251     <body>
1252    
1253     <p>
1254     ACPI defines different sleep states. The more important ones are
1255     </p>
1256    
1257 rane 1.20 <ul>
1258 swift 1.1 <li>S1 aka Standby</li>
1259     <li>S3 aka Suspend to RAM aka Sleep</li>
1260     <li>S4 aka Suspend to Disk aka Hibernate</li>
1261     </ul>
1262    
1263     <p>
1264     They can be called whenever the system is not in use, but a shutdown is not
1265     wanted due to the long boot time.
1266     </p>
1267    
1268     </body>
1269     </section>
1270     <section>
1271 so 1.15 <title>Sleep (S3)</title>
1272 swift 1.1 <body>
1273    
1274     <p>
1275 so 1.15 The ACPI support for these sleep states is marked experimental for good reason.
1276     APM sleep states seem to be more stable, however you can't use APM and ACPI
1277     together.
1278     </p>
1279    
1280     <pre caption="Kernel configuration for the various suspend types">
1281     Power Management Options ---&gt;
1282     [*] Power Management support
1283     ACPI (Advanced Configuration and Power Interface) Support ---&gt;
1284     [*] ACPI Support
1285     [*] Sleep States
1286     </pre>
1287    
1288     <p>
1289 nightmorph 1.17 Once your kernel is properly configured, you can use the
1290 so 1.15 <c>hibernate-script</c> to activate suspend or sleep mode. Let's install that
1291     first.
1292     </p>
1293    
1294     <pre caption="Installing the hibernate-script">
1295 rane 1.19 # <i>emerge hibernate-script</i>
1296 so 1.15 </pre>
1297    
1298     <p>
1299 nightmorph 1.25 Some configuration has to be done in <path>/etc/hibernate</path>. The default
1300 nightmorph 1.24 package introduces a few configuration files for each sleep state. Options that
1301     are common to all suspend methods are placed in <path>common.conf</path>; make
1302     sure this file is properly set up for your system.
1303 so 1.15 </p>
1304    
1305     <p>
1306 nightmorph 1.24 To configure sleep, edit <path>sysfs-ram.conf</path> in
1307     <path>/etc/hibernate</path>. <c>UseSysfsPowerState mem</c> is already setup
1308 nightmorph 1.25 correctly, but if you need to make further changes to this particular sleep
1309     state (or any other sleep state) you should add them to
1310 nightmorph 1.24 <path>/etc/hibernate/hibernate.conf</path>. The comments and option names will
1311     guide you. If you use nfs or samba shares over the network, make sure to
1312     shutdown the appropriate init scripts to avoid timeouts.
1313 so 1.15 </p>
1314    
1315 nightmorph 1.24 <note>
1316     For more information on setting up sleep states, read <c>man
1317     hibernate.conf</c>.
1318     </note>
1319    
1320 so 1.15 <p>
1321     Ready? Now is the last chance to backup any data you want to keep after
1322     executing the next command. Notice that you probably have to hit a special key
1323 rane 1.19 like <c>Fn</c> to resume from sleep.
1324 so 1.15 </p>
1325    
1326     <pre caption="Calling sleep">
1327 rane 1.19 # <i>hibernate-ram</i>
1328 so 1.15 </pre>
1329    
1330     <p>
1331 rane 1.20 If you're still reading, it seems to work. You can also setup standby (S1) in a
1332 nightmorph 1.24 similar way by editing <path>sysfs-ram.conf</path> and changing
1333     "UseSysfsPowerState mem" to "UseSysfsPowerState standby". S3 and S4 are the more
1334     interesting sleep states due to greater energy savings however.
1335 so 1.15 </p>
1336    
1337     </body>
1338     </section>
1339     <section>
1340     <title>Hibernate (S4)</title>
1341     <body>
1342    
1343     <p>
1344     This section introduces hibernation, where a snapshot of the running system is
1345     written to disk before powering off. On resume, the snapshot is loaded and you
1346     can go on working at exactly the point you called hibernate before.
1347 swift 1.1 </p>
1348    
1349     <warn>
1350 so 1.15 Don't exchange non hot-pluggable hardware when suspended. Don't attempt to load
1351     a snapshot with a different kernel image than the one it was created with.
1352     Shutdown any NFS or samba server/client before hibernating.
1353 swift 1.1 </warn>
1354    
1355     <p>
1356 so 1.15 There are two different implementations for S4. The original one is swsusp,
1357 rane 1.20 then there is the newer suspend2 with a nicer interface (including fbsplash
1358     support). A <uri link="http://suspend2.net/features.html#compare"> feature
1359     comparison</uri> is available at the <uri link="http://suspend2.net"> suspend2
1360     Homepage</uri>. There used to be Suspend-to-Disk (pmdisk), a fork of swsusp,
1361     but it has been merged back.
1362 swift 1.1 </p>
1363    
1364     <p>
1365 so 1.15 Suspend2 is not included in the mainline kernel yet, therefore you either have
1366 rane 1.20 to patch your kernel sources with the patches provided by <uri
1367     link="http://suspend2.net">suspend2.net</uri> or use
1368 so 1.15 <c>sys-kernel/suspend2-sources</c>.
1369 swift 1.1 </p>
1370    
1371     <p>
1372 so 1.15 The kernel part for both swusp and suspend2 is as follows:
1373 swift 1.1 </p>
1374    
1375     <pre caption="Kernel configuration for the various suspend types">
1376     Power Management Options ---&gt;
1377     <comment>(hibernate with swsusp)</comment>
1378 so 1.15 [*] Software Suspend
1379     <comment>(replace /dev/SWAP with your swap partition)</comment>
1380     (/dev/SWAP) Default resume partition
1381 rane 1.20
1382 so 1.15 <comment>(hibernate with suspend2)</comment>
1383 swift 1.1 Software Suspend 2
1384     --- Image Storage (you need at least one writer)
1385 so 1.15 [*] File Writer
1386 swift 1.1 [*] Swap Writer
1387 so 1.15 --- General Options
1388 swift 1.1 [*] LZF image compression
1389 so 1.15 <comment>(replace /dev/SWAP with your swap partition)</comment>
1390     (swap:/dev/SWAP) Default resume device name
1391     [ ] Allow Keep Image Mode
1392 swift 1.1 </pre>
1393    
1394     <p>
1395 so 1.15 The configuration for swsusp is rather easy. If you didn't store the location
1396     of your swap partition in the kernel config, you can also pass it as a
1397     parameter with the <c>resume=/dev/SWAP</c> directive. If booting is not
1398     possible due to a broken image, use the <c>noresume</c> kernel parameter. The
1399 rane 1.20 <c>hibernate-cleanup</c> init script invalidates swsusp images during the boot
1400     process.
1401 swift 1.1 </p>
1402    
1403 so 1.15 <pre caption="Invalidating swsusp images during the boot process">
1404 rane 1.19 # <i>rc-update add hibernate-cleanup boot</i>
1405 so 1.15 </pre>
1406    
1407 swift 1.1 <p>
1408 so 1.15 To activate hibernate with swsusp, use the hibernate script and set
1409 nightmorph 1.24 <c>UseSysfsPowerState disk</c> in <path>/etc/hibernate/sysfs-disk</path>.
1410 swift 1.1 </p>
1411    
1412     <warn>
1413     Backup your data before doing this. Run <c>sync</c> before executing one of the
1414     commands to have cached data written to disk. First try it outside of X, then
1415     with X running, but not logged in.
1416     </warn>
1417 rane 1.20
1418 swift 1.1 <p>
1419     If you experience kernel panics due to uhci or similar, try to compile USB
1420     support as module and unload the modules before sending your laptop to sleep
1421 nightmorph 1.24 mode. There are configuration options for this in <path>common.conf</path>
1422 swift 1.1 </p>
1423    
1424 so 1.15 <pre caption="Hibernating with swsusp">
1425 nightmorph 1.24 # <i>nano -w /etc/hibernate/common.conf</i>
1426 so 1.15 <comment>(Make sure you have a backup of your data)</comment>
1427 rane 1.19 # <i>hibernate</i>
1428 so 1.15 </pre>
1429    
1430 swift 1.1 <p>
1431 so 1.15 The following section discusses the setup of suspend2 including fbsplash
1432     support for a nice graphical progress bar during suspend and resume.
1433     </p>
1434    
1435     <p>
1436 rane 1.20 The first part of the configuration is similar to the configuration of swsusp.
1437     In case you didn't store the location of your swap partition in the kernel
1438     config, you have to pass it as a kernel parameter with the
1439 so 1.15 <c>resume2=swap:/dev/SWAP</c> directive. If booting is not possible due to a
1440     broken image, append the <c>noresume2</c> parameter. Additionally, the
1441     <c>hibernate-cleanup</c> init script invalidates suspend2 images during the
1442     boot process.
1443     </p>
1444    
1445     <pre caption="Invalidating suspend2 images during the boot process">
1446 rane 1.19 # <i>rc-update add hibernate-cleanup boot</i>
1447 so 1.15 </pre>
1448    
1449 rane 1.20 <p>
1450 nightmorph 1.24 Now edit <path>/etc/hibernate/suspend2.conf</path>, enable the <c>suspend2</c>
1451     options you need. Do not enable the <c>fbsplash</c> options in
1452     <c>common.conf</c> just yet.
1453 swift 1.1 </p>
1454    
1455 so 1.15 <pre caption="Hibernating with suspend2">
1456 nightmorph 1.24 # <i>nano -w /etc/hibernate/suspend2.conf</i>
1457 so 1.15 <comment>(Make sure you have a backup of your data)</comment>
1458 rane 1.19 # <i>hibernate</i>
1459 swift 1.8 </pre>
1460    
1461 so 1.15 <p>
1462 rane 1.20 Please configure <c>fbsplash</c> now if you didn't do already. To enable
1463     fbsplash support during hibernation, the <c>sys-apps/suspend2-userui</c>
1464     package is needed. Additionally, you've got to enable the <c>fbsplash</c> USE
1465     flag.
1466 so 1.15 </p>
1467    
1468     <pre caption="Installing suspend2-userui">
1469 rane 1.19 # <i>echo "sys-apps/suspend2-userui fbsplash" >> /etc/portage/package.use</i>
1470 nightmorph 1.24 <comment>(It may be marked ~arch, so first it must be keyworded)</comment>
1471     # <i>echo "sys-apps/suspend2-userui" >> /etc/portage/package.keywords</i>
1472 rane 1.19 # <i>emerge suspend2-userui</i>
1473 so 1.15 </pre>
1474    
1475     <p>
1476     The ebuild tells you to make a symlink to the theme you want to use. For
1477     example, to use the <c>livecd-2005.1</c> theme, run the following command:
1478     </p>
1479    
1480     <pre caption="Using the livecd-2005.1 theme during hibernation">
1481 rane 1.19 # <i>ln -sfn /etc/splash/livecd-2005.1 /etc/splash/suspend2</i>
1482 so 1.15 </pre>
1483    
1484     <p>
1485     If you don't want a black screen in the first part of the resume process, you
1486     have to add the <c>suspend2ui_fbsplash</c> tool to your initrd image. Assuming
1487     you created the initrd image with <c>splash_geninitramfs</c> and saved it as
1488 rane 1.20 <path>/boot/fbsplash-emergence-1024x768</path>, here's how to do that.
1489 so 1.15 </p>
1490    
1491     <pre caption="Adding suspend2ui_fbsplash to an initrd image">
1492 rane 1.19 # <i>mount /boot</i>
1493     # <i>mkdir ~/initrd.d</i>
1494     # <i>cp /boot/fbsplash-emergence-1024x768 ~/initrd.d/</i>
1495     # <i>cd ~/initrd.d</i>
1496     # <i>gunzip -c fbsplash-emergence-1024x768 | cpio -idm --quiet -H newc</i>
1497     # <i>rm fbsplash-emergence-1024x768</i>
1498     # <i>cp /usr/sbin/suspend2ui_fbsplash sbin/</i>
1499     # <i>find . | cpio --quiet --dereference -o -H newc | gzip -9 > /boot/fbsplash-suspend2-emergence-1024x768</i>
1500 so 1.15 </pre>
1501    
1502     <p>
1503 nightmorph 1.24 Afterwards adjust <path>grub.conf</path> (or <path>lilo.conf</path>) so that
1504     your suspend2 kernel uses
1505     <path>/boot/fbsplash-suspend2-emergence-1024x768</path> as initrd image. You can
1506     now test a dry run to see if everything is setup correctly.
1507 so 1.15 </p>
1508    
1509     <pre caption="Test run for fbsplash hibernation">
1510 rane 1.19 # <i>suspend2ui_fbsplash -t</i>
1511 so 1.15 </pre>
1512    
1513     <p>
1514 nightmorph 1.24 Afterwards open <path>/etc/hibernate/common.conf</path> and activate the
1515     fbsplash options. Execute <c>hibernate</c> and enjoy.
1516 so 1.15 </p>
1517    
1518 swift 1.1 </body>
1519     </section>
1520     </chapter>
1521    
1522     <chapter>
1523     <title>Troubleshooting</title>
1524     <section>
1525     <body>
1526    
1527     <p>
1528     <e>Q:</e> I'm trying to change the CPU frequency, but
1529     <path>/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor</path> does not
1530     exist.
1531     </p>
1532    
1533     <p>
1534     <e>A:</e> Make sure your processor supports CPU frequency scaling and you chose
1535     the right CPUFreq driver for your processor. Here is a list of processors that
1536     are supported by cpufreq (kernel 2.6.7): ARM Integrator, ARM-SA1100,
1537     ARM-SA1110, AMD Elan - SC400, SC410, AMD mobile K6-2+, AMD mobile K6-3+, AMD
1538     mobile Duron, AMD mobile Athlon, AMD Opteron, AMD Athlon 64, Cyrix Media GXm,
1539     Intel mobile PIII and Intel mobile PIII-M on certain chipsets, Intel Pentium 4,
1540     Intel Xeon, Intel Pentium M (Centrino), National Semiconductors Geode GX,
1541     Transmeta Crusoe, VIA Cyrix 3 / C3, UltraSPARC-III, SuperH SH-3, SH-4, several
1542     "PowerBook" and "iBook2" and various processors on some ACPI 2.0-compatible
1543     systems (only if "ACPI Processor Performance States" are available to the
1544     ACPI/BIOS interface).
1545     </p>
1546    
1547     <p>
1548     <e>Q:</e> My laptop supports frequency scaling, but
1549     <path>/sys/devices/system/cpu/cpu0/cpufreq/</path> is empty.
1550     </p>
1551    
1552     <p>
1553     <e>A:</e> Look for ACPI related error messages with <c>dmesg | grep ACPI</c>.
1554     Try to update the BIOS, especially if a broken DSDT is reported. You can also
1555     try to fix it yourself (which is beyond the scope of this guide).
1556     </p>
1557    
1558     <p>
1559 rane 1.19 <e>Q:</e> My laptop supports frequency scaling, but according to
1560     <path>/proc/cpuinfo</path> the speed never changes.
1561 swift 1.1 </p>
1562    
1563     <p>
1564 swift 1.8 <e>A:</e> Probably you have activated symmetric multiprocessing support
1565     (CONFIG_SMP) in your kernel. Deactivate it and it should work. Some older
1566 rane 1.20 kernels had a bug causing this. In that case, run <c>emerge x86info</c>, update
1567     your kernel as asked and check the current frequency with
1568 swift 1.8 <c>x86info -mhz</c>.
1569 swift 1.1 </p>
1570    
1571     <p>
1572     <e>Q:</e> I can change the CPU frequency, but the range is not as wide as in
1573     another OS.
1574     </p>
1575    
1576     <p>
1577     <e>A:</e> You can combine frequency scaling with ACPI throttling to get a lower
1578     minimum frequency. Notice that throttling doesn't save much energy and is
1579     mainly used for thermal management (keeping your laptop cool and quiet). You
1580     can read the current throttling state with <c>cat
1581     /proc/acpi/processor/CPU/throttling</c> and change it with <c>echo -n "0:x" >
1582     /proc/acpi/processor/CPU/limit</c>, where x is one of the Tx states listed in
1583     <path>/proc/acpi/processor/CPU/throttling</path>.
1584     </p>
1585    
1586     <p>
1587 swift 1.8 <e>Q:</e> When configuring the kernel, powersave, performance and userspace
1588     governors show up, but that ondemand thing is missing. Where do I get it?
1589     </p>
1590    
1591     <p>
1592     <e>A:</e> The ondemand governor is only included in recent kernel sources. Try
1593     updating them.
1594     </p>
1595    
1596     <p>
1597 swift 1.1 <e>Q:</e> Battery life time seems to be worse than before.
1598     </p>
1599    
1600     <p>
1601     <e>A:</e> Check your BIOS settings. Maybe you forgot to re-enable some of the
1602     settings.
1603     </p>
1604    
1605     <p>
1606     <e>Q:</e> My battery is charged, but KDE reports there would be 0% left and
1607     immediately shuts down.
1608     </p>
1609    
1610     <p>
1611     <e>A:</e> Check that battery support is compiled into your kernel. If you use
1612     it as a module, make sure the module is loaded.
1613     </p>
1614    
1615     <p>
1616 rane 1.20 <e>Q:</e> My system logger reports things like "logger: ACPI group battery /
1617     action battery is not defined".
1618 nightmorph 1.17 </p>
1619    
1620     <p>
1621 rane 1.20 <e>A:</e> This message is generated by the <path>/etc/acpi/default.sh</path>
1622     script that is shipped with acpid. You can safely ignore it. If you like to get
1623     rid of it, you can comment the appropriate line in
1624     <path>/etc/acpi/default.sh</path> as shown below:
1625 nightmorph 1.17 </p>
1626    
1627     <pre caption="Disabling warnings about unknown acpi events">
1628     *) # logger "ACPI action $action is not defined"
1629     </pre>
1630    
1631     <p>
1632 swift 1.1 <e>Q:</e> I have a Dell Inspiron 51XX and I don't get any ACPI events.
1633     </p>
1634    
1635     <p>
1636     <e>A:</e> This seems to be a kernel bug. Read on <uri
1637     link="http://bugme.osdl.org/show_bug.cgi?id=1752">here</uri>.
1638     </p>
1639    
1640     <p>
1641 rane 1.20 <e>Q:</e> I activated the <c>DynamicClocks</c> option in <path>xorg.conf</path>
1642     and now X.org crashes / the screen stays black / my laptop doesn't shutdown
1643 so 1.15 properly.
1644     </p>
1645    
1646     <p>
1647 rane 1.20 <e>A:</e> This happens on some systems. You have to disable
1648     <c>DynamicClocks</c>.
1649 so 1.15 </p>
1650    
1651     <p>
1652     <e>Q:</e> I want to use suspend2, but it tells me my swap partition is too
1653     small. Resizing is not an option.
1654     </p>
1655    
1656     <p>
1657 rane 1.20 <e>A:</e> If there is enough free space on your system, you can use the
1658 so 1.15 filewriter instead of the swapwriter. The <c>hibernate-script</c> supports it
1659     as well. More information can be found in
1660     <path>/usr/src/linux/Documentation/power/suspend2.txt</path>.
1661     </p>
1662    
1663     <p>
1664 swift 1.1 <e>Q:</e> I just bought a brand new battery, but it only lasts for some
1665     minutes! What am I doing wrong?
1666     </p>
1667    
1668     <p>
1669     <e>A:</e> First follow your manufacturer's advice on how to charge the battery
1670 rane 1.20 correctly.
1671 swift 1.1 </p>
1672    
1673     <p>
1674     <e>Q:</e> The above didn't help. What should I do then?
1675     </p>
1676    
1677     <p>
1678     <e>A:</e> Some batteries sold as "new" are in fact old ones. Try the following:
1679     </p>
1680    
1681     <pre caption="Querying battery state">
1682     $ <i>grep capacity /proc/acpi/battery/BAT0/info</i>
1683     design capacity: 47520 mWh
1684     last full capacity: 41830 mWh
1685     </pre>
1686    
1687     <p>
1688     If the "last full capacity" differs significantly from the design capacity,
1689     your battery is probably broken. Try to claim your warranty.
1690     </p>
1691    
1692 swift 1.8 <p>
1693     <e>Q:</e> My problem is not listed above. Where should I go next?
1694     </p>
1695    
1696     <p>
1697 nightmorph 1.17 <e>A:</e> Don't fear to contact me, <mail link="earthwings@gentoo.org">Dennis
1698 rane 1.20 Nienhüser</mail>, directly. The <uri link="http://forums.gentoo.org">Gentoo
1699     Forums</uri> are a good place to get help as well. If you prefer IRC, try the
1700     <c>#gentoo-laptop</c> channel at <uri
1701     link="irc://irc.freenode.net">irc.freenode.net</uri>.
1702 swift 1.8 </p>
1703    
1704 swift 1.1 </body>
1705     </section>
1706     </chapter>
1707     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20