Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The pm util power saving scripts only work when a laptop is on battery, not when it is plugged in to AC. Is there a way to make pm utils run all the time, regardless of whether the laptop is connected to a power outlet or not?

share|improve this question
    
just read full description on my answer askubuntu.com/questions/285434/… –  Qasim May 11 '13 at 4:33
    
check working with tlp Apply Battery Settings (ignoring the actual power source): sudo tlp bat –  Qasim May 11 '13 at 4:37
add comment

2 Answers

You can enabled this using:

sudo pm-powersave true

or if you want, I guess you could add the following to /etc/rc.local:

pm-powersave true
share|improve this answer
    
Unfortunately this only works temporarily, because if I unplug the power cord from my laptop and plug it in again, the power save mode becomes false again. –  function Feb 11 '13 at 21:24
    
@Colin Ian King is my answer right ? –  Qasim May 11 '13 at 4:46
add comment

You can make a script

 sudo gedit /etc/pm/power.d/power

Copy paste the following the following in power file

#!/bin/sh

# Shell script to reduce energy consumption when running battery. Place
# it in /etc/pm/power.d/ and give execution rights.

if on_ac_power; then

# Start AC powered settings #

pm-powersave true

else

# Start battery powered settings -#

 pm-powersave true


 fi

Now you need to assign execution permission of power script

 sudo chmod +x /etc/pm/power.d/power

Now you will have pm-powersave true on both ac/bat

How do I make Powertop changes permanent?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.