1 |
nightmorph 07/07/08 07:48:13 |
2 |
|
3 |
Modified: power-management-guide.xml |
4 |
Log: |
5 |
updated power management guide for bug 184215 |
6 |
|
7 |
Revision Changes Path |
8 |
1.28 xml/htdocs/doc/en/power-management-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?rev=1.28&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?rev=1.28&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/power-management-guide.xml?r1=1.27&r2=1.28 |
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.27 |
18 |
retrieving revision 1.28 |
19 |
diff -u -r1.27 -r1.28 |
20 |
--- power-management-guide.xml 30 May 2007 19:09:04 -0000 1.27 |
21 |
+++ power-management-guide.xml 8 Jul 2007 07:48:12 -0000 1.28 |
22 |
@@ -1,6 +1,6 @@ |
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.27 2007/05/30 19:09:04 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/power-management-guide.xml,v 1.28 2007/07/08 07:48:12 nightmorph Exp $ --> |
27 |
<guide link="/doc/en/power-management-guide.xml"> |
28 |
<title>Power Management Guide</title> |
29 |
|
30 |
@@ -23,8 +23,8 @@ |
31 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 |
<license/> |
33 |
|
34 |
-<version>1.33</version> |
35 |
-<date>2007-05-30</date> |
36 |
+<version>1.34</version> |
37 |
+<date>2007-07-08</date> |
38 |
|
39 |
<chapter> |
40 |
<title>Introduction</title> |
41 |
@@ -1069,39 +1069,32 @@ |
42 |
<body> |
43 |
|
44 |
<p> |
45 |
-The second possibility is using a small script and <c>hdparm</c>. Skip this if |
46 |
-you are using laptop-mode. Otherwise, create <path>/etc/init.d/pmg_hda</path>: |
47 |
+The second possibility is using <c>hdparm</c>. Skip this if |
48 |
+you are using laptop-mode. Otherwise, edit <path>/etc/conf.d/hdparm</path> and |
49 |
+add the following values to your drive entries. This example assumes your hard |
50 |
+drive is called <b>hda</b>: |
51 |
</p> |
52 |
|
53 |
-<pre caption="Using hdparm for disk standby"> |
54 |
-#!/sbin/runscript |
55 |
- |
56 |
-depend() { |
57 |
-after hdparm |
58 |
-} |
59 |
- |
60 |
-start() { |
61 |
-ebegin "Activating Power Management for Hard Drives" |
62 |
-hdparm -q -S12 /dev/hda |
63 |
-eend $? |
64 |
-} |
65 |
- |
66 |
-stop () { |
67 |
-ebegin "Deactivating Power Management for Hard Drives" |
68 |
-hdparm -q -S253 /dev/hda |
69 |
-eend $? |
70 |
-} |
71 |
+<pre caption="Using /etc/conf.d/hdparm for disk standby"> |
72 |
+hda_args="-q -S12" |
73 |
</pre> |
74 |
|
75 |
<p> |
76 |
-See <c>man hdparm</c> for the options. If your script is ready, add it to the |
77 |
-battery runlevel. |
78 |
+This will activate power management for your hard drive. If you ever want to |
79 |
+deactivate power management, you can edit <path>/etc/conf.d/hdparm</path> and |
80 |
+change the values to <c>-q -S0</c>, or just run <c>hdparm -q -S0 /dev/hda</c>. |
81 |
+</p> |
82 |
+ |
83 |
+<p> |
84 |
+See <c>man hdparm</c> for the options. Though you can always start <c>hdparm</c> |
85 |
+manually when you are on battery power by running <c>/etc/init.d/hdparm |
86 |
+start</c>, it's much easier to automate its startup and shutdown. To do so, add |
87 |
+<c>hdparm</c> to the battery runlevel so that it will automatically enable power |
88 |
+management. |
89 |
</p> |
90 |
|
91 |
<pre caption="Automate disk standby settings"> |
92 |
-# <i>chmod +x /etc/init.d/pmg_hda</i> |
93 |
-# <i>/sbin/depscan.sh</i> |
94 |
-# <i>rc-update add pmg_hda battery</i> |
95 |
+# <i>rc-update add hdparm battery</i> |
96 |
</pre> |
97 |
|
98 |
<impo> |
99 |
@@ -1178,7 +1171,7 @@ |
100 |
|
101 |
<p> |
102 |
Wireless LAN cards consume quite a bit of energy. Put them in Power Management |
103 |
-mode in analogy to the <c>pmg_hda</c> script. |
104 |
+mode just like your hard drives. |
105 |
</p> |
106 |
|
107 |
<note> |
108 |
@@ -1186,36 +1179,21 @@ |
109 |
this with the actual name of your interface. |
110 |
</note> |
111 |
|
112 |
-<pre caption="WLAN Power Management automated"> |
113 |
-#!/sbin/runscript |
114 |
-start() { |
115 |
- ebegin "Activating Power Management for Wireless LAN" |
116 |
- iwconfig wlan0 power on |
117 |
- eend $? |
118 |
-} |
119 |
+<p> |
120 |
+Add the following script to <path>/etc/conf.d/net</path> to automatically enable |
121 |
+power management for your wireless card: |
122 |
+</p> |
123 |
|
124 |
-stop () { |
125 |
- ebegin "Deactivating Power Management for Wireless LAN" |
126 |
- iwconfig wlan0 power off |
127 |
- eend $? |
128 |
-} |
129 |
+<pre caption="Automated WLAN Power Management"> |
130 |
+iwconfig_wlan0="power on" |
131 |
</pre> |
132 |
|
133 |
<p> |
134 |
-Starting this script will activate power saving features for wlan0. Save it as |
135 |
-<path>/etc/init.d/pmg_wlan0</path> and add it to the battery runlevel like the |
136 |
-disk script above. See <c>man iwconfig</c> for details and more options like |
137 |
-the period between wakeups or timeout settings. If your driver and access point |
138 |
-support changing the beacon time, this is a good starting point to save even |
139 |
-more energy. |
140 |
+See <c>man iwconfig</c> for details and more options like the period between |
141 |
+wakeups or timeout settings. If your driver and access point support changing |
142 |
+the beacon time, this is a good starting point to save even more energy. |
143 |
</p> |
144 |
|
145 |
-<pre caption="Power Management for WLAN"> |
146 |
-# <i>chmod +x /etc/init.d/pmg_wlan0</i> |
147 |
-# <i>/sbin/depscan.sh</i> |
148 |
-# <i>rc-update add pmg_wlan0 battery</i> |
149 |
-</pre> |
150 |
- |
151 |
</body> |
152 |
</section> |
153 |
<section> |
154 |
|
155 |
|
156 |
|
157 |
-- |
158 |
gentoo-doc-cvs@g.o mailing list |