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