source: general/sysutils/pm-utils.xml@ 08c3c25

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 08c3c25 was 08c3c25, checked in by Xi Ruoyao <xry111@…>, 11 months ago

pm-utils: Discourage using it on systemd

Not sure if we should hide this page at all if REV=systemd.

  • Property mode set to 100644
File size: 11.2 KB
Line 
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 these
38 functionalities so this package is likely unneeded and it may
39 conflict with <application>Systemd</application>. Read the
40 document for <filename>suspend.target</filename> and
41 <filename>hibernate.target</filename> in the man page
42 <filename>systemd.special(7)</filename> for details.
43 </para>
44 </note>
45
46 &lfs113_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 <screen><literal>Power management and ACPI options ---&gt;
122 &lt;*&gt; Suspend to RAM and standby [CONFIG_SUSPEND]
123 &lt;*&gt; Hibernation (aka 'suspend to disk') [CONFIG_HIBERNATION]</literal></screen>
124
125 <para>
126 Suspend to RAM allows the system to enter sleep states in which main
127 memory is powered and thus its contents are preserved. The method cuts
128 power to most parts of the machine aside from the RAM. Because of the
129 large power savings, it is advisable for laptops to automatically enter
130 this mode when the computer is running on batteries and the lid is closed
131 (or the user is inactive for some time).
132 </para>
133
134 <para>
135 Suspend to disk (Hibernation) saves the machine's state into swap space
136 and completely powers off the machine. When the machine is powered on,
137 the state is restored. Until then, there is zero power consumption.
138 Suspend to RAM and hibernation are normally appropriate for portable
139 devices such as laptops, but can be used on workstations. The capability
140 is not really appropriate for servers.
141 </para>
142
143 <para>
144 To use hibernation, the kernel parameter
145 resume=/dev/&lt;swap_partition&gt; has to be used on the kernel command
146 line (in grub.cfg). The swap partition should be at least the size of
147 the physical RAM on the system.
148 </para>
149
150 <indexterm zone="pm-utils pm-utils-kernel">
151 <primary sortas="d-pm-utils">pm-utils</primary>
152 </indexterm>
153
154 </sect2>
155
156 <sect2 role="installation">
157 <title>Installation of Power Management Utilities</title>
158
159 <para>
160 First, fix several bugs and a couple of incompatibilities with newer
161 kernels:
162 </para>
163
164<screen><userinput remap="pre">patch -Np1 -i ../pm-utils-&pm-utils-version;-bugfixes-1.patch</userinput></screen>
165
166 <para>
167 Install <application>Power Management Utilities</application> by
168 running the following commands:
169 </para>
170
171<screen><userinput>./configure --prefix=/usr \
172 --sysconfdir=/etc \
173 --docdir=/usr/share/doc/pm-utils-&pm-utils-version; &amp;&amp;
174make</userinput></screen>
175
176 <para>
177 This package does not come with a test suite.
178 </para>
179
180 <para>
181 Now, as the <systemitem class="username">root</systemitem> user:
182 </para>
183
184<screen role="root"><userinput>make install</userinput></screen>
185
186 <para>
187 If you don't have <xref linkend="xmlto"/> installed, copy pregenerated
188 man pages, as the <systemitem class="username">root</systemitem> user:
189 </para>
190
191<screen role="root"><userinput>install -v -m644 man/*.1 /usr/share/man/man1 &amp;&amp;
192install -v -m644 man/*.8 /usr/share/man/man8 &amp;&amp;
193ln -sv pm-action.8 /usr/share/man/man8/pm-suspend.8 &amp;&amp;
194ln -sv pm-action.8 /usr/share/man/man8/pm-hibernate.8 &amp;&amp;
195ln -sv pm-action.8 /usr/share/man/man8/pm-suspend-hybrid.8</userinput></screen>
196
197 </sect2>
198
199 <sect2 role="configuration">
200 <title>Configuring Power Management Utilities</title>
201
202 <para>
203 Suspend or resume functionality can be easily modified by installing files
204 into the <filename class="directory">/etc/pm/sleep.d</filename> directory.
205 These files, known as hooks, are run when the system is put into a sleep
206 state or resumed. Default hooks are located in <filename
207 class="directory">/usr/lib/pm-utils/sleep.d</filename>, and user hooks
208 should be put in <filename class="directory">/etc/pm/sleep.d</filename>.
209 See the pm-action(8) man page for more information.
210 </para>
211
212 <para>
213 In order to use hibernation with <application>GRUB</application> and a
214 swap partition, you need to add kernel parameter
215 <literal>resume=<replaceable>swap_partition</replaceable></literal> (e.g.
216 <literal>resume=/dev/sda1</literal>) to the kernel line in the
217 <filename>/boot/grub/grub.cfg</filename> configuration file.
218 </para>
219
220 </sect2>
221
222 <sect2 role="content">
223 <title>Contents</title>
224
225 <segmentedlist>
226 <segtitle>Installed Programs</segtitle>
227 <segtitle>Installed Libraries</segtitle>
228 <segtitle>Installed Directories</segtitle>
229
230 <seglistitem>
231 <seg>
232 on_ac_power, pm-hibernate, pm-is-supported, pm-powersave, pm-suspend
233 and pm-suspend-hybrid
234 </seg>
235 <seg>
236 None
237 </seg>
238 <seg>
239 /etc/pm, /usr/lib/pm-utils and
240 /usr/share/doc/pm-utils-&pm-utils-version;
241 </seg>
242 </seglistitem>
243 </segmentedlist>
244
245 <variablelist>
246 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
247 <?dbfo list-presentation="list"?>
248 <?dbhtml list-presentation="table"?>
249
250 <varlistentry id="on_ac_power">
251 <term><command>on_ac_power</command></term>
252 <listitem>
253 <para>
254 is a script that determines whether the system is running on AC
255 power (rather than a battery)
256 </para>
257 <indexterm zone="pm-utils on_ac_power">
258 <primary sortas="b-on_ac_power">on_ac_power</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="pm-hibernate">
264 <term><command>pm-hibernate</command></term>
265 <listitem>
266 <para>
267 is a symlink to pm-action script that puts the computer into
268 hibernate mode (the system is fully powered off and system state is
269 saved to disk)
270 </para>
271 <indexterm zone="pm-utils pm-hibernate">
272 <primary sortas="b-pm-hibernate">pm-hibernate</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="pm-is-supported">
278 <term><command>pm-is-supported</command></term>
279 <listitem>
280 <para>
281 is a script that checks whether power management features such as
282 suspend and hibernate are supported
283 </para>
284 <indexterm zone="pm-utils pm-is-supported">
285 <primary sortas="b-pm-is-supported">pm-is-supported</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="pm-powersave">
291 <term><command>pm-powersave</command></term>
292 <listitem>
293 <para>
294 is a script that puts the computer into powersaving (low power)
295 mode
296 </para>
297 <indexterm zone="pm-utils pm-powersave">
298 <primary sortas="b-pm-powersave">pm-powersave</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="pm-suspend">
304 <term><command>pm-suspend</command></term>
305 <listitem>
306 <para>
307 is a symlink to pm-action script that puts the computer into suspend
308 mode (most devices are shut down and system state is saved in RAM)
309 </para>
310 <indexterm zone="pm-utils pm-suspend">
311 <primary sortas="b-pm-suspend">pm-suspend</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="pm-suspend-hybrid">
317 <term><command>pm-suspend-hybrid</command></term>
318 <listitem>
319 <para>
320 is a symlink to pm-action script that puts the computer into
321 hybrid-suspend mode (the system does everything it needs to
322 hibernate, but suspends instead of shutting down)
323 </para>
324 <indexterm zone="pm-utils pm-suspend-hybrid">
325 <primary sortas="b-pm-suspend-hybrid">pm-suspend-hybrid</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 </variablelist>
331
332 </sect2>
333
334</sect1>
Note: See TracBrowser for help on using the repository browser.