1

I have an external battery rigged up for my MBP. It goes through the magsafe adapter. The battery is about twice the capacity of the internal battery.

The problem is, the macbook thinks it is plugged into AC, so undoubtedly the CPU is in full power mode. It will gobble this big battery in under an hour.

I do have graphics set to integrated mode.

adapt-dev
  • 175

2 Answers2

1

Unfortunately, there is no direct way to force OS X to use battery-power mode (here, here and here). OS X uses Intel Speedstep which changes the P-state of the processor depending on the computer's power status (AC/battery).

AFAIK, the only thing you can do is set your AC mode power management settings to the same as battery mode. Using pmset, you can see and set the power settings that your Mac uses for AC and battery scenarios. Below is an example:

$ pmset -g custom
Battery Power:
 lidwake              1
 autopoweroff         1
 autopoweroffdelay    14400
 standbydelay         10800
 standby              1
 ttyskeepawake        1
 hibernatemode        3
 powernap             1
 hibernatefile        /var/vm/sleepimage
 displaysleep         40
 sleep                40
 acwake               0
 halfdim              1
 lessbright           0
 disksleep            10
AC Power:
 lidwake              1
 autopoweroff         1
 autopoweroffdelay    14400
 standbydelay         10800
 standby              1
 ttyskeepawake        1
 hibernatemode        3
 powernap             1
 hibernatefile        /var/vm/sleepimage
 womp                 1
 displaysleep         180
 networkoversleep     0
 sleep                0
 acwake               0
 halfdim              1
 disksleep            10

A brief run-through of the command:

pmset: pmset
-g: get settings
custom: displays custom settings for all power sources

To equalise your AC power settings with your battery consumption settings, you can use the following command:

pmset -g custom | xargs | cut -f1 -d'A' | cut -f2 -d':' | xargs sudo pmset -c

A brief run-through of the command:

pmset -g custom: see above
xargs: converts entire output to one line
cut -f1 -d'A': removes output following "A" of "AC Power:"
cut -f2 -d':': removes output preceding ":" of "Battery Power"
(example output as of this stage)

 lidwake 1 autopoweroff 1 autopoweroffdelay 14400 standbydelay 10800 standby 1 ttyskeepawake 1 hibernatemode 3 powernap 1 hibernatefile /var/vm/sleepimage displaysleep 40 sleep 40 acwake 0 halfdim 1 lessbright 0 disksleep 10

xargs pmset -c: passes the above argument line one by one to pmset

Now, the output of pmset -g custom looks like this:

$ pmset -g custom
Battery Power:
 lidwake              1
 autopoweroff         1
 autopoweroffdelay    14400
 standbydelay         10800
 standby              1
 ttyskeepawake        1
 hibernatemode        3
 powernap             1
 hibernatefile        /var/vm/sleepimage
 displaysleep         40
 sleep                40
 acwake               0
 halfdim              1
 lessbright           0
 disksleep            10
AC Power:
 lidwake              1
 autopoweroff         1
 autopoweroffdelay    14400
 standbydelay         10800
 standby              1
 ttyskeepawake        1
 hibernatemode        3
 powernap             1
 hibernatefile        /var/vm/sleepimage
 womp                 1
 displaysleep         40
 networkoversleep     0
 sleep                40
 acwake               0
 halfdim              1
 disksleep            10

Note that for similar properties that had different properties (i.e. displaysleep, which had 40 on battery and 180 on AC), they are now the same.


It is advisable to keep a backup of the original AC power settings in case you would like to revert. As follows, you can generate a string that you can use to reset your AC power settings with the following command:

pmset -g custom | xargs | cut -f2 -d'A' | cut -f2 -d':'

The difference between this command and the one above is that with this command, we are taking the value after AC power (aka original AC power settings). To reset your settings to your original settings, take the string generated by the above command and pipe it through xargs to pmset -a:

echo "[string generated by above command]" | xargs pmset -a

I would also advise following @gentmatt's tips in this answer to decrease power consumption.

-2

One option is to increase the niceness of the main CPU consuming processes. You can find these processes in the Activity Monitor or in the Terminal with this command:

top -u

If you find out that a process with pid P is the most CPU consuming one, then you can increase the niceness of that with this command in the Terminal:

sudo renice -n +10 P
Hamid Rouhani
  • 1,491
  • 2
  • 15
  • 27