pm-utils-1.4.1

Introduction to Power Management Utilities

The Power Management Utilities is a small collection of scripts to suspend and hibernate computer that can be used to run user supplied scripts on suspend and resume.

This package is known to build and work properly using an LFS-8.0 platform.

Package Information

Power Management Utilities Dependencies

Optional

xmlto-0.0.28 (to generate man pages)

Optional (runtime)

Hdparm-9.51, Wireless Tools-29, ethtool, and vbetool

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pm-utils

Kernel Configuration

If needed, enable the following options in the kernel configuration and recompile the kernel:

Power management and ACPI options --->
    <*> Suspend to RAM and standby            [CONFIG_SUSPEND]
    <*> Hibernation (aka 'suspend to disk')   [CONFIG_HIBERNATION]

Suspend to RAM allows the system to enter sleep states in which main memory is powered and thus its contents are preserved. The method cuts power to most parts of the machine aside from the RAM. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time).

Suspend to disk (Hibernation) saves the machine's state into swap space and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is zero power consumption. Suspend to RAM and hibernation are normally appropriate for portable devices such as laptops, but can be used on workstations. The capability is not really appropriate for servers.

To use hibernation, the kernel parameter resume=/dev/<swap_partition> has to be used on the kernel command line (in grub.cfg). The swap partition should be at least the size of the physical RAM on the system.

Installation of Power Management Utilities

Install Power Management Utilities by running the following commands:

./configure --prefix=/usr     \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/pm-utils-1.4.1 &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you don't have xmlto-0.0.28 installed, copy pregenerated man pages:

install -v -m644 man/*.1 /usr/share/man/man1 &&
install -v -m644 man/*.8 /usr/share/man/man8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-suspend.8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-hibernate.8 &&
ln -sv pm-action.8 /usr/share/man/man8/pm-suspend-hybrid.8

Configuring Power Management Utilities

Suspend or resume functionality can be easily modified by installing files into the /etc/pm/sleep.d directory. These files, known as hooks, are run when the system is put into a sleep state or resumed. Default hooks are located in /usr/lib/pm-utils/sleep.d, and user hooks should be put in /etc/pm/sleep.d. See the pm-action(8) man page for more information.

In order to use hibernation with GRUB and a swap partition, you need to add kernel parameter resume=swap_partition (i.e. resume=/dev/sda1) to the kernel line in the /boot/grub/grub.cfg configuration file.

Contents

Installed Programs: on_ac_power, pm-hibernate, pm-is-supported, pm-powersave, pm-suspend and pm-suspend-hybrid
Installed Libraries: None
Installed Directories: /etc/pm, /usr/lib/pm-utils and /usr/share/doc/pm-utils-1.4.1

Short Descriptions

on_ac_power

is a script that determines whether the system is running on AC power (rather than a battery).

pm-hibernate

is a symlink to pm-action script that puts the computer into hibernate mode (the system is fully powered off and system state is saved to disk).

pm-is-supported

is a script that checks whether power management features such as suspend and hibernate are supported.

pm-powersave

is a script that puts the computer into powersaving (low power) mode.

pm-suspend

is a symlink to pm-action script that puts the computer into suspend mode (most devices are shut down and system state is saved in RAM).

pm-suspend-hybrid

is a symlink to pm-action script that puts the computer into hybrid-suspend mode (the system does everything it needs to hibernate, but suspends instead of shutting down).

Last updated on 2017-02-14 23:25:58 -0800