[How-To] OC/UV a kernel - Eee Pad Transformer Android Development

As I cannot find any related guide while google-ing, I want to post this question on here for the purpose of learning and probably helping other people.
[Q1] How to overclock a kernel
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies need higher voltage and how high exactly ?
[Q2] Undervolting
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies can use lowered voltage and how to calculate them ?
I would be very thankful if any developer could teach me (probably others too) and I will contribute back for sure.
I am right now fixing up bugs in TeamGummy rom, and I'm nearly finished.
Only thing I lack is a custom kernel, which I want to build myself along with the rom.
*push*
Watch out guys, master guevor is going to teach us a little of his enormous knowlegde, so better keep your eyes on this one.

Overclocking
I must say that all I'm going to write, is what I've gathered looking at the code and changes made by others (thanks Blades and Roach2010) (I have not had any documentation about it), so I could make mistakes or misinterpretation.
Nor do I explain everything, because if you do not have a minimal knowledge get to play this directly may be dangerous.
(Q1) Overclocking
Files to modify
arch/arm/mach-tegra/tegra2_clocks.c (All matters relating to the frequencies.)
The system uses a series of programmed pll clocks which in turn can be used as a basis to other clocks. Let's say for this case pll_x is used for the base of processor clock.
The frequency table are in tegra_pll_x_freq_table processor. Seeing the type definition clk_pll_freq_table in clock.h we know that has entries consisting of 6 values​​. (input_rate, output_rate, n, m, p, cpcon)
These values ​​allow tegra2_pll_clk_set_rate function to set the pll frequency.
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
If we add higher frequencies than at present, we have to change the maximum (max_rate) in the tegra_clk_virtual_cpu and tegra_clk_cclk structures, otherwise the system will ignore it. Also have to change the limits for our type of processor in sku_limits. For this case the cpu, cclk y pll_x in the values ​​for our processor (0x04, 0x08, 0x0F).
Finally we modify the table of frequencies used by the processor (frequency list and their order). Is defined at cpufreq_tables and contains a list of lists where we can add a new list or not to touch anything and modify an existing list.
We can look at the existing list freq_table_1p2GHz or in my source I added the list freq_table_1p7GHz.
Contains a list of frequencies that the system can select. It uses the list whose maximum corresponds to the maximum indicated above.
​
arch/arm/mach-tegra/tegra2_dvfs.c (Everything related to the voltages and its relationship with the frequencies.)
This part is much more sensitive and therefore can affect much to the duration of the battery as to stability. I have no formula (unfortunately for me) on how to modify the values, so the task has been more trial and error.
The first thing to know is that one must distinguish between the core voltage and the cpu and should be the latter inferior to the first. In tegra2_dvfs_rel_vdd_cpu_vdd_core function establishes the relationship between the two, being the default 120mV core above the cpu.
Basically what we do if we have added frequencies higher than normal, is to increase the voltage so that they are stable (depend on each processor). I recommend (at first) increment in the same extent all the values ​​involved (maximum voltage).
Therefore we can modify:
Table core_millivolts, establishing the voltages that core can use.
Table cpu_millivolts, establishing the voltages that cpu can use. It contains all the steps and should take into account the difference with the core discussed earlier. If we added any frequency, we add the corresponding voltages.
Tables core_speedo_nominal_millivolts and cpu_speedo_nominal_millivolts contain a nominal voltage of both the core and the cpu.
The maximum and nominal voltages in structures tegra2_dvfs_rail_vdd_cpu, tegra2_dvfs_rail_vdd_core and tegra2_dvfs_rail_vdd_aon.
Finally we adjust the settings for dvfs_init ("cpu", 1,) according to the list of frequencies we want to use (adding if we added new frequencies or changing them if changed change some)
With these changes we should be able to overclock, although we know that although you can configure (once started) a maximum frequency below the maximum that we put on the tables, there is a problem and many times after suspending the system will use the maximum frequency of the table. To avoid this we must make some changes in cpufreq.c
​
drivers/cpufreq/cpufreq.c
The problem occurs in the second core when reconnected after being disconnected in the suspension process. The problem is solved with the next patch.
Code:
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e157205..2626e2d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1048,18 +1048,27 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
/* Set governor before ->init, so that driver could check it */
#ifdef CONFIG_HOTPLUG_CPU
+ struct cpufreq_policy *cp;
for_each_online_cpu(sibling) {
- struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling);
+ cp = per_cpu(cpufreq_cpu_data, sibling);
if (cp && cp->governor &&
- (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ dprintk("found sibling CPU, copying policy\n");
policy->governor = cp->governor;
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
found = 1;
break;
}
}
#endif
if (!found)
+ {
+ dprintk("failed to find sibling CPU, falling back to defaults\n");
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+ }
/* call driver. From then on the cpufreq must be able
* to accept all calls to ->verify and ->setpolicy for this CPU
*/
@@ -1071,6 +1080,16 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
+ if (found)
+ {
+ /* Calling the driver can overwrite policy frequencies again */
+ dprintk("Overriding policy max and min with sibling settings\n");
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
+ }
+
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);

Ok, I'm on it. Trying my best, but I'm afraid you have to push me a little..
Facing heavy compile errors.
Question :
In your kernel source dir, which command do you use to start compiling ?
EDIT :
EDIT 2 :
@ all people trying to compile, do NOT use
Code:
make tegra_defconfig
!
Better grab an existing .config file from an already running kernel (thanks to guevor for this)
Just google "cyanogenmod building kernel from source" , it's described well over there.
If people request, I can share the kernel config and the precompiled blob tools once I get them from guevor.
First kernel compiled successfull, I have my zImage ready.
OC'd and Voltages changed.
First test kernel incoming the next days, I could need some testers.
Pm me if you want to test.

Thanks for this! I love your work and you sharing your vast knowledge of this subject! Thanks OP for giving him the means of enlightening us

back from the dead
edited
I was a little sleep deprived... my bad

Necromancy!

Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks

1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks
Click to expand...
Click to collapse
You can't do it that way. You can try to create oc modules but I couldn't tell you how to do that
Sent from my EVO using Tapatalk 2

Can you send me in the right direction?
Looks like unpacking the kernel isn't happening but I can create an overclock module which is FAR from easy but here's something I started on a little not sure if it's specific to the other device or whatever but I'll see how it goes.
http://forum.ppcgeeks.com/android-t...modules-tinboot-nand-boot-more-beginners.html

1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel.
Click to expand...
Click to collapse
Since the kernel is under GPL, get the sources from where you got the binary.
1chris89 said:
I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Click to expand...
Click to collapse
Is it a Tegra 2 or not? If not, this thread won't help you.

I don't understand this part:
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
Click to expand...
Click to collapse
I want to add new frequencies but I don't get it.. also, why 4 entries for a single frequency? thanks!

Someone pleaseeee?

I hope there's a video tutorial for "adding overclocking features to your kernel", I hate to admit that I can't follow the instructions carefully due to lack of English knowledge

Related

[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

[Guide] [Dec.15] How to Tweak and Mod Android Using Init.d Scripts

Hello my fellow Android enthusiasts,
There are many apps that can be used to tweak kernel settings. However, I am a reductionist at heart and prefer to break things down to their essential parts. This guide was written for those who want to be rid of apps that dig into their kernel at every boot. It is a simple guide to writing init.d scripts that the average user should be able to implement.
Happy Tweaking,
Lucius
PS......ITS A CELEBRATION, *****ES!!!!!!!:victory:
Basics:
The android boot sequence is divided into 3 parts.
1) First stage bootloader
2) Kernel loads and prepares hardware
3) User space programs load - this is where init.d scripts are invoked
Init.d scripts execute commands as if they were entered into a terminal. These commands modify the value of parameters that influence our devices behaviour. They are much more flexible than tweaking apps and give end users the ability to tweak and optimize their device as they see fit. They are small, fast, clean... and awesome.
Requirements:
See my guide to modding and optimization for instructions on how to unlock, install TWRP, root, and install custom ROMs/kernels - http://forum.xda-developers.com/showthread.php?t=2232715
Unlocked: Needed to install custom recovery.
Custom Recovery: Needed to install custom ROMs and custom kernels.
Root Permissions: Needed to access /system partition - enabled when most custom ROMs are installed
Init.d Support: Needed to run init.d scripts at boot - enabled in every custom ROM/kernel I have come across.
Scripting Tool: Text editor or script manager - I use Android Tuner to create/test a script and AntTek File Explorer Ex's built in text editor to edit a script.
Root File Manager: I use AntTek Explorer Ex, it reminds me of my old linux setup, its very functional but clean as hell. Also has a built-in text editor.
Step #1: Acquire a Scripting Tool
I use Android Tuner for script creating/testing. You could also use a text editor. AntTek Explorer Ex has a built in text editor that works well. You could also use Notepad++, its a free linux based text editor. Just avoid windows-based editors, they leave extra spaces and invisible characters when enter is pressed.
Step #2: Begin Your Script
To create a script open your text editor or select "create new script" within the "script manager" in Android Tuner. Put your cursor at the very top left corner to begin writing. The first line of a script must invoke a compatible shell that will execute the script, which in our case is the following:
#!/system/bin/sh
Once this line is typed simply hit enter to start a new line. I usually put an empty line after the first line as it makes things easier to see. Extra lines for spacing purposes are fine so long as they are completely empty.
NOTE - Android tuner automatically appends the above line to the beginning of all scripts. It will not be displayed in the script creator but can be found in the final script you save.
TIP - Do not add spaces at the end of a line. Syntax must be exact.
TIP - Adding a "#" to the front of the line instructs the shell to avoid this line, which is essential for writing notes and keeping scripts organized.
Step #3: Write Your Tweaks
Now we can start writing tweaks. If written correctly each line that you enter will execute a command that changes a kernel or system level parameter. This seems daunting at first but it is really quite easy. Once you are finished typing a line simply hit enter to begin the next line. Here is an example of an executable command so you know what we are talking about going forward.
echo "SmartAssv2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
NOTE - For some examples of useful tweaks see my guide to tweaking and optimization - http://forum.xda-developers.com/showthread.php?t=2232715
GENERAL FORMAT:
The tweaks that we are interested in typically begin by identifying the value to be written to the desired parameter:
echo "parameter value" >
The new parameter value is always followed by the directory tree locating the parameter of interest:
/sys/devices/system/cpu/cpu0/cpufreq/parameter file
In order to create:
echo "700" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
CPU/GPU TWEAKS:
To familiarize yourself with how tweaking is done I would start by opening up the following directory in your file manager:
/sys/devices/system/cpu/cpu0/cpufreq/
This is where cpu parameters, and often gpu parameters, are located. These files/parameters determine how our kernel controls our CPU. To modify our CPU's behaviour these parameters are modified at boot utilizing init.d scripts. Familiarize yourself with these files, open them up with a text editor - it's entirely safe so long as you don't start changing values. If the name of a parameter isn't self-explanatory, opening it up and examining the value it holds will typically explain its purpose. Here are some common parameters that are useful to know.
scaling_available_freq - lists the frequencies available to the cpu
scaling_available_governors - lists the cpu governors available for use
scaling_governor - sets the cpu governor
scaling_max_freq - sets the max freq
scaling_min_freq - sets the min freq
UV_mV_table - sets the voltage table for the cpu
GOVERNOR TWEAKS:
The CPU governor determines how our CPU behaves in response to changes in workload. Changing the governor will impact how our CPU scales through the freq steps available to our CPU. This has a significant impact on the time our CPU spends at different frequency steps, which influences efficiency, performance, battery life, and stability. For more info about the various governors available in android see post #1 at the following link - http://forum.xda-developers.com/showthread.php?t=1369817
Tweakable governor parameters are located in:
sys/devices/system/cpu/cpufreq/
Various interactive governor parameters can be accessed, such as:
go_hispeed_load - Go to hispeed_freq when cpu load at or above this value
hispeed_freq - freq to bump to once go_hispeed_load is passed
min_sample_time - minimum amount of time that can be spent at a frequency before scaling down
timer_rate - the interactive governor checks cpu load at regular intervals to determine whether frequencies should be increased when it comes out of idle. If the cpu is busy between exiting idle and the timer firing we assume the cpu is underpowered and ramp frequency up
HOTPLUG CONFIG:
The hotplug config in Hundsbuah's Kernel allows you to control how CPU cores are brought online as threads are processed. A thread is the smallest sequence of instructions that can be managed independently by a process scheduler. Threads are contained within a process. A process is the execution of instructions contained within a program. On a single processor system multi-threading (multitasking) is generally implemented by transmitting/sending signals over a common signal path; the processor switches between different threads. This switching generally happens frequently enough that the user perceives the threads or tasks as running at the same time. If the CPU is overloaded and a thread is queued up by the process scheduler then lag/stuttering is likely to occur because thread switching does not occur quickly enough to be hidden from the user. On a multi-core system threads can be truly concurrent, with every processor or core executing a separate thread simultaneously, which decreases the potential for lag/stuttering. If core 1 is busy processing a thread and another thread is queued up by the process scheduler we want an additional core to become active so that core 1 does not have to switch between threads. However, we also do not want to bring cores online needlessly. If a core is able to process multiple threads fast enough such that switching is unnoticeable then it would be inefficient to bring another core online. The hotplug config can be found in the following location:
/sys/kernel/rt_config/rt_config
I/O TWEAKS:
The I/O scheduler handles read/write requests from memory (RAM and storage). The I/O scheduler we use can significantly impact I/O (read/write) performance. For more info about the various I/O schedulers available in android see post #4 in the following thread - http://forum.xda-developers.com/showthread.php?t=1369817
The location of the I/O scheduler is:
/sys/block/mmcblk0/queue/scheduler
/sys/block/mmcblk1/queue/scheduler
Use the follIng lines to change the I/O scheduler:
echo "sio" > /sys/block/mmcblk0/queue/scheduler
echo "sio" > /sys/block/mmcblk1/queue/scheduler
KERNEL MODULES:
A kernel module is a file containing code that extends the functionality of our kernel. Modules allow our kernel to communicate with different types of hardware (ex - bluetooth), utilize various file systems (ex - NTFS), or system calls (ex - frandom.ko). Kernels do not automatically come with all available modules, loading only the most essential modules can reduce a kernels footprint and potentially improve performance. Simultaneously, loading improved modules can improve performance in some cases (ex - frandom.ko). For more info about various kernel modules see post #3 in the following thread - http://forum.xda-developers.com/showthread.php?t=1369817
NOTE - You cannot download and load kernel modules from the internet. They need to be compiled for kernel you are using.
To make a kernel module available make sure /system is mounted as rewritable, rather than read-only (see step #5 for further instructions). Copy the module .ko file (ex - tntfs.ko) to the following location:
/system/lib/modules
To check what modules are loaded at boot enter the following command in a terminal:
lsmod
To load a kernel module at boot add the following line to your init.d script:
insmod /system/lib/modules/module name
To unload a kernel module at boot add the following line to your script
rmmod module name
SYSCTL TWEAKS:
This section is currently under construction, more tweaks will be posted once I find them. Sysctl is an interface that is used to examine and dynamically change parameters within a linux based OS.
To change the TCP Congestion Algorithm add the following line to your script:
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=westwood
NOTE - For a brief explanation of TCP/IP protocols and network congestion algorithms see the following post - http://forum.xda-developers.com/showpost.php?p=48088128&postcount=1884
FINISHING YOUR SCRIPT:
Once all your tweaks are written go through the entire script and make sure syntax is exact - no extra spaces or characters. Save your first script as w/e you want (ill explain naming later) just make sure it doesn't have a file extension. I'm talking total absence of file extensions. WHOA! WHAT! WTF YO!
NOTE - Android Tuner saves scripts by default in the "at" folder in "sdcard0"
Example Script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
#Governor Tweaks
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
#SD Tweaks
echo "vr" > /sys/block/mmcblk0/queue/scheduler
echo "vr" > /sys/block/mmcblk1/queue/scheduler
#Module Tweaks
insmod /system/lib/modules/ frandom.ko
rmmod tntfs.ko
rmmod texfat.ko
Step #4: Test Your Script
You can test your script using a root terminal shell (Android Tuner has a terminal). Open a terminal, type "su", and hit enter (or select the box beside "su" in AT). This will give you the ability to run commands as root. To test your script enter the following command:
sh directory of your script
EXAMPLE - sh /storage/sdcard0/at/scripts/01ZenKernelTweaks
Check the files that correspond to the tweaked parameters to see if the script worked. If the values were correctly modified then you have officially finished writing your first working init.d script.
Step #5: Enable Your Script
First, open your file manager, go to your root directory, and remount your /system partition as RW instead of RO. This is typically done by long-pressing the /system folder (ex - AntTek Explorer), file manager settings (ex - esFile Explorer), or through the overflow menu. Once the /system is mounted as RW we can move our script to the init.d folder and change our scripts permissions. The init.d folder is located here:
/system/etc/init.d
The name of your script determines the order in which it is executed. The first two characters determine the order of execution. The ordering is as follows - numbers from 0-99, then letters from A-Z. The first two letters of a script's name are typically numbers between 0-99, this is the standard method of script naming that most developers/tweakers use. Set the name of your script so that it is executed in the order that you wish. Mine is set to execute first because I want to get kernel tweaks done as early as possible.
Once you have named your script long-press it and select "Change Permissions" (or however this is done in your file manager). Give User, Group, and Other read, write, and execute permissions.
Your init.d script will now optimize your tablet quickly and efficiently at every boot. Don't get out of your chair too fast....Before doing anything else, I suggest revelling in your awesome new-found abilities for a significant period of time. Pat yourself on the back. Start referring to yourself as "a boss" if you like. You deserve it.
CAUTION:
Although init.d scripts are easy to make, a bad script may cause boot looping. However, a bad script does not necessarily = boot looping. I have yet to cause a boot loop and I have written many scripts that did not work. Everything typically boots normally, the bad lines in the script are simply not applied. Before enabling your script I strongly suggest taking a Nandroid backup in TWRP. To do so boot into TWRP and select "Backup" from the home screen. This will allow you to restore your entire system, which is done via the "Restore" tool in TWRP.
NOTE - Do not enable scripts to run at boot in a program like Android Tuner or others similar to it. If the script is bad it will cause boot looping because the app will keep trying to run it. If you put the script in the init.d folder and enable it yourself you will avoid this issue.
SUGGESTION:
If you want more examples of tweaks that can help you optimize your tablet see my guide to tweaking and optimization. It fills any gaps in this guide and contains many useful resources. You can find it here - http://forum.xda-developers.com/showthread.php?t=2232715
tweakalicous...
lucius.zen said:
HAPPY TWEAKING,
Lucius
PS......ITS A CELEBRATION, *****ES!!!!!
Click to expand...
Click to collapse
LOL ... great tut Zen ...
Very nice, thanks Zen.
I accidentally stated in Step #3 that "Android saves scripts by default in the 'at' folder in your internal storage"....However, I meant to write "Android Tuner saves scripts...". Changed the OP, just wanted to make sure anyone who has read it already isnt like "WTF ZEN! Where is my damn script! Derpa a derrrr".
Breaking News.....
***************IMPORTANT UPDATE - MUST READ BREAKING NEWS*****************
DEY TUK ARRRRR JEEEERRRRRRRBSSSSS!!!!!!!
.....watching too many episodes of SP lately
lucius.zen said:
How-To Write Init.d Scripts for the tf700
Click to expand...
Click to collapse
Great tutorial!
lucius.zen said:
The number, or letter, at the beggining of the init.d script determines its order of sexecution, beginning at 1 or A, and going up to 99 or Z.
Click to expand...
Click to collapse
The universal convention is to use a numeric prefix from 00 to 99, but in reality the name can be anything and the scripts are simply executed in alphanumeric order - digits come before "A". I recommend using two-digit prefixes as intended.
lucius.zen said:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1300 1200 1150 1125 1112 1100 1087 1075 1050 1037 1025 1012 987 975 962 950 925 912 900 887 875 862 850 837 825 812 800 775 762 750 737 725 712 700 687 675 650 637 625 600" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
Click to expand...
Click to collapse
Note that the UV_mV_table has a completely different format when reading or writing the file - one reason why I hate this interface. But it's the "standard" that was established by whoever hacked the first implementation, and user mode apps expect it like this.
lucius.zen said:
Although init.d scripts are easy to make, you can potentially cause boot looping, please proceed with caution.
Click to expand...
Click to collapse
To repair this, boot into recovery, connect via adb shell, and do the following:
(if needed
mount -o remount,rw /system
chmod 0666 /system/etc/init.d/50myevilscript
This will remove "execute" permissions for the script, which will effectively disable it.
Say I tested and am currently using 10 scripts, how do I create a .zip recovery file so I can flash/install the scripts at once, every time I reflash or factory reset my rom?
Thanks for your awesome tuto ! But I've a question concerning the gpu governor: it's possible to set this governor with command line too ?
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up the good work... :good:
LetMeKnow said:
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up the good work... :good:
Click to expand...
Click to collapse
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues. Been super fun times lol. Hoping to get back in the game this holiday season, would be sweet to share some tweaking/optimization ideas, I havent had much of a chance to check out your tweaks but I have heard great things.
All the best,
Lucius
lucius.zen said:
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues. Been super fun times lol. Hoping to get back in the game this holiday season, would be sweet to share some tweaking/optimization ideas, I havent had much of a chance to check out your tweaks but I have heard great things.
All the best,
Lucius
Click to expand...
Click to collapse
Thanks for a kind word... It sounds like that you need to take of yourself a little better before worrying about the contributing to xda. You do a lot for the community already and hope you will get very soon. Please let me know whenever you have time to talk about tweaks and more than happy to share what I know.
Cheers and get well,
LMK
Missing Files
Hi,
Using the guide I came up with the following script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/max_boost
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
but I received an error for hispeed_freq and go_hispeed_load claiming "No such file or directory". When I checked the /sys/devices/system/cpu/cpufreq/interactive/ directory, the two files are missing. Are they supposed to be present on the TF700?
Thanks
00shakey00 said:
Hi,
Using the guide I came up with the following script:
Code:
#!/system/bin/sh
#CPU Tweaks
echo "1350 1320 1280 1240 1200 1150 1100 1050 1000 950 900 860 820 780 750 720 700" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/max_boost
echo "1900000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "85" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
but I received an error for hispeed_freq and go_hispeed_load claiming "No such file or directory". When I checked the /sys/devices/system/cpu/cpufreq/interactive/ directory, the two files are missing. Are they supposed to be present on the TF700?
Thanks
Click to expand...
Click to collapse
Everything looks good in the script. Not sure why those parameters are missing. What kernel are you using?
lucius.zen said:
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I made a lot of promises and left too much work unfinished. I haven't been on for 6 months because I have been dealing with some pretty serious mental health issues. Apparently I am mildly schizophrenic with comorbid anxiety and attention issues... Lucius
Click to expand...
Click to collapse
Forgive the digression, I couldn't help wondering: I don't mean to slight the condition in any way, but zen couldn't tackle it so you had to go the physical route?
graphdarnell said:
Forgive the digression, I couldn't help wondering: I don't mean to slight the condition in any way, but zen couldn't tackle it so you had to go the physical route?
Click to expand...
Click to collapse
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
lucius.zen said:
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
Click to expand...
Click to collapse
Here we go off topic already ... but just had to throw in my 2 cents. I have many conditions that have been treated for 30+ years (I am in my 50's) I had Chronic Severe OCD that was almost debilitating in my mid 20's. I also have A.D.H.D. (A.D.D) along with boughts of narcolepsy and severe panic attacks (were I end up on the floor or in the ER) anyways, I am a mess or I use to be. I did ALL the drugs Adderall (Amphetamine, Dextroamphetamine Mixed Salts) / Ritalin / Zoloft / bupropion / Xanax all at MAX DOSE. They all relieved some of the systems, but caused other issues to arise (addiction being one). I got into TD and Zen Yoga 10 years ago. 90% of my symptoms went away the first year, and I only take medication for my high cholesterol now. I feel great and work 10 to 13 hours a day. What this has to do with Init.d scripts .... *shrug* .... Pharmaceuticals just suck .
Now back to the Init.d scripting. Great job on the guide !! if this is not pinned it should be !!
Thank you for creating it.
Thibor69
Thibor69 said:
Here we go off topic already ... but just had to throw in my 2 cents. I have many conditions that have been treated for 30+ years (I am in my 50's) I had Chronic Severe OCD that was almost debilitating in my mid 20's. I also have A.D.H.D. (A.D.D) along with boughts of narcolepsy and severe panic attacks (were I end up on the floor or in the ER) anyways, I am a mess or I use to be. I did ALL the drugs Adderall (Amphetamine, Dextroamphetamine Mixed Salts) / Ritalin / Zoloft / bupropion / Xanax all at MAX DOSE. They all relieved some of the systems, but caused other issues to arise (addiction being one). I got into TD and Zen Yoga 10 years ago. 90% of my symptoms went away the first year, and I only take medication for my high cholesterol now. I feel great and work 10 to 13 hours a day. What this has to do with Init.d scripts .... *shrug* .... Pharmaceuticals just suck .
Now back to the Init.d scripting. Great job on the guide !! if this is not pinned it should be !!
Thank you for creating it.
Thibor69
Click to expand...
Click to collapse
Thanks dude! They tried to prescribe me an antipsychotic for my schizophrenia but I try to avoide pharmaceuticals. I agree that meditation, yoga/exercise work really well, as does tailoring my diet, etc. Glad things are going well for you now.
All the best,
Lucius
lucius.zen said:
Sorry I am having trouble understanding what you are asking. Are you wondering if I medication is more effective than meditation?
Click to expand...
Click to collapse
Actually I was asking if Zen would not suffice that you need to take medication. I don't see that drugs would do anything other than suppressing symptoms. Nothing is done about the root-cause, and that's how they get you hooked for life.
My own experience is that body is a reflection of mind and vice versa. The dichotomy is simply false. However, given the ingrained ruts one needs to obliterate, diet for the body must be watched as much as mediation must be practiced for mental well-being. You ever studied Oshawa? Much more than just a regime, the way I see it.
Sorry, I won't digress any further.
lucius.zen said:
The name of your script determines the order in which it is executed. The first two characters determine the order of execution. The ordering is as follows - numbers from 0-99, then letters from A-Z. The first two letters of a script's name are typically numbers between 0-99, this is the standard method of script naming that most developers/tweakers use. Set the name of your script so that it is executed in the order that you wish. Mine is set to execute first because I want to get kernel tweaks done as early as possible.
Click to expand...
Click to collapse
Great guide, thanks for the tutorial. One question, regarding the order of execution of scripts, does it matter if two or more scripts share the same prefix (1st 2 characters), for example 99SuperCharger and 99Supersudaemon, and 98KickAssKernelizer and 98Fly-On, 94engineflush and 94governor, and etc.? I combine scripts from different devs by editing their code to arrest any conflicts when they get executed, though, I don't change the script's name. Never had any problems, just curious on the sequencing of init.d scripts.
iZLeeP said:
Great guide, thanks for the tutorial. One question, regarding the order of execution of scripts, does it matter if two or more scripts share the same prefix (1st 2 characters), for example 99SuperCharger and 99Supersudaemon, and 98KickAssKernelizer and 98Fly-On, 94engineflush and 94governor, and etc.? I combine scripts from different devs by editing their code to arrest any conflicts when they get executed, though, I don't change the script's name. Never had any problems, just curious on the sequencing of init.d scripts.
Click to expand...
Click to collapse
No it doesn't as they get executed alphabetically but it looks a mess and there is little room for ordering.

Porting Thunderzap MTK6577 kernel to Star N9588?

I'm interested in overclocking my STAR N9588 it's the MTK6577 1ghz cortex a9 1gb ram and I wanna port this 1.4Ghz kernel over.
Can someone explain exactly how to do that?
thanks
1chris89 said:
I'm interested in overclocking my STAR N9588 it's the MTK6577 1ghz cortex a9 1gb ram and I wanna port this 1.4Ghz kernel over.
Can someone explain exactly how to do that?
thanks
Click to expand...
Click to collapse
Mate, no OEM has realised JB Sources for the MTK6577 as of yet, well Wiko do realised ..
but our dev found them rather incomplete for successfully compiling a kernel!
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
1chris89 said:
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
Click to expand...
Click to collapse
First, This isnt the Right section to post..Contact a MOD to change the thread to appropraite one... CM isnt yet available for Mediatek phones...SO have to wait....
1chris89 said:
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
Click to expand...
Click to collapse
All that is possible if we have a full tree of the sources.. without them even of you try to play with boot.IMG it won't boot and you will be stuck in a rut!
It appears overclocking the thing isn't that hard at all. Only problem is pull the right files, editing them then pushing them back. Like any file in /sys/devices/ etc I'm trying to adb pull /sys/devices and it doesn't seem to pull all the files. So I tried adb pull /sys/devices/*.* and it didn't seem to like that either. I tried editing the files and they simply don't save. So basically I need to say edit the files in the rom .zip prior to flashing in say TWRP and I can get a nice overclock no problem. It's not a matter of the stupid A** MTK crap it's a matter of modifying the android system (Cortex A9) portion with the updated files to allow for overclocking. As it's all so possible and they say the Cortex A9 can handle upwards of 1.6Ghz without any overvolt necessary.
Once I get this rolling I can help a few of you who are truly interested out. Unless you want to continue to think its impossible to do so then I say continue thinking that as it won't get you anywhere in life.
1chris89 said:
It appears overclocking the thing isn't that hard at all. Only problem is pull the right files, editing them then pushing them back. Like any file in /sys/devices/ etc I'm trying to adb pull /sys/devices and it doesn't seem to pull all the files. So I tried adb pull /sys/devices/*.* and it didn't seem to like that either. I tried editing the files and they simply don't save. So basically I need to say edit the files in the rom .zip prior to flashing in say TWRP and I can get a nice overclock no problem. It's not a matter of the stupid A** MTK crap it's a matter of modifying the android system (Cortex A9) portion with the updated files to allow for overclocking. As it's all so possible and they say the Cortex A9 can handle upwards of 1.6Ghz without any overvolt necessary.
Once I get this rolling I can help a few of you who are truly interested out. Unless you want to continue to think its impossible to do so then I say continue thinking that as it won't get you anywhere in life.
Click to expand...
Click to collapse
hello
it is possible for our canvas 2 to overclock on jellybean all we have to do is port thunderzap kernel for jelly bean.
thats how the HTC explorer got jelly bean
but we dont have much devs
I need to edit the files within /sys/devices/ to increase the max governor clock and max info clock and then look up the cortex a9 power profiles from say a known to be stable device. Like any cortex a9 tablet to know what voltages are ideal.
They say the cortex a9 can handle 1.6ghz with little to no voltage increase.
I'd also like to overclock the gpu PowerVR SGX 531.
If I can I'm going to push for 2.0Ghz if possible.
****Can someone help me adb pull /sys/devices/? Like what command to completely copy all files from /sys/devices from adb and then edit the files and then adb push? Or create a CWM or TWRP .zip with the updated kernel files for overclock?
Thanks
1chris89 said:
I need to edit the files within /sys/devices/ to increase the max governor clock and max info clock and then look up the cortex a9 power profiles from say a known to be stable device. Like any cortex a9 tablet to know what voltages are ideal.
They say the cortex a9 can handle 1.6ghz with little to no voltage increase.
I'd also like to overclock the gpu PowerVR SGX 531.
If I can I'm going to push for 2.0Ghz if possible.
****Can someone help me adb pull /sys/devices/? Like what command to completely copy all files from /sys/devices from adb and then edit the files and then adb push? Or create a CWM or TWRP .zip with the updated kernel files for overclock?
Thanks
Click to expand...
Click to collapse
That really sounds very noobish
1. You cannot simply pull the interfaces since they are symlinked infinitely
2. And do you think Mediatek will leave Clocksource interface controllable to do this? You cannot simply do "2Ghz" in the pulled interface and boom push it back to make your phone fly? eh? The new values will get RESET to original values since they are blocked/limited to the specific values. And thats why we have a thing called "Kernel Sources"
I found the mtk6577 source data... which shows the 1.2Ghz frequency available but it's not in the right table.
https://github.com/wiko-sources/cin.../platform/mt6577/kernel/core/cpufreq-mt6577.c
Maybe I could write a script like
#change cpu to 1.2Ghz by zhuzhuojie 2011-07-23 *EXAMPLE*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor hybrid
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 1209000
**If I can get the Motorola Xoom ElementalX kernel source data and compare and copy I think I can attempt to achieve 1.7Ghz**
#define DVFS_F1 (1001000) // KHz, 1/1 <---------- I say change this value to 1209000 or test beyond 1.2ghz until instability occurs.
#define DVFS_F2 ( 834166) // KHz, 5/6
#define DVFS_F3 ( 750750) // KHz, 3/4
#define DVFS_F4 ( 667333) // KHz, 2/3
#define DVFS_F5 ( 500500) // KHz, 1/2
#define DVFS_F6 ( 250250) // KHz, 1/4
#define DVFS_F7 ( 166833) // KHz, 1/6
#define DVFS_F1_TM (1209000) // KHz, 1/1
#define DVFS_F2_TM (1007500) // KHz, 5/6
#define DVFS_F3_TM ( 906750) // KHz, 3/4
#define DVFS_F4_TM ( 806000) // KHz, 2/3
#define DVFS_F5_TM ( 604500) // KHz, 1/2
#define DVFS_F6_TM ( 302250) // KHz, 1/4
#define DVFS_F7_TM ( 201500) // KHz, 1/6
--------------------------------------------------------------------------
* Operate Point Definition
****************************/
#define OP(cpufreq) \
{ \
.cpufreq_mhz = cpufreq, \
}
/***************************
* MT6575 E1 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6575_freqs_e1[] = {
OP(DVFS_F2_MT6575_E1),
OP(DVFS_F1_MT6575_E1),
};
/***************************
* MT6575 E2 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6575_freqs_e2[] = {
OP(DVFS_F4_MT6575_E2),
OP(DVFS_F3_MT6575_E2),
OP(DVFS_F2_MT6575_E2),
OP(DVFS_F1_MT6575_E2),
};
/***************************
* MT6577 E1 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6577_freqs_e1[] = {
OP(DVFS_F6_MT6577_E1),
OP(DVFS_F5_MT6577_E1),
OP(DVFS_F4_MT6577_E1),
OP(DVFS_F3_MT6577_E1),
OP(DVFS_F2_MT6577_E1),
OP(DVFS_F1_MT6577_E1),
};
/***************************
* MT6577 E1 TM DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6577_freqs_e1_tm[] = {
OP(DVFS_F6_MT6577_E1_TM),
OP(DVFS_F5_MT6577_E1_TM),
OP(DVFS_F4_MT6577_E1_TM),
OP(DVFS_F3_MT6577_E1_TM),
OP(DVFS_F2_MT6577_E1_TM),
OP(DVFS_F1_MT6577_E1_TM),
};
static unsigned int mtk_cpu_freqs_num;
static struct mtk_cpu_freq_info *mtk_cpu_freqs;
static struct cpufreq_frequency_table *mtk_cpu_freqs_table;
extern struct kobject *power_kobj;
extern bool clkmgr_high_speed_check(void);
extern int cpufreq_state_set(int enable);
extern CHIP_VER get_chip_ver(void);
So have you tried? I'm really interested in getting this thing overclocked
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
@FooFighter312
What Device are you wanting to overclock specifically? Because your ASUS Transformer Pad TF700T uses a Nvidia Tegra 3 Quad Core with 5 cores in total all 4 running at 1.6Ghz by stock and the 5th being a power savings core. I've seen 2Ghz out of those but what I have seen is the Tegra 3 benefits primarily by a GPU core Clock increase to I believe 550Mhz was ideal for stability and at least a 20fps increase in game from my testing. Use TrixsterMod from Play Store with a modded kernel and root to push to 550Mhz.
***** IN REGARDS TO THE MTK6577 (ARM Cortex A9) *****
I used OPENSSH via the Play Store to use my PC to remote into the /sys/devices/ etc and change the parameters which doesn't sound hard. However when I changed parameters in files and tried saving it would either give me a permission error, or it would change the value back after I saved it.
Which makes me believe all the files/ parameters within /sys/devices/ etc are "Shadowed" by an unknown source of the system.
If I could determine where it's being shadowed from, I could then change it from the source. From there the "Shadowed" "Source" data would then automatically manipulate the files within /sys/devices/ and achieve the overclocked speeds. According to my research the MTK6577 and the ARM Cortex A9 in particular are using a voltage well beyond it's theoretical optimum. Meaning it's using more voltage than required for firstly stability, but also the ease of overclocking to huge speeds without ever needing to touch the voltage! According to several sources and ARM directly, they put enough volts into the 1Ghz stock speed to usually be able to achieve up to 1.6Ghz without a volt increase. However anything beyond 1.6Ghz requires a heavy volt increase which would ultimately result in epic amounts of heat.
If anyone can give more info on this that would be excellent!
Thanks
I was referring to the MTK6577 for my UMI X1. As far as I've seen there are no custom kernels for my device and the stock one just isn't enough for me. I'd like to push it a little further if possible, and I also would like more governors and io schedulers available. Another problem is that when I change any of the settings, they automatically revert to stock after a reboot.
I'm quite a noob when it comes to programming, especially on android, but I'm learning slowly. Right now I'm just an advanced user, nothing more.
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
no update tutorial?
costum kernel for axioo picopad 5Gew
please custom kernel for axioo Picopad 5 GEW. mtk6577 dual-core 1GHz 512mb ram so that support for overclocking. 1.4 Ghz and swaap

[Guide][CPU Tweak] Advance Interactive Governor Tweak for Whyred

Hi Guys, this is a continuation from initial discussion (and my promise) on InsigniuX kernel thread HERE
UPDATE 1 : After further testing, incorporate input boost to CPU 1 and 5 actually help the performance without affecting battery, as long as we set it within the optimal frequency. I also put fine tuning in hispeed_delay value, please use latest Profile File if you are using PRESET, or check the new values bellow if you do manual config
NOTE : If you are too lazy too read all the technical stuff, simply download the PRESET KERNEL ADIUTOR PROFILE HERE, and apply it to your Kernel Adiutor (choose "profile" from side bar, hit the (+) icon, and choose "import" and choose the downloaded .json file)
as we all know and aware, we always look and try to find the most optimum configuration to achieve best battery life without sacrificing performance. And while of course Qualcomm and Xiaomi have the most talented developers in their team, sometimes the implementation between both in their mass product might left a room for improvement. And in that exact room, we as community here play our role,
so, in an attempt to get a better fluidness out of this device, without sacrificing battery life, i remember one of the guide made by @soniCron i used to stumbled upon few years ago. This Guide give a very detail insight on how to optimize the interactive governor on almost any device/any kernel/any rom (as long as you have root), and thats what i gonna try to apply to our device - if you want to check the guide yourself : HERE
so i take a look into Whyred Kernel Sources to see the voltage values being used by our processor for each frequency step. And here's the voltage/speed table in case you want to see :
{
"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 that table, we can see which frequencies are using most power, and where is the most jump in voltage usage happen when switching between frequency.
Higher voltage jump will cost more power, means less battery life.
in conclusion, i found few frequencies which are less favorable, which is
LITTLE CPU :
1136Mhz - step by step Speed Gain is fine, but when compared to straight jump to 1401Mhz, the Speed to Power Ratio is become less favourable
1536Mhz - Smallest Speed Gain compared to Power Usage
and i also found some which might be the best/favourite frequencies :
LITTLE & BIG CPU :
900Mhz - Best contender for base speed, as it use almost same power with 633Mhz, but with plenty of speed gain
1401Mhz - Good Speed to Power Ratio
and
1747Mhz - Good Speed to Power Ratio for BIG CPU
_____________________________________________________________________________________________________________________________________________________
Now we take into account of the minimum frequency needed to ensure smooth task (if you dont know what am talking about, read the GUIDE i mention in my opening paragraph) :fingers-crossed:
For Whyred, i've found the best frequency is as following :
Idle = 633MHz (Lowest we can go at the moment)
Scrolling = 900MHz (Use Chrome browser to scroll Facebook in desktop mode)
Video = 1401MHz (Play 1080p*60fps videos in Youtube app)
App load = 1747MHz (Can use any app really)
High load = 1843MHz (Max out just in case)
Using the formula take from soniCron guide, i tried calculate optimum CPU load (this will be used as target load config) config for each frequencies
If you want to see the formulas :
Code:
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 calculated 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)
with this config, logically speaking we want to make the Governor to favour the "best" frequencies above, and minimize the usage of unfavourable freqs.
LITTLE
Code:
633Mhz : 63
900Mhz : 71
1136Mhz : 23
1401Mhz : 82
1536Mhz : 4
1612Mhz : 83
BIG
Code:
1136Mhz : 73
1401Mhz : 9
1747Mhz : 85
1843Mhz : 90
Now that we already get the optimum number, time to apply it
Use your favorite Kernel Manager, in my case, am using Kernel Adiutor, and go to CPU Config - CPU Governor Tunables and input these value (am using Hawktail base profile from soniCron thread, as it seems it work best for most of devices, and i already do trial & error with some other value like timer rate as well ) :
(LITTLE)
Code:
align_windows:1
go_hispeed_load: 95
above_hispeed_delay: 0 633600:60000 902400:75000 1401600:100000
timer_rate: 80000
hispeed_freq: 902400
timer_slack: 200000
target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
min_sample_time: 35000
boost: 0
boostpulse_duration: 0
(BIG)
Code:
align_windows:1
go_hispeed_load: 95
above_hispeed_delay: 32000 1136000:60000 1401600:75000 1747200:80000
timer_rate: 60000
hispeed_freq: 1747200
timer_slack: 100000
target_loads: 98 1113600:23 1401600:9 1747200:85 1804200:94
min_sample_time: 20000
boost: 0
boostpulse_duration: 0
Other necessary adjustment :
Boost : ON For CPU 1 at 902400 and CPU 5 at 1401600 both for 100ms
Min Big CPU Hot Plug : 0
Disable all Toggle in Thermal Section
Run Terminal and command :
Code:
su
stop perfd
or Install this MAGISK MODULE to disable Stock Thermal & Hotplug Control (Courtesy of @Mr.Nguyen0504)
Now you can test it. Do full charge and use it normally, see whether you can see the improvement or not,
be mind that this config is not really adjusted towards battery life, but rather overall fluidness/performance, yet without sacrificing too much power
Hopefully it helps you as it seems to help me (you can expect no less than 7-8Hrs SoT, am quite heavy user myself, with 2 WhatsApp account and 1 LINE account constantly active. YouTube & Gaming at least hour/day as well). Discussion is more than welcome here, as these are considered an initial calculations that still yet to furtherly fine tuned for our CPU.
Thanks mate, was waiting for this.
Initial thoughts = project butter:good:
xdarkstar said:
Thanks mate, was waiting for this.
Click to expand...
Click to collapse
please let me know the experience, i only test it with my personal preferences, so your desire with your device may vary
but i think it shouldnt be that far
otonieru said:
please let me know the experience, i only test it with my personal preferences, so your desire with your device may vary
but i think it shouldnt be that far
Click to expand...
Click to collapse
Excellent guide as well. Will test parameters over the weekend.
I will test this
mxilil said:
I will test this
Click to expand...
Click to collapse
yes please,
in the meantime, i also testing another config with input boost enabled, and some fine adjustment to hispeed_delay,
if it turn out to be better, i might create 2nd preset, along with custom control to disable BCL and Perfd. So we do not need to type it in terminal manually after reboot and let adiutor do that.
otonieru said:
Run Terminal and command :
Code:
su
stop perfd
Click to expand...
Click to collapse
I think "stop perf-hal-1-0" is the proper command.
@otonieru Great thread, very nice presentation of the matter with just the right info and setup example.
I have followed the same tutorial for my previous device but ended up using the tunables from my ROM maintainer as I never managed to calculate it properly, probably because I overlooked the voltage jumps.
Now, I wonder whether the minimum freqs of 300mhz for both clusters would help in battery life gains, taking into account the proper target loads are set for both and "timer_rate" and "min_sample_time" are tuned to make CPU ramp up quickly to avoid lags and stutters.
Logically, voltage is lower for lower frequencies, but in this case, 300mhz and 633mhz might be the same on little cluster or the voltage jump might be insignificant, but the voltage jump on big cluster might be bigger. And since the big cluster is on minimum frequency most of the time we might see some gains there.
Can you check the sources of some kernels with full range of frequencies (not the ones who have undervolt applied) and see the voltage tables?
Where is perfd located, or the file that contains the values for perfd daemon? It seems that the terminal command to disable it doesn't work, on any load except standby it still hits 1612mhz on little cluster, which is extremely annoying.
EDIT: There is no line about running state of perfd like this:
Code:
[init.svc.perfd]: [running]
There is only a line pointing at the presence of perf daemon I believe. Does this mean that perfd is not running on my system at all, so the "stop perfd" command doesn't do anything?
EDIT2: My bad people, I've set target loads for 1536 and 1612 to 4 and 8 respectively, by missing another number. Now I've set them to 98 and 100 as it was set on my previous device for two of the highest CPU steps, now the use of freqs seems much better and the device performs nice.
Cirra92 said:
Where is perfd located, or the file that contains the values for perfd daemon? It seems that the terminal command to disable it doesn't work, on any load except standby it still hits 1612mhz on little cluster, which is extremely annoying.
EDIT: There is no line about running state of perfd like this:
There is only a line pointing at the presence of perf daemon I believe. Does this mean that perfd is not running on my system at all, so the "stop perfd" command doesn't do anything?
EDIT2: My bad people, I've set target loads for 1536 and 1612 to 4 and 8 respectively, by missing another number. Now I've set them to 98 and 100 as it was set on my previous device for two of the highest CPU steps, now the use of freqs seems much better and the device performs nice.
Click to expand...
Click to collapse
Actually, i didnt include 300Mhz in my calculation because i try to check various whyred kernel source, and found that not too many of them make the 300Mhz available to beanually selected, but i do check the voltage used by 300Mhz and its saving is almost neglectible,
and as i do this tweak based on my current kernel set up (InsigniuX), i do it with 633 as base.
as for 1612 being used much,
i found that there's probably a bug in our device kernel code that make cpu sometimes lock in its highest frequency (1804 & 1612), it only happen after you restart the phone, (and it happen with most kernel out there, so its not literally the dev mistake, more like xiaomi messed up some codes)
the fix for now is by opening adiutor, ensuring that the freq not locked up. If its locked, change it back manually to 633 and 1133 (for small and big respectively), i found that it manage to stay until another reboot.
my cpu usage is as how i expected from my target load. so i think it play nicely for now.
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
otonieru said:
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
Click to expand...
Click to collapse
I am still on first charge since tweaking the kernel. So far it seems that the battery life is going to be the same, but it feels to me that everything is just a bit faster now, app opening and loading times are shorter and a bit smoother, might be a placebo, but it works nice.
One thing you should fix in main post, your target load for 1612 mhz in little cluster is set to 8, but in calculations it is 83, I suppose you missed the 3 when you wrote the tunables
I am going to update the settings you added after it falls to 20% and I recharge it.
One more thing, if I use the Magisk module for thermal and hotplug (or simply turn off the Core control in Kernel manager) does it mean that the cores will go offline if there is no load?
I remember having different hotplug solutions on SD801 devices which actually turned off 3 cores and left only one to do basic functions in deep sleep, or turn on 2 of them when there is low load on the CPU.
@Cirra92 ah right ! i might hit the backspace accidently, LoL
about hotplug, honestly am still testing it myself to figure whether the config work as intended or not, since the behaviour of this chipset it quite different. And since oreo its a bit harder to really track the cpu activities, we need to run an app to see the activities, but the app itself is giving load to cpu, thus the reading might not actually accurate.
1. Can you repost the voltage table image again? i can't see or is it missing? i really need this voltage info table, I've been playing with kernel tweaks this last few weeks.
2. On your 1st post,little cpu target load arguments are as follows : target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
I don't think its the right setup. the first argument is target load which is 70, is affecting all freq starting from lowest to the highest (if there are no more arguments). but on 2nd argument you write 633600:63 (assuming 633600 is our lowest freq) then the first target load (70) has no effect. cpu target load for lowest freq (633Mhz) will be 63%, at 902Mhz the target load max is 71% and so on. And your screenshot shows the setup behavior. It idles at 633 then only spend small amount of time at 902 and 1401 and go right at the max freq for almost one and a half hours of total. If you want 633600 max target load 63% then the setup as follow :
target_loads: 63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
It means max target load from the lowest freq (633Mhz) will be 63% until below 902400. at 902400 max target load is 71% until below 1113600... and so on.
CMIIW
blackbellz said:
1. Can you repost the voltage table image again? i can't see or is it missing? i really need this voltage info table, I've been playing with kernel tweaks this last few weeks.
2. On your 1st post,little cpu target load arguments are as follows : target_loads: 70 633600:63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
I don't think its the right setup. the first argument is target load which is 70, is affecting all freq starting from lowest to the highest (if there are no more arguments). but on 2nd argument you write 633600:63 (assuming 633600 is our lowest freq) then the first target load (70) has no effect. cpu target load for lowest freq (633Mhz) will be 63%, at 902Mhz the target load max is 71% and so on. And your screenshot shows the setup behavior. It idles at 633 then only spend small amount of time at 902 and 1401 and go right at the max freq for almost one and a half hours of total. If you want 633600 max target load 63% then the setup as follow :
target_loads: 63 92400:71 1113600:23 1401600:82 1536600:4 1612800:83
It means max target load from the lowest freq (633Mhz) will be 63% until below 902400. at 902400 max target load is 71% until below 1113600... and so on.
CMIIW
Click to expand...
Click to collapse
i still can see the table, probably the connection from xda server is not good, its kinda patchy nowaday,
and btw, maybe you are right about the target loads. Although as i mentioned as well, that this config is lean more towards percormance, so its kinda intended from my side. But am still testing some other value as well, and i gonna try with your value as well.
as for now, my current set up is quite satisfy me.
crap, i cant even attach 2 picture in one post
otonieru said:
After further testing, i update the config to incorporate boost & better tuning of hispeed_delay for each frequencies,
please check main post
Click to expand...
Click to collapse
Can you add an image of the voltage table? The original image is not visible^^
otonieru said:
i still can see the table, probably the connection from xda server is not good, its kinda patchy nowaday,
and btw, maybe you are right about the target loads. Although as i mentioned as well, that this config is lean more towards percormance, so its kinda intended from my side. But am still testing some other value as well, and i gonna try with your value as well.
as for now, my current set up is quite satisfy me.
Click to expand...
Click to collapse
i tought this was towards battery but still keeping performance.
Try it or die said:
Can you add an image of the voltage table? The original image is not visible^^
Click to expand...
Click to collapse
Yup, it's not visible. But OP said its visible to him...
raptorddd said:
i tought this was towards battery but still keeping performance.
Click to expand...
Click to collapse
no, its the other way round as i wrote in my main post, LoL. But i guess 9-10Hrs SoT is more thwn enough wasnt it ?

Categories

Resources