[Q] Recommended SetCPU settings? - Samsung Infuse 4G

Hi everyone,
I've been trying to figure out how to best set profiles for my CPU in order to conserve some battery, but I've got to admit I'm not to sure what I'm looking at in terms of setting this stuff up.
I did some basic forum searches, both specific to Infuse as well as broad-range, and didn't really find a cohesive answer to my question.
So, can anyone recommend to me a full list of settings for SetCPU that I could use? I'm running Infused 2.2.3 with Entropy's Daily Driver.
I'd appreciate any advice and help! Thank you!!

Not too many, but here are mine:
Regular
Max: 800
Min: 100
Scaling: Conservative
Profiles
Temp > 44.1 C
Max: 400
Min: 100
Scaling: Conservative
You could increase temperature to little higher if u wanted to, like 46. My temp range is between 30-40 most of the time, so I am good with 44.1.

Thanks! Do you mess with priority at all? What about voltages?

xcrunner65 said:
Thanks! Do you mess with priority at all? What about voltages?
Click to expand...
Click to collapse
Priority just affects which profile takes precedence over another one.
For example, I would recommend that if you have a "high temperature" profile, you make that a high priority so it is chosen over another setting.
I also have a "screen off" profile with a limit of 400.
Capping Regular at 800 will save some battery if you're a heavy user, but at the expense of performance. If you're a light user you probably won't save much battery.
Undervolt settings that work differ from CPU to CPU. Right now mine are:
1200 MHz - 1200 mV (100 under stock)
800 MHz - 1125 mV (75 under stock)
400 MHz - 1000 mV (50 under stock)
100/200 MHz - 900 mV (50 under stock)
These might make your device hang, or you could go well beyond these.

Related

BatteryStatus CPU Scaling: How-to and purpose.

I've been staring at BatteryStatus' CPU Scaling function wondering what good it does if I use it... and how do I use it if I decide that it was useful. I'm sure some users here are wondering the same thing, especially on our low-powered Wizards. Can someone lay it thick for us CPU-shy users?
The CPU Scaling function in BatteryStatus Pro adjusts CPU speed automatically according to CPU usage, so you can get faster speed when using application, ans saves power when you are waiting (i.e. loading a web page).
The rate of scaling is fully adjustable (max speed, min speed, step, threshold, step interval)
Sweet
starkwong; said:
The CPU Scaling function in BatteryStatus Pro adjusts CPU speed automatically according to CPU usage, so you can get faster speed when using application, ans saves power when you are waiting (i.e. loading a web page).
The rate of scaling is fully adjustable (max speed, min speed, step, threshold, step interval)
Click to expand...
Click to collapse
Awesome! Something usable when my phone's bluetooth connected to my car.
Now, how does one set up these options to take advantage of this function?
It'd be better if you search "battery status" (only titles) here..You will come across the battery status development thread, which has all the info you need, plus it points to the home page for the app which also has a manual..
Dont get me wrong but pls search before shooting off questions.
shantzg001 said:
It'd be better if you search "battery status" (only titles) here..You will come across the battery status development thread, which has all the info you need, plus it points to the home page for the app which also has a manual..
Dont get me wrong but pls search before shooting off questions.
Click to expand...
Click to collapse
Well said !
Dont get me wrong but pls search before shooting off questions.
Plz read the forum,you'll find all the answers to your question in here,these kind of questions have been asked hundreds of times in various threads or shud have posted in the appropriate thread from you downloaded your present rom TNT 5.0. Or hit the 'Search' button at the top with your specific word to locate,you'll be amazed.There's no need to start a new thread for this.
Just remember...
More Mhz translates into less power efficency.
ie.
195 mhz (stock speed) = Regular Baterry consuption
240 mhz (overclocked speed) = Over Regular Baterry consuption
260 mhz (overclocked speed) = High Baterry consuption
280 mhz (overclocked speed) = you got the idea
Also remember that when increasing the processor Speed may cause your system to hang or not wakeup if you are using a very low frequency.
Best regards.

[FAQ] Adding UV/OV to your OC kernel

Hi,
I did release an OC/UV kernel for the Optimus 2x device, which come with an application ( Pimp My Cpu ) to manage/change the frequency/voltage on the fly. I had a lot of questions about adding this capability to other devices/kernels, so i tought i could write some little explanation on how it work. This could also be a way to have a common way to add OC/UV so developpers can easly work for any oc/uv kernel (by respecting the two added sysfs interfaces names/capability).
First, we will assume that you sucessfully added overclocking capability to your kernel. So now to be able to "talk" with your kernel and change the frequency/voltage on the fly, we need to use cpufreq capability.
Some of the required "sysfs" interfaces are already provided by cpufreq on all (i guess) kernel. Here is a list of used cpufreq interfaces that should already be present in any default kernel :
"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" :
This interface will show the maximum cpu frequency available on your device. This interface is read only, and you won't be able, in any case, to set an higher cpu frequency than this one. The Optimus 2X for example report "1000000" Khz (1Ghz) by default, after hacking the kernel to enable a higher frequency it can report "1200000" (1.2Ghz).
"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq" :
This interface will show the minimum cpu frequency available on your device. This interface is read only, and you won't be able, in any case, to set an lower cpu frequency than this one.
"/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" :
This interface will show/set the maxmimum possible cpu frequency.
If you read this interface ( "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" ) it will return the current maxmimum possible cpu frequency.
You can write a new maximum frequency to this interface (anything higher reported by "cpuinfo_max_freq" will not work) so you cpu will never go higher.
"/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" :
This interface will show/set the minimum possible cpu frequency.
If you read this interface ( "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" ) it will return the current minimum possible cpu frequency.
You can write a new minimum frequency to this interface (anything lower reported by "cpuinfo_min_freq" will not work) so you cpu will never go lower.
That's it for the standard cpufreq interfaces. Now if you want to be able to change this values "on the fly", with "Pimp My Cpu" for example, you'll have to add two new interfaces to cpufreq :
"/sys/devices/system/cpu/cpu0/cpufreq/frequency_voltage_table" :
This interface will return a table of all the availabe cpu frequency and voltages for each steps, higher to lower and is read only. This allow some utility like "Pimp My Cpu" to know each possible available frequency/voltage your kernel have.
You'll have to hack your kernel around to store this table and be able to show it a new cpufreq sysfs interface. You can take a look at my github to see how i did achieve that.
An read of this interface on the Optimus 2x will report :
FREQ STOCK_MV CURRENT_MV
Code:
1200000 1100 1100
1000000 1000 1000
900000 950 950
750000 875 875
650000 850 850
500000 800 800
300000 770 770
216000 770 770
"/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table" :
This interface enable on the fly voltage change (in mV). You can read/write to it. It will report the current millivolts modifier ( this means : "STOCK_MV" - "UV_mV_table value" ) from higher frequency to lower.
Of course, you'll have to find where the voltage change occur in your kernel and substract this value from the original value. You'll find how i did that on the Optimus 2x kernel on my github.
If you want to undervolt the 1000000 Khz (1Ghz) frequency by 50mV (based on the previous "frequency_voltage_table" you would do it like this :
Code:
echo "0 50 0 0 0 0 0 0" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
That's all for now, i'll try to add some more details as possible.
Good FAQ...thankyou!
Ummmm .... okay... but how can i add more frequencies to the Kernel.... ??? is there any specific file i have to edit or a few files i have to add to the source and then directly compile or some other way ?

[DEV ONLY] i9003 overclock module [need help from devs]

hello guys so i was looking at this project for Motorola Droid X:
http://code.google.com/p/milestone-overclock/
since Droid X has similar OMAP3630 chipset i thought we could try it out for this device...
if it has already been tried out by u guys then sorry for dupe post
anyways the sources available (milestone-overclock-module-1.4.8.tar.gz) were not directly compatible with the i9003 kernel sources (GB_CHN_UPDATE1) so i have modified it slightly.... and now the module gets compiled and it gets loaded (by insmod)... the sysfs and proc interface is active... even the app (MilestoneOverclock148.apk) detects the module correctly... but the changes dont work...
i invite all devs to help out with this...
modified sources are posted here:
https://github.com/DooMLoRD/i9003-overclock
noobs kindly dont spam this thread....
P.S.: Droid X has got overclock upto 1.4GHz with help of this so i am sure we can try little more overclock than 1.1GHz
If you look at the Samsung code in arch/arm/mach-omap2 and /plat-omap, and compare it with code seen for example in the nook color sources (OMAP 3630, see here), there are HUGE differences.
Normally the opp frequency table seems to be hard coded and easy to edit. Samsung on the other hand decided to dynamically assemble it in board-latona.c with info from cpufreq34xx.c (if I overlook that correctly). These differences could be the reason the module does not work.
Further, the line Amit and you changed in clock.c could - but I am not quite sure - actually lead to 10% higher clocks on every opp step. Because what you changed
Code:
- mpurate *= 1000000;
+ mpurate *= 1100000;
is a conversion factor from MHz to Hz. The line
Code:
if (mpurate < 1000)
above seems to be a logical check if the desired clock has been given in Hz or MHz, which is expected to be at max 800 for the 3630. For our 3640 the highest frequency is 1000, which would require the check to be
Code:
if (mpurate < 1001)
or similar, but they might have overlooked this change. If the input is below this boundary, it is thought to be in MHz, and is converted to match the internal logic which works with Hz only.
And two more questions: I experimented a lot with the OC code, and even added two new opps (1100/840 and 1200/865) to my tables. I could select them, and everything including cpufreq scaling tables was correct, but the CPU never was actually clocked above 1000MHz. Do you know why? And did you check if it is with your kernel (compare benchmark values, do not trust any other source, they all lie )?
previously i was also having milestone A853 and by the overclock module it can be overclocked to 1.2 ghz
XDA_Bam said:
If you look at the Samsung code in arch/arm/mach-omap2 and /plat-omap, and compare it with code seen for example in the nook color sources (OMAP 3630, see here), there are HUGE differences.
Normally the opp frequency table seems to be hard coded and easy to edit. Samsung on the other hand decided to dynamically assemble it in board-latona.c with info from cpufreq34xx.c (if I overlook that correctly). These differences could be the reason the module does not work.
Further, the line Amit and you changed in clock.c could - but I am not quite sure - actually lead to 10% higher clocks on every opp step. Because what you changed
Code:
- mpurate *= 1000000;
+ mpurate *= 1100000;
is a conversion factor from MHz to Hz. The line
Code:
if (mpurate < 1000)
above seems to be a logical check if the desired clock has been given in Hz or MHz, which is expected to be at max 800 for the 3630. For our 3640 the highest frequency is 1000, which would require the check to be
Code:
if (mpurate < 1001)
or similar, but they might have overlooked this change. If the input is below this boundary, it is thought to be in MHz, and is converted to match the internal logic which works with Hz only.
And two more questions: I experimented a lot with the OC code, and even added two new opps (1100/840 and 1200/865) to my tables. I could select them, and everything including cpufreq scaling tables was correct, but the CPU never was actually clocked above 1000MHz. Do you know why? And did you check if it is with your kernel (compare benchmark values, do not trust any other source, they all lie )?
Click to expand...
Click to collapse
Yes I know the changes in diff omap kernel sources... Spent a few hrs today comparing milestone/droid x and i9003 kernel sources to get this module complied and loading...
I am sure that the change done by amit is correct, because there is a very prominent change in linpack scores ~18 compared to ~16 which is typical of a 10% overclock...
As for ur other two questions I posted this earlier in the other thread
DooMLoRD said:
Not sure... These omap chips seem to have only 4 bins (300/600/800/1000)... We are currently making the 1000 MHz bin run at 1100mhz... I am not sure if we can add extra bins... I tried adding a lower 125MHz bin, it was shown by setcpu but the device never really went below 300mhz... May be we need to investigate it further...
Sent from my R800i using XDA App
Click to expand...
Click to collapse
P.S.: the chip on this phone is OMAP3630
Sent from my R800i using XDA App
DooMLoRD said:
I am sure that the change done by amit is correct, because there is a very prominent change in linpack scores ~18 compared to ~16 which is typical of a 10% overclock...
Click to expand...
Click to collapse
OK, so the overclock is working. Nice Concerning the mpurate, have a look here. The author is working at TI, so I expect him to be familiar with the code. However, that does not mean we can't use the conversion factor for overclock. It's just not "clean".
DooMLoRD said:
P.S.: the chip on this phone is OMAP3630
Click to expand...
Click to collapse
Yep, you're right. Got that wrong
---------- Post added at 10:50 PM ---------- Previous post was at 10:41 PM ----------
And another idea: For the Nook Color, there is a guy who implemented an interface and an app to change the clocks. It is different from droid-overclock, because he implemented a sysfs interface in the kernel sources. Hope this helps.
http://code.google.com/p/milestone-overclock/
sorry its of no use as yr already checked it out
XDA_Bam said:
And another idea: For the Nook Color, there is a guy who implemented an interface and an app to change the clocks. It is different from droid-overclock, because he implemented a sysfs interface in the kernel sources. Hope this helps.
Click to expand...
Click to collapse
That looks very much like the sysfs interface we added for VDD control on QSD8250/MSM7X30... Should work I think...
Sent from my R800i using XDA App
akashsgpgi said:
http://code.google.com/p/milestone-overclock/
sorry its of no use as yr already checked it out
Click to expand...
Click to collapse
U should be BANNED for spamming.... The link u posted is already there in the second line of the main post...
READ!!!!
Sent from my R800i using XDA App
I made progress with the sysfs interface seen on the Nook. Kernel boots, and the correct rates are displayed under /sys/power/mpu_freq_oppX. I was also able to set the hightest opp to 800 MHz, so that the two highest were both at the same frequency. The setting worked (confirmed with Linpack). But 1100 MHz was ignored (stayed at 1000). Looking into this further.
XDA_Bam said:
I made progress with the sysfs interface seen on the Nook. Kernel boots, and the correct rates are displayed under /sys/power/mpu_freq_oppX. I was also able to set the hightest opp to 800 MHz, so that the two highest were both at the same frequency. The setting worked (confirmed with Linpack). But 1100 MHz was ignored (stayed at 1000). Looking into this further.
Click to expand...
Click to collapse
so wht cpu freq table are u using exactly?
wht i think is we should concentrate on this (atleast for now):
just keep the 4 bins as is (300, 600, 800, 1000)
then try n get the access to these via sysfs (or proc)
see if we can modify them via that interface, say change 1000 to 1100 or change 800 to 900
and then do tests if these work...
if possible make a sysfs (or proc) interface for VDD (voltage control) too...
have u pushed the testing changes... i am working on same thing here... might help to speed things up...
I am currently testing on the master branch, so the branch is "wrong", but this is the commit:
Sysfs interface
Because only underclock works as of now, I am tested setting
Code:
if (mpurate < 2000)
but that didn't help. Now I will define 1100 and 1200 MHz steps in board-latona.c and cpufreq34xx.c to see if this helps.
EDIT: Nope, that didn't solve it. CPU does not run at 1100. Not even 900. Stays at 1000 in both cases. 800 can be forced...
some updates on the overclock module:
we need to search in /proc/kallsyms for:
clk_init_cpufreq_table
cpufreq_stats_update
on our kernel (uc-kernel v04) they are at:
Code:
c005a198 T clk_init_cpufreq_table
c03c5aec t cpufreq_stats_update
these may be different on stock kernel we need to use specific address
I just thought this might be helpful since Optimus black has the same hardware.
joelmonty said:
I just thought this might be helpful since Optimus black has the same hardware.
Click to expand...
Click to collapse
its the same module dude...
these are all based on milestone-overclock module
DooMLoRD said:
some updates on the overclock module:
we need to search in /proc/kallsyms for:
clk_init_cpufreq_table
cpufreq_stats_update
on our kernel (uc-kernel v04) they are at:
Code:
c005a198 T clk_init_cpufreq_table
c03c5aec t cpufreq_stats_update
these may be different on stock kernel we need to use specific address
Click to expand...
Click to collapse
Why these two? Cpufreq seems to be quite happy with the frequency tables. All frequencies are correctly listed, and the highest available for hardware and scaling are correct (say 1100, if I set it). But some "mysterious barrier" doesn't let the cpu clock as high as requested by cpufreq.
XDA_Bam said:
Why these two? Cpufreq seems to be quite happy with the frequency tables. All frequencies are correctly listed, and the highest available for hardware and scaling are correct (say 1100, if I set it). But some "mysterious barrier" doesn't let the cpu clock as high as requested by cpufreq.
Click to expand...
Click to collapse
read the sources of the module it explains why we need to look at those values...
DooMLoRD said:
read the sources of the module it explains why we need to look at those values...
Click to expand...
Click to collapse
Looked into it, and got the module to load and change frequencies by manually setting omap2_clk_init_cpufreq_table_addr=0xXXXXXX. I was able to underclock to 800 and back to 1000 MHz. 1200 was set, but not correctly applied - the mpu was still running at 1000 MHz. Further on, it ****ed up the frequency table. Instead of [300,600,800,1000] it was [600, 600, 1000, 1000] after the test. Not good
XDA_Bam said:
Looked into it, and got the module to load and change frequencies by manually setting omap2_clk_init_cpufreq_table_addr=0xXXXXXX. I was able to underclock to 800 and back to 1000 MHz. 1200 was set, but not correctly applied - the mpu was still running at 1000 MHz. Further on, it ****ed up the frequency table. Instead of [300,600,800,1000] it was [600, 600, 1000, 1000] after the test. Not good
Click to expand...
Click to collapse
yups code needs some more patching but i am sure this is the way forward for stable overclock
I've got the basics working with a completely reworked sysfs interface (no module). See GitHub.
The idea is simple: At all times, there shall be no more than 4 OPPs enabled. For each overclock "wish", we disable the currently highest OPP, and enable the overclocked one. If this has no corresponding OPP yet, we create it.
The code works, and has the following problems / features:
Only the highest OPP can be set for now. Consequently, the overclock has to be higher than 800 MHz.
The voltage is not adjusted, yet. All overclock frequencies are run with the 1 GHz stock voltage.
The cpufreq table, policy and stats are not updated, yet
The cpu does not go into deep sleep after the clocks have been adjusted (possibly because the cpufreq table is wrong)
As OPPs are added to the table if necessary, it is theoretically possible to max out the OPP array by defining new frequencies hundreds of times (depending on the maximum array size).
To set the frequency (in MHz), type
Code:
echo "1100" > /sys/power/overclock_max_freq
It would be really cool if you could take a look, DooMLoRD. The only real problem I see right now is the cpufreq table. If this would be correctly updated, the rest would be "easy" I tried some stuff (not in the commit), but nothing worked, yet.
XDA_Bam said:
I've got the basics working with a completely reworked sysfs interface (no module). See GitHub.
The idea is simple: At all times, there shall be no more than 4 OPPs enabled. For each overclock "wish", we disable the currently highest OPP, and enable the overclocked one. If this has no corresponding OPP yet, we create it.
The code works, and has the following problems / features:
Only the highest OPP can be set for now. Consequently, the overclock has to be higher than 800 MHz.
The voltage is not adjusted, yet. All overclock frequencies are run with the 1 GHz stock voltage.
The cpufreq table, policy and stats are not updated, yet
The cpu does not go into deep sleep after the clocks have been adjusted (possibly because the cpufreq table is wrong)
As OPPs are added to the table if necessary, it is theoretically possible to max out the OPP array by defining new frequencies hundreds of times (depending on the maximum array size).
To set the frequency (in MHz), type
Code:
echo "1100" > /sys/power/overclock_max_freq
It would be really cool if you could take a look, DooMLoRD. The only real problem I see right now is the cpufreq table. If this would be correctly updated, the rest would be "easy" I tried some stuff (not in the commit), but nothing worked, yet.
Click to expand...
Click to collapse
this is the same problem as with other overclocks i was playing with...
the cpufreq table doesnt get updated... only the module based way seems to change that table...
anyways we will have to investigate this further...
oh btw i have found patch to overclock GPU...
DooMLoRD said:
oh btw i have found patch to overclock GPU...
Click to expand...
Click to collapse
Nice. Hehe

Undervolt settings

Hello, I'm new on this forum then I'm sorry if i post in a bad section for my questions... But I think I should post here.
I've got several questions:
- Is there really no risk about undervolting CPU, I asked me about this because no one forum tell risk but compagny thaty produces phones don't set the minimal voltage required for each frequencies.
- Is there an app to force CPU usage at 100% to test undervolt options.
Example: I undervolt 2265MHz with -50mV, I launch app, click on 100% uage then it use at 100% my CPU, if it crash undervolt is to high. If it don't crash undervolt is good, maybe continue tu undervolt.
- Is there an automatic app to undervolt ?
Example: It decrease 1mV by 1mV with always the same frequencie of CPU and 100% CPU usage then when phone crash it restore the last value of voltage, then it do it with another frequency etc etc ...
- Which voltage do you use ? And are there voltages the same for all nexus 5 or they will change depending of each processor.
To give me an opinion about what to use
- If I found a minimum voltage, will it be the same for all kernel ?
Example: I'm on Kernel A, my min for 300MHz is 725mV, I switch to kernel B, Will it work with 725mV for 300MHz??
More generally it depend only of the processor or also of the kernel, governor, I/O scheduler ??
I Think it's all maybe other questions will come
I Thank you for all your constructive response. Don't hesitate to ask me to develop certain question and tell me mistakes .
Theres an undervolting thread. Should be linked in the "Sticky roll-up thread" which you can get to via my signature
Okay, thank you
Okay, I will copy/paste my message
Thak you for the information.

[Guide] Advanced Interactive Governor Tweaks.

This guide is meant for ALL smartphones that runs the Interactive governor, copy-pasted here for better visibility. Credits goes to @soniCron for starting up the guide and @Alcolawl for further implementing it.
The Introduction
So, I tried copy-pasting the entire thread and realised it looks ugly therefore I'll rewrite it to be more simpler and straightforward.
Imagine a car with manual gears, you choose what speed is best suitable for the road conditions. Going into a curve? Best slow down. Clear straight road? Go fast so you reach the destination safely and efficiently.
That's what this guide aims to do with the Interactive governor, based on the CPU load it will choose the best and the lowest frequency to complete the task without compromising performance.
For example, if you scroll your Facebook page your CPU might clock up to the highest frequency for smooth scrolling. Now lower the frequency one step down and you may find that it's still smooth, so why isn't it choosing that instead? Don't blame the phone companies or Google, that's just a way of ensuring performance at all times. This guide will push the limits of that capability.
By default, the Interactive governor will jump from lowest speed to a "nominal" speed under load, and then scale up from that speed as load is sustained. That is lovely, but still too twitchy to provide serious efficiency and power savings. It spends most of its time at 2 or 3 clock speeds and barely hits other clock speeds that are ideal for other tasks or usage patterns.
Instead, what we want to do is configure it to handle different types of loads in different ways. A load suited for scrolling through a webpage is not the same as a load suited for downloading/processing streaming video is not the same as a load suited for snappy loading of an app is not the same as a load suited for high performance gaming. Every kind of load has different tolerances at which their minimal speed is indistinguishable from their maximal speed.
To understand what's best under a variety of tasks, we have to identify two types of load profiles: nominal clock rates and efficient clock rates.
Click to expand...
Click to collapse
Nominal Clock Rates
Nominal clock rates are the minimum CPU clock rates that perform a given task smoothly and without stuttering or lag. To find the nominal clock rate for a given task, turn on only the first CPU using the Performance governor and turn them both down incrementally until you find the minimum clock rate that works best for what you're trying to do, without introducing lags or stutters. (If you have a CPU or kernel that hotplugs individual cores, multiply that clock speed by your number of cores.) Keep the 2nd CPU on the Powersave governor with the lowest frequency your kernel supports. (Or turn it off completely if hotplugging allows.)
Remember what was said about scrolling FB pages? This is it.
Efficient Clock Rates
Efficient clock rates are CPU clock rates that are unique in that they are the most optimal frequency given the range of voltage requirements. If you map out the frequency jump and the voltage requirement jump between each of the available clock rates, you will find that occasionally the voltage requirement will jump significantly without the frequency jumping proportionally to the previous differentials.
For example, using stock voltages, the EvoLTE's msm8960 chipset clock/voltage ratios jump significantly higher from 702Mhz to 810Mhz than the ratios from 594Mhz to 702Mhz.
Imagine a staircase with steps of different heights. You climb these stairs better depending on the height of each steps, do you skip some steps if you can reach the next one easily? Or do you take one step at a time because they are too high?
Clock Rate Biases
Using the information provided above, figure out both your nominal clock rates for the tasks you perform most often and your efficient clock rates depending on your kernel/custom voltage settings. For me, since I cannot determine the efficient clock rates, I use the nominal clock rates listed above. For the tasks I generally perform on my phone, my nominal clock rates are as follows:
Idle - 384Mhz
Page Scrolling - 600Mhz (Tested by browsing FB on Chrome browser cause they're intensive enough)
Video - 787Mhz (Same thing, watch 60fps videos on different resolutions on the Youtube app to detect stutters and lags)
App Loading - 960Mhz
High Load Processing - 1440Mhz
(Note that you must calculate the values that are optimal for your phone for best battery and performance! Each phone is different because of the ROM, kernel, background tasks, etc!)
With this done, you will want to start the fine tuning phase! Correlate the efficient clock rates with their closest nominal clock rates, similar to below:
(This section of the guide is INCOMPLETE because I do not know the clock rate voltages for the Nexus 5X. If you know these, please post in the comments and I will update the guide!)
Idle - ???Mhz efficient / 384Mhz nominal
Page Scrolling - ???Mhz efficient / 600Mhz nominal
Video - ???Mhz efficient / 787Mhz nominal
App Loading - ???Mhz efficient / 960Mhz nominal
High Load - ???Mhz efficient / 1440Mhz nominal
Now that we know what are the most efficient nominal clock rates we want to focus on and what the most optimal are for what we want to do, we will start low and scale up as necessary. It's always better to begin with underperforming and tweak the settings upward until we're satisfied with the performance of our target tasks.
In its default state, the Interactive governor has a hair trigger that will raise and lower the clock rates, which means it spends too much time at unnecessary clock speeds, wasting power, and scales down too quickly, leading to stuttering performance. We will take advantage of a seldom used feature of the Interactive governor. Specifically, that with which it determines when it is okay to scale up to each higher clock rate, on a frequency by frequency basis.
We have two primary goals: respond as quickly as possible to each load request for a lag free experience and exceed the desired clock rate for a given task as little as possible. To do this, we will instruct the Interactive governor to trigger certain clock rates in different ways depending on our expected load.
I won't explain all of the settings of the Interactive governor--there are plenty of summaries all around. (Go search now if you don't know what any of the settings for Interactive governor do. I'll wait here.) However, I will explain an incredibly powerful feature of the Interactive governor that is rarely included in those summaries: multiple frequency adjustments.
The above_highspeed_delay setting, for example, defines how long the governor should wait before escalating the clock rate beyond what's set in highspeed_freq. However, you can define multiple different delays that the governor should use for any specified frequency.
For example, we want the above_highspeed_delay as low as possible to get the CPU out of the idle state as quickly as possible when a significant load is applied. However, we don't want it to jump immediately to the fastest clock rate once it's gotten out of idle, as that may be overkill for the current task. Our target trigger (which you will later adjust to suit your system and usage profile), will begin at 20000μs. That means 20,000μs (or 20ms) after our idle max load has been reached, we want to assume idle has been broken and we want to perform an actual task. (We want this value as low as possible without false positives, because it is one of a few factors that determine how snappy and lag free the CPU's response is.)
But at this point we're not ready to take on a full processing load. We may just be briefly scrolling a webpage and don't need the full power of the CPU now that we've allowed it to break out of idle. So we need it to reach a particular frequency and then hold it there again until we're sure the load is justified before we allow it to push the frequency even higher. To do that, rather than just setting
above_highspeed_delay - 20000
we will instead use the format "frequency:delay" to set
above_highspeed_delay - 20000 460000:60000 600000:20000
"Waaaait... What does that do?!"
This tells the Interactive governor to hold out 20ms after our target load when it's at our highspeed_freq (which we're actually using as our idle frequency--not a burst frequency as originally intended), but then it tells the governor to hold for 60ms after it's reached 460Mhz. Once it has exceeded 460Mhz, it then has free reign to scale up without limitation. (This will be optimized with the target_loads setting in a minute. And if you don't know what I'm talking about when I say "highspeed_freq" then you didn't go search for the basic Interactive governor settings and read about it! Go do that before you read any further, because I will not explain the basics of this governor!)
These settings are among the most important, because they limit the phone's clock rates when you are not interacting with it. If it needs to do something in the background, chances are it does not need to run full throttle! Background and idle tasks should be limited to the lowest reasonable clock rate. Generally speaking, if you're just looking at your phone (to read something, for example), you want the phone to use as little CPU power as possible. This includes checking in with Google to report your location or fetching some pull data or... whatever. Things that you don't need performance for.
Optimize Idle Frequency
Now that you've got the base configuration, we need to tweak it so that the CPU stays at your efficient idle frequency (384Mhz in this case) without spontaneously jumping when your phone is actually idle. To do this, open a CPU monitor that displays the current core frequencies (I like CoolTool, but you can use what you like as long as it doesn't significantly impact the CPU use--you're best off using a passive monitor and checking the results after 30-60 seconds of no activity), watch the frequencies and see how often they go above your efficient idle frequency when you're not doing anything at all, and adjust the following:
timer_rate - If your idle frequency is not being exceeded much, adjust this downward in increments of 5000 until it is, then increase it by 5000. If your idle frequency is being exceeded often, adjust this upward in increments of 5000 until your CPU primarily stays at or below your desired idle frequency.
above_highspeed_delay - Only if your timer_rate has matched or exceeded 50000 and still won't stay at or below your desired idle frequency most of the time, set timer_rate to 50000 and adjust the "20000" portion of the value upwards in increments of 5000 until the idle frequency has stabilized.
The lower these two values are, the more snappy/lag free your system will be. So try to get them as low as possible without the idle frequency being exceeded too much, as this inversely affects the snappiness and efficiency of your phone when you're not doing anything. Lower = snappier but uses more CPU when you're not doing anything (such as reading a webpage); higher = less snappy but stays in a power saving state more often reducing CPU use when you're not interacting with the device. These are the most critical in determining your idle power savings, so keep that in mind if you want the most battery life!
Enhance Task Responsiveness
Now use the efficiency and nominal clock rate correlations you made for your master clock rate list in the section above and adjust your frequencies to suit your usage patterns. For example, I had web page scrolling as my 600Mhz rate, so I will open a web page and scroll and see how everything feels. If it feels sluggish, I will increase all the references to "600000" in both above_highspeed_delay and target_loads upwards to the next available clock rate until that task is smooth. What you are looking for is constant poor/sluggish performance when the task you're testing for is using its highest CPU use. If the task becomes sluggish/stuttery as it winds down (such as a scrolling webpage slowing to a stop), we will address that next, so do not take that behavior into consideration as you adjust these values! If the task is smooth until (or after) it slows down, then you have reached your optimal clock rate and can move on.
Find Optimal Loads
Now here's where we get a little math-heavy to determine what the optimal target_load frequencies are for each clock rate. (Might want to bust out a spreadsheet to do the math for you if you're not using a Nexus 5X.)
We want to determine 2 values for every available clock rate: the maximal efficient load and the minimal efficient load. To make this determination, we need to bust out our calculators. (Or spreadsheets!)
For the maximal efficient load, we want to correlate a load value no higher than 90% of a given clock rate before it would be more efficient to jump to the next clock rate–to avoid overwhelming a particular rate while avoiding premature jumps to the next. For this value, we calculate it as:
(clock rate * 0.9) / next highest clock rate
For example, the maximal efficient load for 600Mhz on the Nexus 5X would be caluclated as:
(600000 * 0.9) / 672000 = 80.36% (rounded and normalized: 80)
For the minimal efficient load, we want to correlate a load value at which anything higher would be better served by a higher clock rate. To calculate this:
(1 - next highest clock rate / clock rate) * -1
For example, the minimal efficient load for 600Mhz on the Nexus 5X would be calculated as:
(1 - 672000 / 600000) * -1 = 12.00% (rounded and normalized: 12)
For the Nexus 5X, the maximal efficient loads of CPU 1 are:
384000:75
460000:69
600000:80
672000:76
787000:81
864000:81
960000:69
1248000:78
For the Nexus 5X, the minimal efficient loads of CPU 1 are:
384000:0
460000:19
600000:30
672000:12
787000:17
864000:9
960000:11
1248000:30
1440000:15
For the Nexus 5X, the maximal efficient loads of CPU 2 are:
384000:72
480000:68
633000:74
768000:80
864000:81
960000:69
1248000:83
1344000:84
1440000:84
1536000:84
1632000:86
1689000:83
For the Nexus 5X, the minimal efficient loads of CPU 2 are:
384000:0
480000:25
633000:32
768000:21
864000:13
960000:11
1248000:30
1344000:8
1440000:7
1536000:7
1632000:6
1689000:3
1824000:8
Using Optimal Loads
Now, you might be asking, "Why the heck did I do all this math?! WHAT IS IT GOOD FORRRR????!!!!"
Well, we had put some values into target_loads earlier, but those values weren't arbitrary. See, for all of our nominal clock rates, we want the CPU to hang out on them for as long as possible, provided they're doing the job. For each frequency tagged as our nominal clock rate, we want to use the maximal efficient load in target_loads. For every other frequency, we want to use our minimal efficient load value.
We don't care about those other frequencies. We don't want the CPU to hang out in those states for very long, because it just encourages the device to be reluctant to jump to a higher nominal frequency and causes stuttering. We eliminate the desire for the governor to select those frequencies unless it is absolutely efficient to do so. For all the nominal clock rates, we want the CPU to hang out there... but not for too long! So we set those values to the maximal efficient load, so they can escape to the next nominal frequency before they overwhelm the current frequency.
All said and done, this reduces jitter and lag in the device while providing optimal frequency selection for our day-to-day tasks.
Fix Stuttering
Now that you have adjusted your frequencies for optimal high CPU use in each given task, you may notice some stuttering as the task winds down. (Such as a scrolling webpage slowing to a stop.) If this bothers you, you can tweak this at the expense of some (minor) battery life by adjusting min_sample_time up in increments of 5000 until you are satisfied.
If you have exceeded a value of 100000 for the min_sample_time setting and still are not satisfied, change it back to 40000 and increase (and re-optimize) your idle frequency by one step. This will impact battery life more, but less than if you were to keep increasing the value of min_sample_time.
However, this step should not be necessary if you properly calibrated your maximal and minimal efficient loads!
But What About That 2nd CPU?!
So we've all but ignored the 2nd CPU. The reason? It's a horribly inefficient processor designed for high load tasks that generally don't come into play during normal usage patterns. It's good for gaming and image processing, but not for most moderate tasks a user might employ.
But it is good for one thing that all users do pretty frequently... loading and switching apps.
Fortunately, at least for the Nexus 5X, the system is pretty smart about when to employ the power of this inefficient 2nd CPU. So it's generally kept at bay most of the time. What we want is to configure it to be our burst processor–we want it to come into play spontaneously and quickly during tasks that necessitate immediate high loads, like loading and switching apps. To do this, we will ignore all but 3 frequencies:
384Mhz
1248Mhz
1824Mhz
In this case, we configure it just as we did with CPU 1, but only worry about keeping it idle as much as possible, allow it to jump to 1824Mhz immediately when needed, and encourage it to fall back to 1248Mhz if a sustained load is needed.
These values are ideal for the Nexus 5X, so if you have a different phone, choose the lowest clock rate, highest clock rate, and median efficient clock rate, using the instructions previously.
For the Nexus 5X, we'll jump straight to...
The Money Shot: Part Deux
If you are using a Nexus 5X, use the following Interactive governor settings for CPU 2. ("big"–the one with 2 cores)
(If you are using a phone other than a Nexus 5X, you must read the above sections and replace the frequencies with your own efficient clock rates!)
above_highspeed_delay - 20000
boost - 0
boostpulse_duration - 80000
go_highspeed_load - 99
hispeed_freq - 1824000
min_sample_time - 20000
target_loads - 98 480000:25 633000:32 768000:21 864000:13 960000:11 1248000:95 1344000:8 1440000:7 1536000:7 1632000:6 1689000:3 1824000:95
timer_rate - 20000
timer_slack - 80000
Click to expand...
Click to collapse
SO there you go, that's the gist of it. I got some smaller examples written up later so hopefully it's more understandable.
"I'm Too Lazy To Read All That! WHAT DO I NEED TO DO?!?!"
If you own a Nexus 5X or 6P, install the ElementalX Kernel and the EX Kernel Manager. (Yes, it works in other kernels, but you're on your own regarding how to set the values. Other kernel editors, such as Kernel Adiutor, are currently buggy and problematic, so your mileage may vary. And if you have another device, you must follow the instructions in this post to derive your own values.)
UPDATE: EX Kernel Manager now supports governor profiles and most currently published profiles are distributed with the manager. To access: EXKM> CPU> Governor options> Load, then select the profile you wish to try! Many thanks to @flar2 for providing native support!
ALPHAS – USE AT YOUR OWN RISK!! (Actually, we really like "GostPepper". Try it out. It's spicy! And don't worry–it won't break anything!)
GlassFish (For most devices!) - High battery savings with buttery smooth interface!
HawkTail (6P) - An advanced, modern profile that is both battery efficient and highly performant! All users are urged to check out HawkTail!
Butterfly - A culmination of all strategies, provides smoothest performance of all currently published settings, though battery savings are a little more modest. Excellent for light and moderate users; heavy/marathon users might want to check out a different setting profile.
GhostPepper (6P) - Uses a quantized, frequency-aligned parametric curve to influence low core clock rates while providing extremely smooth transitions from each clock rate and exceptional battery life. The current favorite, albeit not very well tested so far. HIGHLY RECOMMENDED
SilverFish - Effectively eliminates "hispeed_freq" so perceptive scrolling performance is increased, giving the illusion of excellent performance while providing great battery life. Some users experience problems with performance while multitasking--NOT RECOMMENDED FOR EVERYONE. Light users should enjoy this very much, however.
MadDog - The first major departure from the core strategy. Very well tested, extremely stable, and HIGHLY RECOMMENDED if you aren't fully satisfied with v2.0 settings. This is on the table to be the next stable v3.0, so rest assured you can't go wrong with this one!
DrunkSauce - Supreme UI fluidity coupled with excellent active and idle battery drain. Idle Drain was consistently measured to be ~1%. And while I don't rely on SOT figures that people constantly throw around, active drain spanned from 15-20%/hr depending on usage. YMMV. And as always, flawless audio playback for you audiophiles and ARISE users out there.
Those are the ones compiled for now, please remember that these are all up to the users' preference. It will improve YOUR own SOT, not straight up 8 hours on every device. You can copy off the profiles and use your own device frequency and target loads, use an app like Kernel Auditor to help edit them. It works for stock and custom roms too.
Extra credits:
Thanks also to:
Every developer who has seen this guide, modified it, and implemented it.
All the members who contributed and argued about the inner workings of this guide, your constructive feedback is amazing and helped fine-tune future profiles.
To the poisonous and toxic trash member(s) of a certain thread for their lack of help and elitist behaviour. Their embarrassing attitude helps open our eyes to the dos and don'ts of internet manners.
This is for calculating target loads.
Let me give you an example from my Note 1:
My clock rates are (in MHz): 200, 500, 800, 1000, 1200, 1400
Their voltages are (in V): 950, 950, 1050, 1125, 1225, 1300
If I were to plot the differences in voltage, it would appear like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
From the graph, 500MHz to 800MHz has a huge difference in voltage increase compared to 1000MHz to 1200Mhz. That frequency BEFORE the huge jump is the efficient clock rate: 500MHz and 1000MHz.
So, the nominal clock rate on the other hand is the minimum frequency you can use to complete a task (such as watching videos, loading apps, page scrolling). In this case, mine are: 200MHz, 800MHz, 1000MHz
Now, we just calculate (from the first post) the minimal efficient loads for efficient clock rate and maximal efficient loads for nominal clock rate.
That means my target loads will be:
500: 60
800: 72
1000: 75
1200: 17
I skipped the calculations but this will be what it looks like from there. Someone pls do let me know if I made a mistake, as it does tend to confuse people with other devices.
Nominal clock rate: Maximal load
Efficient clock rate: Minimal load
Edit: Those are for the target loads, for the rest of the settings I'll use the profiles'.
Eh, mmight as well reserve this too
Nice looking guide, about to read
wtf,you just copy pasted in the end
Nice beginning, but half is missing, and you are referencing things that haven't been done before

Categories

Resources