yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] droidphile:
It is 70,000 not 7000. Next time, don't miss the ZERO :)

I know anything below 10,000 is dangerous. Transition latency of GS2 CPU is 10,000 uS. Having a sampling interval equal to or below 10,000 will cause governor to jump up and down through frequencies instead of doing work.
[Galaxy S II General] saikilee:
it's really help ~ thx
[Galaxy S II General] nehalem176:
Video Playback Issue...

droidphile, need your opinion about video playback... MP4, WMV and AVI no problem at all. Only happen this mkv file when i try to view in my stock player.. Below state my mkv file media info for your reference:

Format : Matroska

File size : 207 MiB

Duration : 3mn 45s

Overall bit rate : 7 689 Kbps

Writing library : XviD4PSP 6.0 / 53.6.0

Format : AVC

Format settings, ReFrames : 3 frames

Codec ID : V_MPEG4/ISO/AVC

Nominal bit rate : 6 500 Kbps

Width : 1 920 pixels

Height : 1 080 pixels

Display aspect ratio : 16:9

Frame rate : 29.970 fps

Color space : YUV

Chroma subsampling : 4:2:0

Bit depth : 8 bits

Scan type : MBAFF

Bits/(Pixel*Frame) : 0.105

Writing library : x264 core 116 r2019M 9cc407d

For your information, when I currently use rooted GB rom and after that stock ICS LP7, this video can support playback in my s2, smooth and stable just like in my PC but after rooted with CF kernel then flash NEAK, this mkv file become lag then image not clear... do you have any idea is it related to the kernel or rom? Just wondering here why rooted GB rom and stock ICS LP7 can support this MKV file without any problem but why not in rooted ICS and custom kernel??

currently using

N.E.A.K 2.0.2,

noop+ondemand,

UV: 1125; 1025; 950; 925; 800; 800,

GPU: 100-800; 200-900

For your additional info, stock NEAK voltage, I/O scheduler BFQ and AFTR idle disable still give this problem
[Galaxy S II General] SoulTerrox:
Thx to you noobs as me can understand an advantages;)

great post, long life to you xd

Sent from my SGS II
[Galaxy S II General] droidphile:
@nehalem176

Afaik, mkv support is through codecs and hence mkv playback is a rom thing. Try MX video player from market. Better than stock video player, and is free too.
[Galaxy S II General] nehalem176:
but sir, already try MX player pro 1.6b still FAIL but diceplayer give image stuttering i guess and ironically video player in stock ICS ROM give opposite result... to be frank stock ICS LP7 play this mkv very smooth.. im just wondering is it playback support related to kernel, rom or i dunno build.prop file i guess... been asking to simone and gokhan also reply FPS 29.97 dont think support in my current state but why ICS LP7 can support without any problem..??? been stuck this issue since upgrade to custom rom ICS.. :(:(:(
[Galaxy S II General] Boat Traveller:
Hi,

I've flashed the kernel Siyah 3.1.2 yesterday and I've noticed that my battery life is not better at all. My previous kernel was a official one.

Today i lost 3% in 2 hours without touching the phone.

3G is enabled with juice defender set to balanced.

I'm quite disappointed with the kernel. Is it normal ? I don't have any APP running in the background.

Thanks for the reply

EDIT :

My ROM is ICS 4.0.3 LP4

Kernel : Siyah 3.1.2

Phone : LPS

Frequency range : 200-800 Mhz

Governor : Conservative

Slightly undevolted at 200 Mhz
[Galaxy S II General] droidphile:
1.5 % per hour with 3g enabled is not that bad. May be there was a coincidence that lot of mail sync happened while you were on Siyah. Also check for wakelocks using betterbatterystats app. Juice defender doesn't save anything. It's better we manually control the device settings for good battery life.

200-800 is a good setting for those who care a little too much about battery life. The battery gauge is probably lying to you and not displaying the correct percentages. Reset fuel gauge using ExTweaks app or recharge to full after a complete discharge.
[Galaxy S II General] Boat Traveller:
Thanks for the response.

How can I see which wavelocks prevent the phone to go into deep sleep ?

I reset the fuel gauge and the battery level went from 36% to 12%. What does that mean ?
[Galaxy S II General] GoldGanja:
Thanks, really helped me better understand what I do while I'm trying the best settings for kernel!

Like a Boss :cool:
[Galaxy S II General] droidphile:
Use betterbatterystats app. Download from this thread. It's normal to see a percentage drop when you reset battery gauge. After couple of hours or so, battery gauge will sync with actual percentages and you will see correct values.
[Galaxy S II General] pay.c:
HEY, there is a reference to my results on the first page, now THAT IS COOL. Wouldn't have thought so, as I published them via android-hilfe.de in german language (sorry, just TOO lazy to type it in english ... all over again). ;)

Thanks a lot, droidphile, makes me proud. :D And its always good and motivating to see the own work does indeed have some impact.

BR!

PS: Talking about the 100 MHz - 200 MHz power consumption.
[Galaxy S II General] droidphile:
Hi

YES! Power consumption values are your results. Sorry i forgot to mention your name. I don't understand German so i google translated your page to read them. Nicely measured by the way!
[Galaxy S II General] alberto 63:
Hello, you who are experts, they could restore extweak the entry to change the sensitivity of the touch
[Galaxy S II General] Harsha Raj:
Ignore
[Galaxy S II General] coloxim:
I've a question if I set smooth offset/target ecc is it possible to use more 1000 MHz with on demand governor?

Because I love ode and governor ma use too much 1200 if I set conservative use all frequency but it sometimes doesn t scale under 500 mhz.,I don't know why...

Anyway I'd prefer ondemand with 1000mhz too..is or possible?

Inviato dal mio GT-I9100 usando Tapatalk
[Galaxy S II General] friccc81:
stwebsi faid

Nice work
[Galaxy S II General] droidphile:
All this confusion about smooth scaling and throttling is because their values points to frequency step number and not frequencies themselves. in Siyah, soon we will have params pointing to frequencies and all will be clear then.
[Galaxy S II General] melakamc:
All what i needed to know in one thread. thumbs up mate :) keep up the good work
[Galaxy S II General] 1982Strand:
init.d script not taking effect after boot

Hey everybody!

I'm trying to change governor/scheduler for my kernel with an init.d script, but it won't "stick" after a reboot. The kernel supports the gov/scheduler and the cpu frequencies i'm trying to use.

If i run the script through script manager, it works. I don't have any cpu control apps installed.

I named the script 99cpusetting, making it the last script running in the init.d folder, the permissions are set to rwxr-xr-x (just like the rest of the scripts in the folder)

This is the script:

#!/system/bin/sh

# CPU settings
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "245000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "998400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# echo "noop" > /sys/block/mmcblk0/queue/scheduler

Any ideas to what i can do to make it "stick"?

Thanks for the guides btw, super nice job ;)
[Galaxy S II General] pikachu01:
You have other apps setting them ? Voltage control or set cpu?
[Galaxy S II General] 1982Strand:
Nope..

Only referral i can find to governor/scheduler elsewhere, is in the init.rc (but isn't this run at boot?) the and in a file called powertop, in the xbin folder. (Don't know how to edit last file, it seems coded)
[Galaxy S II General] pennie77:
Ca1ne is working on a fix for a similar problem
[Galaxy S II General] emailprashanthvg:
awesome explanation!! bookmarked it!! Must read!!
[Galaxy S II General] RealSpArTeN:
REQUEST

....wheatley governor? Seems to be pretty sweet to me :D
[Galaxy S II General] droidphile:
Wheatley could be sweet if your device is Nexus. It's not that sweet on GS2. Wheatley is heavily optimized by its author Ezekeel for OMAP4 architecture in GNexus which has 8 idle states (compared to 3 brought in by gs2 custom kernels) and a C4 state.

Wheatley in simple terms is an 'idle-aware' governor. With fewer didle states and lower exit latency, it's not worth using in GS2. Hence, hardly any devs tried porting it to i9100.
[Galaxy S II General] nava88:
Please can someone explain me why siyah kernel now uses 100 Mhz and implement steps of 50 and 25 Mhz, in this guide say 100 Mhz have a big power consumption than 200 Mhz
[Galaxy S II General] droidphile:
Excess power consumption in terms of W / Ghz equation still holds true for 100 mhz on HIGH loads. In real life, CPU can not be at high load on 100 mhz for a longer time since governor will scale it up to a higher frequency. Gokhan implemented support for 18 steps for users to experiment with frequency steps. Try it on your own. Anything from 3 steps to 18 steps can be echoed to scaling_available_frequencies.
[Galaxy S II General] nitrouzoxide:
In my personal experience, using even by using 18 steps, most used freq step is still 200, 500, and 1000..so what's the benefit of using 18 steps instead of samsung 5 steps or siyah 6 steps? thanks... :)
[Galaxy S II General] suta:
great guide! helped me so much! learned a lot from you thread.

I was confused over

3) GPU UP and DOWN Thresholds: The four thresholds are threshold to switch to second step, switch back to first step, switch to third step, switch back to second step. We do not want GPU to immediately scale up after scaling down to a frequency. This implies the thresholds are overlapping load-evaluations. Use up-thresholds of the range 80-90. To calculate down-thresholds in such a way that overlapping is prevented, for a set of two freqs, find out what percentage of higher frequency is lower frequency, and reduce 5-10 % from the resultant value.

(If you like the 'good old' two frequency step, set Threshold-2-UP to 100 so that only First two steps are used and third step will never be active)

Sample Values: 85 70 85 65 (Assuming GPU freqs are 160 200 267). OR 85 65 85 55 (If GPU freqs are 200 267 400).

I couldn't get the calculation correct, currently my GPU freqs are set to 100mhz, 160mhz, 268mhz so what should i set for the threshold percentage to prevent overlapping?
[Galaxy S II General] droidphile:
It all comes down to the governor you use. With ondemand don't expect equal utilization of all frequencies. Atleast the frequencies between 800 and highest frequency may not be used much. Lulzactive with proper configuration may use all freqs evenly. 500 is the frequency CPU is clocked to whenever we touch the screen. 800 is the frequency at which device enters deep sleep and also set for sometime on resume (because bootloader resumes at 800mhz). So 500 and 800 will be used more, with whatever governor.

Up thresholds can be 80-90 range.

Ideal down threshold = (low step/highstep)*100

For 100 - 160 this is 100/160*100 = 62.5. And for 160 - 267 this is 60%. Reduce a little more from these values to make sure there's no overlapping.

So you can use thresholds 85 60 85 55 OR 85 55 85 55.
[Galaxy S II General] ellimist87:
Been having stutters recently, particularly when hitting a whatsapp notification from the status bar, and it stutters into the msg.

Haven't tested extensively but after reading the below, turning off AFTR did help (hope it's not placebo).

" If and only if there are issues, leave it unchecked. Possible issues are stuttering videos/lagging gui, etc. This kinda issues arises when AFTR is hit too soon."

Was wondering, if I'm hitting AFTR too soon, what could be the cause? Never had this issue before till recently (am currently on latest hyrdrogenics 1205 and siyah 3.2.2 using ondemand tweaked to performance a little, and sio. On stock voltages for now). In Siyah thread, many have been mentioning a "slow-mo" effect, where occasionally governor or something else decides not to scale properly, and seems to be moving at lowest frequencies.

Was just wondering if there's a way to determine the cause of phone going into AFTR too soon, and to solve it. Am quite sure I never had it before. Not exactly 100% sure if it's related to this, but that sentence got me thinking it could be (didn't notice it previously). Don't wanna stick on Idle and LPA only if it's gonna mean batt is gonna be significantly less compared to when I used AFTR.

Any idea how I can go about diagnosing it? If I do determine that switching off AFTR helps

Thanks :)
[Galaxy S II General] droidphile:
Hmm it may be the hardware trying to hit AFTR without considering the active process. ICS kernel supports lower target residencies compared to GB. This might be the reason for aftr to hit too soon (if that's what's happening).

Since target residency is not controllable from user space, i recommend you to perform these steps

-Use scaling min freq as 200.

-Set default GPU voltages. Or even set +50mV more than Siyah stock

-Do not use very low gpu freq steps. Use 160/200/267 etc.

Idle and LPA only will consume some extra battery than AFTR+LPA. But the difference will be noticeable for only those who keep a close watch. LPA's target residency is not too high as well. Device is bound to hit lpa soon after idle/aftr.
[Galaxy S II General] ellimist87:
Thanks, will try the above before switching over to Idle/LPA to monitor again.

Could also probably be due to GPU not scalling properly? (since it's animation stutter). Don't really get lags elsewhere, mainly when hitting notifications from notification bar, not always, but it's there. (and I quoted whatsapp coz that's what pops up most often, so highest chance of showing this).

Oddly enough I do use 160/267/267. And generally tweak stuff towards performance. Did notice Siyah's new default is 100, have switched it to 200, and gonna try the extra voltages on GPU.

If that doesn't work, and even Idle/LPA doesn't work, my device could just be giving way huh :p
[Galaxy S II General] ntzntz:
Thanks for that great info. I did learn a lot from your post and other posts from XDA. I have learned to root+room+kernel my phone. Thanks
[Galaxy S II General] 华丽的平凡:
for my bad english ,I can't understand it completely,but it's very helpful,thanks
[Galaxy S II General] naveediftikhar:
hey dphile mate can u provide a quick lil info about pegasusq parameters aswell..siyah jus readded pegasusq in his new version 3.2.4 n its good smooth..but as we users are we would definately like to tame it to our own liking but for that well havto know whats what..!...would be a great help!
[Galaxy S II General] arunr14:
thank you

thank you droidphile, I am comp. engineer but new to android terminology and this one post got me up to speed very quickly.
[Galaxy S II General] droidphile:
Already added in the other thread 3rd post.
[Galaxy S II General] Retko85:
Can someone please explain how Pegasusq governor work (in new Siyah)??

Thanks
[Galaxy S II General] desean:
Search and you will get your answer: http://xdaforums.com/showpost.php?p=24233103&postcount=3
[Galaxy S II General] kpdeepu:
Great info, thanks a lot droidphile! :)
[Galaxy S II General] jojic88:
great info, and when you will add info about new governer: pegasusq? :)
[Galaxy S II General] teh roxxorz:
Here you go > http://xdaforums.com/showthread.php?t=1572937

Third post.
[Galaxy S II General] :
Just wondering if anyone in this forum could help with the question that was asked here http://xdaforums.com/showthread.php?t=1538868

How to edit the battery-full-design in sys folder

Sent from my MB860 CM7.2 RC3 37p Radio
[Galaxy S II General] GregórioAxiaMagno:
droidphile: a big huge blaster atomic evolutive cryptonium goku hadouken thanks! :D

Chuck Norris envies your material :p
[Galaxy S II General] Roots:
What a great explanation, clarified so much for me.. It's like a detailed kernel dictionary for noobs like me..

Many thanks
[Galaxy S II General] M3TALLICA:
Thanks a lot Droidphile.

Could you please add information about Pegasusq governor ?
[Galaxy S II General] carlos67:
Is this line for smartassV2 sample battery profile right? From your first (or 2nd?) post..........

echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;

Shouldn't this be "300000" because thats the difference between 500 and 200mHz.

As it is, the cpu will try to scale down to 300 mHz won't it? What happens if that frequency step is not available.

Similarly when ramping up, going from 500 (awake_ideal_freq) to next step i.e. 800mHz requires a ramp of 300mHz, but yet the parameter is ramp up by 200mHz - but 700mHz is not available in a 5 step kernel, only 800 is next step up. I can only assume that the governor goes to the nearest available frequency if the specified one is not available???

As you can guess I'm a bit confused. An explanation would be very welcome. :)
[Galaxy S II General] manoranjan2050:
many many thanks for great guide..............................
[Galaxy S II General] aerdman:
An unbelievable amount of information, great to have it in one place.

I've actually made several changes in ExTweaks after reading your guide, hope to see some improvements in battery life. Thanks
[Galaxy S II General] snout:
Great thread Buddy ! a big thumbs up.

Helped me to understand all that Jargon.
[Galaxy S II General] scorpion667:
Thanks, didn't know iv) sampling_down_factor is so godly
[Galaxy S II General] mcarans:
Can you please add some info on the Intellidemand governor?
[Galaxy S II General] droidphile:
I will..I'm waiting for Siyah 2.4.2

Gotta add some tweaks too if possible..For that, i need to test :)
[Galaxy S II General] mcarans:
Also in there is a Lionheart governor that can be flashed for SiyahKernel mentioned here (http://xdaforums.com/showthread.php?t=1263838). Can you add some info on that one as well please?

Hope there won't be any new governors for a while!
[Galaxy S II General] Thialala:
Waaaaw ! This is just awesome and lets me voiceless. Thank you. Can I ask you a favor: Will it be possible to translate it and use it in a french forum by quoting you and putting the link to your thread. Great topic once again.
[Galaxy S II General] droidphile:
Yeah go ahead..I don't mind.. :)

My intention was to make a useful thread for users of any kernel. Since i'm using Siyah, i made the thread w.r.t Siyah governors, modules, etc. Planning to add dual core management and related stuffs in post 3.
[Galaxy S II General] mcarans:
Thanks very much for including Lionheart and Intellidemand.

I hadn't realised that Lionheart was geared towards performance rather than battery - good to know.

Is Intellidemand supposed to be better for battery than Lulzactive or Smartassv2?
[Galaxy S II General] droidphile:
As you can see, intellidemand plays a role only during browsing mode: like reading ebooks, internet browsing, etc. So intellidemand's battery friendliness depends on our usage pattern. In Siyah intellidemand does not support detection of browsing mode, so it can be considered roughly an ondemand itself. Gokhan will be adding all the features of original intellidemand soon.
[Galaxy S II General] mcarans:
I'll stick to Lulzactive for now I think. Out of curiosity, what do you recommend for io scheduler for a reasonable performance battery tradeoff (like Lulzactive for governor)?
[Galaxy S II General] droidphile:
i/o schedulers might not have a great impact on battery life. But it could have notable performance impacts. Some users report CFQ takes long time to complete media scanning, some people prefer sio or deadline for their 'simplicities'. Some people believe bfq delivers best during hd video recording and usb data read. Some prefer VR for it performs best when it peaks, but others refrain from it because of Vr's 'unpredictable' behavior.

With Siyah, use sio/deadline or bfq.
[Galaxy S II General] sinancetinkaya:
Is it possible to have bnep.ko in our SGS2
[Galaxy S II General] droidphile:
Why do we wanna bluetooth tether while we can wifi-tether/usb-tether.

Or if you were referring to reverse tether/'battery-saving' tether, i have not tried bluetooth pan in GS2. I'm not sure about BT PANing in GS2.

You can search more or nandroid+download the module+download pan daemon(if any) and try it yourself!
[Galaxy S II General] Acousticoid:
Thank you droidphile, excellent introduction to governors.
[Galaxy S II General] mcarans:
For measuring governor battery life, I guess recalibration is a good idea. I know that you have to charge the phone to full battery, wipe battery stats and then let the phone drain battery until it turns off, then charge to full.

My question is: is it ok to power down the phone for a few hours at a time during the phone drain stage (eg. overnight I usually turn my phone off)?
[Galaxy S II General] sinancetinkaya:
You could have said simply "I DON'T KNOW or I HAVE NO IDEA"
[Galaxy S II General] droidphile:
If phone is powered down, how does the battery drains itself.. Better play some hd videos, turn on gps, play angry birds and use some app to turn on vibration for a few minutes to drain the battery quickly. While charging overnight, you can power down the phone.

Some people doesn't know how to be grateful for some help. Google is your best friend. Thanks for stopping by.
[Galaxy S II General] incubus_fr:
Thumbs up for this really useful thread Droidphile, thank you!
[Galaxy S II General] -Nane-:
Thanks for your work.

=)
[Galaxy S II General] sinancetinkaya:
I already did a lot of search on google

, looked for the source code of bnep.ko module to build it myself.
[Galaxy S II General] droidphile:
As i have said repeatedly....Already added in the other thread long back...3rd post

ramp_down_steps affects sleep ideal frequency, not awake ideal frequency. From my sample tweaks, you can see sleep ideal freq is 200. If your scaling min is 200, then the value of ramp_down_step is not taken into consideration since it's the delta to be used below sleep ideal freq.

CPU driver scales CPU to a frequency available in frequency table, not governor. Governor only instructs the CPU driver. So if frequency delta is 200 above awake ideal frequency of 500, the resultant 700 is rounded off to 800 by CPU driver and scales upto it. 800 to 1000 rounded to 1000 itself, and so on....
[Galaxy S II General] pikachu01:
Actually this is incorrect. Ramp down step is how much you ramp down below the current frequency when threshold goes below min cpu load.

Didn't matter what sleep ideal frequency is.

Also, if it needs to scale to

the frequency is in between 200 and 500 for example , it'll scale to the frequency in between using time slice (need to check the code for this so correct me if I'm wrong)
[Galaxy S II General] aspen1135:
interactivex

Is there a way to get the interactive X governor through xxTweaker? Sorry if this a dumb question i guess im noob :o

oh btw.. THIS ROM THING HAS MADE MY PHONE ****IN AWESOME, great work!!! :D
[Galaxy S II General] droidphile:
Min CPU load is considered, nevertheless ramp down step is also considered.

This is the code snippet.

if (old_freq > this_smartass->ideal_speed) {

new_freq = this_smartass->ideal_speed;

relation = CPUFREQ_RELATION_H;

}

else if (ramp_down_step)

new_freq = old_freq - ramp_down_step;

else {

new_freq = old_freq * this_smartass->cur_cpu_load / max_cpu_load;

if (new_freq > old_freq)

new_freq = old_freq -1;

}

The ideal speed is sleep_ideal_frequency. You can see ramp_down_step is considered only if old_freq is <= ideal_speed. In the last else (entered while ramp_down_step=0) you can see the frequency is adjusted to handle arbitrary max cpu load.

What time slice are you talking about. CPU can operate only in any of the frequency found in frequency table. CPU driver does the rounding off job for all governors, if the resultant freq doesn't exist in the table.

If your kernel has interactivex governor, you will be able to set it using setcpu/voltage control/nstools/antutu cpu master or any such cpu tuner app.
[Galaxy S II General] lupixus:
resurrection remix and siyah

Salutare! i'v recently update my resurrection remic to v.2.3 with the "divine" Siyah 3.3.2 kernel. I believ that is the best rom: long battery life (4 days, see img. att.) even if i used wifi like hell and the camera app. was awake like paparazzi, the GPU is like a CG render farm and the deep sleep is extremly improuved.

I recomand this combination of rom and kernel.