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