So, thanks to great input which I've received on maemo-users mailing list and few additional sources, I've crafted a simple shell script called power-saver.sh that does few things in a single go:
- Sets internet connection mode to "Always ask" (available under Settings -> Internet connections -> Connect automatically).
- Disconnects current internet connection.
- Switches cellular radio into 2G-only mode.
- Disables automatic email send&receive in Modest email client.
Simply speaking, basic usage is as follows:
root@n900:~# power-saver.sh
Going into power saving mode...
root@n900:~# power-saver.sh off
Restoring power suckers...
From my experience, actions taken by this script should make quite significant difference in battery life, yet YMMV of course. It also does nicely play with Alarmed application, so you can conveniently schedule power saving script to execute overnight and restore in the morning automagically.
Script is available for free download, use and any sorts of modification you'd like to make yourself. It's simplistic shell script, no GUI whatsoever, so use it via X-Terminal. It could be wrapped up with some nice status-area button or something, yet my Maemo development skills (and time) are very limited.
Thanks for the script, I appreciate it, since it really might just save my battery for longer. :) However, I've got one question for you. Does the script require running X-Terminal on the background all the time, or can I just close the program and the script still goes on, until I turn it off?
ReplyDeleteYou don't need to keep X-Terminal opened all the time, as this script is not running in the background. It just changes few settings and it's done, so X-Terminal could be closed straight away.
ReplyDeleteWhat about disabling Mail for Exchange sync? Can that be scripted as well?
ReplyDeleteI don't use MfE myself, so I didn't look for a way to disable that via command line (which doesn't mean it doesn't exist).
ReplyDeleteIt's nice, but I think the main power saver here is the switch from 3G to 2.5G. I run my N900 in online mode 24/7, with IM for 5 accounts running, Modest doing checks, roaming onto Wifi as needed, and using it normally (a few texts, short calls, & browsing a bit per day). My battery routinely is at about 40% full when I plug it in at night to go to bed. The key thing is I don't have 3G, only 2.5, which uses less power.
ReplyDeleteOne other power-saver you may want to look into is Titan's Kernel-Power package. It spawned from the overclock stuff, and while it still allows overclocking, Titan's packages are more about power conservation. Using the low voltage kernels (or ultra/extreme versions) you can run the N900 at the same frequencies as a stock N900, but at far less voltage. That means over-all power use is lower, and the battery drains slower.
Download wifi switcher as well.
ReplyDeleteWhen you disconnect from a wifi the chipset is not switched off but keeps scanning for additional networks. Wifi switcher completely powers it down. I noticed significant power savings.
I always get "permission denied" error. I use rootsh to gain root, i try simply power-saver.sh and ./power-saver.sh and always fail. What do i do wrong? (sorry im not a shell specialist :) )
ReplyDelete@Woody14619: Yes, 3G is real power sucker, I've noticed that too, yet here in the UK most networks still have plain old GPRS (not EDGE) within their 2G coverage, so browsing the web is quite painful without 3G and WiFi. Apart from 3G, what I've also noticed is that battery goes quickly down during general Web browsing too, although it's a bit better when doing that via WiFi, not 3G. Also, thanks for kernel-power suggestion. I might give it a try eventually.
ReplyDelete@Remco: Thanks for useful suggestion. I think Wifi Switcher you're referring to is simply unloading wireless adapter kernel module, so that could be easily achieved within my power-saver script too.
@lego: Did you make it executable? chmod +x power-saver.sh. I'd also move it away from MyDocs folder (ie. to /home/user) as it is fat32 filesystem, which doesn't recognize file permissions.
I am having problems installing it, could someone help me through it please.
ReplyDelete@james self: it is a shell script, which requires some basic understanding of command line. Basically, you need to copy the file into some directory in your device (I suggest /home/user), then run X-Terminal, do chmod +x power-saver.sh, and then run it by ./power-saver.sh.
ReplyDeleteIf you guys need a graphic widget button on screen for launching the script just drop me a message in the official Queen Beecon Widget thread http://talk.maemo.org/showthread.php?t=45388
ReplyDeleteHere is an example of what has already been done:
http://talk.maemo.org/showthread.php?p=610074#post610074
@david lorenz: thank you!
ReplyDeletehi! mugen is making 2400mAh extended battery for N900, so it can help those who need longer time without charging: http://www.mugen-power-batteries.com/nokia/nokia-n900/mugen-power-nokia-n900-2400mah-extended-replacement-battery-with-battery-door.html
ReplyDelete"I think Wifi Switcher you’re referring to is simply unloading wireless adapter kernel module, so that could be easily achieved within my power-saver script too."
ReplyDeleteYou can read more?
Nice work!
ReplyDeleteDoes anyone know how to turn of the GPS and network positioning from the shell aswell?
It´s always time consuming to turn all those off if you´ve used the map.