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