yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] scorpion667:
I have made some very interesting discoveries in the past 5 days of playing with different ondemand parameters via init.d scripts.

The main elements I will discuss are as follows:

sampling_rate

up_threshold

down_differential

sampling_down_factor

You can find the definition of these values with google.

Now at first I was all about smoothness and there is a big misconception that it kills battery life due to higher clocks required. I will prove this wrong.

AT first I thought ok let me make the clock speed very responsive by lowering sampling rate, lowering up_threshold and that was a very brute force way of achieving smoothness. It works but it kills battery, CPU sits at high clocks and uses pointless cpu cycles scanning very often for load values.

I used:

sampling_rate: 20000

up_threshold: 70

down_differential: 40

sampling_down_factor: 5

But what I found today is that the homescreen and scrolling lag has very little to do with the cpu being at too low of a frequency. Lock your CPU at 800Mhz performance governor and watch how smooth it is.. . What causes microlags is the CPU switching frequencies too often. Consider a car that shifts gears, when it is between gears it has no power until the next gear is selected. The microlag happens when the CPU switches frequencies during a homescreen transition, regardless of going from 1.2ghz to 1ghz or 800mhz to 500mhz, LOL.

I took a different approach with this discovery in mind. This approach succeeds at achieving smoothness AND battery life.

I raised the sampling rate to 100000 so the CPU doesn't fluctuate as often, we don't want that.

Raised up_threshold to 80 to save battery. High clock speeds drain battery.

Raised sampling_down_factor to 15 so the cpu stays in a set frequency for longer. This is our main tool for smoothness, we want the cpu to scale back slowly!!!

Raised down_differential to 55 to attain a longer duration in a given clock. This one might need more tuning, it's kind of ridiculous now that I think about it.

Very smooth, does not spend as much time at max clock as you would think. To become more battery friendly but retain smoothness I would raise the up_threshold to 85.

This setup spends most of it's time at 800Mhz while scrolling homescreens and is very smooth.

Next I plan to test lowering down differential and sampling down factor, perhaps raising up_threshold.

I plan on tweaking this farther with my recent learnings, it's very fun!!! I will report back.

I love it!
[Galaxy S II Original Android Development] prosumerhacks:
Nice to see your findings... how about HD video play and other intensive tasks? Does it make any difference? Please provide some usage scenarios too?

Sent from my GT-I9100
[Galaxy S II Original Android Development] scorpion667:
I will report findings as I find them but HD video playback is great on my end.. using 2.4.2 sched_mc enabled.

Another thing I want to test is playing with the up threshold of the second core, because single core mode is very smooth and uses less battery... Imma try raising it to 85!

Basically to summarize my long post, for smoothness we don't need high clocks, we need the cpu to not switch clocks as often.
[Galaxy S II Original Android Development] KenHua:
HD Moives and Blutooth Mouse

Thanks for the update. Was hopeful that the latest release would fix the HD Movies and Bluetooth Mouse problems but it didn't work out for my phone. Playing of HD movies from external SD seem to have improved but not free from stutters. Bluetooth mouse still won't connect.
[Galaxy S II Original Android Development] scorpion667:
Even bigger discovery!

You can optimize battery and smoothness alot if you set a high threshold for second core on and also a high off thresold like so:

loadh: 85

loadl: 55

Yet to see any lags/microstutter/slowdowns at all

Gotta keep in mind almost none of our apps are optimized for dual core aside from benchmarks. It's still there for when you need it, off when you don't. Many people reported single core mode is smoother and with these settings the second core is almost always off during homescreen transitions which helps maximize smoothness and raises battery life.
[Galaxy S II Original Android Development] Mr.Gamer:
I don't have that issue, normal boot-time here, less than 30secs, using cyano-lastnightly

Feedback on latest build: intellidemand sounds interesting, i will try using it for a day/two and check how battery goes, but it's far less smooth than smartass (and ondemand!). i'm using it from 200mhz->1400mhz, just as a reference

good work as always ;)
[Galaxy S II Original Android Development] antt00:
Intellidemand is still not as smooth as tweaked conservative. I don't think i can use any other governor now. Tweaked conservative is the best. Thanks gokhan.
[Galaxy S II Original Android Development] tenchi0205:
:confused: that is strange...

p/s: what is the different with 2.4.2 sched_mc enabled and 2.4.2 international ?
[Galaxy S II Original Android Development] scorpion667:
sched_mc = 1 : System fills 1 core before firing up the other supposedly it saves battery.

The creator made two versions, one with sched_mc, one without in order to see which is better on battery life.

In my experience, the one WITH sched_mc is smoother.
[Galaxy S II Original Android Development] CamoGeko:
Testing exactly this tonight and tomorrow. :)

With no sched_mc is working pretty smooth and decent battery run down.

Communicated from a Galaxy far far away via an XDA premium neurotransmitter while DJ'ing on The Enterprise. :D
[Galaxy S II Original Android Development] scorpion667:
Ah, relating to my comment about no sched_mc version, could of been placebo effect.

So, are these values not used if sched_mc is enabled:

echo 25 > /sys/module/pm_hotplug/parameters/loadl

echo 70 > /sys/module/pm_hotplug/parameters/loadh

echo 35 > /sys/module/pm_hotplug/parameters/loadl_scroff

echo 90 > /sys/module/pm_hotplug/parameters/loadh_scroff

??

Because by definition sched_mc should ignore those..?
[Galaxy S II Original Android Development] xBlackDroid:
excellent! i think everything its fine and very smooth

GJ
[Galaxy S II Original Android Development] b2rdetor:
video problem still here. Its look like when you try playback 24p video on 60p screen - you will see drop frames

trying both 2.4.2 versions and can find any difference.

i tryed cf-root kernel and video playback was very smooth - cant see any droped frames

tryed 2.1.1 siayh and video drop frames same as 2.4.2

---------- Post added at 08:11 AM ---------- Previous post was at 08:08 AM ----------

gokhan have you 720-1080p playback problems???
[Galaxy S II Original Android Development] :
Mate I'm learning a lot from your posts thank you very much! Any battery stat you achieved with your set up to share?? :)

Ah good old Nokia days with battery lasting 3 days with hours of calls and 3g push mail always on.. :P

Sent from my SGS2 - Checkrom Revo 4 | Speedmod k18 | Vertumus ICS Theme |
[Galaxy S II Original Android Development] screamworks:
Would it be possible to get a copy of the init.d script(s) you used for those settings, along with the one's you detailed in #12757? :D
[Galaxy S II Original Android Development] EdgaBimbam:
amazing kernel 2.4.2, otg cable now works,stable,friendly baterry :)
[Galaxy S II Original Android Development] scorpion667:
Oops, should have mentioned..

..my bad.

Ondemand governor
[Galaxy S II Original Android Development] flute:
Am I the only one having this message in downloading from www.gokhanmoral.com?

"Cannot download. The content is not supported on this phone."

Inviato dal mio GT-I9100 usando Tapatalk
[Galaxy S II Original Android Development] tomeks:
install 'download all' from the market
[Galaxy S II Original Android Development] jlieu:
Or use opera, or any browser apps to download.
[Galaxy S II Original Android Development] gasmias:
I also have problems with hd playbacks.

With 2.4.2 i can see drop frames.

Everything else is great, for now.
[Galaxy S II Original Android Development] Stylez Ray.:
Sorry for my noob-question, but how can I use ondemandx governor? It says it should be in the kernel on gokhan's homepage but I can't see it in my list of governors?!?
[Galaxy S II Original Android Development] gasmias:
Yes, 2.4.2 with sched_mc is smoother. You can test both versions with same wallpaper on homescreen, you will see when you scrolled homescrens that is smoother with topo..
[Galaxy S II Original Android Development] Fille84:
So does this means that 2.4.2 without sched_mc will give a little better battery. I mean it would mean that more smoothness (sched_mc) = bigger drain of battery..?
[Galaxy S II Original Android Development] Doug8796:
on tegrak i could handle about 1672mhz.. any hope we could have a tad higher in frequency?
[Galaxy S II Original Android Development] gokhanmoral:
you can modify the frequency table.

search the thread and you will find some script examples.

you can change the highest frequency from 1600 to 1672 and also you can modify any level with some limitations. for example, you cannot set second level, i.e. 1400, higher than 1600 or lower than 1200 but you can it to anything in between. you have 8 levels and the highest frequency you can use is 1696MHz, the lowest is 25MHz.
[Galaxy S II Original Android Development] droidphile:
Thread updated with briefing of intellidemand and lionheart.

http://xdaforums.com/showthread.php?t=1369817
[Galaxy S II Original Android Development] b2rdetor:
aaaaaa!!!

something wrong with 4.2.2 conservative. it isnt smooth - archmage game are really jerky now!!! reverted back to 4.2.1 and all smooth again...
[Galaxy S II Original Android Development] sahidmiah:
I m using 4.2.2 and i have tried all the kernel. One problem I notice. Is playing HQ videos on you tube. Specialy long videos the pictures seems to stutter after a while. I mean freeze stops freeze stops. Is there a solutions.
[Galaxy S II Original Android Development] panteleimonov:
for what is this sched_mc in the new version?Better battery life/perfomance what?

Thanks in advance ;)
[Galaxy S II Original Android Development] brack11:
If I flash lionheart init.d script does it mean that whatever is my governor selection in voltage control, i will still have lionheart governor? Also if I modify this script and call it something like "01custom" and place it in /system/etc/init.d/ then I will have those custom settings independent on selection in voltage control or CPU settings of cm7?
[Galaxy S II Original Android Development] gokhanmoral:
lionheart script modifies only conservative governor settings and if you use conservative governor it will behave as lionheart.

you can use the settings in that script in any other script. you can also use setcpu to select conservative and set up_threshold->60 down_threshold->30 freq_step->5 sampling_rate->10000 and you will have lionheart.
[Galaxy S II Original Android Development] bervin:
@gokhan

What then is the up & down threshold of your tweaked conservative??
[Galaxy S II Original Android Development] midreestaj:
With sched_mc On the battery would benefit. Opposite of what you wrote.

sched_mc is used in different scenarios to forcefully idle the cpu cores for better battery consumption. It is done in addition to common hot plugging threshold levels.

Smoothness on the other hand depends upon the application being run, e.g normal UI like menus, notification curtain etc, smaller apps such as messaging, emails etc will not benefit much from dual-core, rather 2nd core kicking in and out over and over will result in some smoothness taken away along with battery.
[Galaxy S II Original Android Development] brack11:
Thank you, I don't like SetCpu though, so, will choose conservative and modify script.

Sent from my GT-I9100
[Galaxy S II Original Android Development] gokhanmoral:
70 30 20 and 60000

It was 60 35 15 60000 in the previous version if I am not wrong .
[Galaxy S II Original Android Development] Sergy330:
+1

I tried with other kernel like cf-root, speedmod, echo.void, phenomenal, ragemod, ninphetamine, etc... and i have no problems with hd videos.

Siyah kernel is excellent, the most complete, but this problem has persisted for a few versions, i believe since v2.1.1

I tried increasing bus speed on cpu frequencies without succeed.

I think that may be related with read_ahead tweak: echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
[Galaxy S II Original Android Development] tomeks:
You could always use voltage control by xan from the market

this app is generating scripts and put them into init.d
[Galaxy S II Original Android Development] rinoa19:
+1 same issue as u with full HD..
[Galaxy S II Original Android Development] Bushido76:
Hey "Lord of the kernels" ;),

I'm using your Siyah Kernel since version 2.1 with different roms. At the moment I'm on oxygen rom (2.3.2) and have been making some comparisons between 2.3/2.4.1 and 2.4.2 in the last days. In my eyes Siyah is getting better with ervery version. :) My absolute favourite is version 2.4.2 with sched_mc enabled. It's doing really great. The tweaked conservative governor is smooth with adw launcher ex and the battery life is outstanding. More than 4 hours display time (while going by train [3G enabled] and playing games while listening to music) did not empty the battery. In deep sleep (low_freq is 100MHz) it should last for serveral days.

Thank you very much for the time you spend with the development of your kernel.

Could you provide a download link to the latest source package (2.4.2 with sched_mc) enabled? The last package I found came with version 2.2. I suppose that the 2.2 package combined with your latest Git-Hub-sources is not enough to rebuild version 2.4.2. ;)

Thank your very much again,

Bushido
[Galaxy S II Original Android Development] brack11:
That's what I use, but it doesn't modify those governor specs. Only voltage and clock

Sent from my GT-I9100
[Galaxy S II Original Android Development] smitna:
https://bitbucket.org/gokhanmoral/siyahkernel
[Galaxy S II Original Android Development] superleeds27:
Using 2.4.2 and SlimROM.

What do people suggest for best battery life?

Currently using, Intellidemand and BFQ i think
[Galaxy S II Original Android Development] jmblazquezh:
Nice to see ya here @Sergy330

Regards.
[Galaxy S II Original Android Development] liamR:
Hi Guys, I need some help...

I'm trying to update Siyah v2.4 to v2.4.1 or v2.4.2 and after the update the sgs2 stuck on the first boot screen (can accesses only download mode).

I always do Dalvik+Cache wipe, tried to update with CWM and odin, no go.

What should I do ?
[Galaxy S II Original Android Development] Bushido76:
Hey smitna,

thank you for the link. When I wrote Git-Hub I meant the bitbucket link - sorry for being imprecise. ;) For Siyah 2.2 Gokhan provided a complete package to rebuild the kernel - source including initramfs, drivers, toolchains and some other things. I wanted to ask, whether he could upload the same package for the 2.4.2 sched_mc-version.

Bushido
[Galaxy S II Original Android Development] gokhanmoral:
wait for the darkknight edition

thanks to Sergy330 for testing and also GadgetCheck..

GadgetCheck will release it (bug him, not me ;) )

hd playback is fixed.

disabled backlights during boot.

sleep entering freq is set to 500MHz.

it will have 100-1000 lulzactive as default and sio as i/o scheduler, slub as memory allocator.

added cpu freq smooth scaling and changed cpufreq notifier priority (thanks to arighi)

reverted screen sensitivity to old level (to pre2.4)

some other tweaks to save battery while preserving responsiveness

and with some undervolting + charge current limitations (as before)
[Galaxy S II Original Android Development] Bushido76:
Are you sure that it really hangs? When I flashed the kernel and wiped dalvik cache the phone needed several minutes to reboot.

Bushido
[Galaxy S II Original Android Development] gokhanmoral:
you can just replace the kernel source folder with the one you download from bitbucket.

it should compile.

I will commit some other changes in an hour but the latest commit has everything (and even more) that you need for v2.4.2 + sched_mc

there is not much change in initramfs and if you cannot decompress it from the kernel image you can just copy tweaks.sh file over and you'll be set.
[Galaxy S II Original Android Development] smitna:
Ok, this cannot answered by me...

I used the tools from the 2.2 sources and latest toolchain from CodeSourcery, but only for additional modules.
[Galaxy S II Original Android Development] gasmias:
Thanks to such great effort!

Which is the most important difference between your kernel and dk?

When will be available for download modified version (HD video playback)?
[Galaxy S II Original Android Development] gokhanmoral:
I have edited the post and listed the new features.

I will wait for some time before I release new version.

the hd playback problem was related with some thresholds (was my mistake again :) ) which came from galaxy note sources.

if you do not watch hd video, the thresholds in v2.4.2 should save more battery but they will also cause lag sometimes.

for a temporary fix, use voltage control app and increase the lower gpu freq one level but in that case it will consume more battery power than dk :)

you see, there is no best, every kernel has flaws :)
[Galaxy S II Original Android Development] liamR:
Ok, I will. Thanks :D

Yeah I know, but it stuck on the first boot screen and not after the boot animation (for building new cache).

never had this problem :(
[Galaxy S II Original Android Development] blaex:
battery drain on 2.4.2 is better compared to 2.4/2.4.1

using 200-1400 with BFQv3 + Lulzactive (-50mw clock) - no gpu voltage/clock change.

but why does the "android system" drains so much energy? how can i trace the sub processes?
[Galaxy S II Original Android Development] chadouming:
Try to redownload the kernel and to re-flash from odin. You should have no more problem. This might be related to a corrupted download.
[Galaxy S II Original Android Development] droidphile:
Battery used by Android System is relative, like all the other components - cell standby, display, etc etc. More Screen On time could cause higher Android System usage. To know the sub process just click on "Android System" under battery usage.

You can also use OS Monitor app from market. This app lets you view the live log of 'android system' too.

Higher AS usage could be due to frequent email sync, higher bluetooth on-time,etc.
[Galaxy S II Original Android Development] dtekkt:
Gokhan, shed_mc version seems to work better for me if you still need that info
[Galaxy S II Original Android Development] Gowind:
I don't know how to fix this. from 2.4.1, I'm unable to change governors via voltage control. it says the changes are applied but if you reopen the app you can see that you are on your previous governor. I have flashed the ultimate kernel cleaning script, but even after that it's the same.
[Galaxy S II Original Android Development] ziroxs:
Hi,

after testing some other different kernels to extend the battery life i switched now to to this latest ver. of Siyah kernel.

Its very very smooth, switching and scrolling within the homescreens is very amazing. Nice, good job.

I used Voltage Control to set up my UV 8-50mV each step, using the new Intelli-Mode and bfq scheduler. I think this could improve a little bit the battery usage but not decrease the performance so much.
[Galaxy S II Original Android Development] blaex:
thanks for the advice, gonna try it out ;)
[Galaxy S II Original Android Development] gasmias:
We strive for the best:)

I really appreciate your efforts to get a good kernel and waiting for a version with HD playback solved, I dont think there will be large differences in battery consumption.
[Galaxy S II Original Android Development] CamoGeko:
Weird.

Have you tried clearing app data from manage applications - voltage control. Or even re-installing the app?

Communicated from a Galaxy far far away via an XDA premium neurotransmitter while DJ'ing on The Enterprise. :D
[Galaxy S II Original Android Development] pippop:
I've just flashed the 2.4.2 version and now I have a big problem, my imei number has vanished and even with efs pro (picking the backups of the /efs made by siyahKernel) I'm not able to restore my imei and phone connection....

I've searched for possible solutions inside the forum but none of them actually worked.

Please help...
[Galaxy S II Original Android Development] CamoGeko:
You're screwed.

Sounds like you should have left your phone as stock.

If you had done enough reading, you would know to root and backup your efs first before starting to flash custom kernels on your device. Couple of apps from the market can even do it.

Another example of someone jumping into deep water without a lifejacket. When will you people ever learn....

Communicated from a Galaxy far far away via an XDA premium neurotransmitter while DJ'ing on The Enterprise. :D
[Galaxy S II Original Android Development] bervin:
How long is the wavelock fot gtalk_async_conn normally for you guys? it's always been the biggest wavelock for me sometimes going up to an hour after nearly a days use
[Galaxy S II Original Android Development] pippop:
Please explain...it's the first time I have this problem, most oh the users with the same problem solved via adb shell or, more simply, via efs pro...I tried these methods but with no results..
[Galaxy S II Original Android Development] xBlackDroid:
J get the same issue, but you need only waiting, the nwe kernel tales some minutes for start

Send from Galaxy SII CyanogenMod
[Galaxy S II Original Android Development] KcDaRookie:
@pippop: Take the CWM EFS.zip I prepared and the efsbackup.tar.gz.

Unpack the efs folder from the backup and put it in the root directory of the CWM EFS.zip file, so if you open the zip-file you should see 2 folders, one is your efs folder and the other is the already existing META-INF-folder...

But the zip-file on your sd-card and flash through CWM recovery.

Boot your phone and cross your fingers.

edit: Hope this package will work, else I cant help it.. I dont want to try to flash this myself, cuz my efs folder is just fine dont want to mess around with it, sry
[Galaxy S II Original Android Development] pippop:
Thanks for your efforts, I sent you a pm
[Galaxy S II Original Android Development] Gowind:
is the issue solved?
[Galaxy S II Original Android Development] KcDaRookie:
unfortunately not.. cwm reports error status 6, updated a new package.. maybe this will work... else I cant help it
[Galaxy S II Original Android Development] pippop:
Not yet, cwm returns an error (status 6) when trying installing the zip file (even the new one)
[Galaxy S II Original Android Development] Gowind:
ok. i will try to help you. do you have an efs backup folder by siyah.
[Galaxy S II Original Android Development] maikash2747:
right people,

i apologize in advance

The guy who replied to my "internet explorer" post did not have to use "****" to point out a mistake, i should have used "browser" and thats about it and now if you clever people know as much as i do that internet explorer is not available for android both of you and him should have known what i am referring to.

both the quoted posts and the one i replied to are a lame try to prove superior knowledge about an OS

I wonder who needs to calm down !!

Peace out.
[Galaxy S II Original Android Development] gokhanmoral:
I hope you can fix it. but if you don't have any backup prior to installing the kernel you may not be able to fix it. If you are using the autobackup that the kernel has made there is a probability that the efs partition was corrupted before making the backup.
[Galaxy S II Original Android Development] pippop:
The backup auto-made by siyah kernel are dated few days before the problem but i dont't know if this info may help you.... inside the backups i can find both nv_data.bin and .nv_data.bak but putting them via adb shell in /efs (root) don't solve the problem..
[Galaxy S II Original Android Development] KcDaRookie:
sure you used the new one?

it says 0 view...

did you use CWM EFSnew.zip?