1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY pm-utils-download-http "https://pm-utils.freedesktop.org/releases/pm-utils-&pm-utils-version;.tar.gz">
|
---|
8 | <!ENTITY pm-utils-download-ftp " ">
|
---|
9 | <!ENTITY pm-utils-md5sum "1742a556089c36c3a89eb1b957da5a60">
|
---|
10 | <!ENTITY pm-utils-size "204 KB">
|
---|
11 | <!ENTITY pm-utils-buildsize "1.6 MB">
|
---|
12 | <!ENTITY pm-utils-time "0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="pm-utils" xreflabel="pm-utils-&pm-utils-version;">
|
---|
16 | <?dbhtml filename="pm-utils.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>pm-utils-&pm-utils-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="pm-utils">
|
---|
26 | <primary sortas="a-pm-utils">pm-utils</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Power Management Utilities</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | The <application>Power Management Utilities</application> is a small
|
---|
34 | collection of scripts to suspend and hibernate a computer that can be used
|
---|
35 | to run user supplied scripts on suspend and resume.
|
---|
36 | </para>
|
---|
37 |
|
---|
38 | &lfs81_checked;
|
---|
39 |
|
---|
40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
41 | <itemizedlist spacing="compact">
|
---|
42 | <listitem>
|
---|
43 | <para>
|
---|
44 | Download (HTTP): <ulink url="&pm-utils-download-http;"/>
|
---|
45 | </para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download (FTP): <ulink url="&pm-utils-download-ftp;"/>
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download MD5 sum: &pm-utils-md5sum;
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Download size: &pm-utils-size;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Estimated disk space required: &pm-utils-buildsize;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | <listitem>
|
---|
68 | <para>
|
---|
69 | Estimated build time: &pm-utils-time;
|
---|
70 | </para>
|
---|
71 | </listitem>
|
---|
72 | </itemizedlist>
|
---|
73 |
|
---|
74 | <bridgehead renderas="sect3">Power Management Utilities Dependencies</bridgehead>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
77 | <para role="optional">
|
---|
78 | <xref linkend="xmlto"/> (to generate man pages)
|
---|
79 | </para>
|
---|
80 |
|
---|
81 | <bridgehead renderas="sect4">Optional (runtime)</bridgehead>
|
---|
82 | <para role="optional">
|
---|
83 | <xref role="runtime" linkend="hdparm"/>,
|
---|
84 | <xref role="runtime" linkend="wireless_tools"/>,
|
---|
85 | <ulink role="runtime"
|
---|
86 | url="https://www.kernel.org/pub/software/network/ethtool/">
|
---|
87 | ethtool</ulink>, and
|
---|
88 | <ulink role="runtime"
|
---|
89 | url="http://ftp.de.debian.org/debian/pool/main/v/vbetool/">
|
---|
90 | vbetool</ulink>
|
---|
91 | </para>
|
---|
92 |
|
---|
93 | <para condition="html" role="usernotes">User Notes:
|
---|
94 | <ulink url="&blfs-wiki;/pm-utils"/>
|
---|
95 | </para>
|
---|
96 | </sect2>
|
---|
97 |
|
---|
98 | <sect2 role="kernel" id="pm-utils-kernel">
|
---|
99 | <title>Kernel Configuration</title>
|
---|
100 |
|
---|
101 | <para>
|
---|
102 | If needed, enable the following options in the kernel configuration and
|
---|
103 | recompile the kernel:
|
---|
104 | </para>
|
---|
105 |
|
---|
106 | <screen><literal>Power management and ACPI options --->
|
---|
107 | <*> Suspend to RAM and standby [CONFIG_SUSPEND]
|
---|
108 | <*> Hibernation (aka 'suspend to disk') [CONFIG_HIBERNATION]</literal></screen>
|
---|
109 |
|
---|
110 | <para>
|
---|
111 | Suspend to RAM allows the system to enter sleep states in which main
|
---|
112 | memory is powered and thus its contents are preserved. The method cuts
|
---|
113 | power to most parts of the machine aside from the RAM. Because of the
|
---|
114 | large power savings, it is advisable for laptops to automatically enter
|
---|
115 | this mode when the computer is running on batteries and the lid is closed
|
---|
116 | (or the user is inactive for some time).
|
---|
117 | </para>
|
---|
118 |
|
---|
119 | <para>
|
---|
120 | Suspend to disk (Hibernation) saves the machine's state into swap space
|
---|
121 | and completely powers off the machine. When the machine is powered on,
|
---|
122 | the state is restored. Until then, there is zero power consumption.
|
---|
123 | Suspend to RAM and hibernation are normally appropriate for portable
|
---|
124 | devices such as laptops, but can be used on workstations. The capability
|
---|
125 | is not really appropriate for servers.
|
---|
126 | </para>
|
---|
127 |
|
---|
128 | <para>
|
---|
129 | To use hibernation, the kernel parameter
|
---|
130 | resume=/dev/<swap_partition> has to be used on the kernel command
|
---|
131 | line (in grub.cfg). The swap partition should be at least the size of
|
---|
132 | the physical RAM on the system.
|
---|
133 | </para>
|
---|
134 |
|
---|
135 | <indexterm zone="pm-utils pm-utils-kernel">
|
---|
136 | <primary sortas="d-pm-utils">pm-utils</primary>
|
---|
137 | </indexterm>
|
---|
138 |
|
---|
139 | </sect2>
|
---|
140 |
|
---|
141 | <sect2 role="installation">
|
---|
142 | <title>Installation of Power Management Utilities</title>
|
---|
143 |
|
---|
144 | <para>
|
---|
145 | Install <application>Power Management Utilities</application> by
|
---|
146 | running the following commands:
|
---|
147 | </para>
|
---|
148 |
|
---|
149 | <screen><userinput>./configure --prefix=/usr \
|
---|
150 | --sysconfdir=/etc \
|
---|
151 | --docdir=/usr/share/doc/pm-utils-&pm-utils-version; &&
|
---|
152 | make</userinput></screen>
|
---|
153 |
|
---|
154 | <para>
|
---|
155 | This package does not come with a test suite.
|
---|
156 | </para>
|
---|
157 |
|
---|
158 | <para>
|
---|
159 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
160 | </para>
|
---|
161 |
|
---|
162 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
163 |
|
---|
164 | <para>
|
---|
165 | If you don't have <xref linkend="xmlto"/> installed, copy pregenerated
|
---|
166 | man pages:
|
---|
167 | </para>
|
---|
168 |
|
---|
169 | <screen role="root"><userinput>install -v -m644 man/*.1 /usr/share/man/man1 &&
|
---|
170 | install -v -m644 man/*.8 /usr/share/man/man8 &&
|
---|
171 | ln -sv pm-action.8 /usr/share/man/man8/pm-suspend.8 &&
|
---|
172 | ln -sv pm-action.8 /usr/share/man/man8/pm-hibernate.8 &&
|
---|
173 | ln -sv pm-action.8 /usr/share/man/man8/pm-suspend-hybrid.8</userinput></screen>
|
---|
174 |
|
---|
175 | </sect2>
|
---|
176 |
|
---|
177 | <sect2 role="configuration">
|
---|
178 | <title>Configuring Power Management Utilities</title>
|
---|
179 |
|
---|
180 | <para>
|
---|
181 | Suspend or resume functionality can be easily modified by installing files
|
---|
182 | into the <filename class="directory">/etc/pm/sleep.d</filename> directory.
|
---|
183 | These files, known as hooks, are run when the system is put into a sleep
|
---|
184 | state or resumed. Default hooks are located in <filename
|
---|
185 | class="directory">/usr/lib/pm-utils/sleep.d</filename>, and user hooks
|
---|
186 | should be put in <filename class="directory">/etc/pm/sleep.d</filename>.
|
---|
187 | See the pm-action(8) man page for more information.
|
---|
188 | </para>
|
---|
189 |
|
---|
190 | <para>
|
---|
191 | In order to use hibernation with <application>GRUB</application> and a
|
---|
192 | swap partition, you need to add kernel parameter
|
---|
193 | <literal>resume=<replaceable>swap_partition</replaceable></literal> (i.e.
|
---|
194 | <literal>resume=/dev/sda1</literal>) to the kernel line in the
|
---|
195 | <filename>/boot/grub/grub.cfg</filename> configuration file.
|
---|
196 | </para>
|
---|
197 |
|
---|
198 | </sect2>
|
---|
199 |
|
---|
200 | <sect2 role="content">
|
---|
201 | <title>Contents</title>
|
---|
202 |
|
---|
203 | <segmentedlist>
|
---|
204 | <segtitle>Installed Programs</segtitle>
|
---|
205 | <segtitle>Installed Libraries</segtitle>
|
---|
206 | <segtitle>Installed Directories</segtitle>
|
---|
207 |
|
---|
208 | <seglistitem>
|
---|
209 | <seg>
|
---|
210 | on_ac_power, pm-hibernate, pm-is-supported, pm-powersave, pm-suspend
|
---|
211 | and pm-suspend-hybrid
|
---|
212 | </seg>
|
---|
213 | <seg>
|
---|
214 | None
|
---|
215 | </seg>
|
---|
216 | <seg>
|
---|
217 | /etc/pm, /usr/lib/pm-utils and
|
---|
218 | /usr/share/doc/pm-utils-&pm-utils-version;
|
---|
219 | </seg>
|
---|
220 | </seglistitem>
|
---|
221 | </segmentedlist>
|
---|
222 |
|
---|
223 | <variablelist>
|
---|
224 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
225 | <?dbfo list-presentation="list"?>
|
---|
226 | <?dbhtml list-presentation="table"?>
|
---|
227 |
|
---|
228 | <varlistentry id="on_ac_power">
|
---|
229 | <term><command>on_ac_power</command></term>
|
---|
230 | <listitem>
|
---|
231 | <para>
|
---|
232 | is a script that determines whether the system is running on AC
|
---|
233 | power (rather than a battery).
|
---|
234 | </para>
|
---|
235 | <indexterm zone="pm-utils on_ac_power">
|
---|
236 | <primary sortas="b-on_ac_power">on_ac_power</primary>
|
---|
237 | </indexterm>
|
---|
238 | </listitem>
|
---|
239 | </varlistentry>
|
---|
240 |
|
---|
241 | <varlistentry id="pm-hibernate">
|
---|
242 | <term><command>pm-hibernate</command></term>
|
---|
243 | <listitem>
|
---|
244 | <para>
|
---|
245 | is a symlink to pm-action script that puts the computer into
|
---|
246 | hibernate mode (the system is fully powered off and system state is
|
---|
247 | saved to disk).
|
---|
248 | </para>
|
---|
249 | <indexterm zone="pm-utils pm-hibernate">
|
---|
250 | <primary sortas="b-pm-hibernate">pm-hibernate</primary>
|
---|
251 | </indexterm>
|
---|
252 | </listitem>
|
---|
253 | </varlistentry>
|
---|
254 |
|
---|
255 | <varlistentry id="pm-is-supported">
|
---|
256 | <term><command>pm-is-supported</command></term>
|
---|
257 | <listitem>
|
---|
258 | <para>
|
---|
259 | is a script that checks whether power management features such as
|
---|
260 | suspend and hibernate are supported.
|
---|
261 | </para>
|
---|
262 | <indexterm zone="pm-utils pm-is-supported">
|
---|
263 | <primary sortas="b-pm-is-supported">pm-is-supported</primary>
|
---|
264 | </indexterm>
|
---|
265 | </listitem>
|
---|
266 | </varlistentry>
|
---|
267 |
|
---|
268 | <varlistentry id="pm-powersave">
|
---|
269 | <term><command>pm-powersave</command></term>
|
---|
270 | <listitem>
|
---|
271 | <para>
|
---|
272 | is a script that puts the computer into powersaving (low power)
|
---|
273 | mode.
|
---|
274 | </para>
|
---|
275 | <indexterm zone="pm-utils pm-powersave">
|
---|
276 | <primary sortas="b-pm-powersave">pm-powersave</primary>
|
---|
277 | </indexterm>
|
---|
278 | </listitem>
|
---|
279 | </varlistentry>
|
---|
280 |
|
---|
281 | <varlistentry id="pm-suspend">
|
---|
282 | <term><command>pm-suspend</command></term>
|
---|
283 | <listitem>
|
---|
284 | <para>
|
---|
285 | is a symlink to pm-action script that puts the computer into suspend
|
---|
286 | mode (most devices are shut down and system state is saved in RAM).
|
---|
287 | </para>
|
---|
288 | <indexterm zone="pm-utils pm-suspend">
|
---|
289 | <primary sortas="b-pm-suspend">pm-suspend</primary>
|
---|
290 | </indexterm>
|
---|
291 | </listitem>
|
---|
292 | </varlistentry>
|
---|
293 |
|
---|
294 | <varlistentry id="pm-suspend-hybrid">
|
---|
295 | <term><command>pm-suspend-hybrid</command></term>
|
---|
296 | <listitem>
|
---|
297 | <para>
|
---|
298 | is a symlink to pm-action script that puts the computer into
|
---|
299 | hybrid-suspend mode (the system does everything it needs to
|
---|
300 | hibernate, but suspends instead of shutting down).
|
---|
301 | </para>
|
---|
302 | <indexterm zone="pm-utils pm-suspend-hybrid">
|
---|
303 | <primary sortas="b-pm-suspend-hybrid">pm-suspend-hybrid</primary>
|
---|
304 | </indexterm>
|
---|
305 | </listitem>
|
---|
306 | </varlistentry>
|
---|
307 |
|
---|
308 | </variablelist>
|
---|
309 |
|
---|
310 | </sect2>
|
---|
311 |
|
---|
312 | </sect1>
|
---|