Difference between revisions of "Powertop"

From ArchWiki
Jump to: navigation, search
(VM Writeback Time: moving)
(Tips and tricks: moving rest to power saving)
Line 20: Line 20:
  
 
PowerTOP suggests a few methods to reduce the power consumption further. You can apply these settings at boot by using [[module parameters]], [[udev rules]] and [[sysctl]]. For details, see the [[power saving]] page.
 
PowerTOP suggests a few methods to reduce the power consumption further. You can apply these settings at boot by using [[module parameters]], [[udev rules]] and [[sysctl]]. For details, see the [[power saving]] page.
 
=== Noatime Mount Option ===
 
See [[Fstab#atime_options|Fstab]].
 
 
=== Bluetooth ===
 
[[Kernel_modules#Blacklisting|Blacklist]] the {{ic|hci_usb}} module if the driver is loaded automatically.
 
 
=== Laptop Mode ===
 
echo 5 > /proc/sys/vm/laptop_mode
 
 
=== Runtime Power Management ===
 
for i in `find /sys/devices/*/power/control`; do echo auto > $i; done;
 
 
=== SATA Active Link Powermanagement ===
 
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
 
 
=== USB Autosuspend ===
 
To enable USB autosuspend after 2 seconds of inactivity:
 
for i in `find /sys/bus/usb/devices/*/power/control`; do echo auto > $i; done;
 
for i in `find /sys/bus/usb/devices/*/power/autosuspend`; do echo '''2''' > $i; done;
 
 
=== Device Power Management ===
 
echo auto | tee /sys/bus/i2c/devices/*/power/control > /dev/null
 
echo auto | tee /sys/bus/pci/devices/*/power/control > /dev/null
 
echo auto | tee /sys/bus/spi/devices/*/power/control > /dev/null
 
 
=== View Power Setings ===
 
This function shows various power settings.  Note you either must be root or you must have sudo.
 
 
{{bc|<nowiki>function aa_power_settings ()
 
{
 
  sudo bash -c '
 
    for i in `find /sys/devices -name "bMaxPower"`;
 
    do
 
        for ii in `find $i -type f`;
 
        do
 
            bd=`dirname $ii`;
 
            busnum=`cat $bd/busnum`;
 
            devnum=`cat $bd/devnum`;
 
            title=`lsusb -s $busnum:$devnum`;
 
            echo -e "\n\n+++ $title\n  -$bd\n  -$ii";
 
            for ff in `find $bd/power -type f ! -empty 2>/dev/null`;
 
            do
 
                v=`cat $ff 2>/dev/null|tr -d "\n"`;
 
                [[ ${#v} -gt 0 ]] && echo -e " `basename $ff`=$v";
 
                v=;
 
            done | sort -g;
 
        done;
 
    done;
 
    echo -e "\n\n\n+++ Kernel Modules\n";
 
    for m in `command lspci -k|sed -n "/in use:/s,^.*: ,,p"|sort -u`;
 
    do
 
        echo "+ $m";
 
        systool -v -m $m 2> /dev/null | sed -n "/Parameters:/,/^$/p";
 
    done
 
  ';
 
}</nowiki>}}
 

Revision as of 23:57, 23 October 2012

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary link Template:Article summary link Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

PowerTOP is a tool provided by Intel to enable various powersaving modes in userspace, kernel and hardware. It is possible to monitor processes and show which of them are utilizing the CPU and wake it from its Idle-States.

Installation

Install package powertop, available in Official Repositories.

Powertop was updated to 2.0 which comes with more features (Article from the H Open). For more information, see the Release Announcement.

Tips and tricks

PowerTOP suggests a few methods to reduce the power consumption further. You can apply these settings at boot by using module parameters, udev rules and sysctl. For details, see the power saving page.