yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] AndreiLux:
I don't see how you can use those values?.... you're running on a low sampling period of 25ms which in itself should be enough to enable completely smooth transitions without any lag, yet you have crazy low thresholds which would negate any sensible battery improvements, and a downsampling factor of 40 of just plain stupid and nobody should use that. You're already running at 25ms sampling which equates to 400HZ/ticks per second so whatever compute load might occur that needs higher frequency, it has vastly enough time to be able to make it smooth. What you're doing with those thresholds is basically ignoring a whole frequency step.

I've been playing with ondemand for a long time now and agree that it's the best, but there is no reason to change its values like that. Keep up threshold at 95%, down differential at something between 5 to 15 max, downsampling at maximum 2, and you have the perfect settings. Use 60-80ms sampling for battery saving, and ~20ms for performance. Frequency transitions cost 100µS maximum, that's 2 order of magnitudes plus times two for the lowest advised sampling rate, and you're multiplying that by 40? ...

In your example: ondemand does not scale down when load reaches 40%, that's lulzactive and all other interactive governors. It makes me even wonder if you understood how the governor works; let's recap:

When load reaches up_threshold, governor scales up to highest frequency (or smooth scaling one if you take it into account), stays there for sampling_down_factor samples without checking the load again, then samples again the load and calculates an estimate of the new target frequency in a way that the lowest frequency will be chosen that would not trigger up_threshold in the next sample, during this choice then down_differential is taken into account as a breathing room value. Rinse and repeat from this point on.

I don't recommend anyone into using your settings.
[Galaxy S II Original Android Development] kgp700:
thanks ! make kernel for korean galaxys2 :D

it work M250K STOCK EK23 rom with siyahkernel 2.6.7

but i'm found some problems

all governors working only max cpu clock(1200mhz) and 2cores with device heating

dmb is not working correctly

(it's not have error message but can't find channel, can't watching dmb tv)

but it's very smooth and high quadrant score

(especially very high i/o score wonderful)

i'm not tested compass sensor and NFC but some people said not working that
[Galaxy S II Original Android Development] AndreiLux:
You're cute. Really.

More in a bit.

Edit: actually, no. I'm done with arguing with idiots and brick walls. I'm not going argue with somebody pulling links and quotes out of his ass from not only different architecture but also different platforms for the sake of winning an argument. I explained my math and my arguments and you chose to ignore half of what I even wrote, so you're not worth any more time. Congratulations you mangled and turned the ondemand governor into a quasi-performance one. Be proud.

For anybody else reading: make your own conclusions.
[Galaxy S II Original Android Development] rajarshi10:
Very newbie'ish question... but I need some answers. I wanna flash this kernel cause in terms of review, this has a very good battery life. But what is UV & scripts? How do I use it with the kernel? What do I need to do for better battery life cause simply flashing this wont do the work, will it? Someone, do reply please :)
[Galaxy S II Original Android Development] cmd512:
The idiot would be you. Doesn't matter if it's different architecture, timing is timing, simple as that. Doesn't matter if it's PCI BUS timing, memory timing, you CLEARLY don't understand this point.

I'm done with you as well. Do me the same courtesy as I've done to others: Try not to be such a ****, alright? I know you have some inner issues that require you to release your angst on an online forum, but next time, if you don't have anything nice or constructive to say, maybe go shout it in the mirror at the moron staring back to you.
[Galaxy S II Original Android Development] Simba501:
Come on guys. What are you accomplishing by bashing each other?. We're here to report oddities, and share experiences and knowledge. We can do so without it resorting to hostility and name calling.

Sent from my Galaxy SII
[Galaxy S II Original Android Development] cmd512:
Yep, back to that. Just shared my settings as well as my reasoning behind them. Other than the high sampling_down_factor, everything else follows in line with the "recommended performance" settings for ondemand in droidphile's thread. Bottom line is it works for me, but your miles may vary.
[Galaxy S II Original Android Development] AndreiLux:
Ah! So that's where that comes from. And just for the record: I called your settings stupid, and wasn't offensive towards you, but towards the numbers. I'm still of the opinion those thresholds are overkill and hogwash for any average user and turn the governor into something that shouldn't be called ondemand anymore.

I see now that droidphile's thread is wrong, and see where you got your stuff from.

vs

/*
* The optimal frequency is the frequency that is the lowest that
* can support the current CPU usage without triggering the up
* policy. To be safe, we focus 10 points under the threshold.
*/
if (max_load_freq <
(dbs_tuners_ins.up_threshold - dbs_tuners_ins.down_differential) *
policy->cur) {
unsigned int freq_next;
freq_next = max_load_freq /
(dbs_tuners_ins.up_threshold -
dbs_tuners_ins.down_differential);

/* No longer fully busy, reset rate_mult */
this_dbs_info->rate_mult = 1;

if (freq_next < policy->min)
freq_next = policy->min;

if (!dbs_tuners_ins.powersave_bias) {
__cpufreq_driver_target(policy, freq_next,
CPUFREQ_RELATION_L);

(And yes, I do study the whole source code of the governors and cpufreq before I make claims :rolleyes: )

Like I said, upon resampling again it scales it down to a specific frequency state which is below the up+differential boundary. That part of the REF/FAQ needs to be rewritten/reworded.
[Galaxy S II Original Android Development] cmd512:
Understood, but frankly, you should avoid directing words like "stupid" or "dumb" towards anyone specifically regardless if you're talking about the person or their comment. Like the gentleman mentioned above, we're all here to discuss and possibly learn from those more learned than us, and words like that DEFINITELY do not help.

(Now instead, if you said I was a bit obsessive with smoothness, I'd agree 100% and say guilty as charged.)

Again, I never said my settings are for everyone, but I have what might be an unhealthy obsession with some of the micro stutters I experience with very high thresholds + very low sampling down factors. Agreed in what you're explaining in that based on the code you show, it drops to a step that theoretically should not require another ramp up in frequency. But with such aggressive sampling rates, you have to admit that that window still exists, and I just see my more aggressive sampling_down_factor setting as just another insurance blanket on top to prevent just that.

I think where we differ is... you're dead set on sticking to what the essence of ondemand brings. While I respect that, I found there were attributes of lulzactive that I preferred, so yes, I am building a somewhat quasi-performance leaning ondemand governor with my unconventional settings. With all that said, I still prefer ondemand because what it offers is the opportunity to smooth scale to an intermediate step so that when I'm not doing anything too intensive, it almost never shoots above 800MHz. But again, I'm part of the camp that when I "really want to use that damn phone," I want it running at full speed. :) Those that really want to maximize battery life would probably not see eye to eye with me on that, but like I said, I use my device too much not to enjoy it at full speed.

Lastly, with ondemand and my quirky settings, I'm actually getting much better battery life than I ever did with the other governors I've used extensively (lulzactive and a very performance leaning conservative setup). So, I'm very happy with the balance of performance and battery life I'm currently getting. As said before, your miles may vary.
[Galaxy S II Original Android Development] Shinfei:
The benefits of all this discussion, i learn more about ondemand's settings so thanks to you two :)
[Galaxy S II Original Android Development] Codex0:
thank you :)
[Galaxy S II Original Android Development] rajarshi10:
Very newbie'ish question... but I need some answers. I wanna flash this kernel cause in terms of review, this has a very good battery life. But what is UV & scripts? How do I use it with the kernel? What do I need to do for better battery life cause simply flashing this wont do the work, will it? Someone, do reply please
[Galaxy S II Original Android Development] XDA mark:
Just flashing 2.6.7 will do wonders. Nothing else needed my friend :)

You can undervolt (using SetCPU or Voltage control), though I don't do it anymore. It can cause instability.

You can use scripts, like the Thunderbolt script. I haven't used that though.

So really, you can just flash 2.6.7 and leave it like that :) It should be set to "SIO + Ondemand" by default, which is really an awesome setting at the moment. Battery life and performance are in total harmony.
[Galaxy S II Original Android Development] rajarshi10:
I am on stock rom with 1650 mah battery. U r using an extended battery + custom rom. Will I get the same result?
[Galaxy S II Original Android Development] Alexino23:
what about battery life? with 2.6.7 is longer? i have the stock battery
[Galaxy S II Original Android Development] adivorandroid:
I9100XWKI1 = NEW EUROPEAN 2012 2.3.6 VERSION

INFINITE BOOT LOOP WITH YOUR KERNEL

:confused::confused::confused:
[Galaxy S II Original Android Development] zaphod777:
wipe your dalvik cache and system cache from recovery.
[Galaxy S II Original Android Development] XDA mark:
Well its obvios you wont get the same results, since my battery has 350mAh more capacity then yours. But believe me, this will maximize your battery life. I used VillainROM for months and this kernel gave great results, now I have switch to Foxhound 3.0 and till now I am seeing the same amazing battery life (and performance).

Just flash 2.6.7 mate... can't go wrong. I always wipe cache and dalvik (dont even know if its neccesary) and then flash the kernel. It will be on the right settings by default...

@Alexino23: Just flash it.. it will. From all the kernels this is one of the best, if not the most, batterylife improving kernels. Some from a kernel standpoint you cant really go wrong. If you are still not happy with your batterylife after, change roms or buy a extended battery. Salut ;)
[Galaxy S II Original Android Development] droidphile:
OK! So guns are pointed at me now.

Never mind. I had lot of stuffs to cover in that thread (and planning to add some more info like Gokhan's upcoming governor darthvader, CPU alignment, CPU schedulers, and so on..) so please forgive 'minor mistakes', atleast for the time i had spent to write the whole thread.

I'm @work now, and will correct/update those parts of ondemand explanation/tweaks when I'm home.

ps: I titled the tweaks as "Sample Tweaks" and NOT "Specific Tweaks" because readers are supposed to get only the idea of tweaking, and i never claim they're the 'original tweaks' or you have to use those exact settings to get max battery/performance/whatever.
[Galaxy S II Original Android Development] adivorandroid:
No results..... :(:(
[Galaxy S II Original Android Development] rauschkugl:
Did you flash the correct version that is made for your model?

Sent from my GT-I9100
[Galaxy S II Original Android Development] RotesMeerJogger:
thank you very much for your settings! i'm with you. i'd like to have very good performance when use my smartphone and very low battery drain when i doesn't use it so i will try your tweaks.

but in this case i doesn't need lulzactive app right?

here i have finally one question. can i delete existing code in this file and copy only your code into it or is it necessary to keep voltage control code and copy your script after vc code?

and forgive me for my very bad english :( :)
[Galaxy S II Original Android Development] shaq1907:
I don't know why but I have worst battery life in 2.6.7. It was awesome in 2.6.6 for me. I'm in UltraToxic Rom 8.0.2.
[Galaxy S II Original Android Development] Shinfei:
No need for lulzactive app if you don't use lulzactive governor :p

All is in the first page mate : http://xdaforums.com/showthread.php?t=1325831

Search for Droidphile's threads (here and here) he made a great work for all can understand ;)
[Galaxy S II Original Android Development] jayerfernandes:
Is a touch based CWM possible on the s2?
[Galaxy S II Original Android Development] edint3000:
@gokhanmoral

Can DIDLE 2 be implemented in siyah, i mean is it posible?
[Galaxy S II Original Android Development] adivorandroid:
YES, MY SAMSUNG GALAXY S II WORK 100% WITH ORIGINAL KERNEL. I use original rom delivered in Italy 2 days ago for NO BRAND device.
[Galaxy S II Original Android Development] ka2uki:
amazing kernel~thanks again @gok!
[Galaxy S II Original Android Development] rauschkugl:
Every s2 works with the original rom amd kernel.

I mean did you flash the i9100 kernel (if you have that version of the s2) or did you download the i777 version. This happened some other users before and they also got a bootloop then.

Maybe you also got a bad download. Try redownloading and flash again. I never had any problems with siyah so far.

Sent from my GT-I9100
[Galaxy S II Original Android Development] expl0de:
Hi, im using this kernel since 1 day and it works fine, I have voltage control installed to tweak the cpu and gpu. It finds only 2 steps for the gpu, but not three as described, they are 200 and 267. I want to adjust the third one to max 267, middle 200 and first 100, cause I want no overclock. Anyone can help?
[Galaxy S II Original Android Development] adivorandroid:
I will try again, thanks for fast reply ;)

EDIT:

After new kernel flash...it work :-)
[Galaxy S II Original Android Development] Shinfei:
If i'm not wrong, VC doesn't integrate this feature yet. You have to use an init.d script for edit the step. By default the third step is disable by an up_threshold for step 3 of 100%

Source : http://xdaforums.com/showthread.php?t=1369817
[Galaxy S II Original Android Development] expl0de:
Thanks for the explanation, I found this "gpu_control" file with root explorer and treshold 2>3 is 100%. Can I manipulate those settings by editing this file with root explorer, or it wont change anything?
[Galaxy S II Original Android Development] pikachu01:
Implementing that will make wake_on_fb etc stop working (screenstate_scaling scripts won't work after that) :/ I think.
[Galaxy S II Original Android Development] Shinfei:
You have to write an init.d script for change these values.

Read this post of droidphile to know how create an init.d script and paste the line i put above ;)

Or use the great script generator of KcDaRookie : http://xdaforums.com/showthread.php?t=1352954 ;)
[Galaxy S II Original Android Development] reAly:
is it useful to reduce the busspeed to 133mhz or is it equal? anybody know something about that?

thank you :-)
[Galaxy S II Original Android Development] nickname_marco:
nope, you cannot.

download script editor from market, make a new script and paste these strings:

run script as root and check whether it's stable for your device or not (it runs fine on mine).

once you are sure you have no probs, move script to init.d folder to have the system load it automatically during boot process.
[Galaxy S II Original Android Development] cmd512:
Not from me, friend. Your thread is hands down one of the most informative and helpful threads on here, and I have nothing but appreciation for it. Thanks again!
[Galaxy S II Original Android Development] menkromsen:
One question.

I have always used SetCPU and VoltageControl together. I have some profiles in setcpu like overclock to 1400mhz when charging, downclock to maximum 800hz when reaching 25% battery, and max 500hz when I only have 15% battery.

-I wonder if SetCpu is using any battery of it's own? If it do actually consume a bit battery, I can clearly live without it :)

But if it's really minimal I would prefer to use it like I always do....
[Galaxy S II Original Android Development] RotesMeerJogger:
here i have finally one question. can i delete existing code in this file and copy only your code into it or is it necessary to keep voltage control code and copy your script after vc code?

and i have found a file from lulzactive app under data/date/com.tegrak.lulzactive/

is it necessary to delete this file if i don't use lulzactive governor?

thanks a lot for your feedback ... and forgive me my bad english :( :)
[Galaxy S II Original Android Development] tolis626:
I've been using SetCPU for a little over two years.Never had any problems with it.Why?Well,contrary to what many say,that it needs resources and CPU cycles to check whether to activate profiles blah blah blah,I can assure you that CPU overhead and memory footprint of an app as well-coded as SetCPU are minimal,as is its impact on the battery.So keep it without fear.It may only cause problems with some screen-off profiles,which are redundant with governors like lulzactive and ondemand.
[Galaxy S II Original Android Development] rab1412000:
What current charging mah are you guys using and what is the safest upper limit that won't have adverse long term effects on battery and unit
[Galaxy S II Original Android Development] cmd512:
Nope, like Shinfei said, no need for lulzactive app. In fact, mine is frozen via Titanium Backup now given I'm only using ondemand. All you need is the following line in your script to enable ondemand:

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Yes, there is quite a bit of code in the VC boot script that can be modified/deleted. For one, there are a bunch of logging parameters that I removed, a few checks for "existing parameters," etc... but there are also a few other items I "trimmed" down given I kind of know my way around these scripts. However, for those that are not as familiar, I recommend you keep some of these items in as they will help you debug should you accidentally edit something incorrectly.

Also, don't forget to set the permissions on your script properly, mine is always rwxr-xr-x, and it always loads with 0 problems.

Good luck!
[Galaxy S II Original Android Development] Milchbeck:
Thank you for the very best Kernel (2.6.7)!!!

Send with Tapatalk: Galaxy S2 CheckRom HD v4 2.3.6 / 2.6.7 Siyah / ICS Domination v1.8
[Galaxy S II Original Android Development] AndreiLux:
No offence against you, your thread is great.
[Galaxy S II Original Android Development] lpsi2000:
So in the end you are both right (LOL):D. So now let me see if there is anything I can cherry pick to improve my configuration:p. That was a good healthy discussion without going out of control. A few misunderstandings or misuse words, but overall good discussion in my opinion.
[Galaxy S II Original Android Development] cmd512:
It works for me, can't say whether it's right though. BUT without a doubt, there is reason to my madness. And, I'm not quite sure how much worse it would have to get to be considered "out of control," but I'm pretty sure that was along the hairy edge. :D
[Galaxy S II Original Android Development] droidphile:
No problem :)

I have updated ondemand briefing and grouped governors in a better order in the thread.
[Galaxy S II Original Android Development] RotesMeerJogger:
cmd512, i hope this is my last question ;)

i use voltage control to set governor, scheduler and cpu frequency range. VC create a file called S91voltctrl in folder etc/init.d. now can i create a new file and copy this (your) code into it? is the line where load ondemand governor necessary? because this governor will be loading from VC script. how can i test if this script work for me? thanks for your help man! :)

#load ondemand governor
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#L1 = 1400MHz = Max freq = smooth target
echo "1" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_target
#1+3 (smooth offset) = L4 = 800MHz = target smooth scaling midstep
echo "3" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_offset
#6 (lowest frequency = L6 = 200MHz) -2 = L4 = 800MHz = target smooth scaling midstep
echo "2" > /sys/devices/system/cpu/cpu0/cpufreq/smooth_step
#Result = Phone will jump to 800MHz before scaling up to higher frequencies

#ondemand tweaks
#CPU load has to hit 75% before scaling up
echo "75" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
#Samples CPU load every 25000 microseconds
echo "25000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
#Waits 25000 x 40 = 1000000 microseconds = 1 second before throttling down from max freq
echo "40" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
#CPU load has to decrease to 75-35 = 40% to throttle down frequency
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
[Galaxy S II Original Android Development] Simba501:
+1, I enjoy when people post their settings and others comment on it. I usually end up taking bits and pieces from both sides, and gaining knowledge in the process :).
[Galaxy S II Original Android Development] ziroxs:
My friend you helped me not only one time with PMs. This support could not be payed with money :) Thank for all support ! :) go further !

thx
[Galaxy S II Original Android Development] cmd512:
Since you're just starting out, I wholeheartedly recommend that you only manually replace portions of the script you understand. And, if my parameters I provided are missing, then yes, you can add them in.

Last thing you'd want to do right now is remove something critical, break the script, and causing hangs at boot.

Let me know if you have any other questions.
[Galaxy S II Original Android Development] RotesMeerJogger:
thank you very much for your help. i wouldn't remove any code. only add your code in vc file. have made a flashable vc backup script if my S2 doesn't boot after my tweaks ;) :) i will let you know my results later.
[Galaxy S II Original Android Development] cmd512:
No problem, and best of luck. I'm also playing a bit with some of the settings given the updated definition of down_differential by AndreiLux/Droidphile, BUT I am still keeping my sampling_down_factor high. Reason is same as before, I want to stagger it a bit when throttling down from max speed.
[Galaxy S II Original Android Development] RotesMeerJogger:
hmm. now i have created a new script file in etc/init.d and if i run the script with script manager (to test it if it's work) i get some "permission denied" errors (at all lines). the interesting thing is i also get this errors if i run vc script with script manager and this script works properly so what is my mistake? thanks for help.
[Galaxy S II Original Android Development] PedroMRP:
You have to run it with root permissions. In script manager press the skull symbol and then run the script
[Galaxy S II Original Android Development] RotesMeerJogger:
hey thank you! now i get the green line "Exit code 0" :cool: :)
[Galaxy S II Original Android Development] chadouming:
Have you changed the right ? You need to make it executable.
[Galaxy S II Original Android Development] RotesMeerJogger:
jepp. permissions are rwx-rwx-rwx. i think it's enough. you are with me? :)

edit: oh i can't give you a thanks. only 8 per day :)