[Q] How to code using init.d? - Samsung Galaxy W I8150

Hi all,
Currently, I'm using this init.d built by NSTools with the name "99nstools" and I just built on it. Below is the code. What I ultimately want it to do is just set my governor to smartassv2, scheduler to sio, min/max frequencies to those values stated, and of course help me set the values for the UV tables. It doesn't seem like its working because i manually set 1 of the voltage a little higher, reboot my phone, and the value stayed at the higher value. Why am I doing this is because if I reboot my phone after a long time of usage, say 2 days, then all the settings will go back to the initially set values. I'm not sure who's reseting my defaults but I'm hoping an init.d can help me set it back to my preferred settings. Thanks all =)
Init.d Coding:
#!/system/bin/sh
CUR=`cat /proc/version`
SAV="Linux version 3.0.73ICSHurtSkyV2.6-g257eef5 ([email protected]) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG hg+default-cbaf37cc20b7 - Linaro GCC 2013.03 - Cortex-A8) ) #3 PREEMPT Sun Apr 14 17:01:44 PDT 2013"
if [ ! "$CUR" == "$SAV" ] ; then
exit
fi
echo 80 > /sys/class/misc/batterylifeextender/charging_limit
echo smartassV2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo sio > /sys/block/mtdblock4/queue/scheduler
echo sio > /sys/block/mmcblk0/queue/scheduler
echo 100 > /sys/class/misc/liveoc/oc_value
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1024000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "122880 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "245760 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "368640 750" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "768000 850" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "806400 900" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1024000 1000" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1200000 1050" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo "1401600 1100" > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Click to expand...
Click to collapse

Related

Ziggy's Tweak

Does anyone know how to delete ziggy's tweak? I have root explorer installed but dont know where to look to find those files.
Thanks
What do the tweaks even do??
Sent from my Htc Evo 4g
Go on system folder then etc folder then init.d folder then 90 screen scale and 90 sys delete
I actually hacked the tweak to completely sleep and run 998mhz when screen is tapped here's the tweak script its excellent!!!
#!/system/bin/bash
Max & Min to 12800
AWAKE_GOVERNOR="interactive"
AWAKE_GOVERNOR_FREQENCY_MAX="998000"
AWAKE_GOVERNOR_FREQENCY_MIN="245000"
SLEEP_GOVERNOR="ondemand"
SLEEP_GOVERNOR_FREQENCY_MAX="128000"
SLEEP_GOVERNOR_FREQENCY_MIN="128000"
(while [ 1 ]
do
AWAKE=`cat /sys/power/wait_for_fb_wake`
if [ $AWAKE = "awake" ]; then
echo $AWAKE_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $AWAKE_GOVERNOR_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $AWAKE_GOVERNOR_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
AWAKE=
fi
SLEEPING=`cat /sys/power/wait_for_fb_sleep`
if [ $SLEEPING = "sleeping" ]; then
echo $SLEEP_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $SLEEP_GOVERNOR_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $SLEEP_GOVERNOR_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
SLEEPING=
fi
done &)
THANKS
thanks a lot cornell. I think im gonna try your script.
No doubt I barely get battery drain on it because I only clocks up when I'm making screen touches

[Q] Modifying Gideonx's OC/UV script

Since my values for the CPU would never stick with System Tuner, I decided to learn how to modify scripts to get the desired effect. I decided that I wanted to modify Gideonx's OC/UV script.
I want to use the GideonX_OC_UV_VM_Tweaked_for_Battery.zip - CPUs @ 384/918Mhz | -75mV | OnDemand | VM tweaked | Not all phones can take -75mV.
Except rather than having a 918Mhz max, I want to use 1.35Ghz max. I heard the script makes your CPU really slow and I'm hoping increasing the max will make it smoother (I don't know too much about this, haha).
I opened up the script with notepad and changed the values from 918000 to 1350000. It now looks like this:
#########################
# GideonX kernel tweaks #
#########################
# Set CPU voltage in microvolts
echo "-75000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set min/max and governor for CPU0
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1350000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Set min/max and governor for CPU0
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo 1350000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
# Set kernel dirty data writes. Dirty just means changed data, don't freak out.
# By setting writeout times to be longer, there are less writes which may save more battery for you.
#
# /proc/sys/vm/dirty_expire_centisecs = how old is the data before kernel writes
# /proc/sys/vm/dirty_writeback_centisecs = how often should the kernel check for dirty data
# /proc/sys/vm/dirty_ratio = max memory in percent of data storage
# /proc/sys/vm/dirty_background_ratio = amount of memory in percent for a data writeout to stop
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
echo "90" > /proc/sys/vm/dirty_ratio
echo "5" > /proc/sys/vm/dirty_background_ratio
When I zipped it back up and tried to install the zip, however, it crashed and didn't install. What did I do wrong? (Total newbie here)
Link to the script: http://forum.xda-developers.com/showpost.php?p=20946429&postcount=574
bump
Anyone have any idea why it's not working?
The way I did it was by using 7zip and notepad++
I didn't unzip the zip file. I juat openes it qith 7zip and draged the file onto my desktop. Then opened it with notepad++ and made the changes I wanted. After that I just draged that file back into the opened zip closed the program ans flashed it. Maybe the way you zipped it back messed up something.
Sent from my SAMSUNG-SGH-T989 using xda premium

[TUTORIAL]Better Battery Life (FLASHABLE ZIP) [KERNEL+GOVERNOR TWEAKS]

The essential feature to save battery has fixed on galaxy y now.
(FLASHABLE ZIP : Kernel+Governor Tweaks) (THANKS FOR KUROTSUGI)
http://www.mediafire.com/?uy14ahd6yjrrs4t
(All Credits for Irfanbargus for modules,and repencis team for kernel)
Second: App For Set and Optimize governor.
APPS:
SetCPU (FREE FOR XDA MEMBERS )
http://forum.xda-developers.com/showthread.php?t=505419
NoFrillsCPU (DONT SUPPORT CUSTOM GOVERNOR CONFIGS)
http://forum.xda-developers.com/showthread.php?t=911917
Antutu Cpu Master
https://play.google.com/store/apps/details?id=com.antutu.CpuMasterFree
Click to expand...
Click to collapse
USING:
NoFrillsCPU:
Install apk
open
Choose the frequences: Min/MAX 312/624 or 312/832
Chose the Governor: Ondemand/Conservative/Scary (You can choose other)
Check the box: Apply on boot
Hit Aplly.
SetCPU:
Download the apk (ITS PAID)(PLZ DONT POST WAREZ HERE)
Open,Alow The SuperUser Permitions
On Main window
Chose the frequencies: Min/MAX 312/624 or 312/832
Chose the Governor: Ondemand/Conservative/Scary (You can choose other)
Check the Box: Set On Boot
Go to Window "Advanced" (This is only Available on theses governors,UP)
Now Edit:
Conservative Governor
For Battery Save
Sampling Rate [120000]
What is this?
Sampling Time/Rate measured in uS by which the polling function determines how often to poll and decide if frequency should be scaled-down or scaled-up. [Some governors will have different sampling time for scaling-up and scaling-down]
Up Threshold [95]
What is this? >
Thresholds measured in percentage. When CPU load reaches this point, governor scales up or scales down the CPU. [Most of the governors will have down-threshold and up-threshold, for which CPU is scaled down or up respectively.
Down Threshold [40] [EXPLICATION IS SAME AS UP THRESHOULD]
Ignore Nice Load [SKIP THIS]
Freq Step [5] [0 to 10 value is aplicable][You chose the better]
What is This?
Defines how much (as a percentage of the maximum CPU speed) the conservative governor will increase the CPU speed by each time the CPU load reaches the Up Threshold.
YOU CAN CUSTOMIZE ALL VALUES AND GET THE BETTER VALUE
Click to expand...
Click to collapse
For performance
Sampling Rate [40000]
Up Threshold [60]
Down Threshold [20]
Freq Step [25]
Click to expand...
Click to collapse
Use The SetCPU CONFIGS and Configure Antutu Cpu master.
I Just Making This All-in-one Thread for Help
All Credits for droidphile.
Original Thread From GS2 Forum
READ FOR OTHER GOVERNOR TWEAKS (ondemand,smartass...etc)
http://forum.xda-developers.com/showthread.php?t=1369817
Repencis Original Thread :
http://forum.xda-developers.com/showthread.php?t=1587398
i read some post on repencis thread that says smartassv2 is good for performance seekers..
anyways.. Thanks for this!!
Read The complete thread on end of post.
this might help. copy this script into a *sh file then execute. don't forget to give execute permission.
Code:
#!/system/bin/sh
# for savaged zen
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/awake_min_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_max_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/down_rate_us
# for smartassv2
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
# for interactive
echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# for interactivex
echo "10000" > /sys/devices/system/cpu/cpufreq/interactivex/min_sample_time
# for conservative
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
currently I only made the tweak for these gov. you can make yourself by change the script line.
I can't change the sampling rate, it automatically revert back to 1000000 every time.
kurotsugi said:
this might help. copy this script into a *sh file then execute. don't forget to give execute permission.
Code:
#!/system/bin/sh
# for savaged zen
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/awake_min_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_max_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/down_rate_us
# for smartassv2
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
# for interactive
echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# for interactivex
echo "10000" > /sys/devices/system/cpu/cpufreq/interactivex/min_sample_time
# for conservative
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
currently I only made the tweak for these gov. you can make yourself by change the script line.
Click to expand...
Click to collapse
I have to execute it via script manager?
kurotsugi said:
this might help. copy this script into a *sh file then execute. don't forget to give execute permission.
Code:
#!/system/bin/sh
# for savaged zen
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/awake_min_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_max_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/down_rate_us
# for smartassv2
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
# for interactive
echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# for interactivex
echo "10000" > /sys/devices/system/cpu/cpufreq/interactivex/min_sample_time
# for conservative
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
currently I only made the tweak for these gov. you can make yourself by change the script line.
Click to expand...
Click to collapse
yeah.. how to? write on notepad then move to init.d?
kurotsugi said:
this might help. copy this script into a *sh file then execute. don't forget to give execute permission.
Code:
#!/system/bin/sh
# for savaged zen
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/awake_min_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_max_freq;
echo "312000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpu0/cpufreq/savagedzen/down_rate_us
# for smartassv2
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo "312000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo "200000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "48000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
echo "49000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
# for interactive
echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# for interactivex
echo "10000" > /sys/devices/system/cpu/cpufreq/interactivex/min_sample_time
# for conservative
echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
currently I only made the tweak for these gov. you can make yourself by change the script line.
Click to expand...
Click to collapse
I have to do after flashing the kernel? And where to put this file?
put it in init.d
GzC said:
I can't change the sampling rate, it automatically revert back to 1000000 every time.
Click to expand...
Click to collapse
Its is a bug. You have to Set 120000 All time when you change for other governor.
Nt workin wid me.. Stuck on boot logo
Sent from my GT-S5360 using XDA
hell_lock said:
Nt workin wid me.. Stuck on boot logo
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
What Rom/Firmware you use ?
hell_lock said:
Nt workin wid me.. Stuck on boot logo
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
Frist flash stock kernal then flash it...
You flash this custom kernal stuck boot logo...
Some custom rom change your kernal automatically.....conform that....
:thumbup:
Sent from my GT-S5360 using XDA
Sharmaskss said:
Frist flash stock kernal then flash it...
You flash this custom kernal stuck boot logo...
Some custom rom change your kernal automatically.....conform that....
:thumbup:
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
?LOL?
I flashed this and my phone booted properly.
So how to use this after flashing then?
Would i just pick one of the governors listed in your script?
EliTSamsunG said:
?LOL?
Click to expand...
Click to collapse
I mean some roms have custom kernal...(eg:chobiv2,..)
So first flash stock then custom kernal....
Flash this kernal upon Merruk kernal must get stuck boot
I face this problem on repines rom flashing....
After flashing the file i checked the system value compared to the script's echo value, i found out that they are different-- which probably means that the script is not taking any effect.
Besides theres no instruction follows after flashing it. But thanks though.
* after flashing the script i set my governor to interactiveX,max freq to 624,min freq 312 and i/o to noop .
From 100% battery and 6hrs running time my battery went down to 85% which is not bad at all!! Hahaha!!
EliTSamsunG said:
Its is a bug. You have to Set 120000 All time when you change for other governor.
Click to expand...
Click to collapse
it always revert back to 1000000 even if i set it to 120000...
the script should be activate manually after every reboot. the problem is that the app like setCPU set the gov and io after the script in init.d run. if you have setCPU you can set the value in that script into your setting. in that way you don't need to run the script manually.
PS: you don't need to buy setCPU at market. every member XDA have special privilage to download it free from this forum
Setcpu is paid but its free on xda..
Here: http://forum.xda-developers.com/showpost.php?p=3638937&postcount=1
Sent from my X8 using xda premium

Easy set Vsel and instant wakeup for CM11(recent nightly built by Quarx) & TWRP 2.8

Easy set Vsel and instant wakeup for CM11(recent nightly built by Quarx) & TWRP 2.8
Hi,all
Recently,I‘ve upgrade defy to CM11 nightly built that Qurax released everyday.And I'm using cm-11-20160628-NIGHTLY-mb52x.zip such a great rom works almost everything and smooth.
MANY THANKS to Quarx!
The rom is using TWRP 2.8.0.0, so I can't find setting CPU Vsel at boot.After some search,it can be done by adding some scripts to /system/etc/init.d/09overclock .(or using AeroControl )
Also,the rom delays to wakeup up to 3 seconds when you click the power button .
And I tried the same CPU governor & I/O schedul that used with 4.1.2 & 4.3.1,and it worked.These two settings built in the rom setting are sometimes failed to work and back to default, so I added them to script too.
Add these scripts to /system/etc/init.d/09overclock ,remember to leave a blank line at the end and set the same right (555) to the file.
Code:
#!/system/bin/sh
#
# Module location
MODULE_DIR="/system/lib/modules"
MODULE="/system/lib/modules/overclock_defy.ko"
SYMSEARCH_MODULE="/system/lib/modules/symsearch.ko"
/system/xbin/insmod $SYMSEARCH_MODULE
/system/xbin/insmod $MODULE_DIR/cpufreq_stats.ko
cpufreq_table=`grep -e omap2_clk_init_cpufreq_table /proc/kallsyms | sed -e "s/\([0-9A-Fa-f]\{8\}\).*/\1/"`
stats_update=`grep -e cpufreq_stats_freq_update /proc/kallsyms | sed -e "s/\([0-9A-Fa-f]\{8\}\).*/\1/"`
/system/xbin/insmod $MODULE omap2_clk_init_cpufreq_table_addr=0x$cpufreq_table
echo 0x$stats_update > /proc/overclock/cpufreq_stats_update_addr
# setVsel at boot,BACKUP your ROM first and use it caution with the stable vsel of your phone!
/system/xbin/busybox echo 55 > /proc/overclock/max_vsel
/system/xbin/busybox echo 1000000 > /proc/overclock/max_rate
/system/xbin/busybox echo 1 300000000 25 > /proc/overclock/mpu_opps
/system/xbin/busybox echo 2 600000000 35 > /proc/overclock/mpu_opps
/system/xbin/busybox echo 3 800000000 45 > /proc/overclock/mpu_opps
/system/xbin/busybox echo 4 1000000000 55 > /proc/overclock/mpu_opps
/system/xbin/busybox echo 0 1000000 > /proc/overclock/freq_table
/system/xbin/busybox echo 1 800000 > /proc/overclock/freq_table
/system/xbin/busybox echo 2 600000 > /proc/overclock/freq_table
/system/xbin/busybox echo 3 300000 > /proc/overclock/freq_table
# avoid wakeup delay when your settings fails sometime in /Settings/Performance/Processor & I/O scheduler.
sleep 60
/system/xbin/busybox echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
/system/xbin/busybox echo sio > /sys/block/mmcblk0/queue/scheduler
# Always check /Settings/Performance/Memory management/Allow purging of assets.
# While select ART runtime in Developer options and check Allow purging of assets ,using following minfree to max performance .
# Should put them below sleep 60,use as your choice.
# /system/xbin/busybox echo "0,1,2,4,7,15" > /sys/module/lowmemorykiller/parameters/adj
# /system/xbin/busybox echo "2464,3712,5632,7392,8608,9856" > /sys/module/lowmemorykiller/parameters/minfree
Also,set this to /system/build.prop ,to bring up income call interface much more fast.
ro.telephony.call_ring.delay=0
FYI,
about the last minfree part(other VM sets are ok by default ),I've done some test below.
ALL tested under ART runtime (its bugfree to me and ART is way much better than Dalvik,using Dalvik,browser crashed at 11-12 gifs no matter what ).
1.uncheck Allow purging of assets ,browser crashed loading 7 - 8 gifs picture in the webpage
2.check Allow purging of assets ,browser crashed loading 14 - 15 gifs picture (including the gifs above) in the webpage
3.check Allow purging of assets ,and using the minfree above ,browser crashed up to 24 gifs picture (including the gifs above) in the webpage(browser using nearly 320M ram...)
All behaviors the same delay switching to other apps when browser approaching to crash.
After done above ,there are only left 2 bugs to me
1.the menu & search button remap.(menu button can't be remapped to other function in the launcher ,and search button only works as search )
2.call recording not working (still searching method)

KFinally found the answer to bad battery life on our beloved htc 10's/works with Oreo

Save much reading and go to page 61. Answers to bad battery on the HTC 10 are worked out there. It's simplifies everything. Many posts here are works in progress kind of back and forth.
Guides I used for amplify are at the bottom of page 13.
(Remember to thank me in the op if anything here helped.)
After numerous hours of research and testing . Just wanted to reveal what I found. This is made for the OP-3 which is also a snapdragon 820 chipset device.
Ive been using on my Verizon HTC 10 with zero issues so far/ Lee-droid oreo rom/Elemental X -3.02 kernel. Much copy and pasting going on, just wanted to share my find.I take no credit for any of this : other than being willing to test on my device. After flashing the final version of (AKT.V1.6/FinalZIP )through twrp/ located on next page I ticked for the Op3 OR SNAPDRAGON 820 DEVICE from a terminul emilator, then I choose "Project Zhana battery" . I used rom toolbox pro's terminal emulator. Choose whatever profile you desire but the one I picked works fine/zero lag. Our other options (as of now) are soilwork scripts made for the HTC 10 or the helix engine now that pnpmgr has been disabled.
. First link is a huge thread on profiles from AKT. Go find which ever works best for your situation.
( I'm not telling you to flash anything. I'm showing you possible routes that have been tested by me. If you do not like results simply Ruu back to stock or dirty flash rom being used to get rid of it all.)
I'm about to tell you how to get buttery smooth, lag-free performance with insanely good battery life, using an old school governor featured in practically every kernel... This tweak is applicable to every phone with any ROM or kernel--stock or custom--that provides the Interactive Governor.
Yeah, yeah... everyone promises good battery with great performance, but who actually delivers? Maybe it isn't as smooth as you want, or maybe it requires something your kernel or ROM don't support. Or maybe the battery life promises just aren't what you expected. There's always some awful compromise. Not here!
This isn't a guide to get 36 hour battery life... provided you never use your phone. That's deep sleep optimization, which is lovely and all, but what good is the phone if you can never use it?! And with the new Marshmallow Doze feature, this strategy is becoming a thing of the past. What I'm talking about is 7-14 hour screen on, actual hands-on usage times! Without compromising anything, you can get 7-8 hour screen on usage with regular, no-compromise usage habits: daytime visible screen brightness, both radios on, sync on, network location on, all the regular usage features, the whole kit and kaboodle... all smooth as a baby's butt and snappy as a Slim Jim! (Up to 14+ hours if you can stand minimum brightness and WiFi-only with a custom ROM and other stuff turned off! And this is with stock voltages and full frequency range--you'll likely get even more if you choose to optimize those as well!)
However, it should be noted that this does not apply to gaming, heavy camera use, etc. Anything that is an automatic battery killer in and of itself. There's nothing that can be done about anything that forces the phone to utilize its maximum resources all the time. But you should know that by now. Further, this guide is about optimizing the CPU as much as possible. It does not cover things like eliminating wakelocks so your phone sleeps well, removing unnecessary and battery draining stock apps, keeping your screen brightness down*, and all that stuff that's been covered in other posts ad infinitum. Those optimizations are up to you.
If you really want to know the principles of this tweaks, please go to this thread since there everything is really well explained and I know you guys just want to apply the tweak and forget about everything behind it, so just keep scrolling!
Voltages and Frequencies:
So recently I have been investigating about the Voltages of our device (since that is a really useful information to know) before that we only have the Nominal frequencies (If you don't know what I am talking about go ahead and read @soniCron thread because I won't explain it) we could develop some tweaks with that, but we were pretty much making blind shots, guessing and hoping that all will be right. Well, now that we have all this information we can optimize our tweaks even more so expect new updates and rework for the current tweaks and of course new ones.
What About Touchboost?
Since I've noticed that a lot of people was asking about Touchboost, I decided to add this little explanation from @soniCron
" Touchboost is a nifty feature in a lot of kernels (including stock on Nexus 5X) that jumps up the frequency so that you experience minimal lag. However, with all the above settings, touchboost is usually detrimental to the efficiency of the device!
We generally want to keep the CPU on the lowest possible frequency as much as possible, and touchboost interferes with that. Further, because we've set up the maximal and minimal efficient clock rates, as well as burst processing from the 2nd CPU core, we don't need touchboost!
If your kernel allows you to shut it off, try to do so and see if the responsiveness of your device is acceptable. On the OP3 (and pretty much all the devices), touchboost adds no perceptual performance gain and only hurts efficiency and battery life. If your kernel doesn't allow you to turn off touchboost, try another one.
Your battery life will thank you! "
With all that been said, you shouldn't confuse Touchboost with CPU Boost and more specifically Input boost. Both are used to boost the clock speed of our device whenever we touch the touchscreen, so we don't suffer any lags.
The difference is that Input boost can be configured and Touchboost cannot, making it a really inefficient.
MY DEVICE LAGS!!! WHY?!?!
First of all, it's a "normal" thing, as I have stated before, all these tweaks have been done for fit my usage or certain usage which is most likely not the same as yours. Because this, when the are put on a certain scenario the might stutter or lag just a bit (If you are experimenting huge lags, you have done something wrong)
And yes, this can be fixed. We have a couple of ways of fixing it:
First of all, Check If the tweaks have been applied correctly
Our first one is modifying the Input boost (not touchboost) most of our tweaks have an already established Input boost clock speeds and time, you can incise does too a bit. For example, we have 960(Mhz) for all the CPU at 40ms you could bump it up to ~1036(Mhz) and 42ms, don't modify too much this values since it will potentially increase your battery drain.
Our second tool for fixing lags is min_sample_time , my recommendation is to increase the value by 5000 each time till you no longer suffer any stutter or lag.
Try another tweak, for example;
If you are using Project X.A.N.A Battery, try using Balanced option...
Still having lag?
Get rid of unnecessary (background-)apps
Try a different IO-Scheduler
Try another profile
My phone still uses too much battery
First of all, Check If the tweaks have been applied correctly
Make sure that you have disabled touchboost.
Set brightness to a lower level.
Use a dark / black theme
Don't play games all day
Try other tweak, for example;
If you are using Project Zhana Balanced, try using Battery option...
How to install:
A flashable zip to be flashed via recovery, which installs scripts of the latest iterations of most profiles (some legacy profiles had to be eliminated for more convenience) and a master script that takes control of all the installed scripts and applies your desired profile at will as soon as you recall it via Terminal Emulator app and get guided by the on-screen instructions.
So to wrap it up:
1- Download the latest AKT_Profile_vX.x.zip file
2- Reboot into TWRP recovery and flash the .zip file
3- After you boot up the phone, leave it to settle for a minute
4- Open up your favorite Terminal Emulator app
5- Grant it superuser permissions by typing in "su" without the quotes
6- After superuser permissions are granted, type in "AKT" without the quotes (yes capitalized)
Download link for AKT
https://forum.xda-developers.com/showpost.php?p=70352820&postcount=2146
Xposed with magic information and downloads.
This is where the rubber meets the road. Amplify and greenify for Oreo!!!
https://forum.xda-developers.com/xposed/unofficial-systemless-xposed-t3388268
(Save yourself some time and jump to page 61 Finally found the answers there. Long live the HTC 10. My device is finally a beast.)
Sounds interesting - might give it a try
It's running like a totally different phone. I'm amazed almost 2 hours of screen on time and still at 70% battery. And I'm casting to my living room TV as well. Still zero lag. So phone is running tasks as well. And I'm back and forth on here. Works nicely.
mattie_49 said:
It's running like a totally different phone. I'm amazed almost 2 hours of screen on time and still at 70% battery. And I'm casting to my living room TV as well. Still zero lag. So phone is running tasks as well. And I'm back and forth on here. Works nicely.
Click to expand...
Click to collapse
Are you using stock elemental x settings or other ?
Code:
#!/system/bin/sh
#Author: Asiier
#Settings By: Asiier
#Device: One Plus 3
#Codename: Project Zhana (BT)
#Build Status: Stable
#Version: 4.2
#Last Updated: 22/01/2017
#Notes: Please give credit when using this in your work!
#TWEAKS_BEGIN
echo ""
echo --------------------------------------------------------
echo Applying 'Project Zhana (Battery variant)' v4.3
echo Advanced Kernel Settings
echo --------------------------------------------------------
sleep 0.5
echo Author: Asiier
echo Settings By: Asiier
echo "Device: One Plus 3 & SD820 Devices"
echo Codename: 'Project Zhana (BT)'
echo Build Status: Stable
echo Last Updated: 19/09/2017
echo For more information go to the XDA theard
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sleep 0.3
echo Checking Android version...
if grep -q 'ro.build.version.sdk=25' /system/build.prop; then
echo Android Nougat 7.1.X detected!
sleep 0.3
echo N detected... Applying proper settings
fi
if grep -q 'ro.build.version.sdk=24' /system/build.prop; then
echo Android Nougat 7.0.X detected!
sleep 0.3
echo N detected... Applying proper settings
fi
if grep -q 'ro.build.version.sdk=23' /system/build.prop; then
echo Android Marshmallow 6.0.1 detected!
sleep 0.3
echo MM detected... Applying proper settings
fi
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sleep 0.3
#Apply settings to LITTLE cluster
echo Applying settings to LITTLE Cluster...
sleep 0.5
#Temporarily change permissions to governor files for the LITTLE cluster to enable Interactive governor
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#Grab Maximum Achievable Frequency for the LITTLE Cluster
maxfreq=$(cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq")
if test "$maxfreq" -eq 1593600; then
#Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 1593MHz
echo No LITTLE Cluster Overclocking detected.
echo Applying appropriate values.
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1593MHz
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
fi
if test "$maxfreq" -eq 1728000; then
#Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 1728MHz
echo LITTLE Cluster Overclocking detected.
echo Applying appropriate values.
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1728000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1728MHz
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
maxfreq=$(cat "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq")
fi
if test "$maxfreq" -lt 1593600; then
#Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 1593MHz
echo LITTLE Cluster Underclocking detected!!
sleep 1
echo We recommend not to UnderClock the CPU as the tweaks already will take care of that If needed
echo The tweaks will continue getting applied but we recommend setting the CPU to Max frequency!
sleep 4
#chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1593MHz
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
elif test $maxfreq -gt 1728000; then
#Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 1728MHz
echo LITTLE Cluster Overclocking detected.
sleep 1
echo This OverClock is higher than normal and only possible on Xceed Kernel
echo The tweak will continue getting applyed
echo " Althought it might no reach the maximum frequency you have setted as it haven't been made to work with frecuencies higher than 1728 Mhz "
#chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#echo 1728000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1728MHz
#chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
fi
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/*
echo 220000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 307200 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 0 729600:76000 960000:99000 1228800:150000 1478400:170000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 155 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 22000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
fi
sleep 0.5
#Apply settings to Big cluster
echo Applying settings to BIG Cluster
sleep 0.2
#Temporarily change permissions to governor files for the LITTLE cluster to enable Interactive governor
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo interactive > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
#Grab Maximum Achievable Frequency for the Big Cluster
maxfreq=$(cat "/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_max_freq")
if test $maxfreq -eq 2150400; then
#Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 2150MHz
echo No BIG Cluster Overclocking detected.
echo Applying appropriate values.
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 2150400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq #Core 2 Maximum Frequency = 2150MHz
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 65 940800:80 1036800:2 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
#Set overclock max frequency compatible target_loads
elif test $maxfreq -eq 2265600; then
#Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 2265MHz
echo BIG Cluster Overclocking detected.
echo Applying appropriate values.
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 2265600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq #Core 2 Maximum Frequency = 2265MHz
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 65 940800:80 1036800:2 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
fi
if test $maxfreq -lt 2150400; then
#Temporarily change permissions to governor files for the Big cluster to set the maximum frequency to 1593MHz
echo BIG Cluster Underclocking detected!!
sleep 1
echo We recommend not to UnderClock the CPU as the tweaks already will take care of that If needed
echo The tweaks will continue getting applied but we recommend setting the CPU to Max frequency!
sleep 4
#chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
#echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1593MHz
#chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 65 940800:80 1036800:2 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
elif test $maxfreq -gt 2265600; then
#Temporarily change permissions to governor files for the Little cluster to set the maximum frequency to 1728MHz
echo BIG Cluster Overclocking detected.
sleep 1
echo This OverClock is higher than normal and only possible on Xceed Kernel
echo The tweak will continue getting applyed
echo " Althought it might no reach the maximum frequency you have setted as it haven't been made to work with frecuencies higher than 2265600 Mhz "
sleep 4
#chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
#echo 1728000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq #Core 0 Maximum Frequency = 1728MHz
#chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 65 940800:80 1036800:99 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
fi
sleep 0.5
#Tweak Interactive Governor
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/*
echo 140000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_slack
echo 1401600 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq
echo 65000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate
echo 32000 940800:85000 1248000:96000 1401600:88000 1632000:80000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay
echo 99 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load
echo 11000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boost
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
fi
echo "=========================================="
echo Checking whether you are using a Sultanxda based ROM or not
echo "=========================================="
#Checking whether you are using a Sultanxda based ROM or not
echo Checking ROM...
sleep 0.2
echo Applying appropriate values.
if [ -e "/sys/kernel/cpu_input_boost/enabled" ]; then
echo Enabling Input Boost for the LITTLE cluster @556 MHz and for the BIG Cluster @0Mhz and Custom thermal driver of Sultanxda
chmod 644 /sys/kernel/cpu_input_boost/*
echo 1 > /sys/kernel/cpu_input_boost/enabled
echo 66 > /sys/kernel/cpu_input_boost/ib_duration_ms
echo 556800 0 > /sys/kernel/cpu_input_boost/ib_freqs
chmod 444 /sys/kernel/cpu_input_boost/*
chmod 644 /sys/kernel/msm_thermal/enabled
echo 0 > /sys/kernel/msm_thermal/enabled
chmod 444 /sys/kernel/msm_thermal/enabled
else
#Checking whether you are using a Lineage based ROM or not
echo Checking ROM...
sleep 0.2
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
#Enable Input Boost for LITTLE cluster @556MHz and for BIG cluster @729MHz for 66ms
echo Lineage Based ROM detected
echo Applying appropriate values.
echo Enabling Input Boost at 556 MHz for the LITTLE cluster and at 0 MHz for the BIG Cluster
if [ -e "/sys/module/cpu_boost/parameters/input_boost_freq" ]; then
chmod 644 /sys/module/cpu_boost/parameters/input_boost_freq
echo 0:556800 1:0 2:0 3:0 > /sys/module/cpu_boost/parameters/input_boost_freq
chmod 644 /sys/module/cpu_boost/parameters/input_boost_ms
echo 55 > /sys/module/cpu_boost/parameters/input_boost_ms
else
echo "*Input Boost is not avalible for your Kernel*"
fi
if [ -e "/sys/module/cpu_boost/parameters/boost_ms" ]; then
chmod 644 /sys/module/cpu_boost/parameters/boost_ms
echo 0 > /sys/module/cpu_boost/parameters/boost_ms
else
echo "*Cpu_Boost is not avalible for your Kernel*"
fi
else
#Enable Input Boost for LITTLE cluster @729MHz and for BIG cluster @729Hz for 100ms
echo Non-Lineage ROM detected
echo Applying appropriate values.
echo Enabling Input Boost at 729 MHz for the LITTLE cluster and at 0 MHz for the BIG Cluster
if [ -e "/sys/module/cpu_boost/parameters/input_boost_freq" ]; then
chmod 644 /sys/module/cpu_boost/parameters/input_boost_freq
echo 0:729600 1:0 2:0 3:0 > /sys/module/cpu_boost/parameters/input_boost_freq
chmod 644 /sys/module/cpu_boost/parameters/input_boost_ms
echo 77 > /sys/module/cpu_boost/parameters/input_boost_ms
else
echo "*Input Boost is not avalible for your Kernel*"
fi
if [ -e "/sys/module/cpu_boost/parameters/boost_ms" ]; then
chmod 644 /sys/module/cpu_boost/parameters/boost_ms
echo 0 > /sys/module/cpu_boost/parameters/boost_ms
else
echo "*Cpu_Boost is not avalible for your Kernel*"
fi
fi
fi
sleep 0.3
echo "=========================================="
#Disable TouchBoost
echo Disabling TouchBoost
if [ -e "/sys/module/msm_performance/parameters/touchboost" ]; then
chmod 644 /sys/module/msm_performance/parameters/touchboost
echo 0 > /sys/module/msm_performance/parameters/touchboost
else
echo "*Not supported for your current Kernel*"
fi
#Disable BCL
echo Disabling BCL and Removing Perfd
if [ -e "/sys/devices/soc/soc:qcom,bcl/mode" ]; then
echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
fi
#Enable Core Control and Disable MSM Thermal Throttling allowing for longer sustained performance
echo Disabling Aggressive CPU Thermal Throttling
if [ -e "/sys/module/msm_thermal/core_control/enabled" ]; then
echo 1 > /sys/module/msm_thermal/core_control/enabled
fi
if [ -e "/sys/module/msm_thermal/parameters/enabled" ]; then
echo N > /sys/module/msm_thermal/parameters/enabled
fi
#Tweak HMP Scheduler to feed the Big cluster more tasks
sleep 0.3
#echo Tweaking HMP Scheduler for correcting BIG Cluster utilization
echo 2 > /proc/sys/kernel/sched_window_stats_policy
echo 85 > /proc/sys/kernel/sched_upmigrate
echo 62 > /proc/sys/kernel/sched_downmigrate
echo 5 > /proc/sys/kernel/sched_spill_nr_run
echo 100 > /proc/sys/kernel/sched_spill_load
echo 30 > /proc/sys/kernel/sched_init_task_load
if [ -e "/proc/sys/kernel/sched_heavy_task" ]; then
echo 65 > /proc/sys/kernel/sched_heavy_task
fi
if [ -e "/proc/sys/kernel/sched_enable_power_aware" ]; then
echo 1 > /proc/sys/kernel/sched_enable_power_aware
fi
echo 10 > /proc/sys/kernel/sched_upmigrate_min_nice
echo 4 > /proc/sys/kernel/sched_ravg_hist_size
if [ -e "/proc/sys/kernel/sched_small_wakee_task_load" ]; then
echo 7 > /proc/sys/kernel/sched_small_wakee_task_load
fi
if [ -e "/proc/sys/kernel/sched_wakeup_load_threshold" ]; then
echo 110 > /proc/sys/kernel/sched_wakeup_load_threshold
fi
if [ -e "/proc/sys/kernel/sched_small_task" ]; then
echo 7 > /proc/sys/kernel/sched_small_task
fi
if [ -e "/proc/sys/kernel/sched_big_waker_task_load" ]; then
echo 35 > /proc/sys/kernel/sched_big_waker_task_load
fi
echo 950000 > /proc/sys/kernel/sched_rt_runtime_us
echo 1000000 > /proc/sys/kernel/sched_rt_period_us
if [ -e "/proc/sys/kernel/sched_migration_fixup" ]; then
echo 1 > /proc/sys/kernel/sched_migration_fixup
fi
if [ -e "/proc/sys/kernel/sched_freq_dec_notify" ]; then
echo 410000 > /proc/sys/kernel/sched_freq_dec_notify
fi
if [ -e "/proc/sys/kernel/sched_freq_inc_notify" ]; then
echo 600000 > /proc/sys/kernel/sched_freq_inc_notify
fi
if [ -e "/proc/sys/kernel/sched_boost" ]; then
echo 0 > /proc/sys/kernel/sched_boost
fi
#Tweaks for other various Settings
sleep 0.5
echo "=========================================="
echo Tweaking other various Settings
echo ·I/O Values
if [ -d /sys/block/dm-0 ] || [ -d /sys/devices/virtual/block/dm-0 ]; then
if [ -e /sys/devices/virtual/block/dm-0/queue/scheduler ]; then
DM_PATH=/sys/devices/virtual/block/dm-0/queue
fi
if [ -e /sys/block/dm-0/queue/scheduler ]; then
DM_PATH=/sys/block/dm-0/queue
fi
string=/sys/devices/virtual/block/dm-0/queue/scheduler;
Zen_Available=false;
if $BB grep 'zen' $string; then
Zen_Available=true;
fi
if [ "$Zen_Available" == "true" ]; then
if [ -e $DM_PATH/scheduler_hard ]; then
echo zen > $DM_PATH/scheduler_hard
fi
echo zen > $DM_PATH/scheduler
sleep 2
echo 300 > $DM_PATH/iosched/sync_expire
echo 2800 > $DM_PATH/iosched/async_expire
echo 14 > $DM_PATH/iosched/fifo_batch
chmod 644 $DM_PATH/iosched/sync_expire
echo 300 > $DM_PATH/iosched/sync_expire
fi
if [ "$Zen_Available" = "false" ]; then
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
echo ZEN not avalible, setting 'Noop' instead...
if [ -e $DM_PATH/scheduler_hard ]; then
echo noop > $DM_PATH/scheduler_hard
fi
echo noop > $DM_PATH/scheduler
else
echo ZEN not avalible, setting 'CFQ' instead...
if [ -e $DM_PATH/scheduler_hard ]; then
echo cfq > $DM_PATH/scheduler_hard
fi
echo cfq > $DM_PATH/scheduler
fi
fi
fi
for i in /sys/block/../devices/soc/624000.ufshc/host0/target0:0:0/0:0:0:[0-4]/block/*/queue; do
string4=$($BB readlink -f $i/scheduler | cut -d 'q' -f1 | cut -d 'k' -f2 | cut -d '/' -f2 | tr a-z A-Z)
string5=$($BB cat $i/scheduler | cut -d ']' -f1 | cut -d '[' -f2 | $BB tr a-z A-Z)
if [ "$string5" == "NOOP" ]; then
echo "Leaving $string4 block at default $string5"
echo ""
sleep 0.1
fi
if [ "$string5" != "NOOP" ]; then
echo "Changing $string4 block I/O scheduler"
if [ -e $i/scheduler_hard ]; then
echo zen > $i/scheduler_hard
fi
echo zen > $i/scheduler
echo ""
sleep 2
# Initialize string 6 to avoid reference conflicts
string6=$($BB cat $i/scheduler | cut -d ']' -f1 | cut -d '[' -f2)
if [ "$string6" == "zen" ]; then
echo 300 > $i/iosched/sync_expire
echo 2800 > $i/iosched/async_expire
echo 14 > $i/iosched/fifo_batch
chmod 644 $i/iosched/sync_expire
echo 300 > $i/iosched/sync_expire
fi
fi
done
if [ -e "$DM_PATH/iostats" ]; then
echo 0 > $DM_PATH/iostats
fi
if [ -e "$DM_PATH/rq_affinity" ]; then
echo 1 > $DM_PATH/rq_affinity
fi
if [ -e "/sys/block/dm-0/bdi/read_ahead_kb" ]; then
echo 512 > /sys/devices/virtual/block/dm-0/bdi/read_ahead_kb
fi
if [ -e "/sys/block/sda/bdi/read_ahead_kb" ]; then
echo 512 > /sys/block/sda/bdi/read_ahead_kb
fi
echo ·Memory Values
echo 0 > /proc/sys/vm/swappiness
echo 100 > /proc/sys/vm/vfs_cache_pressure
echo 80 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 100 > /proc/sys/vm/dirty_expire_centisecs
echo 250 > /proc/sys/vm/dirty_writeback_centisecs
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 3 > /proc/sys/vm/page-cluster
if [ -e "/sys/module/lowmemorykiller/parameters/enable_adaptive_lmk" ]; then
chmod 666 /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
chown root /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
fi
if [ -e "/sys/module/lowmemorykiller/parameters/enable_adaptive_lmk" ]; then
echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
else
echo ' *Adaptive LMK is not present on your Kernel* '
fi
if [ -e "/sys/module/lowmemorykiller/parameters/minfree" ]; then
echo 23939,44091,58788,73485,88182,102879 > /sys/module/lowmemorykiller/parameters/minfree
else
echo ' *LMK cannot currently be modified on your Kernel* '
fi
echo ·TCP Values
string2=/proc/sys/net/ipv4/tcp_available_congestion_control
if grep 'westwood' $string2; then
echo westwood > /proc/sys/net/ipv4/tcp_congestion_control
else
echo Westwood not avilable, using Cubic
echo cubic > /proc/sys/net/ipv4/tcp_congestion_control
fi
#Tweaking GPU
sleep 0.4
echo GPU Tweaking
echo msm-adreno-tz > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/governor
if grep -q 'ro.build.version.sdk=25' /system/build.prop; then
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
echo 510000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk
else
echo 560000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk
fi
fi
if grep -q 'ro.build.version.sdk=24' /system/build.prop; then
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
echo 510000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk
else
echo 560000000 > /sys/class/kgsl/kgsl-3d0/max_gpuclk
fi
fi
if grep -q 'ro.build.version.sdk=23' /system/build.prop; then
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
echo 560000000 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/max_freq
else
echo 560000000 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/max_freq
fi
else
if grep -q 'ro.build.flavor=lineage_oneplus3-userdebug' /system/build.prop; then
echo 510000000 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/max_freq
else
echo 560000000 > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/max_freq
fi
fi
sleep 1
echo ------------------------------------------------------------
echo 'Project Zhana v4.3' Successfully Applied!
echo "Project Zhana Battery" > /data/system/current_profile
echo You may now tweak them further
echo using EXKM or Kernel Adiutor
echo ------------------------------------------------------------
echo ""
echo " Done, this will be automatically closed..."
sleep 4
#################################################
#Modded by Asiier
#Please say thanks and give proper credits if you're using this profile.
#Credits
#*soniCron *Alcolawl *RogerF81 *Patalao *Mostafa Wael *Senthil360 and all of those that have share their profiles on Nexus 5X/6P Advanced Interactive Tweaks respective threads.
Important are:
Small Cores Tweaks.
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 220000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 307200 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 0 729600:76000 960000:99000 1228800:150000 1478400:170000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 155 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 22000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
fi
Big Cores Tweaks:
echo 65 940800:80 1036800:2 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 140000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_slack
echo 1401600 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq
echo 65000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate
echo 32000 940800:85000 1248000:96000 1401600:88000 1632000:80000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay
echo 99 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load
echo 11000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boost
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
fi
#Enable Input Boost for LITTLE cluster @729MHz and for BIG cluster @729Hz for 100ms
echo Non-Lineage ROM detected
echo Applying appropriate values.
echo Enabling Input Boost at 729 MHz for the LITTLE cluster and at 0 MHz for the BIG Cluster
if [ -e "/sys/module/cpu_boost/parameters/input_boost_freq" ]; then
chmod 644 /sys/module/cpu_boost/parameters/input_boost_freq
echo 0:729600 1:0 2:0 3:0 > /sys/module/cpu_boost/parameters/input_boost_freq
chmod 644 /sys/module/cpu_boost/parameters/input_boost_ms
echo 77 > /sys/module/cpu_boost/parameters/input_boost_ms
else
echo "*Input Boost is not avalible for your Kernel*"
fi
#echo Tweaking HMP Scheduler for correcting BIG Cluster utilization
echo 2 > /proc/sys/kernel/sched_window_stats_policy
echo 85 > /proc/sys/kernel/sched_upmigrate
echo 62 > /proc/sys/kernel/sched_downmigrate
echo 5 > /proc/sys/kernel/sched_spill_nr_run
echo 100 > /proc/sys/kernel/sched_spill_load
echo 30 > /proc/sys/kernel/sched_init_task_load
it prefers Zen, if not available goes to noop or CFQ
Some Memory tweaks..
cho ·Memory Values
echo 0 > /proc/sys/vm/swappiness
echo 100 > /proc/sys/vm/vfs_cache_pressure
echo 80 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 100 > /proc/sys/vm/dirty_expire_centisecs
echo 250 > /proc/sys/vm/dirty_writeback_centisecs
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 3 > /proc/sys/vm/page-cluster
tries to set TCP to westwood if not cubic.
echo msm-adreno-tz > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/governor
Oh... and the whole zip is made for SDK25 or lower so not really O compatible.
So yeah... you'd better set the values you'd want manually instead of relying on a outdated all in one wonder script.
timbohobbs said:
Are you using stock elemental x settings or other ?
Click to expand...
Click to collapse
Stock
Haldi4803 said:
Important are:
Small Cores Tweaks.
echo 70 480000:65 556800:75 729600:82 960000:86 1036800:2 1228800:99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 220000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
echo 307200 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 0 729600:76000 960000:99000 1228800:150000 1478400:170000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 155 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 22000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/enable_prediction
fi
Big Cores Tweaks:
echo 65 940800:80 1036800:2 1401600:95 1824000:98 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
echo 140000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_slack
echo 1401600 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq
echo 65000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate
echo 32000 940800:85000 1248000:96000 1401600:88000 1632000:80000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay
echo 99 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load
echo 11000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boost
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/fast_ramp_down
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/align_windows
echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/boostpulse_duration
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy
if [ -e "/sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction" ]; then
chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
echo 0 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/enable_prediction
fi
#Enable Input Boost for LITTLE cluster @729MHz and for BIG cluster @729Hz for 100ms
echo Non-Lineage ROM detected
echo Applying appropriate values.
echo Enabling Input Boost at 729 MHz for the LITTLE cluster and at 0 MHz for the BIG Cluster
if [ -e "/sys/module/cpu_boost/parameters/input_boost_freq" ]; then
chmod 644 /sys/module/cpu_boost/parameters/input_boost_freq
echo 0:729600 1:0 2:0 3:0 > /sys/module/cpu_boost/parameters/input_boost_freq
chmod 644 /sys/module/cpu_boost/parameters/input_boost_ms
echo 77 > /sys/module/cpu_boost/parameters/input_boost_ms
else
echo "*Input Boost is not avalible for your Kernel*"
fi
#echo Tweaking HMP Scheduler for correcting BIG Cluster utilization
echo 2 > /proc/sys/kernel/sched_window_stats_policy
echo 85 > /proc/sys/kernel/sched_upmigrate
echo 62 > /proc/sys/kernel/sched_downmigrate
echo 5 > /proc/sys/kernel/sched_spill_nr_run
echo 100 > /proc/sys/kernel/sched_spill_load
echo 30 > /proc/sys/kernel/sched_init_task_load
it prefers Zen, if not available goes to noop or CFQ
Some Memory tweaks..
cho ·Memory Values
echo 0 > /proc/sys/vm/swappiness
echo 100 > /proc/sys/vm/vfs_cache_pressure
echo 80 > /proc/sys/vm/dirty_ratio
echo 20 > /proc/sys/vm/dirty_background_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
echo 100 > /proc/sys/vm/dirty_expire_centisecs
echo 250 > /proc/sys/vm/dirty_writeback_centisecs
echo 0 > /proc/sys/vm/oom_kill_allocating_task
echo 3 > /proc/sys/vm/page-cluster
tries to set TCP to westwood if not cubic.
echo msm-adreno-tz > /sys/devices/soc/b00000.qcom,kgsl-3d0/devfreq/b00000.qcom,kgsl-3d0/governor
Oh... and the whole zip is made for SDK25 or lower so not really O compatible.
So yeah... you'd better set the values you'd want manually instead of relying on a outdated all in one wonder script.
Click to expand...
Click to collapse
That would work if I knew how to set all those values. For me though I do not.
So i was checking this out and in the FAQ thread here: https://forum.xda-developers.com/showpost.php?p=69037152&postcount=3
Near the top it mentions the HTC10 with a link that explains why it doesn't work or doesn't work as well on an HTC device, linked here: https://forum.xda-developers.com/showpost.php?p=70815496&postcount=2864
The long and short of it is I guess HTC uses there own proprietary pnp manager. But it does go on to say that someone else took the work being done with AKT and made a unified kernel tweak, linked here: https://forum.xda-developers.com/htc-10/development/advanced-interactive-governor-tweaks-t3543589 Which i guess works for anything including HTC's stock kernel.
whew........ So i guess my question first of all is are you using AKT, or are you using Soilwork: Unified kernel-tweaks?
I guess the next question is those of us using modded kernel (cleanslate and Elemental X) Do those kernels have HTC's proprietary pnp manager turned on and they are just tweaking it, or do they shut it off completely and go there own route.
If they shut it off completely then it sounds like AKT is the way to go, but if they don't are are just tweaking HTC's pnp manager, it sounds like the Soilwork tweak is the way to go.
BTW i also use Leedoird, but i'm rocking the CleanSlate kernel atm.
Void4ever
void4ever said:
So i was checking this out and in the FAQ thread here: https://forum.xda-developers.com/showpost.php?p=69037152&postcount=3
Near the top it mentions the HTC10 with a link that explains why it doesn't work or doesn't work as well on an HTC device, linked here: https://forum.xda-developers.com/showpost.php?p=70815496&postcount=2864
The long and short of it is I guess HTC uses there own proprietary pnp manager. But it does go on to say that someone else took the work being done with AKT and made a unified kernel tweak, linked here: https://forum.xda-developers.com/htc-10/development/advanced-interactive-governor-tweaks-t3543589 Which i guess works for anything including HTC's stock kernel.
whew........ So i guess my question first of all is are you using AKT, or are you using Soilwork: Unified kernel-tweaks?
I guess the next question is those of us using modded kernel (cleanslate and Elemental X) Do those kernels have HTC's proprietary pnp manager turned on and they are just tweaking it, or do they shut it off completely and go there own route.
If they shut it off completely then it sounds like AKT is the way to go, but if they don't are are just tweaking HTC's pnp manager, it sounds like the Soilwork tweak is the way to go.
BTW i also use Leedoird, but i'm rocking the CleanSlate kernel atm.
Void4ever
Click to expand...
Click to collapse
Using AKT. And enabled through terminal.And no I didn't disable pnp mgr, I'm guessing it overrides it. And soilwork won't flash. Akt is working fine for me no reboots or massive drains or wakelocks.No excessive heat either running cool as a cucumber,so until pnp is updated I chose to use this route. I'm getting better averages than I was on Nougat. 4.5 hrs on screen currently 27% battery remaining and 16 hours off charger. Try it and see what you think.
mattie_49 said:
Using AKT. And enabled through terminal.And no I didn't disable pnp mgr, I'm guessing it overrides it. And soilwork won't flash. Akt is working fine for me no reboots or massive drains or wakelocks.No excessive heat either running cool as a cucumber,so until pnp is updated I chose to use this route. I'm getting better averages than I was on Nougat. 4.5 hrs on screen currently 27% battery remaining and 16 hours off charger. Try it and see what you think.
Click to expand...
Click to collapse
Hi, do you think this would work on Nougat? I have random reboots at 40% battery left.
NickDVS said:
Hi, do you think this would work on Nougat? I have random reboots at 40% battery left.
Click to expand...
Click to collapse
I'm sure. Try and see
I've done all of this before & it only helps slightly. The drain is related to HTC's framework & it's dialer, and the only way to truly stop the drain is to use airplane mode...which kind of defeats the purpose of it being a phone.
This battery issue is non-existent with LineageOS 15.1 & AOSiP 8.1, running on Oreo firmware. Both of those ROMs work fine, but still have bugs: bottom speaker barely works & Bluetooth issues.
mattie_49 said:
Using AKT. And enabled through terminal.And no I didn't disable pnp mgr, I'm guessing it overrides it. And soilwork won't flash. Akt is working fine for me no reboots or massive drains or wakelocks.No excessive heat either running cool as a cucumber,so until pnp is updated I chose to use this route. I'm getting better averages than I was on Nougat. 4.5 hrs on screen currently 27% battery remaining and 16 hours off charger. Try it and see what you think.
Click to expand...
Click to collapse
I am o. Leedroid 5.2 with stock kernel tweaked by leedroid, can I install a stock stock kernel and what rom do you have?
Is this AKT still work after reboot? Or we must re-enable it after reboot?
fresh777 said:
Is this AKT still work after reboot? Or we must re-enable it after reboot?
Click to expand...
Click to collapse
Must use a terminal emulator. Type su enter
Then type AKT then it's self explainable, choose your profile.
mattie_49 said:
Must use a terminal emulator. Type su enter
Then type AKT then it's self explainable, choose your profile.
Click to expand...
Click to collapse
Thanks for the reply. I mean after run AKT from terminal and done. For the next reboot, i must repeat the step or not?
fresh777 said:
Thanks for the reply. I mean after run AKT from terminal and done. For the next reboot, i must repeat the step or not?
Click to expand...
Click to collapse
No. All done till you wanna change profiles if at all. Terminal will tell you what profile is active after AKT enter
mattie_49 said:
No. All done till you wanna change profiles if at all. Terminal will tell you what profile is active after AKT enter
Click to expand...
Click to collapse
Thank you. I just use this in aosip 8.1 rom. Don't see any improvement for battery life. But for hot issue, i didn't got this issue when use AKT.
Ninja X said:
I am o. Leedroid 5.2 with stock kernel tweaked by leedroid, can I install a stock stock kernel and what rom do you have?
Click to expand...
Click to collapse
the stock kernel in leedroid is not tweaked, you either have the actual stock kernel or the cleanslate kernel.
Oooh.

Categories

Resources