Wednesday, May 23, 2007

Extend your MacBook battery life

The PowerTOP project inspired me to take a quick look at what was running on my MacBook under OS X. Just by using the activity monitor (and top) I could very quickly spot some obvious issues.

- The world clock in dashboard (which is one of the four included and running ones by default) fires off once a second, I didn't really need that widget anyway.

- I had enabled access to disabled devices long ago when playing around, but it seems to start a process that wakes up a lot. Turning that off solves that.

- In OS X I often use iTerm, but it also is waking up all of the time. For the short term I will just use the built in Terminal, but being open source a look into the code might make for fun some day.

- If you haven't already downloaded and installed a add blocking css file that will block a lot of ads out there and then add to the css file to block flash banner ads which will run continuously and just suck up CPU:


/* this hides the usual 468x60 Flash banner ads */
embed[type="application/x-shockwave-flash"][width="468"][height="60"] {
display: none !important;
visibility: hidden !important;
}
/* this hides the not so usual but very annoying 728x90 Flash banner ads */
embed[type="application/x-shockwave-flash"][width="728"][height="90"] {
display: none !important;
visibility: hidden !important;
}

My crude tests (turn everything on, view estimated battery life left after idling for a few minutes, turn everything off and do the same) noticed a nice jump in expected battery life.* Of course this can't approach anywhere the improvements that powerTOP could give in Linux, but it was surprising how much of a difference I was able to get with give minutes and top.

*Of course it is highly likely my testing method could just be a fluke, feel free to run your own test.