Recommended Posts

I've noticed a lot of distros really don't include many (or any) laptop power management tweaks by default. The only distro that seems to try to do this is ubuntu 12.04, which already does some of the stuff in this how to. When I recently ran powertop on my fedora 17 install and it reported relatively high battery discharge, and all the tunables were shown as "bad" I decided to use the same tweaks I had on my arch linux install, using pm-utils scripts. There are other ways to do this, such as laptop-mode-tools and jupiter, but I've had the best success with the following:

Note, that some of these scripts have varying levels of success on different hardware, you may want to look at them and tweak them a little bit if need be, or remove ones that don't work for you (for example, I found the pm-utils 'harddrive' script to be too aggresive for my taste, so I increased the battery APM to 128 and the spindown time to 3 minutes, which are the default settings ubuntu 12.04 uses). You can view the following log to see if the scripts are executing properly:

cat /var/log/pm-powersave.log

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.

Note: your distro may or may not already have some of the above scripts located in /usr/lib64/pm-utils/power.d or /usr/lib/pm-utils/power.d Ubuntu does include and use some of these by default, but fedora didn't include any.

After doing this I did a few additonal things that didn't come with the included scripts, 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.archlinu....php?pid=860231). to enable runtime pm for all my pci devices:


#!/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[/Code]

I added a script called usb_pm (taken from the arch wiki: https://wiki.archlin...-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[/Code]

I added a simpler script for intel audio power saving (taken from a script on the crunchbang forums: http://crunchbanglin...ipt-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[/Code]

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[/Code]

And here are the results smile.gif

http://i.imgur.com/ZLXQw.png

http://i.imgur.com/GzFPI.jpg

Link to comment
https://www.neowin.net/forum/topic/1089443-how-to-power-saving-with-pm-utils/
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • When will the Photos app be updated to remember the window size and position when reopened? They addressed this issue in a 2024 version of the app (though I can't recall the build number). Unfortunately, after that specific version, the problem persists! Please prioritise this fix in your K2 schedule. Additionally, the Snipping Tool has lost the ability to capture the Windows Taskbar starting from the 2024 version!
    • Same, never saw it on Android or iOS. Guess only some people got it *shrugs*
    • Anthropic pulls Fable 5 and Mythos 5 after US export control order by Pradeep Viswanathan In April this year, Anthropic launched the Claude Mythos Preview frontier model with state-of-the-art cyber and coding capabilities for a select set of companies around the world. After preparing appropriate guardrails, early this week, Anthropic launched Claude Fable 5 and Mythos 5, its most capable AI models. Claude Fable 5 is for general users and comes with strict safeguards, while Mythos 5 is designed with fewer safeguards for cybersecurity and biology use cases. Today, Anthropic abruptly suspended access to its Fable 5 and Mythos 5 AI models for all customers after receiving an export control directive from the US government. The company received the directive from the government today at 5:21 p.m. ET, and the received letter did not provide any details regarding the national security concern. Anthropic understands that the government became aware of a method to bypass, or “jailbreak,” Fable 5, which might be the reason behind the directive. The order was issued under national security authorities and requires the company to suspend all access to Fable 5 and Mythos 5 by any foreign national, whether they are inside or outside the United States. The restriction also applies to foreign national employees working at Anthropic. As a result, the company has disabled both models for all customers to ensure compliance. Access to previous Anthropic models like Opus and Sonnet is not affected by this government order. The company highlighted that it had developed strong safeguards to reduce the possibility that Fable is misused for tasks related to cybersecurity. In fact, many developers are complaining that the safeguards are going overboard. Additionally, the company worked with the US government, the UK AISI, multiple private third-party organizations, and internal teams to red-team Fable’s safeguards for thousands of hours. Finally, Anthropic noted that no testers have yet been able to find a universal jailbreak on Fable 5. As expected, Anthropic disagrees that a narrow potential jailbreak should lead to the recall of a commercial model used by hundreds of millions of people. It warned that applying this standard across the AI industry could effectively halt new frontier model deployments. Anthropic concluded by mentioning that it is working to restore access to Fable 5 and Mythos 5 as soon as possible and plans to share more details within the next 24 hours.
    • Brave Browser 1.91.172 is out.
  • Recent Achievements

    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
    • One Month Later
      Markus94287 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      176
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      92
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!