The powersave package cares about
the basic power saving functions. User controlled events like suspend events
or the system's reaction to different levels of battery charge and events
triggered by ACPI buttons, are entirely controlled via the respective desktop
applets KPowersave in KDE and GNOME Powermanager in GNOME.
![]() | For More Information |
|---|---|
For more information on KPowersave, turn to http://www.opensuse.org/Projects_KPowersave. For more information on GNOME Power Manager, turn to http://www.gnome.org/projects/gnome-power-manager/. | |
This package contains all power management features of your computer. It
supports hardware using ACPI, APM, IDE hard disks, and
PowerNow! or SpeedStep
technologies. The functionality from the packages apmd, acpid, and ospmd have been consolidated in the
powersave package. Daemons from
these packages, except acpid that acts as a multiplexer for acpi events,
should not be run concurrently with the powersave daemon.
Even if your system does not contain all the hardware elements listed above, use the powersave daemon for controlling the power saving function. Because ACPI and APM are mutually exclusive, you can only use one of these systems on your computer. The daemon automatically detects any changes in the hardware configuration.
The configuration of powersave is distributed to several files. Every configuration option listed there contains additional documentation about its functionality.
/etc/sysconfig/powersave/common
This file contains general settings for the powersave daemon. For
example, the amount of debug messages in
/var/log/messages can be increased by increasing
the value of the variable DEBUG.
/etc/sysconfig/powersave/events
The powersave daemon needs this file for processing system events. An
event can be assigned external actions or actions performed by the daemon
itself. For external actions, the daemon tries to run an executable file
(usually a Bash script) in
/usr/lib/powersave/scripts/. Predefined internal
actions are:
ignore
throttle
dethrottle
suspend_to_disk
suspend_to_ram
standby
notify
reread_cpu_capabilities
throttle slows down the processor by the
value defined in MAX_THROTTLING.
This value depends on the current scheme.
dethrottle sets the processor to
full performance.
The directory
/usr/lib/powersave/scripts
contains scripts for processing events:
Useful if the screen is displaced after a suspend or standby.
Saves the settings and logs out from GNOME, KDE, or other window managers.
Saves the GNOME or KDE settings and shuts down the system.
Executes the disk settings.
If, for example, the variable
EVENT_AC_ADAPTER_ONLINE="set_disk_settings
throttle" is set, the two scripts or actions are processed
in the specified order as soon as the user plugs in the AC adapter. The
daemon runs the external script
/usr/lib/powersave/scripts/set_disk_settings. After
this script has been processed successfully, the daemon runs the internal
action throttle.
The actions for the event of a sleep button could be modified as in
EVENT_BUTTON_SLEEP="notify suspend_to_disk". In
this case, the user is informed about the suspend by a pop-up window in X
or a message on the console. Subsequently,
suspend_to_disk is executed. The internal action
notify can be customized using the variable
NOTIFY_METHOD in
/etc/sysconfig/powersave/common.
/etc/sysconfig/powersave/thermal
Activates cooling and thermal control. Details about this
subject are available in the file
/usr/share/doc/packages/powersave/README.thermal.
/etc/sysconfig/powersave/scheme_*These are the various schemes that adapt the power consumption to certain deployment scenarios. A number of schemes are preconfigured and can be used as they are. Custom schemes can be saved here.
There are three basic ACPI sleep modes and two APM sleep modes:
Saves the entire memory content to the hard disk. The computer is switched off completely and does not consume any power. This sleep mode is enabled by default and should work on all systems.
Saves the states of all devices to the main memory. Only the main memory continues consuming power. For a list of supported hardware, refer to http://suspend.cvs.sourceforge.net/suspend/suspend/whitelist.c?view=markup.
Switches some devices off (manufacturer-dependent).
The system behavior can be adapted to the type of power supply. The power consumption of the system should be reduced when the system is disconnected from the AC power supply and operated with the battery. Similarly, the performance should automatically increase as soon as the system is connected to the AC power supply. The CPU frequency, the power saving function of IDE, and a number of other parameters can be modified.
The actions to execute when the computer is disconnected
from or connected to the AC power supply are defined in
/etc/sysconfig/powersave/events. Select the
schemes to use in /etc/sysconfig/powersave/common:
AC_SCHEME="performance" BATTERY_SCHEME="powersave"
The schemes are stored in files in
/etc/sysconfig/powersave. The filenames are in
the format scheme_name-of-the-scheme. The example
refers to two schemes:
scheme_performance and
scheme_powersave. performance,
powersave, presentation, and
acoustic are preconfigured. Existing schemes can be
edited, created, deleted, or associated with different power supply states
with the help of the YaST power management module.
All error messages and alerts are logged in the file
/var/log/messages. If you cannot find the needed
information, increase the verbosity of the messages of powersave using
DEBUG in the file
/etc/sysconfig/powersave/common. Increase the value of
the variable to 7 or even 15 and
restart the daemon. The more detailed error messages in
/var/log/messages should help you to find the error.
The following sections cover the most common problems with powersave.
If you experience problems with ACPI, use the command dmesg|grep
-i acpi to search
the output of dmesg for ACPI-specific messages. A BIOS
update may
be required to resolve the problem. Go to the home page of your laptop
manufacturer, look for an updated BIOS version, and install it. Ask the
manufacturer to comply with the latest ACPI specification. If the errors
persist after the BIOS update, proceed as follows to replace the faulty
DSDT table in your BIOS with an updated DSDT:
Download the DSDT for your system from http://acpi.sourceforge.net/dsdt/view.php. Check if the file is
decompressed and compiled as shown by the file extension
.aml (ACPI machine language). If this is the case,
continue with step 3.
If the file extension of the downloaded table is
.asl (ACPI source language), compile it with iasl
(package pmtools). Enter the
command iasl -sa file.asl. The latest
version of iasl (Intel ACPI compiler) is available at http://developer.intel.com/technology/iapc/acpi/downloads.htm.
Copy the file DSDT.aml to any location
(/etc/DSDT.aml is recommended). Edit
/etc/sysconfig/kernel and adapt the path to the DSDT
file accordingly. Start mkinitrd (package mkinitrd). Whenever you install the kernel
and use mkinitrd to create an
initrd, the modified DSDT is integrated and loaded
when the system is booted.
Refer to the kernel sources (kernel-source) to see if your processor is
supported. You may need a special kernel module or module option to
activate CPU frequency control. This information is available in
/usr/src/linux/Documentation/cpu-freq/*. If a special
module or module option is needed, configure it in the file
/etc/sysconfig/powersave/cpufreq by means of the
variables CPUFREQD_MODULE and
CPUFREQD_MODULE_OPTS.
/usr/share/doc/packages/powersave—Local Powersave
daemon documentation
http://powersave.sourceforge.net—Most recent Powersave daemon documentation
http://www.opensuse.org/Projects_Powersave—Project page in the openSUSE wiki
http://www.opensuse.org/Projects_YaST_PowerManagement—Basic documentation on the use of the YaST power management module
http://www.gnome.org/projects/gnome-power-manager/—Basic information on the GNOME Power Manager applet
http://www.opensuse.org/Projects_KPowersave—Basic information on KPowersave