[How To]Modify HTC One's Thermal Files For Your Own Need - One (M7) Android Development

Sorry for poor English
It is well-known that HTC encrypted their thermal config file, thermald.conf, to prevent users from modifying. Since 4.2.2, it throttles both gpu and cpu when battery reached 40C. It is not a good idea, since it cannot satisfy both those who want coolness and those who want extreme performance. As a result, users and devs have to use a custom thermal solution.
It is a good solution to have a 3rd party thermal management, but I believe there are people who want to use stock kernels or to use powersaver function. So I am here to start a thread about how to write a thermal config file for our own needs.
Requirements
1. a computer with adb and related drivers properly installed
2. your phones rooted
3. wp_mod.ko installed properly or using custom kernel
Step 1:
Find more information about temperature sensors
1. enable usb debug
2. connect your phone to the computer
3.1. input the following
Code:
adb pull /proc/last_kmsg
you can find adb.exe in sdk:http://developer.android.com/sdk/index.html
4. open the file, and search "sensor"
3.2. input the following
Code:
adb shell
cat /sys/devices/virtual/thermald/thermald_zone*/temp
* is the number of sensor you wanna checkout. it ranges from 0 to 11
the number displayed is the current temperature on this sensor
The following is the info I analysed, some of which may be incorrect
Code:
thermal_zone0: enabled, related to cpu
thermal_zone1: enabled, related to cpu
thermal_zone2: disabled, probably related to motherboard
thermal_zone3: disabled, related to cpu
thermal_zone4: disabled, probably related to motherboard
thermal_zone5: disabled, probably related to motherboard
thermal_zone6: disabled, probably related to motherboard
thermal_zone7: enabled, related to cpu
thermal_zone8: enabled, related to cpu
thermal_zone9: enabled, related to cpu
thermal_zone10: disabled, related to cpu
thermal_zone11:disabled, unknown
Step 2
create a txt file on your computer, rename it "thermald.conf"
Step 3
open the "thermald.conf" file you just created
Step 4
Write the first line:
Code:
sampling 5000
the number indicates the time interval of the system to scan the temperature, but I doubt whether it has any function now. Also I suggest to leave it unchanged.
Step 5
Define the sensor you want to use and configure its thresholds
Code:
[tsens_tz_sensor2]
sampling 1500
thresholds 54 57 64 70 75
thresholds_clr 51 54 57 64 70
actions gpu+cpu gpu+cpu cpu cpu cpu
action_info 400000000+1728000 320000000+1134000 1026000 918000 702000
Code:
[tsens_tz_sensor2]
the number after the word "sensor" means the sensor you want to use and config
Code:
sampling 1500
time interval of scanning, strongly recommended to leave it unchanged
Code:
thresholds 54 57 64 70 75
As it says, these are the thresholds that trigure actions
For example, the number 57 means that if the temperature of this sensor is over 57C, gpu will be throttled to 320mhz and cpu will be throttled to 1134mhz
Code:
thresholds_clr 51 54 57 64 70
These are the thresholds that make system to do the former action
For example, the number 54 means that if the temperature of this sensor is under 54C, gpu will be set to 400mhz and cpu will be set to 1728mhz
NOTE: it is strongly recommended to match the (n+1)th thresholds_clr to the nth thresholds, except threshold that trigures shutdown action
Code:
actions
These are the actions you want to take, like throttling cpu, gpu and even brightness.
If you want to take multiple actions, just use "+" to connect
For example, if you want to throttle both cpu and gpu
just type
actions cpu+gpu
If you does not want to take any action, just type: none
*actions:
Code:
cpu
gpu
lcd
battery
none
Code:
action_info
These define the values of actions defined earlier.
For example,
Code:
actions cpu+gpu
action_info 1134000+320000000
means to throttle cpu to 1134mhz and 320mhz
NOTE: The sequence of action info should EXACTLY MATCH the sequence of actions
For example, if you type
"cpu+gpu" in actions line
you can only type first, the cpu frequency you want to set, second, the gpu frequency you want to set
you CANNOT type it like this:
Code:
actions cpu+gpu
action_info 320000000+1134000
It can confuse the system when it decides to throttle
cpu frequency table:
Code:
384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1566000 1674000 1728000
gpu frequency table:
Code:
400000000 320000000 200000000
lcd
any value below 255. 255 means not to lower the brightness
battery
Code:
+1
+2
I don't know what these values mean, but it is for sure to be able to lower temperature
none
Code:
0
Step 5
save it and put it in your system
put the thermald.conf file in the folder where your adb.exe is placed
adb:
Code:
adb shell mount -o rw,remount /dev/block/mmcblk0p35 /system
adb push thermald.conf /system/etc/
adb shell chmod 644 /system/etc/thermald.conf
or use recovery to flash
I will post scripts in attachments
Sample
Code:
sampling 5000
[tsens_tz_sensor0]
sampling 1500
thresholds 34
thresholds_clr 32
actions none
action_info 0
[tsens_tz_sensor7]
sampling 1500
thresholds 34 36 45 48 57 66 75 95
thresholds_clr 32 34 36 45 48 57 66 90
actions cpu+gpu cpu+gpu cpu+gpu cpu+gpu cpu+gpu cpu+gpu cpu+gpu cpu+gpu+shutdown
action_info 1728000+320000000 1134000+320000000 1026000+200000000 918000+200000000 702000+200000000 486000+200000000 384000+200000000 384000+200000000+5000
[tsens_tz_sensor8]
sampling 1500
thresholds 34 95
thresholds_clr 32 90
actions none shutdown
action_info 0 5000
[tsens_tz_sensor9]
sampling 1500
thresholds 34 95
thresholds_clr 32 90
actions none shutdown
action_info 0 5000
[tsens_tz_sensor10]
sampling 1500
thresholds 34 95
thresholds_clr 32 90
actions none shutdown
action_info 0 5000
Update
10/12/2013 replaced thermald_boot to prevent pnpmgr from changing config files [email protected]
Downloads
I've modified some thermald files for those who do not want to modify it by their own.
Stock thermald config file from htc:
cpu throttles when reaching 57C. both cpu and gpu throttles when battery temp reaches 40C
View attachment stock_thermal.zip
Stock no gpu:
cpu throttles when reaching 57C, no gpu throttling
View attachment stock_no_gpu.zip
Cool Version:
cpu throttles at 46C, no gpu throttling
View attachment cool.zip
Extra Cool
cpu throttles at 40C, no gpu throttling
View attachment extra_cool.zip
Ultra Cool
cpu throttles at 36C, gpu is limited at 320mhz
View attachment ultra_cool.zip
Performance
cpu will not throttle until 76C, no gpu throttling
View attachment performance.zip
NOTE: without changes of voltages/drivers/kernels, less heat means less performance. cpu performance is noticeably influenced if cpu freq is lower than 1134mhz. if gpu is at 200mhz you will feel laggy in everything.
Hopefully you guys will enjoy this

This is excellent work! where have you been 6 months ago :laugh:
but now we can finally use stock kernel without the risk of disabling throttling completely
I didnt understand one thing, after we create the text file, shouldnt we encrypt it again?

hamdir said:
This is excellent work! where have you been 6 months ago :laugh:
but now we can finally use stock kernel without the risk of disabling throttling completely
I didnt understand one thing, after we create the text file, shouldnt we encrypt it again?
Click to expand...
Click to collapse
One is so hot that I didn't get this phone before May...I would have been very happy if I have had this phone 6 months ago
4.1.2's default thermald file worked fine, but 4.2.2's one annoyed. I was waiting for some devs to decrypt the config file but no one seems to care about that. Since One is a qualcomm device, custom thermald file should work if the right language is used. It works indeed. I am now using Bulletproof with cool version, very cool indeed, and with the full function of powersaver, since I do not need to disable the thermald daemon anymore
no need to re-encrypt. no one knows how and why htc encrypt those things. It works fine without encryption, just as one can flash a decrypted ruu zip file.

jerrylzy said:
One is so hot that I didn't get this phone before May...I would have been very happy if I have had this phone 6 months ago
4.1.2's default thermald file worked fine, but 4.2.2's one annoyed. I was waiting for some devs to decrypt the config file but no one seems to care about that. Since One is a qualcomm device, custom thermald file should work if the right language is used. It works indeed. I am now using Bulletproof with cool version, very cool indeed, and with the full function of powersaver, since I do not need to disable the thermald daemon anymore
no need to re-encrypt. no one knows how and why htc encrypt those things. It works fine without encryption, just as one can flash a decrypted ruu zip file.
Click to expand...
Click to collapse
Ah although i attempted to use the SGS4 themrald on 4.1.2 and it didnt really work, so i guess like you said the proper wording is important
excellent, did you try these on the 3.17 kernel ?
so we only wp_mod.ko in case we push from ADB right? flashing from recovery shouldnt need this

hamdir said:
Ah although i attempted to use the SGS4 themrald on 4.1.2 and it didnt really work, so i guess like you said the proper wording is important
excellent, did you try these on the 3.17 kernel ?
Click to expand...
Click to collapse
First, sensors may be different on the 9505. Second, 9505's thermald is different. It uses soft-link to thermald-8064ab.conf, and its values are obsolete, from which I think samsung does poorly on system optimization. since it uses soft links, one's thermald binary may not support that kind of configuration.
It works very well on all stock kernels. I used 3.17 kernel for a long time, for it does not give me purple/pink issue in low light(I have no problem in 4,2,2, it should be the drivers' fault)
Yes you don't need wp_mod.ko if you use recovery to flash thermald.conf.

jerrylzy said:
First, sensors may be different on the 9505. Second, 9505's thermald is different. It uses soft-link to thermald-8064ab.conf, and its values are obsolete, from which I think samsung does poorly on system optimization. since it uses soft links, one's thermald binary may not support that kind of configuration.
It works very well on all stock kernels. I used 3.17 kernel for a long time, for it does not give me purple/pink issue in low light(I have no problem in 4,2,2, it should be the drivers' fault)
Yes you don't need wp_mod.ko if you use recovery to flash thermald.conf.
Click to expand...
Click to collapse
hold on 3.17 solves the tint issue?
I will post details about your find in my information threads, thanks a lot, this is gold
there is only problem! now i have to rewrite my entire Gaming OP

hamdir said:
hold on 3.17 solves the tint issue?
I will post details about your find in my information threads, thanks a lot, this is gold
there is only problem! now i have to rewrite my entire Gaming OP
Click to expand...
Click to collapse
Sorry for the inconvenience
No, as I said, I have no problem under stock 4.2.2 & 3.09 & 3.17, I only have purple/red issue when I am using 3.17 custom kernel with camera hack. Some users reported that the issue is ameliorated but not fully solved in stock 3.17 system

@jerrylzy you think there is an easy hack for stock kernel to OC the GPU into 450mhz?

hamdir said:
@jerrylzy you think there is an easy hack for stock kernel to OC the GPU into 450mhz?
Click to expand...
Click to collapse
Really? Theoritically, we cannot oc anything without compiling a modified kernel source...

jerrylzy said:
Really? Theoritically, we cannot oc anything without compiling a modified kernel source...
Click to expand...
Click to collapse
well I was just asking if there is a way
anyway listen this might be wrong but I really feel you should fix your patch zip files, by duplicating the txt thermald.conf as thermald_boot.conf as well, I feel I'm getting better performance this way out of stock kernel
I used to have weird stalls in games, all fixed after I also replaced thermald_boot, still I'm not sure but there is no harm in doing this

@jerrylzy i don't think the thermald_boot is related to the stalls i've been feeling
I think the stock no gpu 57c arrives sooner than I accepted so when the threshold is hit and it throttles down a full 500mhz on the CPU we get noticeable drop in CPU hungry games like Asphalt 8 (although no where near as noticeable as the GPU throttle)
I think we should cook a thermald which gradually scales down the CPU, something between the stock no gpu and performance, but it scales down in steps instead of a sharp 500mhz drop
one more thing i noticed, while the threshold is 57 for stock no GPU, i feel its actually threshold_clr 54 which is actually being used but I can't confirm since the CPU temps drop down so fast between switching out of game to a CPU monitor app
for now the solution is your performance zip file, but i noticed you are probing a lot more Sensors in the performance patch unlike the other files, can you elaborate?

hamdir said:
@jerrylzy i don't think the thermald_boot is related to the stalls i've been feeling
I think the stock no gpu 57c arrives sooner than I accepted so when the threshold is hit and it throttles down a full 500mhz on the CPU we get noticeable drop in CPU hungry games like Asphalt 8 (although no where near as noticeable as the GPU throttle)
I think we should cook a thermald which gradually scales down the CPU, something between the stock no gpu and performance, but it scales down in steps instead of a sharp 500mhz drop
one more thing i noticed, while the threshold is 57 for stock no GPU, i feel its actually threshold_clr 54 which is actually being used but I can't confirm since the CPU temps drop down so fast between switching out of game to a CPU monitor app
for now the solution is your performance zip file, but i noticed you are probing a lot more Sensors in the performance patch unlike the other files, can you elaborate?
Click to expand...
Click to collapse
In the new "stock no gpu" patch I added a step of 1566mhz between 1728mhz and 1134mhz. Also the reason why I added a lot more sensors for performance path is that I added a lot more sensors to prevent the cpu from too hot, which is harmful to both the cpu and the battery. Actually, it should not be as hot as that. I personally used stability test to check the thermald patch. with quad core 1.7g running more than 5 minutes, the temperature of my cpu never went higher than 65C. I am on PVS 4 bin.

jerrylzy said:
In the new "stock no gpu" patch I added a step of 1566mhz between 1728mhz and 1134mhz. Also the reason why I added a lot more sensors for performance path is that I added a lot more sensors to prevent the cpu from too hot, which is harmful to both the cpu and the battery. Actually, it should not be as hot as that. I personally used stability test to check the thermald patch. with quad core 1.7g running more than 5 minutes, the temperature of my cpu never went higher than 65C. I am on PVS 4 bin.
Click to expand...
Click to collapse
ok great, I was sure this is why you added those sensors good work, so performance patch is pretty safe I assume? i also have the same bin
I checked the new stock_no_gpu good work mate :good:
but i think i will go with performance

Related

[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2

{
"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"
}
*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!​
I know there are several posts that have been made regarding the overclocking method(s) for the ATRIX 2 both on this forum, as well as some others, however; many of these posts are somewhat old, and I am just providing a guide thread here on XDA since most of the original threads were still beta at the time. This being the case, I take no credit for the instructions I will outline below, but will credit those who deserve to be credited for their efforts they have made in getting these methods to work stably. I am simply compiling some information that users may find helpful in the overclocking process. This is specifically geared toward ATRIX 2 owners who want to have a working knowledge of overclocking and how to accomplish this. If I have missed anything, or if the information is either A) outdated, or B) there is another "newer" more approved method in achieving overclock WITHOUT init.d support, please let me know and I will update the OP...
*Make sure you have a backup in place before attempting any of the following steps, and PLEASE understand how to flash the FXZ file to return to stock if you run into any surprises -though, if you follow the instructions exactly, I would be surprised if you would find the need to do so...​
First & Foremost:​
*DISCLAIMER: I cannot be held responsible for any and all damage related to Hardware loss or data or Software, which the user might cause while overclocking there device. Additionally, I am taking the liberty to assume that anyone who attempts to Overclock their device understands the risks involved. Such risks include, but aren’t limited to: failure of hardware, voiding warranties, and data corruption. While many users enjoy overclocking their own devices, they should do so knowing such risks involved.​
*CPU overclocking is something that you should fully understand BEFORE attempting! Remember that the ultimate goal is speed with stability. Extreme clock speeds are merely academic exercises if the overclocked system can't run your device's operating system and/or applications reliably.
*Please note that the guide thread is based on a more generalized approach to give best results for the majority of users; just because someone's CPU processor runs at 1.25 GHz (or even higher) DOES NOT ENSURE that yours will!​
CPU Overclocking Overview:​
What Is "CPU"?
The term "CPU" is an abbreviation for Central Processor Unit. Essentially, the CPU is the brains of your device's system. It is the internal component which carries out the instructions of a program by performing the basic arithmetical, logical, and input/output operations of the system. Your Android's CPU is responsible for handling all instructions it receives from hardware components and applications running on your device. The CPU performs operations on data held in the computer memory -the RAM. The CPU relies on an "Operating system" (Android OS) for input and output of data, interaction with the user and for storing information.​
What Is CPU Overclocking?
If you think overclocking sounds like an ominous term, you may have the right idea. Basically overclocking means to run a microprocessor faster than the clock speed for which it has been tested and approved. Overclocking is a popular technique for getting a little performance boost from your system, without making any changes to the actual device's hardware. Because of the performance boost found in overclocking, it seems to be something desired by users who demand more from their device, such as heavy gamers, and may perhaps be even somewhat of a novelty for those that really don't need such performance increases. All CPUs have a fundamental clock rate, from which all of the other clock rates inside the CPU are derived. Various sections of the processor take this fundamental clock rate, which acts as a kind of standard timekeeper, and multiply it to get an internal clock speed for a particular section of the CPU. In conjunction with overclocking, the CPU core voltage (VSel or uVolt as it may be referred to) is sometimes raised above the default setting to stabilize an overclocked CPU.​
What Is "Clock Speed"?
Clock speed: Given in megahertz (MHz) or in gigahertz (GHz), the clock speed determines how many instructions per second the processor can execute. The higher the value, the more powerful the CPU. In overclocking your device's CPU, you must be somewhat familiar with it's hardware, and it is always a procedure conducted at your own risk. When overclocking there are some problems and issues you'll have to deal with, such as excessive heat, random reboots, and/or operating system freezes. Even though your device's CPU can be overclocked, it doesn't mean your RAM modules will stably support some of the higher CPU clock speeds that others have seen.​
What Are The Risks Involved?
Overclocking comes with many risks, such as overheating, random system rebooting, and system freezing, so you should become familiar with all the pros and cons before you attempt it. Additionally, overclocking isn't supported by some of the Android Operating System kernels (ICS/JB -at least not as of yet) which means overclocking your CPU may not work on all Android versions -and will obviously void your warranty and leave you with an inoperable CPU if you overclock too high and damage the CPU in the process. Overclocking may also decrease the lifespan of the CPU, cause failure in critical components and may even result in some data corruption, as well as an increase in unexplainable crashes and freezes, as previously mentioned.​
VSel & uVolt (Undervolting) Overview:​
What Is Undervolting?
Undervolting is the practice of modding an Android device to run at a lower voltage than the stock settings. The idea behind kernel undervolting is to reduce that stock voltage to the bare minimum required to run the phone at factory settings. The main battery saver is a low VSel1 (the lowest voltage at the lowest speed), because your phone runs at this speed most of the time. Underclocking VSel1 is not a good idea, because below the default 300 MHz it takes noticeably longer before your phone responds to an incoming call in standby mode. Reducing VSel1 too much makes your phone hang or reboot when it's idle, but you can reduce VSel1 within reason to increase standby time. If you cut VSel1 from 33 to 20 the processor uses 40% less power most of the time, which can make the difference between your phone lasting a full day or blacking out before you get a chance to plug it in. (There are more ways to stretch your battery without "dumbing" down your smartphone)
Lowering the intermediate voltage at medium speed (600 MHz by default) saves a bit of juice when you're playing with your phone a lot, because VSel2 is the typical setting when you're using your phone. If you use your phone as an mp3 player on a long trip you may notice the difference. Your phone rarely runs, or should rarely, at top speed. It spikes at VSel3 occasionally, but even with QueueTube streaming, Wi-Fi Ruler scanning, GPS Status looking for satellites, and Dolphin HD loading pages in the background my processor spent most of the time at 600 MHz instead of the default maximum (800 MHz) or my custom 1.25 GHz CPU frequency scaling.​
What are the "Pros" Regarding Undervolting?
The pros, as mentioned before, are increased battery life and cooler temperatures. It should be noted at this juncture that there is controversy regarding whether or not undervolting truly provides increased battery life; there are those that believe it makes no difference, and unfortunately much of the evidence is circumstantial or based on hearsay, since usage patterns, rogue apps, and any number of other factors can contribute to a perceived difference in battery drain or conservation. Undervolting can help battery life, up to a point, although once the voltage drops below a certain threshold, the battery life actually suffers due to errors caused by the baseband radio not getting enough power. Suffice it to say, it is possible to safely take it to mean that undervolting does in fact provide better battery life than stock settings.​
What Are The "Cons" Regarding Undervolting?
On the flip side, undervolting has its pitfalls. Undervolting a phone too much can cause serious errors to appear as the power-starved processor starts to error out. The radio from above is a perfect example, but there have also been numerous other errors that result from extreme undervolting. These errors can range from random reboots to the phone locking up when the WiFi is turned on, and quite often there is no indication that the undervolting is the cause. The very worst case scenario for undervolting your Android device is that you may in fact "soft brick" the phone; the lack of voltage during boot could conceivably corrupt the phone’s firmware, leaving the phone unusable.​
[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2 (ICS 4.0.4 ONLY)
Modules :
Filesystem
ntfs.ko (read/write support)
cifs.ko (with extra attributes)​
Kernel hacking
symsearch.ko (Unexported symbol finder by Skrilax_CZ)​
CPU scaling governor (back ported from other dev)
cpufreq_interactiveX.ko [@] (interactiveX V2 governor by imoseyon)
early suspend support and hotplugging
cpufreq_hotplugX.ko [@] (hotplugX governor by imoseyon)
early suspend support and tweaks
cpufreq_smartass2.ko [@] (SmartassV2 governor by erasmux)
cpufreq_pegasusq.ko [@] (Samsung multi-core governor)
based on modification done by Gokhanmoral
cpufreq_boostedASSv2.ko [@] (a modified smartassv2 governor)
ported from BMc08GT​
CPU/GPU frequency control
cpu-control.ko [@] (Tweak CPU frequency & voltage to your like)
my 1st kernel module. based on milestone overclock & opptimizer.​
I/O scheduler
sio-iosched.ko (Simple IO scheduler by waninkoko)
based on Noop, Deadline and V(R) IO schedulers. In android world, simple is better​
modules with [@] mark requires symsearch.ko to operate
Disclaimer : I don't write all of these modules. Only make a few changes/tweak for it to work on our device. Enjoy!
Kernel version : 3.0.8
Kernel source : 67.42.17.XT910S.SKT.en.KR
Compiler setup : CodeSourcerey arm-2012.03-56-arm-none-eabi (-O2 optimization)
Build revision : Project Lense build​
Change logs:
0.1.1
- Add Simple I/O scheduler.
0.1.2
- Recompile with -O2 flag. I notice some instability when using -O3 flag
- Tweaked sio scheduler
- Add tweaked pegasusq governor.
0.1.3
- Add cpu overclock/underclock module
- Add boostedASSv2 governor
**For best practices, only load module when it's needed. That would save some kernel memory.​
Source code :
ttps://github.com/whirleyes/extra_kernel_module​
Download link :
extra_kernel_modules_0.1.3.zip - contains all the modules
init.d_n_governor_installer_0.1.3.zip - optional. init.d installer (load all modules to memory on startup).
Update : Add a preview of Tweakerz app.
- Include all kernel module. Module are loaded from app storage.(no install /alter system partition.)
- Load/unload kernel module on-the-fly (No save setting or set on boot option)
- Set CPU voltage/freq via GUI (No persist option yet)​
Easy Install method: (For init.d)
Reboot to recovery
Install extra_kernel_modules_0.1.zip
Install init.d_n_governor_installer.zip (Thanks to core720)​
Install guide for adding init.d script via Script Manager - SManager app
1.Extract all *.ko files from extra_kernel_modules_0.1.2.zip to /system/lib/modules
2.Open Script Manager, Create new script / modify existing script
Code:
#!/system/bin/sh
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpufreq_interactiveX.ko
insmod /system/lib/modules/cpufreq_hotplugX.ko
insmod /system/lib/modules/cpufreq_smartass2.ko
insmod /system/lib/modules/cpufreq_pegasusq.ko
insmod /system/lib/modules/sio-iosched.ko
3.Save to /system/etc/init.d/​
Q: How to load a cpufreq governor
1.Load symsearch.ko
2.Load your choice of governor
3.Enable it
Code:
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpufreq_interactiveX.ko
echo interactivex > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Q: What is the best cpu-freq governor
Maybe this will help you choose/tweak
CPU Governors explained
Pegasusq Governor​
Q: How to load cpu frequency/voltage (underclock/overclock)
1.Load symsearch.ko
2.Load cpu_control.ko
Code:
insmod /system/lib/modules/symsearch.ko
insmod /system/lib/modules/cpu_control.ko
Q: How to change cpu frequency & voltage
echo id frequency(Mhz) voltage(mV) > /proc/cpu_control/tweak_cpu
Example:
Code:
echo 0 196 980 > /proc/cpu_control/tweak_cpu
echo 1 500 1195 > /proc/cpu_control/tweak_cpu
echo 2 750 1320 > /proc/cpu_control/tweak_cpu
echo 3 1000 1388 > /proc/cpu_control/tweak_cpu
echo 4 1350 1410 > /proc/cpu_control/tweak_cpu
ICS kernel default voltage&frequency table
Code:
Id Freq Volt(mV)
0 300 1025
1 600 1200
2 800 1325
3 1000 1388
4 1200 1398
GB kernel default voltage&frequency table
Code:
Id Freq Volt(mV)
0 300 1025
1 600 1200
2 800 1313
3 1000 1374
4 1200 1375
** voltage min : 830mV, max : 1410mV​
More/Details about cpu_control.ko module
To view ICS default frequency-voltage table
Code:
cat /proc/cpu_control/opp_table_default
To view current frequency-voltage table
Code:
cat /proc/cpu_control/opp_table_current
To view current CPU & GPU frequency
Code:
cat /proc/cpu_control/frequency_current
​
[GUIDE] Comprehensive Guide To Overclocking The ATRIX 2 (2.3.6)
PREREQUISITES:
A Rooted ATRIX 2: (for obvious reasons) Check THIS THREAD as well as THE BEGINNER'S GUIDE for references and instruction for rooting your device.
Clockworkmod Recovery (CWM): You can find the installation procedure for this in THE BEGINNER'S GUIDE as well.
If your ROM does not support init.d: download the mo_simp_1.5_edison-signed.zip and flash in CWM Recovery.
Root Explorer: This application will allow you access to the init.d folder to edit your echo table values. You can find this application HERE.
SetCPU: This application will provide verification of your CPU overclocking settings. You can find this application HERE.
Terminal Emulator: You can find this application HERE.
Instructions For Users WITHOUT init.d Support Already Running (Stock/Rooted 2.3.6. etc):
1) Download the latest mo_simp_1.5.x_YOUR_DEVICE.zip
2) Move the mo_simp_1.5.x_YOUR_DEVICE.zip to the root of your SD card
3) Flash in Clockwork Recovery
Optional for Motorola Devices:
4) If your ROM does not have init.d support, download this file and flash from CWM Recovery: moto_init_d-signed.zip
5) Reboot your ATRIX 2 after you have flashed the mo_simp_1.5.x_YOUR_DEVICE.zip and/or moto_init_d-signed.zip
*Note, this will remove any old kernel modules, or init.d script you may have. Backup your old init.d script before flashing -if any!
Basic Usage:
*These are the basic terminal commands, to be entered as Root or "su". The Milestone Overclock interface exists as four individual files located at /proc/overclock/*
6) Switch to "SuperUser" (NOTE: All commands must be done as SuperUser. Switch from the "$" symbol that you will see when you first open the Terminal Emulator to the "#" symbol simply by typing in "su" -without the quotation marks!):
What you will see when you open Terminal Emulator initially:
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$
What you should see AFTER typing in "su" (without quotation marks):​
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$ su
[email protected]:/#
7) Next, type this command in Terminal Emulator: cat /proc/overclock/*
Code:
cat /proc/overclock/*
Below is what you should see in Terminal Emulator after entering: cat /proc/overclock/*​
Code:
[email protected]:/$ export PATH=/data/local/bin:$PATH
[email protected]:/$ su
[email protected]:/# cat /proc/overclock/*
//RAZR Stock
freq_table[0] index=0 frequency=300000
freq_table[1] index=1 frequency=600000
freq_table[2] index=2 frequency=800000
freq_table[3] index=3 frequency=1000000
freq_table[4] index=4 frequency=1200000
cpumin=300000 cpumax=1200000 min=300000 max=1200000 usermin=300000 usermax=1200000
clk_get_rate=300000
mpu_opps[5] rate=1200000000 opp_id=5 vsel=61 u_volt=1375000
mpu_opps[4] rate=1000000000 opp_id=4 vsel=61 u_volt=1374000
mpu_opps[3] rate=800000000 opp_id=3 vsel=55 u_volt=1313000
mpu_opps[2] rate=600000000 opp_id=2 vsel=43 u_volt=1200000
mpu_opps[1] rate=300000000 opp_id=1 vsel=26 u_volt=1025000
1.5-mapphone-yokohama
//Droid3, Bionic, Atrix2 Stock
freq_table[0] index=0 frequency=300000
freq_table[1] index=1 frequency=600000
freq_table[2] index=2 frequency=800000
freq_table[3] index=3 frequency=1000000
cpumin=300000 cpumax=1000000 min=300000 max=1000000 usermin=300000 usermax=1000000
clk_get_rate=300000
mpu_opps[3] rate=1000000000 opp_id=3 vsel=61 u_volt=1375000
mpu_opps[2] rate=800000000 opp_id=2 vsel=55 u_volt=1313000
mpu_opps[1] rate=600000000 opp_id=1 vsel=43 u_volt=1200000
mpu_opps[0] rate=300000000 opp_id=0 vsel=26 u_volt=1025000
1.5-mapphone-yokohama
8) Read all current settings: (useful for verifying that the frequency table and opp tables match)
9) Next, read just mpu_opps info for the Droid 3, Bionic, and ATRIX 2 Stock:
Code:
[COLOR="DarkOrange"]Droid3/Bionic/Atrix2 stock Settings
echo 3 1000000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps[/COLOR]
10) Write the new frequency & voltage: (Format: echo /proc/overclock/mpu_opps)
*Note: Change only the top frequency/voltage on ATRIX 2 by typing in the full code line "echo 3 1125000000 1375000 > /proc/overclock/mpu_opps" (without quotation marks)
Code:
echo 3 1125000000 1375000 > /proc/overclock/mpu_opps
11) To verify the changes made to echo 3, type in "cat /proc/overclock/mpu_opps" (without quotation marks)
Code:
[email protected]:/# cat/proc/overclock/*
echo 3 1125000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps
*Note: Voltage can be set as a VSEL or uV value. Max VSEL for most Motorola devices is 63.
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/overclock.ko
The new update.zip's will install a basic init.d script to "/system/etc/init.d/00opptimize". If you've found settings that are "stable" for your device, and you'd like to run these at boot, you may edit this file accordingly. By default, this script only loads the kernel modules. This requires your ROM to have init.d support to work. If you cannot find a method of getting init.d working, you can use Script Manager to execute this file at boot.
11) Reboot after making changes.
12) Open SetCPU to confirm whether your CPU echo values stuck through rebooting. Also, make sure that the "Set On Boot" box is left un-ticked, so as to not have the changed CPU clock speed set upon reboot, and to further test to make sure you are able to run higher CPU clock speeds.
Instructions For Users WITH init.d Support Already Running (Custom ROM WITH init.d Built-In):
1) Open Root Explorer, and navigate to: system>etc>init.d>00pptimize (See Explanatory Images Below)
2) Next, open the 00pptimize file and open using Text Editor (See Explanatory Image Below)
3) Then, after opening the 00pptimize file using text editor, scroll down until you see the section of code highlighted in red below:
4) Make sure your permissions are set to "R/W" instead of "R/O" in Root Explorer!
Code:
# RAZR stock Settings
# echo 5 1200000000 1375000 > /proc/overclock/mpu_opps
# echo 4 1000000000 1374000 > /proc/overclock/mpu_opps
# echo 3 800000000 1313000 > /proc/overclock/mpu_opps
# echo 2 600000000 1200000 > /proc/overclock/mpu_opps
# echo 1 300000000 1025000 > /proc/overclock/mpu_opps
[COLOR="Red"]# Droid3/Bionic/Atrix2 stock Settings
echo 3 1000000000 1375000 > /proc/overclock/mpu_opps
echo 2 800000000 1313000 > /proc/overclock/mpu_opps
echo 1 600000000 1200000 > /proc/overclock/mpu_opps
echo 0 300000000 1025000 > /proc/overclock/mpu_opps
# LG Thrill 4G/Optimus 3D Froyo stock Settings[/COLOR]
# echo 3 1008000000 1350000 > /proc/overclock/mpu_opps
# echo 2 800000000 1260000 > /proc/overclock/mpu_opps
# echo 1 600000000 1100000 > /proc/overclock/mpu_opps
# echo 0 300000000 930000 > /proc/overclock/mpu_opps
5) Now, using the Text Editor in Root Explorer, change the echo 3 table value from "echo 3 1000000000 1375000 > /proc/overclock/mpu_opps" to something like: "echo 3 1100000000 1375000 > /proc/overclock/mpu_opps" (without the quotation marks)
6) Next, click the "back" button.
7) Root Explorer will ask you to save changes. A window will show after you have made changes, and will say:
Warning
You have made changes to this file.
Do you want to save these changes before exiting?​
Click "Yes" to save. The newly made changes will be saved to a file that will be called "00pptimize.bak".
8) Now, find and delete the "00pptimize.bak" file created after you made your changes by long pressing this file and choosing the "Delete" option.
9) Finally, exit out of Root Explorer and reboot your device.
10) Once you have rebooted, open SetCPU and you should see your CPU frequency scaling value you changed from 1000000000 to 1100000000, or check the settings by using Terminal Emulator and typing "cat /proc/overclock/*" -what you should see is a clock speed that was 1GHz and is now 1.1GHz. Also, leave the "Set On Boot" box un-ticked until you have fully tested the new CPU clock speeds and are certain they are at a stable frequency.
11) You can continue this process using small incremental jumps from 1.1GHz to 1.12GHz, to 1.14GHz, to 1.16GHz, etc. until you find a your highest stable running CPU clock speed.
*I have been able to slowly work my way up to run my CPU at 1.25GHz stably, but you may find that your device can either handle more or less clock speed. Again, handle with care, and patience in achieving your highest stable clock speed is something you need to take into consideration throughout this entire process!
UNDERVOLTING GUIDE: Updated: 08/09/2012
Please Reference THIS THREAD For Loading/Changing CPU Voltages.
Credit Goes To:
whirleyes​
CPU GOVERNOR SETTING EXPLANATION: Updated: 08/09/2012
Please Reference THIS THREAD For CPU Governors Explained.
Credits goes to:
http://icrontic.com/discussion/95140...m-tuner-tegrak
http://forum.xda-developers.com/show....php?t=1369817​
*I recommend that after you make changes to the clock speed, you run your device for 5-10 minutes. Open applications, play a quick game, browse the web, etc. to make sure that your device can handle the new clock speeds before making any further increases to the CPU.
**You can also underclock in the same manner that you have used to overclock, but by changing the echo table values at echo 0 to something like "echo 0 240000000 1025000 > /proc/overclock/mpu_opps" -which is always a good idea when overclocking to give the CPU a load relief when using CPU settings like "performance". This will run your CPU at its lowest frequency scaling to 240MHz rather than at 300MHz, but again, experimentation/patience/extensive testing is a must!​
Credits: tekehuna,cogeary, JRW 28, alteredlikeness, whirleyes, 00pptimizer Project via RootzWiki, and probably more to come to credit. Please let me know if you can add to/provide more info/correct me on misinformation/or should be listed in credits also and I will update the OP!​
Good one bro very useful for noobs
Sent from my MB865 using xda app-developers app
Mods, can you sticky this?
Sent from my ATRIX 2 using my toes
Fantastic! I've always said "I'll try out overclocking when I have time to do the research" but I guess now I won't have an excuse. Thanks a bunch. :good:
iarejohnsmith said:
Fantastic! I've always said "I'll try out overclocking when I have time to do the research" but I guess now I won't have an excuse. Thanks a bunch. :good:
Click to expand...
Click to collapse
Glad you found this thread useful! I know overclocking can be a bit daunting when you think about it, but it really is quite easy after a few basic commands are learned and preformed a few times. If you need any more guidance in your OC'ing, please feel free to PM me, and I'll step you through anything you might be unsure of!
Thanks for taking the time for this. Realy appreciate it. :good:
So who all did this?
I believ OCing to 1.2 Ghz wudnt cause any problems as it is the same chipset(OMAP 4430) as in Razr(1.2 Ghz Clocked)?
djabhi003 said:
Thanks for taking the time for this. Realy appreciate it. :good:
So who all did this?
I believ OCing to 1.2 Ghz wudnt cause any problems as it is the same chipset(OMAP 4430) as in Razr(1.2 Ghz Clocked)?
Click to expand...
Click to collapse
I'm clocked at 1.25GHz stable. Some have been known to hit as high as 1.3GHz. Seems as though there's nothing consistent (across the board) for all ATRIX 2's to be able to clock to. You'll just have to experiment and test at some length to find your highest possible CPU clock speed that's stable and reliable...
Sent from my MB865 using xda's premium carrier pigeon service
"9) Finally, exit out of Root Explorer and reboot your device."
This step is unnecessary as you can just run the shell script for it to take effect instantly.
I actually recommend people copying this shell script elsewhere outside of the init.d directory so it doesn't run at startup, and only copy the script back over when you've extensively tested for random reboots. Altering the startup script files and rebooting to test increases your likelyhood of bootlooping.
Note: For the atrix 2 at least, it IS possible to adb into your phone and replace, move, or remove the files in the init.d directory before they run at startup; I've had to do this to get out of a overclock-related bootloop at least twice...
IIRC, in my case it was spamming something like this in a command line while the phone booted up
Code:
adb shell "su -c "mount -o rw,remount /dev/null /system"&&"rm /system/etc/init.d/Oc3""
(may need more quotation marks lol)
It would be 00pptimize in the context of your posting (adb must be enabled in the phone development settings obviously)
moofree said:
"9) Finally, exit out of Root Explorer and reboot your device."
This step is unnecessary as you can just run the shell script for it to take effect instantly.
I actually recommend people copying this shell script elsewhere outside of the init.d directory so it doesn't run at startup, and only copy the script back over when you've extensively tested for random reboots. Altering the startup script files and rebooting to test increases your likelyhood of bootlooping.
Click to expand...
Click to collapse
This is true, and I suppose I can include a caveat in the OP to let users know.
moofree said:
Note: For the atrix 2 at least, it IS possible to adb into your phone and replace or remove the files in the init.d directory before it runs at startup; I've had to do this to get out of a overclock-related bootloop at least twice...
IIRC, in my case it was something like spamming this in a command line while the phone booted up
Code:
adb shell "su -c "rm /system/etc/init.d/Oc3""
It would be 00pptimize in the context of your posting (adb be enabled in the phone development settings obviously)
Click to expand...
Click to collapse
As far as using adb, I didn't reference any methodologies to include this, as some users may not have any knowledge/experience with using it. Again, I can look at this more closely and possibly include something in the OP that will give more instruction concerning this usage soon.
This Guide Thread is one I am going to update as newer overclocking methods and/or shortcuts are discovered and tested. I also have intent to write an undervolting section as well. I want this guide to be one specifically for the ATRIX 2 community, and further I want to maintain it to keep both accuracy and understandability as well as open for suggestion(s) -as you have made; and I thank you.
Sent from my MB865 using xda's premium carrier pigeon service
Excellent guide, will try it out tonite, any suggestions on what vsel to give on different clocks, like 300/600/1000 or 300/600/1100 ?
nikolain said:
Excellent guide, will try it out tonite.
Click to expand...
Click to collapse
Let me know (PM me) if you have any questions...
Sent from my MB865 using xda's premium carrier pigeon service
nikolain said:
Excellent guide, will try it out tonite, any suggestions on what vsel to give on different clocks, like 300/600/1000 or 300/600/1100 ?
Click to expand...
Click to collapse
Apex_Strider said:
Let me know (PM me) if you have any questions...
Sent from my MB865 using xda's premium carrier pigeon service
Click to expand...
Click to collapse
Any suggestion on Voltages ?
nikolain said:
Any suggestion on Voltages ?
Click to expand...
Click to collapse
You shouldn't try to go any higher than vSel=63 at echo 3, or you'll likely experience problems. There's other init.d files that have uVolt as well as vSel. The uVolt is a more fine tuning of voltages, but like I said you can edit the vSel at echo 3 to vSel 63 and you should be golden...
Sent from my MB865 using xda's premium carrier pigeon service
the ICS leak from searet is using 1200mhz clock speed. Isnt it high? it working well now just maybe if some expert can give me some hints.
Titankahn said:
the ICS leak from searet is using 1200mhz clock speed. Isnt it high? it working well now just maybe if some expert can give me some hints.
Click to expand...
Click to collapse
I am not on the leaked ICS AT&T version, so I really can't answer to this. What exactly are you wondering about? I know there's been some question as to why some ICS leaks have users clocked to 1.2GHZ and others at the stock 1GHz. That been sort of a mystery. Further, since I've not flashed the leak to be able to test higher click speeds myself (curious as to what the maximum stable clock speed might be with ICS) so I just have no insight. Yet...
Sent from my Atari Falcon030
Hey Apex, quick question,
Every time I try to underclock echo0, to say, 240mhz, I'll reboot and SetCPU says its UC'd, but phone won't fall below echo1 value at idle, in this case 600mhz. If I reset echo0 too 300mhz, its fine. And it doesn't matter what the GPU is set, still the same. Maybe voltage change is warranted?
Sent from my ATRIX 2 sill on GB
captaincado said:
Hey Apex, quick question,
Every time I try to underclock echo0, to say, 240mhz, I'll reboot and SetCPU says its UC'd, but phone won't fall below echo1 value at idle, in this case 600mhz. If I reset echo0 too 300mhz, its fine. And it doesn't matter what the GPU is set, still the same. Maybe voltage change is warranted?
Sent from my ATRIX 2 sill on GB
Click to expand...
Click to collapse
What rom are you running, or are you rooted/stock? Since I'm running Lithium v1.3.1 it (obviously) has the 00pptimize folder with all the code needed to over/underclock in the 00pptimize from unit.d folder. I've underclocked to 220MHz at echo table 0 with no voltage changes, and have seen no ill-effects as result. How are you modifying the echo tables, Terminal Emulator or Root Explorer?
Sent from my Atari Falcon030
I'm on lithium 1.3.1, using root explorer, but, this happens on any rom. I've been changing values in OC3, instead of uncommenting in 00optimize.
Om a side note, I can OC to 1335mhz, 48 hour stable.
Sent from my ATRIX 2 still on GB

[TUT][GUIDE][I9505] Kernel features/parameters explained! [09/21/2013]

This is a simple STARTER REF/GUIDE to kernel features/parameters and everything you need to know about custom kernel goodies. Now that there are a few custom kernels out there for our device, you may want to know about these.
I’d be glad if you could help me complete this guide.
First of all I’d like to thank all kernel guys who put countless hours into this to bring us these kernels/kernel hacks.
Index:
Post 1:
A.1: What you want to know about the CPU/GPU of your device
A.2: MUST KNOW FACTS
B.1: Main Kernel Parameters
B.2: CPU/Governor Adjustments
Post 2:
B.3: Extra Features/Parameters
More Coming Soon!!!
Post 3:
Coming Soon!!!
A.1. What you may want to know about the CPU/GPU of your device:
Galaxy S4 4G/LTE (i9505) features a Qualcomm SnapDragon (600) 1.9GHz Quad Core krait (300) CPU and an Adreno 320 GPU.
A.2. MUST KNOW FACTS:
AOSP/GE/TW versions. Which one to flash on ROM X?
Firstly you have to see that what is your ROM's base. You can find this the thread of ROM.
- TW (As for TouchWiz): These ROMs are based on samsung's official firmwares. Mostly these ROMs are modified version of Samsung firmwares. These are also called Stock ROMs. You can find out a ROM is Touchwiz by looking at its base version. In ROM thread, you may see 'based on samsung's latest firmware "XXBMGA"'. Sammy's firmwares are like that. They consist of a region/carrier code + base version. (XX + BMGA). TW framework is essential for the Sammy's apps to work (like splanner). Also most of the TW ROMs are under Android Development forums.
For these ROMs you should Flash TW version of the kernels (obviously!).
- GE (As for GoogleEdition): These ROMs are based on Samsung's official Google Edition firmwares. GE ROMs contain TW materials, so they somehow are considered as TW ROMs (well, not entirely). Everything which is said in TW section is applied here, too.
So if there wasn't a GE edition kernel, the most likely version that is for GE is TW 4.3 version of the kernel. (Talking about Ktoonsez's kernel). It appears like GE Kernels also works on TW ROMs, too. (Very similar sources).
- AOSP (As for Android OpenSource Project): These ROMs are based on opensource projects like CM, AOKP, PA and... Basically these ROMs does not include TW materials. And so the TW apps does not work in these ROMs (Like Sammy's fine camera). Also most of the AOSP ROMs are under Original Android Development forums.
Flash AOSP version of the kernels for these ROMs.
- Other Bases: There are other bases like MIUI out there which are usually closed source on kernel side. So nothing much you can do here about them.
Click to expand...
Click to collapse
The modifications and changing values of kernel parameters will stick until the next reboot. They will be set to default when you reboot your device. So if you want them to stick, you have to do one of the following:
1. Init.d Scripts: Here is a complete guide, how to make one. (The guide is for another device, but the basics are the same!).
2. Set on Boot: The programs like Trickster Mod, have an option named 'Set on Boot'. If you want the settings you have in Trickster to stick, you have to check that option.
Click to expand...
Click to collapse
And a quote from the elite developer that everyone know:
However, if you put any trust in Quadrant scores you could use them to prove that dancing naked for 5 minutes in your garden affects device performance. - Chainfire
Click to expand...
Click to collapse
B.1. Main Kernel Parameters:
Some info:
- The different frequencies of the CPU are usually called CPU states (In very general way of talking!). CPU jumps from one state to another. The different states of CPU frequencies are seprated using a certain value called "step". So to put it simple the frequencies can be certain numbers.
- Min/Max frequency refers to the frequency that CPU is not able to go below/above.
Click to expand...
Click to collapse
OC/UC (As for OverClock/UnderClock):
As you may know, CPU or any other processing unit features a clock frequency. Over/Under Clock simply means raising/decreasing the clock frequency of CPU.
Reason: Why would one need to overclock? Because one needs more processing power. For example if you want to experience smoother gameplay when playing high-graphic games.
Why would we need underclock? Higher processing power demands more battery. So underclocking helps us, reserve more battery. Searching internet and texting don’t need much of processing power. So we can limit the processing power and save battery during low use of our device.
•Note1: OC/UC is not limited to CPU. GPU is also capable of OC/UC.
•Note2: Gamers may not use GPU UC. Limiting GPU processing power impacts significantly on your gaming experience.
•Note3: These apply to both min and max frequency of the CPU. What we said is mainly about the max frequency. Min frequency defines where the CPU frequency can't go below. So by lowering it (not too much) when in low use CPU will stay in lower states, preserving more power. The exact opposite goes for increasing it. The good thing about increasing it is improving performance and snappiness of the device!
UV (As for Undervolt):
Every frequency of a processing unit, demands a certain amount of power to be supplied. Undervolting to put it simple means decreasing the voltage of a certain frequency (or all of them).
Reason: The more voltage CPU/GPU gets, more heat will be generated. So mainly we UV to decrease the generated heat of CPU/GPU.
•Note1: One Frequency needs a certain minimum amount of voltage to perform correctly and the system be stable. Undervolting more than a certain amount of voltage will cause system instability.
•Note2: UV improves battery life by using less power. See this.
•Note3: In most of the kernels you can perform a -50mv UV across the board (means in all frequencies).
CPU Governors:
Frequency scaling is the means by which the Linux kernel dynamically adjusts the CPU frequency based on usage of the device. Governors refer to schemes which dictate to the kernel how it should do these adjustments. (From rootzwiki)
To put it simple, Governors are the way that CPU frequency is adjusted according to the demand of operating system.
Selecting a proper governor for your CPU is crucial to the performance and battery preserving of your device. For example if you are low using your device you may use a more battery friendly governor and if you want to play games you may use a (more power consuming) performance governor.
I/O Schedulers (As for Input/Output):
Input/output (I/O) scheduling is the method that operating systems use to decide which order block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'. (From Wikipedia)
To put it simple, Schedulers are the way reading and writing to the SD card is managed.
The same things that is said in the Governors part is applied here, too.
Governors and schedulers explained:
http://forum.xda-developers.com/showthread.php?t=1687578
http://forum.xda-developers.com/showthread.php?t=1369817
http://tinzdroid.blogspot.com/2012/07/android-kernel-governors-modules-io.html
http://forum.xda-developers.com/showpost.php?p=21638852&postcount=56
Click to expand...
Click to collapse
ReadAhead buffer size:
In terms of reading data from SD card, there is a cache which is used as a buffer. The size of that cache is readAhead buffer size. The size has a direct impact on your reading speed of your SD. So giving it a right amount is crucial.
Profiles:
Some kernels let you specify the parameters stated above in different profiles which are based on different usages of the device. In other words, you can have different parameters in some specific device states.
Different profiles can be Screen Off, Call, Music, Charging, etc...
One of the most useful profiles is Screen off.
When screen is off, you don't expect your device to be smooth (!!!) and snappy! Because mainly nothing important is happening when screen is off. So as a profile you can specify different settings for this state.
For example: Screen Off Max CPU can be really a very low number. Max Frequency is 1.89GHz by default, you can go down to 486MHz when the screen is off.
File System “X” R/W (As for Read/Write):
Android by default doesn’t support all the File Systems (What are file systems?! See here). So some kernels may add certain file system R/W. exFAT and NTFS are such file systems.
B.2. CPU/Governor adjustments:
MP-Decision:
Mpdecision decides when the second core shall be active and sets the idle and screen off freq while the governor decides when the freq should be increased/lowered.
Click to expand...
Click to collapse
Hotplug:
Hotplugging as we know dynamically activates second CPU core ON on load conditions and turns second core OFF on low load conditions.
Click to expand...
Click to collapse
- auto hotplug: Make available the hotplugging for the non-hotplugging governors.
Gentle Fair Sleepers:
Sleeper Fairness is a concept which treats sleeping/waiting tasks as if they were in a run queue. This implies tasks which spend most of the time waiting for an user input and such will get a fair share of CPU when they need it. Disabling Gentle Fair Sleepers could improve UI responsiveness.
IntelliPlug:
In kernel replacement of MP-Decision.
Click to expand...
Click to collapse
Eco Mode:
I quote faux123 here:
Eco Mode is an optimized dual core solution for quad-core SOC (System on Chip) like the Qualcomm S4-pro. This should allow for Maximum battery life without sacrificing performance.
Click to expand...
Click to collapse
Eco Mode mainly turns off two cores of the CPU, and in a way turns your device to a more battery friendly dual core system. optimized settings for dual core operations.
Snake Charmer:
This feature tends to cap the minimum frequency of all cores to the value you set.
- Lock Frequencies: This options prevents other apps to change frequencies.
Adjustments:
Here I will explain some useful adjustments.
- touch_boost_CPU: Specify the frequency of the cores when you touch the screen. Low value results in lags and high value lowers battery life, makes your device experience smooth.
- touch_boost_X_core: Specify if the X core comes online when the screen is touched. More online cores result in smoothness, and lower battery life.
- boost_X_core_on_button: Specify if the X core comes online when the button is pressed.
- sync_extra_cores: Specify if extra cores should be synced with single first core when they come online.
Work in progress, will add more info soon.
thanks and credits to:
ktoonsez - for his great kernel and ktweaker. Here.
faux123 - for his great kernel and app. Here.
droidphile - for his great guide. Here.
PM me if I missed someone.
B.3 Extra Features/Parameters:
TCP Congestion Control:
The choices in this section, address how the operating system kernel manages flows of information in and out of the kernel, which is at some level the "switchboard operator" of your handset. More info here.
Better to leave this options as is. Cubic or Westwood as the default of your kernel.
Init.d Support:
There are some scripts that run every time your device boot up which are located in /etc/init.d Those are called init.d scripts. One of the most popular init.d scirpts that is available for Note 10.1 is this.
FastCharge:
This feature makes it possible for the phone to ask for more current from USB host. So your device would be charged faster connecting to a USB host (Or USB Battery) Be aware that enabling FastCharge would block the USB access to your Phone Storage.
Dynamic FSync:
fsync is a system call in Unix/Linux. "man fsync" says:
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device (or other permanent storage device) so that all changed information can be retrieved even after the system crashed or was rebooted. This includes writing through or flushing a disk cache if present. The call blocks until the device reports that the transfer has completed. It also flushes metadata information associated with the file (see stat(2)).
Click to expand...
Click to collapse
So it's something embedded in programs after a related set of write operations to ensure that all data has been written to the storage device. The bolded part is what makes it interesting for some to disable it - "The call blocks" means the calling program waits until it's finished, and this may create lag. The downside is that if the system crashes, the data on the storage devices may be inconsistent, and you may lose data. (From here).
Dynamic FSync, makes it possible for fsync operation to be asynchronous when the screen is on, and synchronous when the screen is off. And what does asynchronous mean? Means OS issues fsync call, but not necessarily immediately at commit time for each transaction. It delays the FSync call for a certain amount of time. In case of a crash, the transactions not yet sync'ed in the last delay time before the crash may be rolled back, but the state of the data is always consistent. (From here).
MultiCore PowerSaving:
This feature try to group up tasks in the least cores possible. To put it simple, it will focus in using least cores for your tasks to be done. This means less cores are active and so more battery life. Also this will decrease performance.
•Note: To enable use TricksterMod app. 0 for disable and 2 for the most aggressive.
Special Modules:
Special modules can be available in kernel files that can be mounted and used in system. For example CIFS:
In order to manage your cifs/nfs network shares on your Android device you need the proper and working modules. And so you can mount/unmount your network accessible file resources and access your data.
zRAM:
In order to explain zRAM more precisely first we need other terms defined clearly:
Swap can be compared with the swap file on Windows. If the memory (RAM) is almost complete, the data which is not used actively (ex. background applications) will be stored on hard drive so as to re-evacuate RAM free. If required, this data is then read back from there easily. This will preserve performance with no lose at multitasking (the main reason we use swap).
In zRAM unnecessary storage resources are compressed and then moved to a reserved area in the fixed RAM (zRAM). So in other words, zRAM is a kind of swap in memory. As the data is compressed not much memory needs to be preserved as zRAM. However, the CPU has to work more because compressed data has to be unpacked again when it is needed). The advantage clearly lies in the speed. Since the swap partition in RAM is much faster than this is a swap partition on a hard drive.
In itself a great thing. But Android does not have a swap partition, and therefore brings Android ZRAM under no performance gain as would be the case with a normal PC. (From here with some editing.)
Click to expand...
Click to collapse
What we need to know essentially lies here:
zRAM off = Low use data will be stored the way they are in the memory. This will cause no extra load on CPU, yet need more RAM.
zRAM on = Low use data will be stored compressed in the memory. This will cause extra load in CPU as to store or restore data, yet preserve more Free RAM.
The main use of zRAM is when you are using a heavy ROM that eats up all your RAM. This will allow multitasking to be more functional. On light ROMs, or for those who don't multitask much, this is not necessary.
Note: Also there are methods to use a part of internal memory as Swap space. This is not as fast as zRAM. But no RAM will be used at all and CPU load is less. Though I am not sure that this has been brought to our device yet. Will add more data soon on this part.
Work in progress, will add more info soon.
Reserved for OP
Very useful thread
Very informative.. Im learning mew things in xda everyday.. Thanks..
ps000000 said:
Very useful thread
Click to expand...
Click to collapse
dannyella said:
Very informative.. Im learning mew things in xda everyday.. Thanks..
Click to expand...
Click to collapse
Glad to be of help.
Very informative. Might want to consider adding zram definition?
lzk123 said:
Very informative. Might want to consider adding zram definition?
Click to expand...
Click to collapse
Of course, zRAM, throttle and some other stuff are in my list.
Awesome guide!
LuigiBull23 said:
Awesome guide!
Click to expand...
Click to collapse
Glad you approved
Also I'd be happy if you could help me complete it with your suggestions.
zRAM added to the guide. (see post 2).
lzk123 said:
Very informative. Might want to consider adding zram definition?
Click to expand...
Click to collapse
Great guide, very useful. Will point this thread to some people in the future. Thanks
xdeal said:
Great guide, very useful. Will point this thread to some people in the future. Thanks
Click to expand...
Click to collapse
Thanks. Glad to be of help.
Recently added to the GUIDE:
- Must know facts. (This really was making mass confusion for some people!).
Stay tuned, more to come!
Quick questions:
Are the governors included on the kernell? if not, where do I get them? I don't know mucho of this things but i'm assuming that each kernell should have thier own governor ot at least the parameters that each governor should follow.
My other question is if the governors change from kernel to kernel or they are standard? The ''ondemand'' governor on a stock kernell it's the same/ behave the same ina cutom kernell? I don't see the point of a custom kernell if the govenor is going to behave the same regardless of the kernell so the kernell should provide the governor with the parameters or the governor itself.
Anyone knows this?
dclarkg said:
Quick questions:
Are the governors included on the kernell? if not, where do I get them? I don't know mucho of this things but i'm assuming that each kernell should have thier own governor ot at least the parameters that each governor should follow.
My other question is if the governors change from kernel to kernel or they are standard? The ''ondemand'' governor on a stock kernell it's the same/ behave the same ina cutom kernell? I don't see the point of a custom kernell if the govenor is going to behave the same regardless of the kernell so the kernell should provide the governor with the parameters or the governor itself.
Anyone knows this?
Click to expand...
Click to collapse
Yes governors are in the kernel, you don't get them any where. You can set governor with the apps that usually come with the kernels.
Custom kernels usually have more governors that stock kernel, letting you choose the one that suits you the best. Usually the governor that is tweakable or have nice settings is there to choose (like Ktoonzactiveq in Ktoonsez's kernel).
Also sometimes the same governors from stock kernel are tweaked to work better in custom kernel.
The main thing is that the well known governors are mostly standard and same in different kernels. But some are tweaked and some are specifically tweaked for the custom kernel (ex. Ktoonzactiveq or Abyssplug).
Sent from my GT-I9505 using Tapatalk
csec said:
Yes governors are in the kernel, you don't get them any where. You can set governor with the apps that usually come with the kernels.
Custom kernels usually have more governors that stock kernel, letting you choose the one that suits you the best. Usually the governor that is tweakable or have nice settings is there to choose (like Ktoonzactiveq in Ktoonsez's kernel).
Also sometimes the same governors from stock kernel are tweaked to work better in custom kernel.
The main thing is that the well known governors are mostly standard and same in different kernels. But some are tweaked and some are specifically tweaked for the custom kernel (ex. Ktoonzactiveq or Abyssplug).
Sent from my GT-I9505 using Tapatalk
Click to expand...
Click to collapse
Ktoonzactiveq?? Hmm.. Never heard of it but sounds much better than Ktoonservativeq lol.
Yes I know what you meant but you almost had me there a sec for a completely different governor that the boss has not shared with me.
csec said:
Yes governors are in the kernel, you don't get them any where. You can set governor with the apps that usually come with the kernels.
Custom kernels usually have more governors that stock kernel, letting you choose the one that suits you the best. Usually the governor that is tweakable or have nice settings is there to choose (like Ktoonzactiveq in Ktoonsez's kernel).
Also sometimes the same governors from stock kernel are tweaked to work better in custom kernel.
The main thing is that the well known governors are mostly standard and same in different kernels. But some are tweaked and some are specifically tweaked for the custom kernel (ex. Ktoonzactiveq or Abyssplug).
Sent from my GT-I9505 using Tapatalk
Click to expand...
Click to collapse
That's what I thought! I appreciate the help!
One more question: what about the Schedulers? Do they come with the kernel as well? can thos be modified? For waht I've been reading in the forum the Schedulers are more a data allocation sort of thing, those can be modifed depending on the kernel values? do they have anything to do with governors or can they be set regardless of the kernel/governors parameters?
I don't know mucho of this things but since I got the S4 I just felt in love with android and I'm trying to learn a bit. =]
dclarkg said:
That's what I thought! I appreciate the help!
One more question: what about the Schedulers? Do they come with the kernel as well? can thos be modified? For waht I've been reading in the forum the Schedulers are more a data allocation sort of thing, those can be modifed depending on the kernel values? do they have anything to do with governors or can they be set regardless of the kernel/governors parameters?
I don't know mucho of this things but since I got the S4 I just felt in love with android and I'm trying to learn a bit. =]
Click to expand...
Click to collapse
The same thing that I said about the governors applies to schedulers, too. They are in kernel, can be modified, tweaked, and are standard ones are the same in different kernels.
LuigiBull23 said:
Ktoonzactiveq?? Hmm.. Never heard of it but sounds much better than Ktoonservativeq lol.
Yes I know what you meant but you almost had me there a sec for a completely different governor that the boss has not shared with me.
Click to expand...
Click to collapse
Hahahaha, sorry. I mistyped this the first day, and SwiftKey got the best of me!
But thinking logicly, it's based on conservative, and so I think that's why there's the "servative" part! That's it, burnt into my mind. :good:

[GUIDE] Advanced Interactive Governor Script - Battery Life

Remember to have the screen turned ON while you apply the script!!!
Hi guys!
Today i want to share with you a script i specifically tailored for our 4C, to decrease high battery drain just by tuning parameters of the interactive governor.
As many of you know, on the Nexus 5X forum there is a huge post about different profiles created to achieve the same purpose, and almost all of them works with our device (personally tested)
[GUIDE] Advanced Interactive Governor Tweaks; Buttery smooth and insane battery life!
I raccomed to read it!
One of them in particular was extremely good battery wise but i felt some lagginess here and there (talkin about HawkTail 1.2)
So i decided to make a script myself and share it with you, the idea behind it is to force the CPU to scale better with loads and making the Big cores in use more frequently by tuning some of the kernel parameters.
Plus we will have the GPU idling @ 180MhZ instead of 300MhZ (like in the Nexus 5x) and a switch to noop scheduler.
Performance wise and taking in example the latest stable ROM from Xiaomi.eu (8.0.5) we will have a decrease of about 5k point in Antutu (I'll attach two screenshots, the 71K was the result without tweaking, plus just by switching back to CFQ scheduler you'll get 2K points back but NOOP is more battery friendly)
So here you go, this is my script TAO.
Using it is pretty simple and you have a couple of options: [ROOT IS NEEDED]
Since it's a script, if your rom have INIT.D folder support, you can just move the file under /etc/Init.d and reboot the device. The script will make a log file under /sdcard/TAO.log that you can check if anything went wrong.
The second option, if your rom doesn't have Init.d folder support, just use Kernel Auditor and a text editor.
Open the downloaded file in a text editor, select all and copy the text.
Then open Kernel Auditor, and in the menu look for init.d, enable the "Emulate Init.d" and then click the "+" symbol. It will ask to add a name (let's set it to TAO for coherence), then OK. It will open a new window where we have to paste all the text previously copied, save it by pressing the icon on the top right. Now we can just reboot the device or click the newly created item and select execute.
Third option is to run it manually from terminal.
Plus, i'll add my Thermal-engine-8992.conf that you guys can use to change the thermal throttling values. Download it and replace it in /system/etc/ , set it with permission 644 and reboot.
This modded thermal will move up the limits, long story short, your device will continue to perform even if it gets hot.
Enjoy! & report back for feedback
Remember to have the screen turned ON while you apply the script!!!
P.S.
Files are zipped, extract them!!!
UPDATE
Minor update - use_sched_load set to 0 for both cores
Correction made for the log file
UPDATE 0.7
Since @solis_f is having some problem with the big cores, and this could be a common problem to many others too i've decided to add something in the script that will force the big core online so you should not have any more problem executing the script. Let me know
UPDATE 0.8 - Experimental
Updated Target_loads for both Little and Big cores.
Little core min freq. to 384 MhZ.
Input boost @ 787 MhZ instead of 600 MhZ.
hispeed_load disabled for both cores.
Updated values for UpMigrate.
Enabled core_ctl for big cluster:
With this update, you'll have your big cores Offline most of the time, but they will comes online when needed.
Yours perfd (/data/system/perfd/default_values) with this version have to look like this:
Code:
ihf;787200
iahd;38000
ighl;200
itl;39 460800:5 600000:62 672000:10 787200:81 864000:90 960000:99
gpu_default_pwrlvl;5
sst;33
smil;20
sminr;3
sitl;65
sum;66
sdm;54
cbmf;1525
cbhdr;90
cbhip;16
ihf0;787200
iahd0;38000
itl0;39 460800:5 600000:62 672000:10 787200:81 864000:90 960000:99
imst0;0
ighl0;200
imf0;0
itr0;30000
its0;-1
iiib0;1
intb0;0
ibd0;0
ihf4;1248000
iahd4;38000
itl4;53 768000:64 864000:72 960000:79 1248000:99
imst4;0
ighl4;200
imf4;20000
itr4;30000
its4;-1
iiib4;1
intb4;0
ibd4;0
P.P.S.
Over two hundred downloads, but not even half of you gives me feedback...
UPDATE 0.9
Sorry for the delay, many things to do IRL.
This version is what i'm using now, should be smoother then v0.8, hope you like it.
nice one, will try this
Did you try to run Antutu several times in a row, so we can see is the result of 66k almost constant. Since as we all know, results can degrade towards 44k because of overheating..
predragiPredrag said:
Did you try to run Antutu several times in a row, so we can see is the result of 66k almost constant. Since as we all know, results can degrade towards 44k because of overheating..
Click to expand...
Click to collapse
I did not, but degradation of score is dictated by the thermal config. That's why i modded that too, and pushed the standard limits...
Let me show you with an example:
Code:
[SS-SKIN-XO-THERM-PERF]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster1
set_point 43000
set_point_clr 37000
time_constant 0
device_max_limit 800000
This is taken from the original file, and it covers the big cluster... when it reach 43° celsius, the thermal throttling will limit the max frequency of the cluster to 800MhZ
Code:
[SS-SKIN-XO-THERM-PERF]
algo_type monitor
sampling 5000
sensor quiet_therm
thresholds 46000 48000 50000
thresholds_clr 44000 46000 48000
actions cluster1 cluster1 cluster1
action_info 1632000 1248000 960000
This is the same part but modified by me, i've added more step... as you can see thermal throttling for big cluster will work once the big cluster reach 46° and it will cut the max frequency to 1632MhZ, then at 48° 1248MhZ and at 50° at 960MhZ
The hot-plug, that put the cores offline, on the original file for the big cluster is marked at 42° for core 4 and 45° for core 5.
On my config file both cores will be hot-plugged once they reach 52°.
TL;DR if you use my thermal-engine conf file, you will get more consistent score on several runs.
Nice to hear that will try this when I have more time to play with my phone and report back.
Great work and thanks for sharing this
GoldGanja said:
Hi guys!
Today i want to share with you a script i specifically tailored for our 4C, to decrease high battery drain just by tuning parameters of the interactive governor.
As many of you know, on the Nexus 5X forum there is a huge post about different profiles created to achieve the same purpose, and almost all of them works with our device (personally tested)
[GUIDE] Advanced Interactive Governor Tweaks; Buttery smooth and insane battery life!
I raccomed to read it!
(...)
Enjoy! & report back for feedback
P.S.
Files are zipped, extract them!!!
Click to expand...
Click to collapse
Hi,
I can not apply root because of he problem between pokemon go and root, (I am playing pokemon go with my 8 years old son a father-son activity and he loves it)
I am using a dev miui rom and i did tune my thermal-engine and remove the input boost using the TWRP file manager to apply the files.
This rom does not have init.d folder could i call your script from init.qcom.post_boot.sh? if so, do you know how to?
best regards,
John
You should look for some sort of systemless root, and magisk to masquerade root and be able to play Po Go on a rooted phone. I don't think you can chain load the script within post_boot.sh and by the way to modify it you should have super user permissions. Anyway keep up the father and son activity, is way more important!
Sent from my Mi-4c using Tapatalk
GoldGanja said:
You should look for some sort of systemless root, and magisk to masquerade root and be able to play Po Go on a rooted phone. I don't think you can chain load the script within post_boot.sh and by the way to modify it you should have super user permissions. Anyway keep up the father and son activity, is way more important!
Sent from my Mi-4c using Tapatalk
Click to expand...
Click to collapse
thanx, my son does not talk about anything else...
About the chain load the TS rom does that with ts_power.sh file.
Code:
# ts power scripts permissions
chown -h system /system/etc/ts_power.sh
chown -h system /data/ts_power.sh
Code:
# Call ts_power.sh, if found
if [ -f /data/ts_power.sh ]; then
logi "Call /data/ts_power.sh set_profile $profile"
sh /data/ts_power.sh set_profile $profile
elif [ -f /system/etc/ts_power.sh ]; then
logi "Call /system/etc/ts_power.sh set_profile $profile"
sh /system/etc/ts_power.sh set_profile $profile
fi
I will try to see if it works using your script.
About systemless root, i don't want to be in the middle of the cat and mouse thing. Today google update and tomorrow there is another hide root.
I did replace the thermal engine using the twrp file manager. It works.
Nice share bro. Thermal engine + init.d script is good battery backup for mi4c.
Hello,
could you make patched files available and the place where they should be placed ?
I don't want to root my phone but I want to give your optimisation a try. It is possible with TWRP to replace the files in the file manager. More work but it can be done without root. Therefore however I will need the allready patched files....
A little more "complicated" even... might it not be possible using TWRP to flash these files ? I have no idea how that would work exactly but I can imagine it would be possible to create a flashable zip that replaces these files... It currently goes beyound my abbilities though unfortunatly but maybe someone can help with that.
Thanks for your share @GoldGanja , looks interesting.
But i think the thermal-engine.conf would cause more overheating as it is already (for me reduce overheating is the most important), but i like the way to reduce the clockspeed step by step. Maybe i will try it with lower values.
The modified governer looks great. I think this will help with heating too. But on this there aren´t laggings ?
Thank you! i hope this fix my battery drain and the heat, i'll report if i see changes
@nachtwacht
Even if i make a zip file to use with twrp, this will only be useful for the thermal-engine conf file...because the other one is a script i've created and so there is no other file to replace. As stated ROOT is needed, i'm sorry.
@Danny94
thermal-engine.conf per se will not increase or decrease over-heating, of course one could make a conf file to be more restrictive on the temps and brutally decrease the performance but i don't see the need of this because i don't have any over-heat problem within my device with the script i've made. A major cause of over-heating is the input-boost frequency that by default is set to 1248MhZ, while if you run my script it will be 600 MhZ. Farther i have no lags at all...give it a try and report back. More feedback I have about it, the better I can adjust some parameters.
@HYBRIDEMON
Thanks!
@GoldGanja
Yeah i will try tomorrow if i get some free time.
Wich Rom do you use ? I have at almost all roms overheating problems. After 10 min+ of 3d gaming i have ~55°c + (On my old phone Thl 5k i could play the same game hours, don´t get over 45 °c and no lagging or something - and yeah its not the best phone).
With your thermal config the device throttles later. So it will heat higher, until it shut down big core etc. As hotter it becomes as more difficult its to cooldown. Sure if you won´t reach 52°c would be perfect one. But maybe i will replace the values with lower, else it looks very good.
I can't find tao.log at sdcard.
Script is applied or not?
I copied to etc/init.d and set 755 permissions.
Edit:
Finally I applied manually and I have 2 errors with big cluster settings.
Enviado desde mi Mi-4c mediante Tapatalk
@dany94
I'm using last stable from xiaomi.eu (8.0.5). Anyway, if you get to know how the gears of the thermal engine works, do what is best for your usage. Feel free to change the numbers on my file if needed
siba01 said:
I can't find tao.log at sdcard.
Script is applied or not?
I copied to etc/init.d and set 755 permissions.
Edit:
Finally I applied manually and I have 2 errors with big cluster settings.
Enviado desde mi Mi-4c mediante Tapatalk
Click to expand...
Click to collapse
I think you are using a CM TS rom, right? well, for that you have to do two things.
First, set the battery mode to QUICK, because on BALANCE there is the hotplug of the BIG cores. Then re-run my script.
If that's not the case, maybe the device was just a bit hot, and the hotplug kicked in by the thermal-engine...let it cool down first or use my thermal-engine conf.
Second, rename my file to userinit.sh and place it under /data/local if you want the settings to be applied at each boot.
GoldGanja said:
Even if i make a zip file to use with twrp, this will only be useful for the thermal-engine conf file...because the other one is a script i've created and so there is no other file to replace. As stated ROOT is needed, i'm sorry.
Click to expand...
Click to collapse
Maybe I was not clear or, more likely I do not completely understand which is a fact for sure
Let me clear up the first part, then hopefully in the end I will also better understand
Your script chances several files if I understand correctly ? scaling_min_freq for example is the first one you change in the script ?
Could we not update all the files that you change using TWRP ?
My guess is, (that's just me trying to understand better.....) that I think that using TWRP it is possible to change these files without root, but in reality it is not because the phone is not rooted ? Maybe because only the complete system can be changed and not single files ? (without root)
I do know that in the end, for me it is possible to root my phone, apply the settings, and then unroot it again.... which hopefully have my phone working like it never was rooted... it's just a risk I would like to avoid if in any way possible, therefore I am investigating and trying to get it all clear for me, sorry for that
GoldGanja said:
@dany94
I'm using last stable from xiaomi.eu (8.0.5). Anyway, if you get to know how the gears of the thermal engine works, do what is best for your usage. Feel free to change the numbers on my file if needed
I think you are using a CM TS rom, right? well, for that you have to do two things.
First, set the battery mode to QUICK, because on BALANCE there is the hotplug of the BIG cores. Then re-run my script.
If that's not the case, maybe the device was just a bit hot, and the hotplug kicked in by the thermal-engine...let it cool down first or use my thermal-engine conf.
Second, rename my file to userinit.sh and place it under /data/local if you want the settings to be applied at each boot.
Click to expand...
Click to collapse
I'm using Resurrecction Remix.
Thanks for your answer.
Enviado desde mi Mi-4c mediante Tapatalk
I was pretty sure you will do such a good job for Mi4c! Well done!
Edit: btw big cluster values are not getting applied
solis_f said:
I was pretty sure you will do such a good job for Mi4c! Well done!
Edit: btw big cluster values are not getting applied
Click to expand...
Click to collapse
What ROM are you using?
Sent from my Mi-4c using Tapatalk

Better perfomance on b378 nougat p9 with less throttling cpu for rooted device

Hello i just rooted my p9 eva-L09c432b378 and i found a way to make a less agressive throttling cpu due to higher temperature.
First you need heve a rooted device,and a root file explorer.
Open root explorer and get r/w permission to edit a file:
The path of the file to edit is:/sys/devices/virtual/thermal/thermal_zone0
Go to this folder and find file name:
trip_point_0_temp
Normally the value of this file is 55000 mean that after 55°C cpu will throttle hard to lower frequency and specially games will start lag!
I put the value at 65000 mean no throttle under 65°C
With that i could chain antutu bench more times without lower score
Warning this modification must be done at each time you restart your phone coz the value will be reseted at 55000!
So if people is able to make a script with auto change this value with an init.d script on boot you can tell me coz i don't know how to do that!
FEEDBACK ARE WELCOME
moomoon03 said:
...
So if people is able to make a script with auto change this value with an init.d script on boot you can tell me coz i don't know how to do that!
Click to expand...
Click to collapse
The attached file placed in your init.d folder with the correct permissions will do the job :good:
Once downloaded, remove .txt from the file name, it doesn't need that extension but i couldn't upload it without it
Peace
Hmm... nice finding. Does it give any major boost in eg VR applications that are most demanding right now? I mean real visible boost in performance, not only benchmarks numbers. Right now I didnt root my P9 because Im happy with it as it is, but if it would give some kick in terms of GPU/CPU speed, I might actually root it again...
I'm not sure you would see any major boost in most applications,and i would also be wary of consistently raising the temp threshhold by nearly 20% for extended periods of time...A burnt out CPU will almost certainly give no real boost in performance...
I had some cpu tweaks on my older xperias that also mess with throttling, and on some VR applications difference was not big but visible, from 5 to 9fps, sound really small, but in VR where you actually need stable 60fps to get proper experience(and less motion sickness, because low fps is actually main reason for that) every fps is important. So if in VR sesion that take from 10 to 30min if it would give me additional 5-10fps I would consider it as a good result.
True that more heat on such small component is not good, but I think 65C is not that "big", I actually once time checked temp of my xperia z3 without a back cover using Infrared thermometer from work and in heavy game running, cpu area had almost 72C -_- with cover it dropped to 63C, so metal back cover of P9 should keep it cool for that 30min of fun with VR
chris5s said:
The attached file placed in your init.d folder with the correct permissions will do the job :good:
Once downloaded, remove .txt from the file name, it doesn't need that extension but i couldn't upload it without it
Peace
Click to expand...
Click to collapse
Hello thx for the . Txt u did i'll try it!
Other thing about temp, it's the temp of the cpu so 65 is not really high coz i know lot of cpu could reach sometime 80 to 90 degrees and if you look on the folder, you have another file with second security given to 80°C Cpu
Just a warning, its perfectly fine to set the throttling to start after 65 degrees but I wouldnt advise you go any higher for those people thinking "I want to squeeze more out so lets change it to 75 degrees".
Just remember that there is some downsides to running hotter CPU/Phone, higher battery drain and reduced lifespan of the phone/components are some of them. Just keep this in mind, there is a reason why Huawei set it to 55 degrees however like many of you, I like to get the most out of my phone and things like shortening the lifespan of the components or a slight battery drain does not bother me.

How To Guide [TUTORIAL] How unlock Full Unlimited Power of Poco X3 Pro

Hi,
This is my first post here
Now you can Play Genshin Impact with Highest Graphical settings in 52 Fps AVG.
I tested many ways to get rig of thermal throttling of Poco X3 Pro , increase gaming performance , Battery life and find ways to optimize kernel.
All link and files will be at the bottom of post.
Of course you have to be ROOTED for most of the thing and install few thing. I recommend using a cooler like BlackShark Funcooler BR11 or B20 but isn't necessary.
You can use Miui but good is to install rom like Arrow OS or other.
Let start from beginning.....
1.Get to developer options and and select Graphics Drivers than find your Game and select "System graphics driver" with should give you 3-5% increase in fps and increase thermal headroom without need of root.
2.Install SmartPack-Kernel Manager and set settings below
2.5 Alternative is Install FDE.AI from Github. This app is Great in term of performance for gaming.
CPU
CPU Governor: Performance/Performance/Performance
CPU Hotplug
Minimum CPUs big: 1
Busy Down Threshold: 0
Busy Up Threshold: 100
Task Threshold: 1 (Default)
GPU
GPU Max/Min Frequency: 675/692mhz
GPU Governor: performance
GPU Power Level: for Gaming 5 or 0 ( CPU power 0 gives 15 % more performance in Cpu heave tasks)
I/O Scheduler ( Repeat this step in all boxes )
Sheduler: cfq
Read-Ahead: 8192kB
Rotation Storage: Enabled
I/O Stats: Disabled
Add Random: Enabled
RQ Affinity: 2
No-Merges: 2
NR Requests: 128
Entropy
Read: 1024
Write: 2048
PS. Use the "Gaming" or "No Set" or "PUGB" thermal profile if possible or disable Thermal Engine with Thermal Unlocker 855.
3. Install and use Konabess app to undervolt and overclock Adreno 640 Gpu to 692 Mhz
1. First of all, we click BACKUP OLD IMAGE and back up our stock boot image. The backup boot image you receive when you click will come to your phone's main memory. If you flash this boot.img image as an image from recovery when you have problems, it will return to its original state.
2.Then we click on THE GPU FREQ TABLE and select what your processor is from the list.
3. We click on the New section and click on the new frequency.
4. Here we click Frequency and change the first 3 values. So if the phone's stock max GPU speed frequency is 675 mhz, we make the first three digits 692 without touching the zeros and click SAVE GPU FREQ TABLE.
Now we're throwing a voltage level at this new frequency.
5. We click on THE GPU VOLT TABLE, click New and click on the new frequency.
6. In the same way that we enter the new frequency value(692)from the Frequency section, where we set the first 3 values. Then we click Voltage Level and select SVS_L2 from the list.
7. Finally, we click SAVE GPU VOLT TABLE and click REPACK AND FLASH NEW IMAGE on the top left.
Now in VOLTAGE Table undervolt all freq
257 MHz​345 MHz​427 MHz​499 MHz​585 MHz​692 MHz​MIN_SVSMIN_SVSLOW_SVSLOW_SVS_L1SVS_L1SVS_L2
Undervolting will decrease heat and battery consumption in all of use from YouTube to Gaming.
Now there is fun part with is Magisk Modules
Thermal Unlocker 855- ( Disable the Software Throttling and increase the charging speed. Works also on Snapdragon 860-865/870 devices! )
-ACC ( find in Magisk app in list of Modules )- Advanced Charging Controller ACC is an Android software mainly intended for extending battery service life.
Now let me show you gaming benchmarks of Genshin Impact with Highest Graphical settings
{
"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"
}
The First score is 46.4 Fps is stock setting only undervolting and OC to 692 Mhz
Third is GPU set to Performance and 692 Mhz lock and next with all CPU and GPU Perfomance and the last benchmark is with Thermal Unlocker 855.
The best way for gaming is set all CPU and GPU Governov to Perfomance and lock GPU to max Freq Max and Min 692MHz and use FDE.AI.
Link:
Release v0.14 · libxzr/KonaBess
Support sd780G
github.com
Release 12.4.1m · feravolt/FDE.AI-docs
Update kernel_block.md
github.com
SmartPack-Kernel Manager - Apps on Google Play
The ultimate tool to manage your kernel
play.google.com
astronomy2021 said:
Minimum CPUs big: 3
Click to expand...
Click to collapse
can only set to 1
and set 690mhz only on konabess
then get this
co2thunderboy said:
can only set to 1
View attachment 5346125
and set 690mhz only on konabess
then get this
View attachment 5346127
Click to expand...
Click to collapse
Yeh Thanks my bad Snapdragon 860 only has Minimum CPUs big: 1
Oh Thank I try 690 MHz maybe this 2Mhz are a little to much for lock chip.
astronomy2021 said:
Yeh Thanks my bad Snapdragon 860 only has Minimum CPUs big: 1
Oh Thank I try 690 MHz maybe this 2Mhz are a little to much for lock chip.
Click to expand...
Click to collapse
btw im just telling, not suggesting
bcz someone said 690mhz is stable, on this thread
Poco X3 Pro Kernel
Hi, Gpu overclock is my reason to root poco. I'm new to this I want to ask if KonaBess works with Poco X3 Pro ? I know that works with 855/855+ and anybody tested this ? Is there Kernel for Poco X3 Pro that increase Gpu Freq to 700-800 Mhz for...
forum.xda-developers.com
one question, after step 7 why there is only 6 freq ?
bcz default is 6, and we add 1 more on step 5
it should be 7 freq isn't it ?
and should we flash the image again after undervolting or not ?
Yes you Flash image \ like this SAVE GPU VOLT TABLE and click REPACK AND FLASH NEW IMAGE on the top left after every change in freq or voltage table.
No because you hold on 675 Mhz and delete it or change it to 690-692MHz.
I this case we don't need 675 Mhz if we have 690 Mhz than is is only 6 Freq like from stock.
astronomy2021 said:
Yes you Flash image \ like this SAVE GPU VOLT TABLE and click REPACK AND FLASH NEW IMAGE on the top left after every change in freq or voltage table.
No because you hold on 675 Mhz and delete it or change it to 690-692MHz.
I this case we don't need 675 Mhz if we have 690 Mhz than is is only 6 Freq like from stock.
Click to expand...
Click to collapse
ouwh ok then, bcz the instruction is to create new on step 5, i thought we dont have to delete the 675mhz
for how long youve been doing this? is this completely safe? thank youuu
Yes is Complete safe. You don't need to worry anything. Just if you don't have cooler and if you want to be safe don't install Thermal Unlocker 855.
Everything else you can be safe you phone will not burn or anything like that. Hole point is to decrease temperature with with undervolting we do by 5-6 C .
astronomy2021 said:
Yes is Complete safe. You don't need to worry anything. Just if you don't have cooler and if you want to be safe don't install Thermal Unlocker 855.
Everything else you can be safe you phone will not burn or anything like that. Hole point is to decrease temperature with with undervolting we do by 5-6 C .
Click to expand...
Click to collapse
i will definitely buy a cooler hahah, i want to play genshin and appreciate its beauty
You can play it with 30fps and even in 900p or 1080p with 30fps avg with you can upscale it with GLTools app.
If you want 60fps buy cooler haha even I have plans to buy it
Ps. I change it with GPU Power Level to 0 with give you exactly 15 % boost in OpenGL
i tried undervolting, after rebooting my phone got stuck at logo i dont know why,
I fixed my phone just flashed stock boot.img
You do it correctly ? Try one at the time 692 svs_l2 , maybe problem is with lower freq with don't have enough power.
Undervolt 692 and 585 should work on any poco X3 Pro identical
astronomy2021 said:
You do it correctly ? Try one at the time 692 svs_l2 , maybe problem is with lower freq with don't have enough power.
Undervolt 692 and 585 should work on any poco X3 Pro identical
Click to expand...
Click to collapse
should i undervolt 692 and 585 only?
because i tried to undervolt all freq and it caused boot stuck
Try identify with is too low low to boot, try one at the time.I think is lower freq like 427 Mhz with cause me trouble because have to low power to boot.
Yes try this two 692MHz,585 MHz this are safe because this freq are only use in 3d graphics render and 257 MHz to MIN_SVS. If every think is ok in the next boot try 345 MHz to MIN_SVS and next try next freq.
You will gain +2hours of battery time on normal use
Can someone teach me how to do it or have a video clip, I can't do it.
Is it normal the SELinux to be disabled after all procedures are done?
Just a heads up. Installing Thermal Unlocker 855 trips Fortnite security and it will kick you from the game when you try to play.
Thank you for this guide !
Will apply it the next days!
I've completely changed all my GPU frequencies, and increase the amount of frequency step to 9. I've started at 272mhz to 688mhz. I've tried 691 and 692 but i rather the number 688 lol.
All frequencies in MHz are, 272,352,400,448,496,544,592,640,688..
(Don't try doing this of you don't understand how to.)
A long with that I've also created my own thermal-normal.conf for MIUI, and so far it has been doing its job. A lot of kernels I've notice ignore the many of the thermal file throttle parameters, I don't know why it's like that. So I'm using Kangaroo 1.1 kernel because it reads from the thermal file properly and so far the best kernel I've noticed for MIUI.
This is the file, also I'm not responsible for anything that might or might not happen to your devices. Remember although we may use the same device and the same SOC, every individual chip has its own flaws in hardware limits across devices. Simply, what may work for me might not work for you. Use at you own risk.
Kcane95 said:
I've completely changed all my GPU frequencies, and increase the amount of frequency step to 9. I've started at 272mhz to 688mhz. I've tried 691 and 692 but i rather the number 688 lol.
All frequencies in MHz are, 272,352,400,448,496,544,592,640,688..
(Don't try doing this of you don't understand how to.)
A long with that I've also created my own thermal-normal.conf for MIUI, and so far it has been doing its job. A lot of kernels I've notice ignore the many of the thermal file throttle parameters, I don't know why it's like that. So I'm using Kangaroo 1.1 kernel because it reads from the thermal file properly and so far the best kernel I've noticed for MIUI.
This is the file, also I'm not responsible for anything that might or might not happen to your devices. Remember although we may use the same device and the same SOC, every individual chip has its own flaws in hardware limits across devices. Simply, what may work for me might not work for you. Use at you own risk.
Click to expand...
Click to collapse
Is there any way to include this file inside kernel's zip and flash it or the only way is to root phone and then insert file?

Categories

Resources