Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Spitemare
Old
#1  
Member - OP
Thanks Meter 13
Posts: 93
Join Date: Nov 2010
Default Smartass CPU Governor on Droid 2

So I was investigating loadable kernel modules on the Droid 2 this weekend. One of the modules I tried loading was the smartass governor module and to my surprise it worked. From what I can tell it appears to be working with no problems.

The module itself is from a Milestone Cyanogen ROM. Given how close the Milestone is to the Droid 1 and how close the Droid 1 is to the Droid 2 it seemed like a safe try to see if it would load.

Requirements:
  • You must be rooted. This really should go without saying but I'm trying to cover all the bases here.
  • You must have busybox installed.
  • You must be able to boot into clockwork recovery.

I've tried this on Fission ROM but since we can't change the kernel on the Droid 2 this will probably work on any other Droid 2 ROM. D2G users, YMMV.

NOTICE: By installing this you assume any and all risk for what might happen to your phone. I am not responsible if this mod causes your phone to stop working, catch fire, steal your significant other, and/or hijack a plane. Basically I haven't had any issues but that is not a guarantee that you won't have any issues.

Attached is the update.zip. Boot into clockwork recovery and choose this zip to install. Once you reboot you'll be using the smartass governor.
Attached Thumbnails
Click image for larger version

Name:	CAP201103280816.jpg
Views:	594
Size:	15.4 KB
ID:	554177  
Attached Files
File Type: zip smartass-governor.zip - [Click for QR Code] (214.9 KB, 407 views)
The Following User Says Thank You to Spitemare For This Useful Post: [ Click to Expand ]
 
rtfield
Old
#2  
Member
Thanks Meter 3
Posts: 66
Join Date: Sep 2010
So what has this done for your battery life?
 
Spitemare
Old
#3  
Member - OP
Thanks Meter 13
Posts: 93
Join Date: Nov 2010
Anecdotally I believe my battery life has improved. With the ondemand governor and data and wifi off I've seen my battery drop 10% in a night. With the smartass governor under the same conditions my battery appears to be the same. Now given that Motorola phones report the battery in just 10% increments my totally non-scientific analysis might end up being nothing.

Really you'd have to try it yourself and determine if things are better. From what I've read online the smartass governor is better at conserving battery than ondemand but it really depends on how you use your phone.
 
droidmakespwn
Old
#4  
droidmakespwn's Avatar
Senior Member
Thanks Meter 122
Posts: 600
Join Date: Sep 2010
Location: McGuire AFB
Download circle battery widget from the market. Its free and somehow it reports 1% increments. I have been using it for a while now and it seems to be spot on.

Sent from my DROID2 using Tapatalk
 
rtfield
Old
#5  
Member
Thanks Meter 3
Posts: 66
Join Date: Sep 2010
It just guesses
 
Spitemare
Old
#6  
Member - OP
Thanks Meter 13
Posts: 93
Join Date: Nov 2010
Well, there is a way to get an accurate battery reading. Reading /sys/devices/platform/cpcap_battery/power_supply/battery/charge_counter will give you the battery level in 1% increments. However, the system reads from /sys/devices/platform/cpcap_battery/power_supply/battery/capacity which provides the bounded 10% increments. Some widgets, Minimalistic Text for example, will read from charge_counter on Moto devices.

Ideally a kernel module could be written that changes what is written out to capacity so the entire system could take advantage of 1% battery increments. If I had the time I would take a crack at it, but it's been awhile since I've done any C coding.
 
tbaker077
Old
#7  
Senior Member
Thanks Meter 16
Posts: 1,050
Join Date: Jan 2009
Location: California
Looks interesting. I'll wait until a little more feedback is given before I try it. How is the performance after the install?
 
rtfield
Old
#8  
Member
Thanks Meter 3
Posts: 66
Join Date: Sep 2010
I'm guessing you have to sbf to go back?
 
Spitemare
Old
#9  
Member - OP
Thanks Meter 13
Posts: 93
Join Date: Nov 2010
Quote:
Originally Posted by tbaker077 View Post
How is the performance after the install?
No different than using the ondemand governor. Smartass takes a clever approach to CPU scaling: instead of polling CPU usage like ondemand it detects when the phone comes out of sleep and sets a timer to go off in two ticks. Once that timer goes off it looks at CPU usage and scales if needed. What does all this mean? Well, if you turn on your phone to quickly check the time and then turn it back off the smartass governor will never ramp up the clockspeed. So far after a few days of light usage I've been quite pleased.

Quote:
Originally Posted by rtfield View Post
I'm guessing you have to sbf to go back?
Nope. If you want to revert just chmod 644 /etc/startup/smartass.sh and reboot.
 
rtfield
Old
#10  
Member
Thanks Meter 3
Posts: 66
Join Date: Sep 2010
Sweet
Thanks

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

Coloring Your Logcat World

Getting feedback for your app during development is as simple as adding logging info where necessary and looking … more

Guide Your Sheep to Safety with Finger Shepherd

Just a coupe of days ago, we brought you news about a game calledAgent Sheep. In that … more

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more