yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] droidphile:
I can't think of any reasons if you're certain there are no syntax errors. Because you were able to get the script running for some other governor. There's a chance that it's an error in the kernel. I remember few months back, Siyah kernel had this problem with lulzactive governor. People were not able to change the parameter through script. Some permission issues. Parameter files will have permissions 655. So no problems there. Are you sure other people using your kernel are able to tweaks smartass2 using script.
[Galaxy S II General] maurogg84:
I'm not sure if other people can't tweak the governor, I can go and ask, I was able to change the parameter using the terminal, buy i couldn't with the script. Maybe is a kernel error like you said, I'm going to ask imnuts, maybe he'll know since he crated the kernel, thanks for your help again.

Eclipse 1.3 ROM

V6 Supercharged!
[Galaxy S II General] alonewind:
Good job!

Your explain is so clear and I learned a lot from it ,thanks!
[Galaxy S II General] bulldozer1210:
thank you

thanks a lot

it is the amazing thread for me.

i can get so much knowledge about many things.
[Galaxy S II General] droidphile:
Who gave a 1 star to this thread? :(

Whoever it it, since he is the first person to do so, please tell me why so. Who's the hater?
[Galaxy S II General] ogdobber:
I think because the op isn't very thorough :rolleyes:

this is a incredibly useful thread to those who don't know or want to learn

seriously, this is a huge pet peeve of mine, there is no accountability for the thread rating.

thanks for your effort
[Galaxy S II General] MistahBungle:
You know how it is Droid, always one idiot :) This is a great thread & I (and I'm sure stacks of other people) appreciate what you've done here & also all the help you've given people in the Siyah dev thread ;)
[Galaxy S II General] alonewind:
iii) down_rate_us - The minimum amount of time to spend at a frequency before we can ramp up. (Ignored below awake-ideal frequency since governor needs to rapidly scale up to awake_ideal_freq when below it)

iv) up_rate_us - The minimum amount of time to spend at a frequency before we can ramp down. (Ignored above sleep-ideal frequency since governor needs to rapidly scale down to sleep_ideal_freq when above it)

it seems this two parameters are reversed?
[Galaxy S II General] droidphile:
My bad! Corrected in the OP 2.
[Galaxy S II General] Luka321:
Just what i was looking for, excellent thread!
[Galaxy S II General] Masamushia:
Hello Droidphile, your thread has helped me numerous amounts of times, but I have a few questions regarding the ExTweaks. There are just some settings tat I don't even begin to understand what they do. I'm using Entropy's DD 3/5/12 kernel, btw. What exactly is a jiffie and how does it effect my settings? I checked in your hotplug section but I didn't anything. From my understanding it's just a smaller unit of time? I tried setting rate_cpuon and rate to both the highest settings and then the lowest settings but I just didn't see what it was actually doing. I'm more or less confused on what rate, rate_cpuon and rate_scroff are actually doing. And how would changing the GPU StayCount settings effect the gpu too, btw? Sorry for all the questions and thank you so much for this thread. 5/5 :)
[Galaxy S II General] droidphile:
Like the literal meaning, jiffy is a small amount of time. It's used for some calculations in various governors to help make sampling decisions. One jiffy is one millionth of a micro second in plain physics. But here, one jiffy = one tick of the system timer.

If you were referring to jiffies in a governor such as smartassv2, refer this post in the same thread.

Like i briefed in OP 5, rate, rate_cpuon and rate_scroff are the sampling intervals for hotplugging.

Example:

Assume loadh=70, loadl=25, loadh_scroff=95, loadl_scroff=50.

Assume rate = 100, rate_cpuon=400, rate_scroff=400, measured in jiffies. Frequency of our system timer is 200 hz. So divide by 200 to convert into seconds.

SCREEN-ON

If only first core is online, every rate = 100 jiffies (0.5 seconds) load on first core is sampled and if found to be more than or equal to 70% = loadh, second core is turned ON.

If both cores are online, every rate_cpuon = 400 jiffies (2 seconds) load on both cores is sampled and if found to be less than 25% = loadl, second core is turned OFF.

SCREEN-OFF

If only first core is online, every rate_scroff = 400 jiffies (2 seconds) load on first core is sampled and if found to be more than or equal to 95% = loadh_scroff, second core is turned ON.

If both cores are online, every rate_cpuon = 400 jiffies (2 seconds) load on both cores is sampled and if found to be less than 50% = loadl_scroff, second core is turned OFF.

note:

1) All these sampling intervals are void and invalid while using dual-core mode or single-core mode.

2) It's better to set loadh_scroff=100 so that second core never turns on during screen-off. This helps in faster hitting of deep idle states.

GPU Staycounts defines the number of cycles to stay at each frequency. Default is 1 1 1. Setting higher values results in increased sampling intervals - i.e less frequent sampling and might help in saving a little battery.
[Galaxy S II General] Masamushia:
So then messing with the sample rates for the governor aren't recommended? I know that's an option in stuff like SetCPU, if I am understanding the post correctly. Or am I confusing two different things?

Sweet! That is exactly what I wanted to know. I was looking on random sites on how to convert jiffies to ms or seconds but it just didn't make sense to me. :(

So then the sampling interval rates are only used if you just use your default system? By that I mean, let the single core run until the work load gets too high and the second core kicks in? Hmm, saving battery, huh? I'm pretty down for that! I think I'll experiment around with that then and see how it works out for me in terms of battery life. Thank you so much for your detailed and informative response! Also, if I may ask, what settings do you run your phone on? In terms of govenors, I/O scheduler, GPU frequency and voltages, GPU thresholds and the things we discussed? I'm sure it's posted around XDA SOMEWHERE, but settings and sigs change over time!
[Galaxy S II General] jrollercoasters:
first attempt at doing a script and i got this.. i took away ext, and ran as root so why..
[Galaxy S II General] droidphile:
Messing with sampling intervals of governors is recommended if we know what we're doing. Sampling intervals are probably the most significant params of any governor. It's how frequent the governor thinks (or how often we allow the governor and CPU driver to think). However, the jiffies and sampling intervals we were talking about belongs to Hotplugging :)

Yes, sampling intervals are used only when Hotplugging logic is active. Using Ex Tweaks/Tegrak 2nd Core App /Script if the mode is changed to single core or dual core, these params are invalid.

About my configs, they're set according to my personal preference. They're no magic (winks at geko :) )

If anybody is interested:

I set all params via two init.d script. One for echoing CPU frequencies and voltages. This script almost doesn't require a change.

Second for scaling freqs, and all other advanced and basic params. Only screen-off profile is set by SetCPU.

Scaling during screen on: 500 to 1200. I want response to be snappy without consuming power 'offered' by 1400 or 1600 mhz. 500 is an energy efficient freq. It doesn't consume too much power compared to 200. Moreover, since 500 is the minimum, voltage used for 500 will always be it's own voltage since there is no scaling up to 500.

Scaling during screen-off: I use a SetCPU screen off profile to scale 200-500. For some reason, i feel a it's better to use an app service than an infinite While loop in an init.d script :) The only point of this profile is to lower scaling min freq to 200 during screen on. Ondemand governor has a 500 mhz cap already.

Scheduler: BFQ

Governor: Ondemand with

Up Threshold 70

sampling_rate 50000

sampling_down_factor 1

down_differential 10

All smooth scaling params: 2

loadl: 25

loadh: 50

loadl_scroff: 80

loadh_scroff: 100

rate: 100

rate_cpuon: 400

rate_scroff: 400

freq_cpu1on: 600000 (So that at only from approx 800 second core will be turned on if required)

Bus Frequencies: Static mode is disabled, leaving it as samsung default. Memory throughput is very important for whatever that includes a lot of graphics rendering. I noticed dropped frames while using static bus speeds.

GPU clocks: 160 200 267

GPU Thresholds: 85 70 85 65

Deep Sleep Freq/Bus : 4 0

sched_mc: 0 (Don't need a redundant load balancing on cores when there's hotplugging already)

enable_mask: 3

Brightness Curve: 30 1 24 (stock levels)

Touch Sensitivity(tsp_threshold): 50

Charge Current: 650 650 450

I get decent battery life without compromising on performance with these settings.

Governor should be set to smartassV2 before applying tweaks. Check the path to parameters again. Some dir paths may be invalid. Also check for unwanted spaces at the beginning, in between and end of each lines. Use Notepad++ to save the script in unix script format. Remove .sh extension before copying to phone!
[Galaxy S II General] Frugipon:
Multiple schedulers?

Hi there.

Will start by stating the obvious: awesome thread, extremely informative, perhaps my favorite post so far. Thanked, 5-stars rated, not sure what more I can do but if you see something feel free to let me know ;).

Also thank you very much for sharing your tweaks for Siyah as I am sure that many will find them to be a good base on which to build a more personal configuration. I personnaly managed to miror your settings in my very first init.d script and could not be more proud :p.

Anywho, back to my question:

I was lurking inside Voltage Control scrit that gets created when the option "Set on boot" > "set as init.d script" is selected and I saw that when it comes to setting the scheduler, the script "echoes" the user choice in several locations (e.g. /sys/block/stl*/queue/scheduler, /sys/block/mmcblk*/queue/scheduler, /sys/block/bml*/queue/scheduler, /sys/block/mtdblock*/queue/scheduler).

At first I thought that it was intended to work on different devices, hence the different locations but then I noticed that even for my I9100, several of these locations existed.

So here is my question (at last):

is there any benefit from setting the scheduler in all of the existing above-mentionned locations rather than just using /sys/block/mmcblk0/queue/scheduler as stated in the OP?
[Galaxy S II General] droidphile:
Some scripts echoes i/o scheduler into stl, mmc, bml and mtd blocks in sysfs just to make sure that all the block devices uses the same i/o scheduler.

STL: Sector Transition Layer, MMC: Multi Media Card, BML: Block Management Layer, MTD: Memory Technology Device, etc are the block devices.

Just echoing to MMC block, /sys/block/mmcblk0/queue/scheduler will do fine in our device.
[Galaxy S II General] syntax_gosong:
Hi, I'm a newbie.

I'm so happy in finding this thread.

Now I know how to treat the govs & schs :)

One question.

Is the Sample Governors Tweaks can be applied

to other phone. I'm using Nexus S by the way.
[Galaxy S II General] droidphile:
Yes you can use those tweaks. However, the sample tweaks are just sample and optimized for GS2 h/w. Nexus' OMAP has few more advantages when it comes to power savings and such because of numerous idle states and the like. Just make sure the governor you want to tweak has all the tweak files (specified in OP) present in the directory.
[Galaxy S II General] republicano:
hello i have been trying extweaks for a day, its been on for 10hours flight mode 9 hours deep sleep, the 1 hour while i was using it, and the battery is at 80%, is that reasonable? im trying to save power

loadl - 50, loadh -70, loadl_scroff - 70, loadh_scnoff - 100, rate 500, ratecpuon - 500, rate_scnoff - 1000,freq_cpu1on - 800000hz, lowest cpu freq at 200

left the rest the same.

thanks
[Galaxy S II General] jrollercoasters:
dose anyone know if the settings will stick if i go straight to file and edit it?
[Galaxy S II General] droidphile:
It is reasonable and good. rate_scroff set to a large value (1000 jiffies = 5 seconds) is good since second core will not turn on during screen-off as loadh_scroff is 100%.

If you increased loadl to 50 so that second core turns off fast, also recommend to lower rate_scroff from 500 to do justice to 50% threshold.

You mean params files of governor or all the tunable-files in general. Echoing via terminal or script is safer so that it will get parsed correctly. All those files are actually not files, but functions.
[Galaxy S II General] creeve4:
I'm trying get get an init.d script working to set one of the Smartassv2 governor parameters.

This is the script:

#!/system/bin/sh
echo "100000" > /sys/devices/system/cpu/cpufreq/smartass2/sleep_ideal_freq;

When I run the script with Script Manager, the value is written.

When I place the file in the /system/etc/init.d folder (I named the script 99SA2), the value is not written after a reboot (I have set permissions and owner on the file).

I'm using Voltage Control to set the governor and UV.

What could be interfering?
[Galaxy S II General] droidphile:
That's probably because script is getting executed before active governor is set to smartass2. As a solution, instead of using VC for setting governor, use the script. Set governor first, then echo tweaks.
[Galaxy S II General] creeve4:
Thanks, I fixed it by using "sleep 60" in the script.
[Galaxy S II General] slinky1914:
Just found this post after trying to Google the different governors and the differences between them. Very informative post. Now I wont be guessing when I choose governors. Thanks again.
[Galaxy S II General] gchindi:
nice one...

hey droidphile,

nice and clear, but can you do a similar explanation on how the system power saving mode works, I mean what all changes it triggers once activated?

I know it makes the UI to react slower but need to compare this custom kernel tweaks against stock system power saving mode, obviously there should be a valid reason for Sammy/android to include it in stock (unless we are all being fooled)!

Im not using any stock kernel and have no intentions of using also (now, dont tell me Im in the wrong place then!)

but just want to confirm if most of the results are achieved (I know not all can be achieved) by using system power saving mode itslef, then I dont see a real requirement to use the custom kernel along with the brain draining settings that we have to do to get a bit more battery life or UI speed....!

The whole idea of owining a smartphone (SGS2 or any other) is defeated by making the end users to do all the tweaks & turns to gain maximum result...I believe in phone to work with a policy of "Minimum fuss, maximum result"..it should be built that way...I agree with the android freedom...but i feel sometimes we end up spending more time in adjusting the software rather than using it!:(

Can you please throw some light on System power saving mode (stock kernel).

it would be really helpful for some of us. By the way, I hope you are doing ok with Bangalore's temperature at the moment, Im from B'lore too, but in UK at the mo...

thanks again for the wonderful insights....!
[Galaxy S II General] droidphile:
I think System Power Savings restrict max clock/prevents over-use of max clock, reduces brightness especially on white pixels and drops few frames to make UI rendering slow. The valid reason for sammy to include it in stock is this: People at Samsung are not as smart/talented as developers on XDA and similar sites. Devs know there's more to squeeze out of the h/w. Or Sammy should be knowing this. But they're not interested to do more since 90 % of flagship-phone users doesn't know what to do if provided with tons of tweaks.

Imo, power saving mode saves a little juice at the expense of unbearable lag. Using a custom kernel and knowing how to tweak it, can save the same amount of juice without experiencing such lags. That's the whole idea of this thread. If i had to write about a stock kernel, 10% of what i have written so far will be more than enough :)

Isn't the whole idea of a flagship smartphone to tweak the sh&* out of it and grin wide like a winner. With configurator apps and such for kernels being released, having descriptions of params & simple to use interface, it only takes a few minutes/hours to understand all the tunables. Is there anything more fun than tweaking to match our usage pattern? Again, it doesn't mean we have to keep on tweaking. Adjust the values until a point and then use the device like normal.

And yeah, after a very cold december and jan, bangalore is weirdly hot this summer :)
[Galaxy S II General] jaquez4:
Hey yall,

I had a quick question regarding the lulzactive app to adjust battery/performance. im still new to this form of tweaking and have read the guide several times, each time understanding a bit more. Im currently running Silver's rom with the SGS II streamline kernel with the lulzactive v2 govenor. After setting the values to reflect your suggestions for power save, there is an option in the app to set on each boot. I have that box checked but as soon as I exit the app and go back into it, the box is automatically unchecked. Is this a bug in the app or is something else causing it to become unchecked? Any information or help is greatly appreciated.
[Galaxy S II General] czesiu:
What can I do to make my S2 wake up as fast as possible without keeping a wake lock (preventing deep sleep)?

Siyah-v3.0b6-CWM

cm-9-20120322-NIGHTLY-galaxys2
[Galaxy S II General] shotta35:
Nothing - you either get deep sleep or don't.
[Galaxy S II General] czesiu:
surely something can be done since cm7 was faster to wake
[Galaxy S II General] skualone:
firts all i have to say is thanks dude for this awesome post now i can undertand what the hell im doing now with my SGS2
[Galaxy S II General] droidphile:
Never used lulz app. Make sure governor is lulzactive before you tweak with the app. Could be a bug in the kernel or in the app. Reinstall the app and see.

It's a 'specialty of Exynos 4210. With 2.6 gingerbread kernels, the resume time was 650ms. With 3.0 ics kernels, it is now 1000ms. Wait for kernel devs to find a fix to reduce the resume time is all we can do.
[Galaxy S II General] TecQuality:
@droidphile: dude you did a great job with this thread (as always), thanks for your efforts and keep up the great job!!!
[Galaxy S II General] jaeyeol:
Great thanks! This thread is really informative and helpful!!! :D
[Galaxy S II General] unnamedname:
Someone PLEASE explain what does "Android Logger" in ExTweaks?

I've flashed new rc2 built of Siyah kernel and this "Logger" is now off, why should it be ON (as suggested in thread) ?

:confused:
[Galaxy S II General] rav4kar:
Nice work, Simply a post worthy of praise!! Thanks!
[Galaxy S II General] Mohad.O.F:
nice topic thnnxx
[Galaxy S II General] droidphile:
Logger enables lgcats and last_kmesg. If you get a crash/freeze you can produce logs to your kernel/rom/theme developers and it may help them debug issues.
[Galaxy S II General] senotrius:
hope u add guide about undervolting and live Oc. .ESP now kernels support arm and int voltages.

I use a galaxy s but happened to stumble onto this post accidentally.good work brother:)
[Galaxy S II General] lupoalba:
Awesome posts.

Thanks for sharing your knowledge, guy.
[Galaxy S II General] windowsxelvis:
Very good. :)

Thanks for your hard work. :D
[Galaxy S II General] droidphile:
Why write a guide on something that gives you at max 10-15 minutes and can make your device unstable if not taken care of. :) There are many other factors that affect the power consumption. Power consumption is a complex equation. UV alone will do nothing special.
[Galaxy S II General] lupoalba:
Hello droidphile,

have you any idea where to download governor modules to insert into the kernel?

I would like to insert some governor in the overcome4 kernel.

Many thanks.
[Galaxy S II General] droidphile:
Any module should be binary-compatible with the current version of kernel else 'insmoding' will not work. You can compile one yourself (using module source and build.sh in the kernel source) or download a compatible one if any. Here is a tutorial to compile a module outside kernel source tree. I have no clue where to download modules for your kernel.
[Galaxy S II General] lupoalba:
Yes now i know, thanks to your posts

Thank you.

there is no sentence that can clarify how much has been useful and instructive for me that you wrote here.
[Galaxy S II General] dimebagdan65:
And now for something completely different...
[Galaxy S II General] senotrius:
:D
[Galaxy S II General] zapskull:
Hi,

I've a problem with my CPU settings which are :

When i monitor my CPU load / frequency, I saw that my CPU clock is scaled at 800MHz whatever its load. Then, when I reboot GSM, the problem is fixed temporarily..

Do you have an idea of how to fix that?
[Galaxy S II General] master_droid:
Thank you very much droidphile
[Galaxy S II General] droidphile:
Could be a glitch with the governor. Your kernel dev should be able to assist more. I hope the problem is not temporary - like only for a short time after screen-wake.
[Galaxy S II General] zapskull:
I'm looking for a monitoring app. Now i'm using cool tool but its sampling period is about 500us and i'ld like lesser.

No it's not after screen wake.

And i forgot! Thanx a lot Droidphile! For your answer and also for your work! It is really helpful.

Envoyé depuis mon Nexus S avec Tapatalk
[Galaxy S II General] virus786:
A monitoring app you say?

Something like this perhaps?

[APP][2.2+] Diagnosis - Know what Android is doing!
[Galaxy S II General] zapskull:
I did my research with 'monitoring' -_-

Yes it was that kind of app. I wanted to see cpu freq and load to know how reacts my cpu.

Thanx

Envoyé depuis mon Nexus S avec Tapatalk
[Galaxy S II General] Blubbies:
this post save my life :p
[Galaxy S II General] Keasby:
Which sheduler should i use with the conservative gov for best battery life?
[Galaxy S II General] droidphile:
I/O Scheduler does not affect battery life. Effects of using different i/o schedulers are obvious whilst multi-tasking or during a specific task. For better battery life - Tune your governor, reduce brightness, take care of frequency of syncing mails. Use any scheduler of your choice.
[Galaxy S II General] pokkas88:
amazing thread, guess i have a lot of reading to do to catch up... you just made my day :)))
[Galaxy S II General] bouighil:
Can i have the best config to have the best battery life withe extweaks please (i'm noob :D )
[Galaxy S II General] droidphile:
Read the other thread. Link in my sig.
[Galaxy S II General] puccini:
Hi Droid i love these post/guides of yours, as i've said before. Quick question. Have you tried using the SmartassV2 governor with the Siyah Kernel ? It seems torun like a dog compared to Lulzactive?

Sorry should've said i am talking ICS here and Siyah 3.x
[Galaxy S II General] Josuhu:
Siyah Kernels

Why my governor changes back to default after reboot ? Do I have to reset something from Siyah kerneö CWM recovery to get the governor stay as lulzactive for example ?
[Galaxy S II General] Josuhu:
governor settings

Holy Sh#t! Thanks it worked, my knowledge has riced again.

FYI: Foxhound PsychoMantis and Siyah v3.1rc3
[Galaxy S II General] Dr.MacHack:
FYI? Never heard :D

I'm on Resurrection Remix v1.3 and it's awsome! I've replied to youre ask without looking which thread this is :D I use Tapatalk and have seen that there is a new response and I thought that someone asked something in Resurrection Remix thread so I don't asked on which ROM you are :D

And then I recognized that this was the kernel tweaks thread on which I responsed :D

No problem mate :)

Gesendet von meinem Galaxy S2 mit Tapatalk 2
[Galaxy S II General] infinity-netchip:
The performance settings here are a little bit dangerous. Simone201 were speaking, and the up sample time can't be lower than 10 000. And I saw (if I remember well) values of 7000! That can't the Exynos SoC handle.