Difference between revisions of "How to make use of Power Management features"

From ThinkWiki
Jump to: navigation, search
(enabling the harddisks power management features)
(Added DynamicClocks in the Radeon Xorg driver)
Line 130: Line 130:
 
===Laptop-mode===
 
===Laptop-mode===
 
Todo...
 
Todo...
 +
 +
==DynamicClocks in the Radeon Xorg driver==
 +
The xorg X server have support for a power saving feature from ATI called PowerPlay. Xorg calls this feature DynamicClocks. It can be enabled in the server by adding '''Option  "DynamicClocks" "on"''' in the '''Device''' section in /etc/X11/xorg.conf
 +
 +
Section "Device"
 +
        Identifier  "Videocard0"
 +
        Driver      "radeon"
 +
        VendorName  "IBM Thinkpad"
 +
        BoardName  "ATI Radeon Mobility M9"
 +
        '''Option      "DynamicClocks" "on"'''
 +
EndSection
 +
 +
 +
With this option enabled, the X11 server should print (/var/log/Xorg.0.log):
 +
 +
(**) RADEON(0): Option "DynamicClocks" "on"
 +
(II) RADEON(0): Dynamic Clock Scaling Enabled
 +
 +
http://www.ati.com/products/pdf/powerplaywp2.pdf
 +
  
 
==other Hardware==
 
==other Hardware==
 
Todo...(if any - other ways of saving power and such)
 
Todo...(if any - other ways of saving power and such)

Revision as of 15:49, 16 November 2004

APM

general

You need to enable the APM Power Management support in the kernel and install the apmd to handle the events triggered by the kernel driver. The configuration for what to do at the different events is done in the proxy script which is usually found in /etc/apmd_proxy. See man apmd for further information on this.

Screen blanking (Standby)

Todo...

Suspend to RAM (Sleep)

Todo...

Suspend to disk (Hibernate)

The Phoenix BIOS allows you two ways to hibernate with APM: using a special partition or using a hibernation file on a dos type partition.

using a hibernation partition

Todo...

using a hibernation file on a dos partition

The partition to put the file on must be a dos or vfat partition. Fat32 formatted partitions have been reported successful as well as Fat16 formatted ones. The file is either created with phdisk.exe, if you happen to have a floppy drive and a bootable dos floppy disk that you can start it from. Under Linux tphdisk will do this job for you.

Todo... (how to create the file, partition size)

ACPI

general

Todo...

Screen blanking (Standby)

Todo...

Suspend to RAM (Sleep)

ACPI Sleep and suspend-to-ram with recent 2.6.x kernels usually works fine, too.

Todo...

Suspend to disk (Hibernate)

There are two drivers for this available:

  • swsusp, which is in the kernel and
  • SoftwareSuspend2 which is more feature rich, but not yet in the kernel, so you have to patch it in yourself

Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on this page.

using swsusp

Todo...

using SoftwareSuspend2

Todo...

Dynamic Frequency Scaling (SpeedStep)

configuring the kernel

2.4 kernels

Todo...

2.6 kernels

Todo...

If you have a Coppermine-piix-smi based Thinkpads like from the A2x, X2x and T2x series you might want to look at this page.

configuring SpeedStep daemons

Harddisk Power Management

Todo...

enabling the harddisks power management features

#!/bin/sh
# I' using this on FC2 and FC3
# cpu throttling off as FC does thisout-of-the-box
# turning swap off is only for those that feel comfortable
# doing something this nasty.
#
# pcfe, 2004-11-15
                                                                                                                                     
# cpu throttling
# cat /proc/acpi/processor/CPU0/throttling for more info
ACAD_THR=0
BATT_THR=2
                                                                                                                                    
# spindown time for HD (man hdparm for valid values)
# I prefer 2 hours for acad and 2 min for batt
ACAD_HD=244
BATT_HD=24
                                                                                                                                    
# Power management level
# 255 (off) on AC
# 128 (medium) on batt
# lowered to 32, pcfe, 2004-06-23
# upped to 64, pcfe, 2004-07-14
# upped to 96, pcfe, 2004-10-20
ACAD_PM=255
BATT_PM=96
                                                                                                                                    
# ac/battery event handler
                                                                                                                                    
status=`awk '/^state: / { print $2 }' /proc/acpi/ac_adapter/AC/state`
                                                                                                                                     
case $status in
       "on-line")
               logger "Running /sbin/laptop_mode stop"
               /sbin/laptop_mode stop
               logger "Setting HD spindown for AC mode with hdparm -S $ACAD_HD /dev/hda."
               /sbin/hdparm -S $ACAD_HD /dev/hda > /dev/null 2>&1
               logger "Setting HD powersaving for AC mode with hdparm -B $ACAD_PM /dev/hda."
               /sbin/hdparm -B $ACAD_PM /dev/hda > /dev/null 2>&1
               #logger "Turning on swap."
               #/sbin/swapon -a
               #echo -n $ACAD_CPU:$ACAD_THR > /proc/acpi/processor/CPU0/limit
               exit 0
       ;;
       "off-line")
               #logger "Turning off swap."
               #/sbin/swapoff -a
               logger "Running /sbin/laptop_mode start"
               /sbin/laptop_mode start
               logger "Setting HD spindown for battery mode with hdparm -S $BATT_HD /dev/hda."
               /sbin/hdparm -S $BATT_HD /dev/hda > /dev/null 2>&1
               logger "Setting HD powersaving for battery mode with hdparm -B $BATT_PM /dev/hda."
               /sbin/hdparm -B $BATT_PM /dev/hda > /dev/null 2>&1
               #echo -n $BATT_CPU:$BATT_THR > /proc/acpi/processor/CPU0/limit
               exit 0
       ;;
esac

Laptop-mode

Todo...

DynamicClocks in the Radeon Xorg driver

The xorg X server have support for a power saving feature from ATI called PowerPlay. Xorg calls this feature DynamicClocks. It can be enabled in the server by adding Option "DynamicClocks" "on" in the Device section in /etc/X11/xorg.conf

Section "Device"
       Identifier  "Videocard0"
       Driver      "radeon"
       VendorName  "IBM Thinkpad"
       BoardName   "ATI Radeon Mobility M9"
       Option      "DynamicClocks" "on"
EndSection


With this option enabled, the X11 server should print (/var/log/Xorg.0.log):

(**) RADEON(0): Option "DynamicClocks" "on"
(II) RADEON(0): Dynamic Clock Scaling Enabled

http://www.ati.com/products/pdf/powerplaywp2.pdf


other Hardware

Todo...(if any - other ways of saving power and such)