| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.40 2009/08/05 14:51:17 nightmorph Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.41 2009/08/12 02:24:57 nightmorph Exp $ --> |
| 4 | <guide link="/doc/en/power-management-guide.xml"> |
4 | <guide link="/doc/en/power-management-guide.xml"> |
| 5 | <title>Power Management Guide</title> |
5 | <title>Power Management Guide</title> |
| 6 | |
6 | |
| 7 | <author title="Author"> |
7 | <author title="Author"> |
| 8 | <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail> |
8 | <mail link="earthwings@gentoo.org">Dennis Nienhüser</mail> |
| … | |
… | |
| 21 | |
21 | |
| 22 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
22 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 23 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
23 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 24 | <license/> |
24 | <license/> |
| 25 | |
25 | |
| 26 | <version>1.43</version> |
26 | <version>1.44</version> |
| 27 | <date>2009-08-05</date> |
27 | <date>2009-08-11</date> |
| 28 | |
28 | |
| 29 | <chapter> |
29 | <chapter> |
| 30 | <title>Introduction</title> |
30 | <title>Introduction</title> |
| 31 | <section> |
31 | <section> |
| 32 | <body> |
32 | <body> |
| … | |
… | |
| 458 | </p> |
458 | </p> |
| 459 | |
459 | |
| 460 | </body> |
460 | </body> |
| 461 | </section> |
461 | </section> |
| 462 | <section> |
462 | <section> |
| 463 | <title>Setting The Frequency Manually</title> |
463 | <title>Setting The Frequency</title> |
| 464 | <body> |
464 | <body> |
| 465 | |
465 | |
| 466 | <p> |
466 | <p> |
| 467 | Decreasing CPU speed and voltage has two advantages: On the one hand less |
467 | Decreasing CPU speed and voltage has two advantages: On the one hand less |
| 468 | energy is consumed, on the other hand there is thermal improvement as your |
468 | energy is consumed, on the other hand there is thermal improvement as your |
| … | |
… | |
| 477 | section to verify yours is supported. |
477 | section to verify yours is supported. |
| 478 | </note> |
478 | </note> |
| 479 | |
479 | |
| 480 | <p> |
480 | <p> |
| 481 | It's time to test whether CPU frequency changing works. Let's install another |
481 | It's time to test whether CPU frequency changing works. Let's install another |
| 482 | tool which is very handy for debugging purposes: <c>sys-power/cpufrequtils</c> |
482 | tool: <c>sys-power/cpufrequtils</c>. |
| 483 | </p> |
483 | </p> |
| 484 | |
484 | |
| 485 | <pre caption="Checking CPU frequency"> |
485 | <pre caption="Checking CPU frequency"> |
| 486 | # <i>emerge cpufrequtils</i> |
486 | # <i>emerge cpufrequtils</i> |
| 487 | # <i>cpufreq-info</i> |
487 | # <i>cpufreq-info</i> |
| … | |
… | |
| 512 | governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as |
512 | governor and verify the change with <c>cpufreq-info</c>. If it doesn't work as |
| 513 | expected, you might find help in the <uri link="#doc_chap8">Troubleshooting |
513 | expected, you might find help in the <uri link="#doc_chap8">Troubleshooting |
| 514 | section</uri> in the end of this guide. |
514 | section</uri> in the end of this guide. |
| 515 | </p> |
515 | </p> |
| 516 | |
516 | |
|
|
517 | <p> |
|
|
518 | <c>cpufrequtils</c> can operate in an automatic mode (when you use the |
|
|
519 | <b>ondemand</b> governor), you can also switch to the <b>userspace</b> governor |
|
|
520 | if you want to manually set a specific speed. You can also statically set your |
|
|
521 | CPU to its highest or lowest frequency by using the <b>performance</b> |
|
|
522 | and <b>powersave</b> governors, respectively. |
|
|
523 | </p> |
|
|
524 | |
|
|
525 | <pre caption="Changing CPU speeds"> |
|
|
526 | <comment>(Set the highest available frequency)</comment> |
|
|
527 | # <i>cpufreq-set -g performance</i> |
|
|
528 | <comment>(Set the lowest available frequency)</comment> |
|
|
529 | # <i>cpufreq-set -g powersave</i> |
|
|
530 | <comment>(Set a specific frequency)</comment> |
|
|
531 | # <i>cpufreq-set -g userspace</i> |
|
|
532 | # <i>cpufreq-set -f 2.00ghz</i> |
|
|
533 | </pre> |
|
|
534 | |
| 517 | </body> |
535 | </body> |
| 518 | </section> |
|
|
| 519 | <section> |
536 | </section> |
| 520 | <title>Automated frequency adaption</title> |
537 | <section> |
|
|
538 | <title>Other CPU Speed Utilities</title> |
| 521 | <body> |
539 | <body> |
| 522 | |
540 | |
| 523 | <p> |
541 | <p> |
| 524 | The above is quite nice, but not doable in daily life. Better let your system |
542 | While <c>cpufrequtils</c> may be the best all-around program, there are some |
| 525 | set the appropriate frequency automatically. There are many different |
543 | other choices available in Portage. The following table gives a quick overview |
| 526 | approaches to do this. The following table gives a quick overview to help you |
544 | of available CPU speed utilities. It's roughly separated in three categories |
| 527 | decide on one of them. It's roughly separated in three categories <b>kernel</b> |
|
|
| 528 | for approaches that only need kernel support, <b>daemon</b> for programs that |
545 | <b>kernel</b> for approaches that only need kernel support, <b>daemon</b> for |
| 529 | run in the background and <b>graphical</b> for programs that provide a GUI for |
546 | programs that run in the background and <b>graphical</b> for programs that |
| 530 | easy configuration and changes. |
547 | provide a GUI for easy configuration and changes. |
| 531 | </p> |
548 | </p> |
| 532 | |
549 | |
| 533 | <table> |
550 | <table> |
| 534 | <tr> |
551 | <tr> |
| 535 | <th>Name</th> |
552 | <th>Name</th> |
| … | |
… | |
| 739 | <c>battery</c> runlevel as well. |
756 | <c>battery</c> runlevel as well. |
| 740 | </p> |
757 | </p> |
| 741 | |
758 | |
| 742 | <pre caption="Starting cpufreqd"> |
759 | <pre caption="Starting cpufreqd"> |
| 743 | # <i>rc-update add cpufreqd default battery</i> |
760 | # <i>rc-update add cpufreqd default battery</i> |
| 744 | # <i>rc</i> |
761 | # <i>/etc/init.d/cpufreqd start</i> |
| 745 | </pre> |
762 | </pre> |
| 746 | |
763 | |
| 747 | <p> |
764 | <p> |
| 748 | Sometimes it can be desirable to select another policy than the daemon chooses, |
765 | Sometimes it can be desirable to select another policy than the daemon chooses, |
| 749 | for example when battery power is low, but you know that AC will be available |
766 | for example when battery power is low, but you know that AC will be available |