[Module] SMARTASS,ONDEMANDAX and others for 3.0.x kernels (save battery) | 2012-12-10

195 posts
Thanks Meter: 457
 
By AnDyX, Senior Member on 13th October 2012, 08:07 AM
Post Reply Email Thread
As usually I made my ow version of Smartass governor for phone I have. I couldn't break 1 day battery life on stock governor - so I started write my own and finally looks like there will be up to 4 days with this version of smartass governor. But I don't use my phone for listening music etc. So when phone has screen off - I require that it does nothing.
This thread still evolves - now will consist following parts:
  • Governors
  • IO Schedulers

Prerequisites:
- for latest version: any SE based 3.0.x kernel and U8500 based device,
- up to smartass v006 Xperia U with stock 6.1.1.B.1.10 ROM,
- root,
- desire to replace SetCPU - when used only for 'ScreenOff' profile.

Automatic installation using apk:
  • Use app from this post (starting from v003 it is inside zip file),
    After install there is just simple button to run any desired governor and io scheduler.
    When phone boots again- there is service that boots with phone called 'SmartAss v.00x'.
    You can check it on: Settings->Applications->Running - I believe.
    When you click on it - there is details with timer that shows how long this service run. After 1min service will install desired governor and scheduler and run it again and close itself.
  • If you try to upgrade app - reboot phone to load new version. If this not works - remove app - reboot phone and load new one.

GOVERNORS

General info:
- information about governors is here,
- a lot of information about performance, battery draining: Battery, Governors, and...: Tips and Conclusions
- more information about 'smartass' governor is here or here,
- how different governors work is explained here: [Q] SetCPU governors (explained).

ONDEMANDAX
The benefits:
- CPU when screen is off is capped to 200MHz,
- behaves as ondemand governor when screen is on,
- no need for sleep-off profile,
Governor file: axperiau_ondemandax.ko
Governor name: ondemandax

PEGASUSQ
Samsung's own multi-core aware governor. Pegasusq is basically an ondemand based governor which also controls hotplugging.
Information about this governor: Pegasusq Governor
Governor file: axperiau_pegasusq.ko
Governor name: pegasusq

LULZACTIVEQ
Lulzactiveq is a modified lulzactive governor authored by XDA member robertobsc and is adapted in Siyah kernel for GS2 and GS3. Lulzactiveq aims to optimize the second version of luzactive from Tegrak by a) providing an extra parameter (dec_cpu_load) to make scaling down more sensible, and b) incorporating hotplug logic to the governor. Luzactiveq is the first ever interactive based governor with hotplugging logic inbuilt (atleast the first of its kind for the exynos platform). When CPU comes out of idle loop and it's time to make a scaling decision, if load >= inc_cpu_load CPU is scaled up (like original luzactiveq) and if load <dec_cpu_load, CPU is scaled down. This possibly eliminates the strict single cut-off frequency for luzactiveq to make CPU scaling decisions. Also, stand hotplug logic runs as a separate thread with the governor so that external hotplugging logic is not required to control hotplug in and out (turn On and Off) CPU cores in multi core devices like GS2 or GS3. Only a multi core aware governor makes real sense on muti-core devices. Lulzactiveq and pegasusq aims to do that.
Governor file: axperiau_lulzactiveq.ko
Governor name: lulzactiveq

SMARTASSV2
The benefits:
- CPU when screen is off is capped to 200MHz,
- allows to set starting CPU freq when phone awakes (to speed up awake process),
- allows set/change almost all aspects of governor (to suite needs),
Governor file: axperiau_smartass2.ko
Governor name: smartassV2

Manual installation:
  • Unzip file
  • Copy 'governor-file' to directory where you have adb
  • Execute
    Code:
    adb push 'governor-file' /data/local/tmp
    - this copies file on phone
  • Run adb shell or terminal - whatever you like
  • Execute following commands:
Code:
su
cd /data/local/tmp
insmod 'governor-file'
echo "governor-name" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "governor-name" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
Now governor should works

IO SCHEDULERS

General info:
Information about io schedulers: I/O Schedulers

SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.

Advantages:
  • Simple, so reliable.
  • Minimized starvation of requests.
Disadvantages:
  • Slow random-read speeds on flash drives, compared to other schedulers.
  • Sequential-read speeds on flash drives also not so good.
File name: axperiau_sio-iosched.ko
Scheduler name: sio

V(R)
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.

Advantages:
  • May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
  • Performance fluctuation results in below-average performance at times.
  • Least reliable/most unstable.
File name: axperiau_vr-iosched.ko
Scheduler name: vr

Manual installation:
  • Unzip file
  • Copy 'scheduler-file' to directory where you have adb
  • Execute
    Code:
    adb push 'scheduler-file' /data/local/tmp
    - this copies file on phone
  • Run adb shell or terminal - whatever you like
  • Execute following commands:
Code:
su
cd /data/local/tmp
insmod 'scheduler-file'
echo "scheduler-name" > /sys/block/mmcblk0/queue/scheduler
Now scheduler should works.

VERSION INFO
LULZACTIVEQ:
v005:
- based on latest sources of lulzactiveq,
- code cleanup,

v004: in tests,

v003:
- based on latest sources of lulzactiveq,

v002:
- tuned parameters,
- when screen is off - max cpu freq in policy is changed to 200MHz,

v001:
- will load on any SE 3.0.x kernel and any SE devices with U8500 CPU,

PEGASUSQ:
v003:
- code cleanup,

v002:
- tuned parameters,
- when screen is off - max cpu freq in policy is changed to 200MHz,

v001:
- will load on any SE 3.0.x kernel and any SE devices with U8500 CPU,

VR, SIO:
v001:
- will load on any SE 3.0.x kernel and any SE devices with U8500 CPU,

ONDEMANDAX:
v004:
- will load on any SE 3.0.x kernel and any SE devices with U8500 CPU,

v003:
- added all features that I discovered while developing SmartASS to original ondemand code - so it's save battery now as SmartASS and no longer screen-off profile is needed.

SMARTASS:
v008:
- code cleanup,
- should be less laggy then previous version,

v007:
- will load on any SE 3.0.x kernel and any SE devices with U8500 CPU,

v006:
- few parameters tuned,

v005:
- changed logic - so now should work more stable,
- when screen is off - max cpu freq in policy is changed to 200MHz,
- few parameters tuned,

v004:
- minor changes for screen off power saving,

v003:
- fixed logical bug in code,

v002:
- added sleep_max_freq and sleep_rate_jiffies - to change SMARTASSV1 behavior,
- added apk that automates install and run smartass after boot,

v001:
- just initial version fixed to work with Xperia U.

Disclaimer
I'm not responsible if this module damages your lovely phone. Use it at your own risk! Think before you do something!

Sources at: GitHub
The Following 84 Users Say Thank You to AnDyX For This Useful Post: [ View ] Gift AnDyX Ad-Free
13th October 2012, 08:52 AM |#2  
gengi's Avatar
Senior Member
Thanks Meter: 165
 
More
Were To install?

Sent from my ST25i using xda premium
13th October 2012, 09:53 AM |#3  
XperianPro's Avatar
Senior Member
Flag Mars
Thanks Meter: 881
 
Donate to Me
More
Will you please fix recovery for locked bootloader?


Sent from my ST25i using xda app-developers app
The Following 2 Users Say Thank You to XperianPro For This Useful Post: [ View ] Gift XperianPro Ad-Free
13th October 2012, 10:03 AM |#4  
atis112's Avatar
Inactive Recognized Developer
Thanks Meter: 2,630
 
Donate to Me
More
Great! Work fine. Thanks!
13th October 2012, 11:25 AM |#5  
gengi's Avatar
Senior Member
Thanks Meter: 165
 
More
But were do you install the module ?

Edit: Forget i have seen it. XD

I copied the file to /data/local/tmp and run the comands on terminal but i don´t have smartass governor. Any idea?
The Following User Says Thank You to gengi For This Useful Post: [ View ] Gift gengi Ad-Free
13th October 2012, 02:47 PM |#6  
Senior Member
Thanks Meter: 2,071
 
More
Can you please do a version to flash via cwm.
Thx
13th October 2012, 02:59 PM |#7  
felipevsw's Avatar
Senior Member
Flag Porto Alegre
Thanks Meter: 299
 
More
SMARTASS is the best! Thanks!
13th October 2012, 03:43 PM |#8  
Member
Thanks Meter: 8
 
More
Same here, I followed the tutorial twice, but it dint't work.
No smartassV2 showed on SetCPU.

Ps. Did the tutorial using adb on windows
13th October 2012, 03:46 PM |#9  
estonia1's Avatar
Member
Flag Türi
Thanks Meter: 9
 
More
waiting for .apk
13th October 2012, 03:46 PM |#10  
XperianPro's Avatar
Senior Member
Flag Mars
Thanks Meter: 881
 
Donate to Me
More
Quote:
Originally Posted by estonia1

waiting for .apk

You will never get it.

Sent from my ST25i using xda app-developers app
13th October 2012, 04:26 PM |#11  
RockitOut11's Avatar
Senior Member
Thanks Meter: 140
 
More
AnDyx rulz

This kinda reminds me of X8 developement
Post Reply Subscribe to Thread

Tags
development

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes