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