Reduce Power Consumption Extend Battery Life of your Android with CPUfreq Governor Tweaks

CPUfreq is the part of the Linux kernel that changes your CPU's frequency to save power or increases it to make your system run faster. Obviously the settings you use there are essential for you performance and battery consumption. I read an extensive article by IBM some time ago analysing the different Linux cpu frequency governors. It makes lots of fancy tests and has great diagrams etc. What it boils down to is that these are the perfect setttings for low power at high performance in Linux. (Also check out this article where I tested these settings on my netbook.)


Update: You can now adjust these settings with the updated CPU Tuner app. Use this link or e.g. the barcode from this page from your Android browser to download it.

Conservative:
up_threshold: 98
down_threshold: 95

Ondemand:
up_threshold: 98

How all I had to do is root my droid and run one of these scripts:
Conservative:
#!/system/bin/sh

cd /sys/devices/system/cpu/cpu0/cpufreq/

echo -n Governor:
cat scaling_governor
echo Setting to conservative.
echo conservative > scaling_governor

cd conservative

echo -n Up Threshold:
cat up_threshold
echo Setting to 98.
echo 98 > up_threshold
echo -n Down Threshold:
cat down_threshold
echo Setting to 95.
echo 95 > down_threshold

Ondemand:
#!/system/bin/sh

cd /sys/devices/system/cpu/cpu0/cpufreq/

echo -n Governor:
cat scaling_governor
echo Setting to ondemand.
echo ondemand > scaling_governor

cd ondemand
echo -n up_threshold:
cat up_threshold
echo Setting to 98.
echo 98 > up_threshold

And the settings are perfect. Ondemand is a little faster and more responsive in my experience. The changes to the conservative governor seem to make quite a difference in battery time when it's used a lot is my feeling. Check it out and let me know what you think. All you need is root and a terminal. Copy the files to your sdcard and then run them from there. Attention: the scripts must be formatted in unix format, not with dos line breaks. And of course you can and should also use these settings on your Notebooks, Netbooks, Tablets and everything else running Linux.

All I'd need now is to put it on the app market for lots of money. ;-)
Any hints how to put a script on the app market?

If you liked this article, you might want to subscribe for more.

2 comments:

  1. What do the shell commands do????

    ReplyDelete
  2. What do the shell command do. What are differences between them .??
    Thank you
    I dint read the part ,they don't appear till you've read them lol

    ReplyDelete

I appreciate comments. Feel free to write anything you wish. Selected comments and questions will be published.