Configuring Power Management in Fedora


Advanced Power Management (APM) enables workstations and servers to automatically turn off when instructed to shut down. Most often used by Linux mobile users, APM can help extend battery sessions through the use of intelligent storage-cell circuitry, CPU throttling (similar to, but not the same as safety thermal throttling incorporated by Intel in Pentium III and IV CPUs), and control of displays and hard drives.

Most PCs support APM via the BIOS and hardware. APM support is configured, enabled, and then incorporated in the Linux kernel.

APM information is constantly updated in the file /proc/apm, which can look like this:

# cat /proc/apm 1.14 1.2 0x03 0x01 0x03 0x09 100% 10800 sec


This example provides information such as battery charge, along with time and percentage of time remaining. From left to right in the example are the driver version, BIOS version, status, AC status, battery status, battery state, remaining battery life, and number of seconds of life remaining. Some X11 clients, such as the asapm, xapmload, or GKrellM clients, parse this file and display icons or graphical power LEDs to present the information in an easier-to-digest form. These clients can be especially helpful for notebook users.

APM is supported by all kernels included with Fedora. However, problematic hardware or APM misconfiguration can cause kernel panics with some hardware, resulting in the inability to boot Linux. When this happens, you must reconfigure APM, and then build and install a new Linux kernel. (See Chapter 39 for more information.)

Basic Linux kernel APM configuration options include

  • CONFIG_APM Whether or not to configure APM support

  • CONFIG_APM_IGNORE_USER_SUSPEND Ignores keyboard suspend instruction

  • CONFIG_APM_DO_ENABLE Enables APM at boot

  • CONFIG_APM_CPU_IDLE Idle CPU when not used

  • CONFIG_APM_DISPLAY_BLANK Enables monitor or LCD panel blanking

  • CONFIG_APM_RTC_IS_GMT Determines clock setting

  • CONFIG_APM_ALLOW_INTS Allows interrupts during APM use (such as serial-port activity)

  • CONFIG_APM_REAL_MODE_POWER_OFF Enables powering down

Fedora includes several APM-related commandssuch as apm that prints APM information and apmsleep, used to suspend and then awake notebook hardware at a specific time. Linux notebook users can use the apm command like this:

$ apm -v APM BIOS 1.2 (kernel driver 1.16) AC on-line, battery status high: 95%


Other power management incorporated in the kernel includes control of peripheral control interface (PCI) devices and display power management signaling (DPMS) for enabled monitors, which can help energy costs by placing devices in a low-power state after a preset time. Screen saving, as most astute Linux system administrators and users know, is no longer necessary to protect displays from image burn-in. And password protection enabled by the screensaver provides only a modicum of physical security.

Hardware health monitoring is supported by the lm_sensors software package, which acquired some notoriety when early versions allegedly caused IBM ThinkPad notebooks to suffer permanent damage. However, system administrators managing desktop PCs can benefit from using applications, such as the sensors command that takes advantage of the hardware monitoring features of the lm_sensors libraries.

You can customize the output of the sensors command by editing (as root) the /etc/sensors.conf file, but the default settings should work for your computer. To enable sensor reading, use the sensors-detect command to determine which kernel modules to load to enable sensor output:

# /usr/sbin/sensors-detect This program will help you determine which I2C/SMBus modules you need to load to use lm_sensors most effectively. You need to have i2c and lm_sensors installed before running this program. Also, you need to be 'root', or at least have access to the /dev/i2c-* files, for most things. If you have patched your kernel and have some drivers built in, you can safely answer NO if asked to load some modules. In this case, things may seem a bit confusing, but they will still work. It is generally safe and recommended to accept the default answers to all questions, unless you know what you're doing.  We can start with probing for (PCI) I2C or SMBus adapters.  You do not need any special privileges for this.  Do you want to probe now? (YES/no):


Type YES and press Enter to begin the probe (do not if you have an IBM ThinkPad notebook; see http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/README. thinkpad for more information). The command will then begin a series of probes of your PC's motherboard and report on found hardware. After you answer the prompts, the program will display one or more recommended command lines (and perhaps a new entry to /etc/modprobe.conf) to enable sensor reporting. For example,

modprobe i2c-isa modprobe via686a


You can then use the sensors command's -f option to view various component temperatures in Fahrenheit, like this:

$ sensors -f via686a-isa-6000 Adapter: ISA adapter Algorithm: ISA algorithm 2.0V:   +1.36 V (min = +1.79 V, max = +2.18 V) 2.5V:   +2.49 V (min = +2.24 V, max = +2.74 V) I/O:    +3.28 V (min = +2.95 V, max = +3.62 V) +5V:    +5.02 V (min = +4.47 V, max = +5.49 V) +12V:   +11.62 V (min = +10.79 V, max = +13.18 V) Case Fan: 2700 RPM (min = 48214 RPM, div = 2) CPU Fan: 3497 RPM (min = 67500 RPM, div = 2) SYS Temp: +98.8°F (limit = +295°F, hysteresis = -95°F) CPU Temp: +98.8°F (limit = +295°F, hysteresis = -95°F) SBr Temp: +79.3°F (limit = -74°F, hysteresis = -95°F)


Monitoring your system's hardware can be critically important, especially if you overclock the central processing unit (CPU) in order to gain performance.



Red Hat Fedora 5 Unleashed
Red Hat Fedora 5 Unleashed
ISBN: 067232847X
EAN: 2147483647
Year: 2004
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net