Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 5th July 2012, 10:50 PM
screamin_jesus Offline
Registered User
 
Join Date: Jun 2007
Posts: 232
linuxfirefox
Laptop Power management with pm-utils

To my suprise when I ran powertop on my fresh fedora 17 install, powertop reported all tunables bad and fedora doesn't seem to have any laptop power saving features enabled by default, nor does it have any of the pm-utils power saving scripts in /usr/lib64/pm-utils/power.d or /etc/pm/power.d.

These scripts may have varying degrees of success on different hardware, but they work perfeclty for me. Ubuntu has enabled a few of these by default in 12.04. I was able to easily save a few watts of power on battery and show all "good" in powertop by doing the following:

Download the upstream pm-utils source from here:
http://pm-utils.freedesktop.org/rele...s-1.4.1.tar.gz

Once extracted you can find various power saving scripts in: pm-utils-1.4.1/pm/power.d. Take the scripts you wish to use, and drop them into /etc/pm/power.d and make them executable. This will enable a good amount of the powertop recommended tunables automatically when you are on battery.

After doing this I did a few additional things to get the remaining powertop recommendations set to 'good'.

I added a script called "device_pm" (Using a script I found on the arch forums: https://bbs.archlinux.org/viewtopic.php?pid=860231). to enable runtime pm for all my pci devices:

Code:
#!/bin/sh

device_pm() {
    for dpcontrol in /sys/bus/{pci,spi,i2c}/devices/*/power/control; do
        [ -w "$dpcontrol" ] || continue
        echo $1 > "$dpcontrol"
    done
}

case "$1" in
    true)
        echo "**device power management ON"
        device_pm auto
        ;;
    false)
        echo "**device power management OFF"
        device_pm on
        ;;
esac

exit 0
I added a script called usb_pm (taken from the arch wiki: https://wiki.archlinux.org/index.php...utils_Settings) to enable usb autosuspend and disable nmi_watchdog:

Code:
#!/bin/sh
case "$1" in
    true)
       # USB powersaving
        for i in /sys/bus/usb/devices/*/power/autosuspend; do
            echo 1 > $i
        done
        for i in /sys/bus/usb/devices/*/power/control; do
            echo auto > $i
        done
    sysctl kernel.nmi_watchdog=0
    ;;
    false)
        for i in /sys/bus/usb/devices/*/power/autosuspend; do
            echo 2 > $i
        done
        for i in /sys/bus/usb/devices/*/power/control; do
            echo on > $i
        done
    sysctl kernel.nmi_watchdog=1
    ;;
esac

exit 0
I added a simpler script for intel audio power saving (taken from a script on the crunchbang forums: http://crunchbanglinux.org/forums/to...pt-for-debian/) that worked better on my machine than the pm-utils one:


Code:
#!/bin/sh
# A script to enable intel audio power saving on fedora

case "$1" in
    true)
    # Enable some power saving settings while on battery
       # Intel power saving
        echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller
        echo 1 > /sys/module/snd_hda_intel/parameters/power_save
    ;;
    false)
       #Return settings to default on AC power
        echo N > /sys/module/snd_hda_intel/parameters/power_save_controller
        echo 0 > /sys/module/snd_hda_intel/parameters/power_save
    ;;
esac

exit 0
and lastly, increase the vm_writeback value on battery (taken from arch wiki: https://wiki.archlin...-utils_Settings)

Code:
#!/bin/sh
case "$1" in
    true)
       # Less VM disk activity. Suggested by powertop
        echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
    ;;
    false)
       #Return settings to default on AC power
        echo 500 > /proc/sys/vm/dirty_writeback_centisecs
    ;;
esac

exit 0
And here are the results
http://i.imgur.com/ZLXQw.png
http://i.imgur.com/GzFPI.jpg

Last edited by screamin_jesus; 6th July 2012 at 07:43 PM.
Reply With Quote
 

Tags
management, pmutils, power

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Power management in FC4 y_farkash Using Fedora 2 3rd April 2008 12:06 PM
Need help with power management dupies Using Fedora 0 4th March 2007 07:16 AM
Power Management BigWaxer Using Fedora 4 19th February 2007 02:17 AM
fc3 power management armen Hardware & Laptops 3 22nd March 2005 09:10 AM
Power Management jbyers Using Fedora 5 24th January 2005 06:13 PM


Current GMT-time: 10:18 (Friday, 24-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Conceicao da Feira Photos - Rouyn-Noranda - Pundong Travel Photos on Instagram