[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 | <sect1info>
|
---|
[d027410] | 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[8957e1c] | 21 | </sect1info>
|
---|
| 22 |
|
---|
[70727c9] | 23 | <title>pm-utils-&pm-utils-version;</title>
|
---|
[8957e1c] | 24 |
|
---|
[70727c9] | 25 | <indexterm zone="pm-utils">
|
---|
| 26 | <primary sortas="a-pm-utils">pm-utils</primary>
|
---|
[8957e1c] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Power Management Utilities</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
[af8a78d] | 33 | The <application>Power Management Utilities</application> provide
|
---|
| 34 | simple shell command line tools to suspend and hibernate the computer.
|
---|
| 35 | They can be used to run user supplied scripts on suspend and resume.
|
---|
[8957e1c] | 36 | </para>
|
---|
| 37 |
|
---|
[9eb7ee7] | 38 | &lfs83_checked;
|
---|
[8957e1c] | 39 |
|
---|
| 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>
|
---|
[70727c9] | 44 | Download (HTTP): <ulink url="&pm-utils-download-http;"/>
|
---|
[8957e1c] | 45 | </para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>
|
---|
[70727c9] | 49 | Download (FTP): <ulink url="&pm-utils-download-ftp;"/>
|
---|
[8957e1c] | 50 | </para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>
|
---|
[70727c9] | 54 | Download MD5 sum: &pm-utils-md5sum;
|
---|
[8957e1c] | 55 | </para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>
|
---|
[70727c9] | 59 | Download size: &pm-utils-size;
|
---|
[8957e1c] | 60 | </para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>
|
---|
[70727c9] | 64 | Estimated disk space required: &pm-utils-buildsize;
|
---|
[8957e1c] | 65 | </para>
|
---|
| 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>
|
---|
[70727c9] | 69 | Estimated build time: &pm-utils-time;
|
---|
[8957e1c] | 70 | </para>
|
---|
| 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
[70727c9] | 74 | <bridgehead renderas="sect3">Power Management Utilities Dependencies</bridgehead>
|
---|
[8957e1c] | 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">
|
---|
[572553b] | 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>
|
---|
[8957e1c] | 91 | </para>
|
---|
| 92 |
|
---|
| 93 | <para condition="html" role="usernotes">User Notes:
|
---|
| 94 | <ulink url="&blfs-wiki;/pm-utils"/>
|
---|
| 95 | </para>
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
[31fc886] | 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>
|
---|
[f3429309] | 118 |
|
---|
[31fc886] | 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 |
|
---|
[8957e1c] | 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 |
|
---|
[f23c35f4] | 149 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 150 | --sysconfdir=/etc \
|
---|
[70727c9] | 151 | --docdir=/usr/share/doc/pm-utils-&pm-utils-version; &&
|
---|
[8957e1c] | 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
|
---|
[59bf9513] | 166 | man pages, as the <systemitem class="username">root</systemitem> user:
|
---|
[8957e1c] | 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
|
---|
[ced6c5c9] | 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.
|
---|
[8957e1c] | 188 | </para>
|
---|
| 189 |
|
---|
[5251abd7] | 190 | <para>
|
---|
| 191 | In order to use hibernation with <application>GRUB</application> and a
|
---|
| 192 | swap partition, you need to add kernel parameter
|
---|
[af8a78d] | 193 | <literal>resume=<replaceable>swap_partition</replaceable></literal> (e.g.
|
---|
[5251abd7] | 194 | <literal>resume=/dev/sda1</literal>) to the kernel line in the
|
---|
| 195 | <filename>/boot/grub/grub.cfg</filename> configuration file.
|
---|
| 196 | </para>
|
---|
| 197 |
|
---|
[8957e1c] | 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
|
---|
[70727c9] | 218 | /usr/share/doc/pm-utils-&pm-utils-version;
|
---|
[8957e1c] | 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>
|
---|
[70727c9] | 235 | <indexterm zone="pm-utils on_ac_power">
|
---|
[8957e1c] | 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
|
---|
[f3429309] | 247 | saved to disk).
|
---|
[8957e1c] | 248 | </para>
|
---|
[70727c9] | 249 | <indexterm zone="pm-utils pm-hibernate">
|
---|
[8957e1c] | 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>
|
---|
[70727c9] | 262 | <indexterm zone="pm-utils pm-is-supported">
|
---|
[8957e1c] | 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>
|
---|
[70727c9] | 275 | <indexterm zone="pm-utils pm-powersave">
|
---|
[8957e1c] | 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>
|
---|
[70727c9] | 288 | <indexterm zone="pm-utils pm-suspend">
|
---|
[8957e1c] | 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>
|
---|
[70727c9] | 302 | <indexterm zone="pm-utils pm-suspend-hybrid">
|
---|
[8957e1c] | 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>
|
---|