Interactive – why is this the best governor? [INFO] - AT&T Galaxy Note 3 General

Technical thread I wrote up about the subject... noob or dev check it out. I hope you find something useful to further your knowledge of Android/Linux
Cheers
http://forum.xda-developers.com/showthread.php?t=2649820

cun7 said:
Technical thread I wrote up about the subject... noob or dev check it out. I hope you find something useful to further your knowledge of Android/Linux
Cheers
http://forum.xda-developers.com/showthread.php?t=2649820
Click to expand...
Click to collapse
Can you please post ALL of your kernel settings (Governor, Schedulers etc) ??
Currently our bootloader is locked so we can only change Default governor and that's it. But as soon as someone finds an exploit or something I'll be trying out your settings.
P.S. Default governor is interactive on AT&T N3

Walter.White said:
Can you please post ALL of your kernel settings (Governor, Schedulers etc) ??
Currently our bootloader is locked so we can only change Default governor and that's it. But as soon as someone finds an exploit or something I'll be trying out your settings.
P.S. Default governor is interactive on AT&T N3
Click to expand...
Click to collapse
First time I've ever seen default be interactive on a device that includes the governor. Interesting to know!
You can change specifics in your /etc/init.qcom.post_boot.sh file as well.... That is where lines are called out for ondemand settings... Switch them there
Sent from another galaxy

thanks for posting here! from what i saw, ondemand was the default governor on my Note 3, but i went ahead and changed it to intereactive, and I also changed the scheduler from row to deadline.... and i feel like i am already noticing a significant difference in battery life. previously my battery would fall from 100 almost instantly after taking it off the charger, but now it seems like more of a steady drip! gonna keep running this way and see how it goes but it does feel a lot better, with seemingly about the same performance.

cun7 said:
Technical thread I wrote up about the subject... noob or dev check it out. I hope you find something useful to further your knowledge of Android/Linux
Cheers
http://forum.xda-developers.com/showthread.php?t=2649820
Click to expand...
Click to collapse
This is my first android device so I'm still learning. But I'm a fast learner so just point me in the right direction.
Code:
product_name=`getprop ro.product.name`
case "$product_name" in
klte*)
# Change interactive governor parameters
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "20000 1400000:80000 1500000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1400000:90 1700000:95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
;;
*)
# Change interactive governor parameters
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "20000 1400000:80000 1500000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1400000:90 1700000:95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
;;
esac
timer_rate: 15000
timer_slack: 60000
min_sampling_time: 60000
hispeed_freq: 1728000
go_hispeed_load: 65
Also how do I change my Scheduler to Deadline?? And are there any settings that I need to change for deadline scheduler too??
P.S. I have attached init.qcom.post_boot.sh (just change ending from .pdf to .sh) from ATT N3 Variant. Any help will be appreciated.

Walter.White said:
This is my first android device so I'm still learning. But I'm a fast learner so just point me in the right direction.
Code:
product_name=`getprop ro.product.name`
case "$product_name" in
klte*)
# Change interactive governor parameters
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "20000 1400000:80000 1500000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1400000:90 1700000:95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
;;
*)
# Change interactive governor parameters
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "20000 1400000:80000 1500000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1400000:90 1700000:95" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
;;
esac
timer_rate: 15000
timer_slack: 60000
min_sampling_time: 60000
hispeed_freq: 1728000
go_hispeed_load: 65
Also how do I change my Scheduler to Deadline?? And are there any settings that I need to change for deadline scheduler too??
P.S. I have attached init.qcom.post_boot.sh (just change ending from .pdf to .sh) from ATT N3 Variant. Any help will be appreciated.
Click to expand...
Click to collapse
I'll edit it for you tonight once I get home and send it back to you
Sent from another galaxy

cun7 said:
I'll edit it for you tonight once I get home and send it back to you
Sent from another galaxy
Click to expand...
Click to collapse
Thank you. Two more things.
1. How do I change my default scheduler from cfq to deadline ??
2. How do I change my cache size to 4096 ??
(Is there a way to do it besides using init.d script??)

Walter.White said:
Thank you. Two more things.
1. How do I change my default scheduler from cfq to deadline ??
2. How do I change my cache size to 4096 ??
(Is there a way to do it besides using init.d script??)
Click to expand...
Click to collapse
The only way to change it without using a script is to use an app. I prefer TricksterMod. I like tinkering with scripts every now and again, but it can be a pain to simply have to reboot your device after editing some stuff in init.d or post_boot.sh
Give trickster a shot. I just got home, I'll look at your post boot file and send it back to you. I'll go ahead and add lines in there for setting the read ahead size and scheduler.

cun7 said:
The only way to change it without using a script is to use an app. I prefer TricksterMod. I like tinkering with scripts every now and again, but it can be a pain to simply have to reboot your device after editing some stuff in init.d or post_boot.sh
Give trickster a shot. I just got home, I'll look at your post boot file and send it back to you. I'll go ahead and add lines in there for setting the read ahead size and scheduler.
Click to expand...
Click to collapse
Thanks man. I appreciate it.

cun7 said:
The only way to change it without using a script is to use an app. I prefer TricksterMod. I like tinkering with scripts every now and again, but it can be a pain to simply have to reboot your device after editing some stuff in init.d or post_boot.sh
Give trickster a shot. I just got home, I'll look at your post boot file and send it back to you. I'll go ahead and add lines in there for setting the read ahead size and scheduler.
Click to expand...
Click to collapse
Did you had chance to look at it?

Related

Easiest way to oc without SetCPU?

I have only had my Xoom for a few days so its a new learning curve atm
I have the US MZ604 OTA ICS installed and Rogue 2.0.2 "Kuma" Kernel
After i have decided my stable clocks
whats the easiest way to add these and to undervolt
without any external apps
on my phone its a simple case of adding lines to
/etc/initqcom.post_boot.sh
like so
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 30 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/down_differential
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 672000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
What's your aversion to SetCPU?
It makes it really easy to OC/UV.
Sent from my Xoom using xda premium
If you want to know what files to modify take a look through the EOS gerrit review site and look for what files they tweak for overclocking the xoom. If you're just trying to save a buck you can get setcpu for free on xda. There is no reason not to use an app to test frequencies before making changes to boot options that can boot loop your device.
I dont like having processes running that are un needed
if im going to be running at 1.5ghz 24/7
why not have it set from the get go to 1.5ghz
instead of having a background process do it post boot
d3athsd00r said:
What's your aversion to SetCPU?
It makes it really easy to OC/UV.
Sent from my Xoom using xda premium
Click to expand...
Click to collapse
ShonkUK said:
I dont like having processes running that are un needed
if im going to be running at 1.5ghz 24/7
why not have it set from the get go to 1.5ghz
instead of having a background process do it post boot
Click to expand...
Click to collapse
Unless you're using setcpu profiles (which I don't reccomend), there should be no constant process running.
It runs as a background process on every boot if oc on boot is enabled
I have been having a sniff around the firmware it seems to be
/init.stingray.rc
# Power Management Settings
#write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
# timer 20ms, min sample 80ms, go max at 80%
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 80000
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 80
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# No need to continuously scan w1 bus
write /sys/devices/w1\ bus\ master/w1_master_search 1
# Disable charging LED
write /sys/class/gpio/gpio168/value 1
its in the boot.img..
i will setup something in init.d
echo 1504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1504000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
is the command
umm init.d is broken on kuma 2.02 doh
here's how to fix it for anyone who wants to do this
To fix rogue_XM-kernel-2.0.2-kuma init.d support
extract sysinit from rogue_XM-kernel-2.0.2-kuma.zip to c:\
adb remount rw
adb push c:\sysinit /system/bin/
adb shell
chmod 755 /system/bin/sysinit
chgrp 2000 /system/bin/sysinit
any script you put in /system/etc/init.d/01oc for example
will run on boot
here's my 01oc file
#!/system/bin/sh
# overclock that *****
echo 1504000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1504000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# enable charging light while device is on
chmod 777 /sys/devices/virtual/gpio/gpio168/value
echo 0 > /sys/devices/virtual/gpio/gpio168/value
# sd card write access
umount /mnt/external1
mount -t vfat -o fmask=0000,dmask=0000,rw /dev/block/platform/sdhci-tegra.2/mmcblk0p1 /mnt/external1
then
adb remount rw
adb push c:\01oc /system/etc/init.d/
adb shell
chmod 755 /system/etc/init.d/01oc
I thought when you said "easiest", you mean easy. Not how to do it by the hard way.
You should be asking how to do without third-party applications.
Hardcoding the OC is a bad idea. If something goes wrong, you can get locked out of your device, or have to fiddle through recovery to fix it. That's where a tool that runs at startup can save your bacon and also make thing "easiest" (which is what you are after), as it will automatically revert to default clock if the last shutdown wasn't done cleanly.
Well its not really hard is it
its a 3 line script for init.d
if it wasnt for the fact that init.d was broken on kuma
and i had to find out the method of oc
it would have been done in two mins
navossoc said:
I thought when you said "easiest", you mean easy. Not how to do it by the hard way.
You should be asking how to do without third-party applications.
Click to expand...
Click to collapse

Doubts About DroidXGovernorsV2.2 and other little doubt

First I want to apologize for my strange English (Google translator)
Returning to Questions, I would like to Know how to Remove the vibration when the screen Unlock
I also like to know how to do DroidxGovernos work on my machine because the installation is completed via CMW put the Set CPU does not recognize them, any thoughts?
Brazil to Use Retail 2.3.6 Root, Boot menu, and CMW working
Thanks
Not sure on the lockscreen vibration.
DX govs work by adding in the modules into /system/lib/modules/ and loading them with an init script. So far, they've worked on Bravo, Defy, and Defy+. Did you enable overclocking in the bootmenu? Its necessary. Some users even have to enable "Load All Modules". I've never had to, but some have. I can tell you the Boostedass works wonders on ICS with battery time. Added 16 hours of battery life on Quarx 2012\05\12. Miui runs for 2 days with about 4-5 hours of mp3 playing a day, 1 hour of wifi browsing, and being a bit anal with disabling what I'm not using with the power widget (3g, wifi, gps, etc...)
There is that chance that they just don't work. InteractiveX, from the same rom I found these governors in, won't work at all on my Bravo. I know that on CM7\MIUI\CM9 on the Bravo all that I have to do is flash the zip and enable them in No Frills and they just work.
Boosted, as well as SIO, are now built into the latest bootmenus for the Defy and Bravo now because of how well they work.
The full init script I'm using, and included with DX Gov 2.2.
Code:
#!/system/bin/sh
#Load Modules for IO Scheduler and Governors
insmod /system/lib/modules/cpufreq_smartassv2.ko
insmod /system/lib/modules/cpufreq_BOOSTEDassV2.ko
insmod /system/lib/modules/sio-iosched.ko
#Set IO Scheduler, use "sio" "noop" or "cfs" (sio and noop recommended)
for i in /sys/block/mmc*/queue; do
echo "sio" > $i/scheduler
done
#Tweak IO Parameters
for i in /sys/block/*/queue; do
[ -f "$i/rotational" ] && [ "`cat $i/rotational`" -ne "0" ] && echo "0" > $i/rotational
[ -f "$i/read_ahead_kb" ] && echo "2048" > $i/read_ahead_kb
[ -f "$i/iosched/async_read_expire" ] && echo "4000" > $i/iosched/async_read_expire
[ -f "$i/iosched/async_write_expire" ] && echo "16000" > $i/iosched/async_write_expire
[ -f "$i/iosched/fifo_batch" ] && echo "1" > $i/iosched/fifo_batch;
[ -f "$i/iosched/sync_read_expire" ] && echo "500" > $i/iosched/sync_read_expire
[ -f "$i/iosched/sync_write_expire" ] && echo "2000" > $i/iosched/sync_write_expire
[ -f "$i/iosched/writes_starved" ] && echo "0" > $i/iosched/writes_starved
[ -f "$i/nr_requests" ] && echo "2048" > $i/nr_requests
[ -f "$i/iostats" ] && [ "`cat $i/iostats`" -ne "0" ] && echo "0" > $i/iostats
done
#Set SD Card read ahead cache
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
You can remove the smartassv2 insmod line (script above, 5th line) to save a tiny bit of ram; and the last line is the SD Speed Tweak (also script above, last 2 lines). It can be removed if you use other values or another mod with them included. I only included it so all the read ahead values were the same.
You can also use the following script to load and configure Boosted or SmartassV2. It doesn't work on the Bravo. Some reason echoing boostedass causes my phone to freeze on boot. Perhaps you'll have better luck than me.
Code:
#!/system/bin/sh
#Use either BOOSTEDassV2 or smartassV2. Comment out (# at beginning) all lines if using stock governors.
echo "BOOSTEDassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#Only use one or the other, and only if you plan on using BOOSTEDassV2 or smartassv2
#Tweak BOOSTEDassV2
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/awake_ideal_freq
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_ideal_freq
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_wakeup_freq
echo "70" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/max_cpu_load
echo "40" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/min_cpu_load
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_up_step
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_down_step
echo "49000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/up_rate_us
echo "97000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/down_rate_us
#Tweak smartassV2
#echo "600000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
#echo "600000" > /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 "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step
#echo "50000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
#echo "65000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us

Can someone help me look at this code?

I put this inside of init.d can it won't excute. So I run it by scriptmanager and it gave me errors in line 3, 4, 5, 6 ...11 write error: bad file number.
Any idea? Thanks.
#!/system/xbin/bash
if [ -d "/sys/devices/system/cpu/cpufreq/smartass" ]; then
echo 768000 > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo 200000 > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo 768000 > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo 85 > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo 60 > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo 150000 > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo 150000 > /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;
fi
pump. Should I post it here or somewhere else? Can mod please move this to "Android dev" or a proper forum?
You don't need the if and end if.
Also, i am pretty sure that the #!system/... is going to the right place, you can just flash my indian madness mod (thats what i basically is plus it adds virtuous OC) I'll get you a link
---------- Post added at 02:27 AM ---------- Previous post was at 02:26 AM ----------
http://forum.xda-developers.com/showthread.php?t=1634061
Make sure that your bash shell really reside under /system/xbin/bash
Since you get an error for every line in your script it mean that the interpreter can't read it correctly. So it might be that BASH is located somewhere else.
Ziv
ibuddler said:
I put this inside of init.d can it won't excute. So I run it by scriptmanager and it gave me errors in line 3, 4, 5, 6 ...11 write error: bad file number.
Any idea? Thanks.
#!/system/xbin/bash
if [ -d "/sys/devices/system/cpu/cpufreq/smartass" ]; then
echo 768000 > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
echo 200000 > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
echo 768000 > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo 85 > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo 60 > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo 150000 > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
echo 150000 > /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;
fi
Click to expand...
Click to collapse
Also make sure that files in /sys/devices/system/cpu/cpufreq/smartass/ exist. Seeing as you don't get an error on line 1 or 2, I'd say it found bash, and that the directory exists, but the files do not. There is a small chance that this may also need to be run as root so that you have write permissions to those files. I would have expected "permission denied" in that case.
I think that's what the If condition is suppose to check. that the smartass directory do exist. Ot shouldn't even enter into that section if there's no smartass directory.
Can it be that your syntax for the if clause is wrong?
Ziv

[MOD] HBBTweaks v32 (11/23) - battery and performance

HBBTweaks is a package of Kernel and build.prop tweaks I've done (read, tested, benchmarked, saw the sources, etc) and shared on a Facebook group since version 1 (long time ago huh?)
Lots of users tested and most of them noticed improvements in battery life *and* performance, so I decided to publish here as you may find it helpful too..
It is just a .zip file you can install with CWM or TWRP the same way as you install a ROM. It should work on ALL ROMs but *I* have only tested it with CM10.x and CM11 ones. Don't worry, if anything goes wrong you can easily uninstall it and everything will be reverted.
WARNING: it will activate some overclocking (cpu: 1050mhz, gpu: 700mhz) and undervolting *if* your Kernel is able to, so your phone may get unstable if it's not as GOOD as mine, LOL.
If you get some reboots after installing it, try the alternate versions.. First try a1, then try a2. They won't save as MUCH battery as the original one but you'll definitively notice improvements as this isn't just a "switch-on-the-OC script" !!
Download link: http://d-h.st/iuT (Multi-installer, with two "alternate" versions and uninstaller included)
See if your phone gets a bit more responsive and if your battery life is better then post your thoughts here
CHANGELOG
31 -> 32
abyssplug or pegasusqplus as default
faster gpu clock reaction
sqlite3 and zipalign updated
touchboost to 800mhz with 200ms duration (default was 500ms)
higher intervals for the kernel scheduler
won't save any modified data to mmc/sd for up to 5m
tweaked abyssplug and pegasusq
won't disable zram, instead will use it more if it's already enabled
30 -> 31
sqlite3 included to optimize some databases
other minor tweaks
don't forget to reinstall it after any rom update!
29 -> 30
it tries to disable zram giving better performance and battery
ext4 and sioplus tweaks!
abyssplug by default, tweaked also
28 -> 29
kernel's sched_* back to default. better performance
testing some ext4 tweaks
27 -> 28
Aroma installer providing 2 alternate installation options and an uninstaller.
10.1 (and MIUI) compatible
Different swappiness and page-cluster values for zRam swapping or "normal" swapping
ddr_opp set to 100%, don't know if it will stick. it's faster here.
tweaked the way minfree is set and also the mounting options
26 -> 27
A typo (while I was translating) was preventing undervolting.. that's why nobody complained about reboots with the full version.. lol
XDA:DevDB Information
HBBTweaks, Tool/Utility for the Samsung Galaxy S Advance I9070
Contributors
fbs
Version Information
Status: Testing
Created 2014-06-16
Last Updated 2014-11-25
Works on JB roms too ?
Normally I can't overclock, it causes the known freezes and reboot issues.
So which verison should I pick? Alternate 1 or Alternate 2?
danielbulan97 said:
Works on JB roms too ?
Click to expand...
Click to collapse
It should..
coffeecore said:
Normally I can't overclock, it causes the known freezes and reboot issues.
So which verison should I pick? Alternate 1 or Alternate 2?
Click to expand...
Click to collapse
It's not a big overclock to the cpu(it's limited to 1050mhz), it's mostly to the gpu.. so, I think you could try the original one and then a1.. come on, the files are so small..
fbs said:
It's not a big overclock to the cpu(it's limited to 1050mhz), it's mostly to the gpu.. so, I think you could try the original one and then a1.. come on, the files are so small..
Click to expand...
Click to collapse
Haha I know, sorry for my lazyness :cyclops:
Edit: You should/can mention in the OP that OC is limited to 1050mhz.
I will download and try!
I am using Resurection Remix. The rom is awesome but i am having some battery drains..
I will try this tweaks for some days and test if the battery goes better
thanks!
@fbs Thanks man, tried original one and everything is fine. Waiting a couple of days for making a correct review. One question, I set CPU to 1000 (max.) and after that I flashed your script. When looking for which states my processor has been on there is 1000 Mhz the highest (I've set this before flashing script) but is my CPU actually running on 1050mhz? Would like to know more about this script
Thanks anyway, it's nice :thumbup:
PS; On what ROM are you now?
sent with my S Advance.
coffeecore said:
@fbs Thanks man, tried original one and everything is fine. Waiting a couple of days for making a correct review. One question, I set CPU to 1000 (max.) and after that I flashed your script. When looking for which states my processor has been on there is 1000 Mhz the highest (I've set this before flashing script) but is my CPU actually running on 1050mhz? Would like to know more about this script
PS; On what ROM are you now?
Click to expand...
Click to collapse
Well it sets max frequency to 1050 right after booting, but if your ROM or any app (like No-Frills) set it back to 1000, it will keep on 1000.
Right now I'm using Paranoid 4.4 build by t4n017 available here.. it's faster than vanilla cm11 and Vanir, to me..
v26 changelog?
moscka said:
v26 changelog?
Click to expand...
Click to collapse
Did you use V25 ?
Is KitKat based custom ROM supported?
Is KitKat based custom ROM supported? TQ.
xbean said:
Is KitKat based custom ROM supported? TQ.
Click to expand...
Click to collapse
Yes
I'll give it a try tomorrow.
coffeecore said:
Yes
Click to expand...
Click to collapse
Thanks. I'll give it a try tomorrow. Cheers.
King ov Hell said:
Did you use V25 ?
Click to expand...
Click to collapse
Yes, I was on v25.
The system is a little snappier, but the most noticeable change is the battery save (undervolting).
I got 4h and 30m of screen on and my battery is not good. I have it for 18 months.
I'm on PA 4.4.3.
Essential
II'm using this tweak since version 23. Currently use version 26 alt1 with Vanir 4.4.3 ROM and everything is running perfectly. Really feel improvements in battery performance and the performance of the device. :good::good::good::good::good:
Thank U Bro.
and what about the battery life
mhmod222 said:
and what about the battery life
Click to expand...
Click to collapse
Try it out, it is worth it man :good:
---------- Post added at 11:57 PM ---------- Previous post was at 11:21 PM ----------
@fbs
It is not recommended to flash this script right after flashing ROM and Gapps, right?
Booting is a requirement.
coffeecore said:
Try it out, it is worth it man :good:
---------- Post added at 11:57 PM ---------- Previous post was at 11:21 PM ----------
@fbs
It is not recommended to flash this script right after flashing ROM and Gapps, right?
Booting is a requirement.
Click to expand...
Click to collapse
You can flash it any time. Don't need to boot after initial ROM/GApps flash.. :good:
It just won't work if you install it BEFORE the ROM itself as the ROM's installer will format /system and everything will be lost
If anyone's interested, here are the two main "scripts" my tweak uses. Anyone could read it inside the .zip or /system/etc/init.d folder, but I know some are lazy then I'll copy/paste here
#!/system/bin/sh
#hbbtweaksv27
echo z1hbbkern START
#activate KSM, but less pages in a bunch to prevent lagging
echo 51 > /sys/kernel/mm/ksm/sleep_millisecs;
echo 29 > /sys/kernel/mm/ksm/pages_to_scan;
echo 1 > /sys/kernel/mm/ksm/run;
#and activate uksm if it has it
echo 1 > /sys/kernel/mm/uksm/run;
echo medium > /sys/kernel/mm/uksm/cpu_governor;
echo 439 > /sys/kernel/mm/uksm/sleep_millisecs;
#I read somewhere 5ms should be the maximum for a dual-core, our default was 10ms
echo "3999971" > /proc/sys/kernel/sched_latency_ns;
echo "1000003" > /proc/sys/kernel/sched_shares_window;
#higher avg time, maybe lessen the overhead
echo "2003" > /proc/sys/kernel/sched_time_avg;
#1.5ms was the minimum time a thread could be on cpu.
#I think it's too much time, lowered to 0,1ms. Same for threads that are waking up
echo "100003" > /proc/sys/kernel/sched_wakeup_granularity_ns;
echo "100003" > /proc/sys/kernel/sched_min_granularity_ns;
echo "150000" > /proc/sys/kernel/sched_migration_cost;
#a forked thread should run right after
echo 1 > /proc/sys/kernel/sched_child_runs_first;
echo 0 > /proc/sys/kernel/sched_tunable_scaling;
#won't enforce a time for real-time tasks.. maybe lessen the overhead?
echo -1 > /proc/sys/kernel/sched_rt_runtime_us;
echo 2000000 > /proc/sys/kernel/sched_rt_period_us;
#updated file-data that's cached in ram will stay on it 63s before being written
echo "6317" > /proc/sys/vm/dirty_writeback_centisecs;
echo "6317" > /proc/sys/vm/dirty_expire_centisecs;
#but if we have dynamic writebacks, it will stay only 3s when display is active and 123s when not
echo "317" > /proc/sys/vm/dirty_writeback_active_centisecs;
echo "12301" > /proc/sys/vm/dirty_writeback_suspend_centisecs;
#let's almost deactivate swapping, our "disc" is ultra-super-slow!
echo "1" > /proc/sys/vm/swappiness;
#let's fix the amount of memory that could be dirty before it start writing to mmc
echo "8000000" > /proc/sys/vm/dirty_background_bytes;
#let's fix the maximum amount of memory an app can defile before it get blocked
echo "14000000" > /proc/sys/vm/dirty_bytes;
#4mb really "free", not even used for caching
echo 4096 > /proc/sys/vm/min_free_kbytes;
#1=same amount for every zone.. (?)
echo 1 > /proc/sys/vm/min_free_order_shift;
#3s frequency for stats. idk if there's any drawbacks
echo 3 > /proc/sys/vm/stat_interval;
echo 0 > /proc/sys/vm/highmem_is_dirtyable;
echo "30" > /proc/sys/kernel/panic;
echo "0" > /proc/sys/kernel/panic_on_oops;
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
#swap as little as possible in a bunch
echo "1" > /proc/sys/vm/page-cluster;
#less wait time, less complexity.. less memory, less packet size
echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout;
echo 1 > /proc/sys/net/ipv4/tcp_timestamps;
echo 5 > /proc/sys/net/ipv4/tcp_challenge_ack_limit;
echo 1 > /proc/sys/net/ipv4/tcp_sack;
echo 0 > /proc/sys/net/ipv4/tcp_dsack;
echo 64 > /proc/sys/net/ipv4/tcp_base_mss;
echo 0 > /proc/sys/net/ipv4/tcp_retrans_collapse;
echo 0 > /proc/sys/net/ipv4/tcp_abc;
echo 0 > /proc/sys/net/ipv4/tcp_mtu_probing;
echo 0 > /proc/sys/net/ipv4/tcp_ecn;
echo 21 > /proc/sys/net/ipv4/tcp_reordering;
echo 262144 > /proc/sys/net/core/wmem_default;
echo 262144 > /proc/sys/net/core/rmem_default;
echo 1 > /proc/sys/net/ipv4/tcp_no_metrics_save;
echo 512 1024 4096 > /proc/sys/net/ipv4/tcp_mem;
echo illinois > /proc/sys/net/ipv4/tcp_congestion_control;
#max of 4mb for net reads and writes, should be enough
echo 4194304 > /proc/sys/net/core/rmem_max;
echo 4194304 > /proc/sys/net/core/wmem_max;
#abb-codec audio: higher gains and low power mode activated
echo on > /sys/kernel/abb-codec/anagain3;
echo gain=0 > /sys/kernel/abb-codec/anagain3;
echo on > /sys/kernel/abb-codec/hsldiggain;
echo gain=0 > /sys/kernel/abb-codec/hsldiggain;
echo on > /sys/kernel/abb-codec/hsrdiggain;
echo gain=0 > /sys/kernel/abb-codec/hsrdiggain;
echo on > /sys/kernel/abb-codec/hslowpow;
echo mode=1 > /sys/kernel/abb-codec/hslowpow;
echo on > /sys/kernel/abb-codec/hsdaclowpow;
echo mode=1 > /sys/kernel/abb-codec/hsdaclowpow;
echo on > /sys/kernel/abb-codec/hshpen;
echo mode=1 > /sys/kernel/abb-codec/hshpen;
echo on > /sys/kernel/abb-codec/classdhpg;
echo gain=10 > /sys/kernel/abb-codec/classdhpg;
echo on > /sys/kernel/abb-codec/classdwg;
echo gain=10 > /sys/kernel/abb-codec/classdwg;
echo on > /sys/kernel/abb-codec/addiggain2;
echo gain=4 > /sys/kernel/abb-codec/addiggain2;
echo on > /sys/kernel/abb-codec/eardiggain;
echo gain=0 > /sys/kernel/abb-codec/eardiggain;
echo 1 > /sys/kernel/abb-codec/chargepump;
#ramp to 800mhz when you touch the screen
echo on > /sys/kernel/mxt224e/touchboost;
echo 800000 > /sys/kernel/mxt224e/touchboost_freq;
#no fsync.
echo 1 > /sys/kernel/fsync/mode;
#mali (gpu) stuff
echo 0 > /sys/module/mali/parameters/mali_debug_level;
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder;
#439ms instead of 1s to verify mali(gpu)'s usage
echo 439 > /sys/module/mali/parameters/mali_utilization_sampling_rate;
echo 439 > /sys/module/mali/parameters/mali_pm_sampling_rate;
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max;
echo 48 > /sys/module/mali/parameters/mali_l2_max_reads;
echo 0 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs;
#our cpu's own powersaving is buggy and we have pegasusq
echo 0 > /sys/devices/system/cpu/sched_mc_power_savings;
echo 0 > /sys/module/dhd/parameters/dhdpm_fast;
echo 4 > /d/cpuidle/deepest_state;
#don't try to squeeze too much or too frequently (?) lessen overhead (?)
echo 64 > /sys/module/lowmemorykiller/parameters/cost;
#order of death! starting from right to left in number of pages
#first it will kill empty apps when we have less than 30720x4096 (120MB) of free ram
minfree=16384,18432,20480,24576,26624,30720;
lmk=/sys/module/lowmemorykiller/parameters/minfree;
minboot=`cat $lmk`;
while sleep 10; do
if [ `cat $lmk` != $minboot ]; then
[ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit;
fi;
done&
#I really don't know if these will help to lessen overhead or lessen lags, but....
sysctl -w vm.extfrag_threshold=800;
sysctl -w kernel.randomize_va_space=0;
echo 128 > /proc/sys/kernel/random/read_wakeup_threshold;
echo 256 > /proc/sys/kernel/random/write_wakeup_threshold;
#let's use pegasusq as governor as it's multi-core AWARE and it shut downs our second cpu
echo pegasusq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
governor=reset;
while true; do
current=`cut -d\[ -f2 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | cut -d\] -f1`;
if [ $governor != $current ]; then
governor=$current;
if [ $governor == "pegasusq" ]; then
echo 40000 > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate;
echo 400000 > /sys/devices/system/cpu/cpufreq/pegasusq/freq_for_responsiveness;
echo 70 > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold_at_min_freq;
echo 99 > /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold;
echo 20 > /sys/devices/system/cpu/cpufreq/pegasusq/down_differential;
echo 20 > /sys/devices/system/cpu/cpufreq/pegasusq/freq_step;
echo 800000 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1;
echo 400000 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0;
echo 300 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1;
echo 110 > /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0;
echo 3 > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/pegasusq/sampling_down_factor;
fi;
if [ $governor == "lulzactiveq" ]; then
echo 3 > /sys/devices/system/cpu/cpufreq/lulzactiveq/screen_off_min_step;
echo 90 > /sys/devices/system/cpu/cpufreq/lulzactiveq/inc_cpu_load;
echo 40 > /sys/devices/system/cpu/cpufreq/lulzactiveq/dec_cpu_load;
echo 80000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/up_sample_time;
echo 80000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/down_sample_time;
echo 120000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_sampling_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_up_rate;
echo 2 > /sys/devices/system/cpu/cpufreq/lulzactiveq/cpu_down_rate;
echo 1 > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_up_step;
echo 1 > /sys/devices/system/cpu/cpufreq/lulzactiveq/pump_down_step;
echo 800000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_1_1;
echo 400000 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_freq_2_0;
echo 300 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_1_1;
echo 110 > /sys/devices/system/cpu/cpufreq/lulzactiveq/hotplug_rq_2_0;
fi;
fi;
sleep 809;
done&
#no sleepers seems to help. others are experimental
mount -t debugfs none /sys/kernel/debug;
echo "ARCH_POWER" > /sys/kernel/debug/sched_features;
echo "NO_GENTLE_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NORMALIZED_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_START_DEBIT" > /sys/kernel/debug/sched_features;
echo "NO_NEXT_BUDDY" > /sys/kernel/debug/sched_features;
echo "NONTASK_POWER" > /sys/kernel/debug/sched_features;
echo "AFFINE_WAKEUPS" > /sys/kernel/debug/sched_features;
#let's force the system user interface to have higher priority
while sleep 1; do
if [ `pidof com.android.systemui` ]; then
systemui=`pidof com.android.systemui`;
busybox renice -18 $systemui;
echo -17 > /proc/$systemui/oom_adj;
chmod 100 /proc/$systemui/oom_adj;
exit;
fi;
done&
#and some launchers too
list="com.android.launcher org.adw.launcher org.adwfreak.launcher com.anddoes.launcher com.android.lmt com.chrislacy.actionlauncher.pro com.cyanogenmod.trebuchet com.gau.go.launcherex com.mobint.hololauncher com.mobint.hololauncher.hd com.teslacoilsw.launcher com.tsf.shell org.zeam";
while sleep 60; do
for class in $list; do
if [ `pgrep $class` ]; then
launcher=`pgrep $class`;
echo -17 > /proc/$launcher/oom_adj;
chmod 100 /proc/$launcher/oom_adj;
busybox renice -18 $launcher;
fi;
done;
exit;
done&
echo hbbkern: adjusting frequencies and voltages/undervolt
########################## OVERCLOCK & UNDERVOLT. The alternate versions changes these!
#and you can change it too. higher VARM = higher voltage. in hexadecimal
#This is ULTRA-STABLE on my phone but yours are not like mine..
#################
#overclock gpu if needed
echo 1 > /sys/kernel/mali/mali_auto_boost;
#720mhz while "boosted" (idx 22)
echo idx=22 > /sys/kernel/mali/mali_boost_high;
#300mhz while not (idx 2)
echo idx=2 > /sys/kernel/mali/mali_boost_low;
#let's scale from 200mhz to 1050mhz
echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1050000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
#200mhz
echo varm=0x10 > /sys/kernel/liveopp/arm_step0;
echo set_volt=1 > /sys/kernel/liveopp/arm_step0;
#400mhz
echo varm=0x10 > /sys/kernel/liveopp/arm_step1;
echo set_volt=1 > /sys/kernel/liveopp/arm_step1;
#600mhz
echo varm=0x19 > /sys/kernel/liveopp/arm_step2;
echo set_volt=1 > /sys/kernel/liveopp/arm_step2;
#800mhz
echo varm=0x22 > /sys/kernel/liveopp/arm_step3;
echo set_volt=1 > /sys/kernel/liveopp/arm_step3;
#1000mhz
echo varm=0x2C > /sys/kernel/liveopp/arm_step4;
echo set_volt=1 > /sys/kernel/liveopp/arm_step4;
#1050mhz
echo varm=0x2E > /sys/kernel/liveopp/arm_step5;
echo set_volt=1 > /sys/kernel/liveopp/arm_step5;
echo z1hbbkern END
#!/system/bin/sh
#hbbtweaksv27
echo z2hbbmounts START
tune2fs -o journal_data_writeback /dev/block/mmcblk0p4
tune2fs -o journal_data_writeback /dev/block/mmcblk0p5
tune2fs -O ^has_journal /dev/block/mmcblk0p4
tune2fs -O ^has_journal /dev/block/mmcblk0p5
sleep 31;
#let's not update access time for each file/folder accessed (noatime, nodiratime)
#let's write only after 61 secs instead of 5
#"writeback" is the fastest metadata writing mode and "discard" will clean erased zones providing better writting performance after
busybox mount -o remount,noatime,nodiratime,rw,barrier=1,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=61 /data /data;
busybox mount -o remount,noatime,nodiratime,rw,barrier=0,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=67 /cache /cache;
#quem sabe tenha writeback?
busybox mount -o remount,noatime,nodiratime,data=writeback,rw,barrier=0,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=61 /cache /cache;
busybox mount -o remount,noatime,nodiratime,data=writeback,rw,barrier=1,noauto_da_alloc,discard,delalloc,nobh,nodev,nosuid,commit=67 /data /data;
for k in $(busybox mount | grep relatime | cut -d " " -f3); do busybox mount -o remount,noatime,nodiratime $k $k; done;
echo 15 > /proc/sys/fs/lease-break-time;
sleep 31;
#let's cache 2000 writes/reads requests
#no merging and no scheduler if not writing to a real mmc (less overhead?)
#NO read_ahead seems controversial.. but we shouldn't waste our time trying to read
# and fillin our ram with unrequested data
for i in $(busybox find /sys/devices -name queue);
do
echo 2000 > $i/nr_requests;
echo 2 > $i/rq_affinity;
echo 2 > $i/nomerges;
echo 0 > $i/rotational;
echo 0 > $i/add_random;
echo 0 > $i/iostats;
echo noop > $i/scheduler;
echo 0 > $i/read_ahead_kb;
done;
#for mmcs it will merge and try to use sioplus as scheduler..
for i in $(busybox find /sys/devices -name queue |grep mmc);
do
echo 0 > $i/nomerges;
echo row > $i/scheduler;
echo sio > $i/scheduler;
echo sioplus > $i/scheduler;
echo 0 > $i/read_ahead_kb;
done;
#in doubt about it for the external one
echo "128" > /sys/devices/virtual/bdi/179:96/read_ahead_kb;
CI() {
echo $1 > /sys/block/mmcblk0/queue/iosched/$2
echo $1 > /sys/block/mmcblk1/queue/iosched/$2
}
#scheduler tweaks
scheduler=reset;
while sleep 461; do
current=`cut -d\[ -f2 /sys/block/mmcblk0/queue/scheduler | cut -d\] -f1`;
if [ $scheduler != $current ]; then
scheduler=$current;
if [ $scheduler == "deadline" ]; then
CI 200 read_expire;
CI 500 write_expire;
CI 4 writes_starved;
CI 0 front_merges;
CI 8 fifo_batch;
elif [ $scheduler == "row" ]; then
CI 100 hp_read_quantum;
CI 75 rp_read_quantum;
CI 3 lp_read_quantum;
CI 6 hp_swrite_quantum;
CI 5 rp_swrite_quantum;
CI 4 rp_write_quantum;
CI 12 lp_swrite_quantum;
CI 10 read_idle;
CI 15 read_idle_freq;
elif [ $scheduler == "cfq" ]; then
CI 4 quantum;
CI 80 fifo_expire_sync;
CI 330 fifo_expire_async;
CI 12582912 back_seek_max;
CI 1 back_seek_penalty;
CI 60 slice_sync;
CI 50 slice_async;
CI 2 slice_async_rq;
CI 0 slice_idle;
CI 0 group_idle;
CI 1 low_latency;
fi;
fi;
done&
#nada de gastar memoria com internet, nossas conexoes sao ultra-lentas
setprop net.tcp.buffersize.evdo ""
setprop net.tcp.buffersize.evdo_b ""
setprop net.tcp.buffersize.gprs ""
setprop net.tcp.buffersize.hsdpa ""
setprop net.tcp.buffersize.hspa ""
setprop net.tcp.buffersize.hspap ""
setprop net.tcp.buffersize.hsupa ""
setprop net.tcp.buffersize.edge ""
setprop net.tcp.buffersize.umts ""
setprop net.tcp.buffersize.dchspap ""
setprop net.tcp.buffersize.lte ""
setprop net.tcp.buffersize.default 1024,32768,1048576,1024,4096,65536
setprop net.tcp.buffersize.wifi 4096,524288,1048576,4096,1048576,4194304
echo z2hbbmounts END
sleep 2;
#DROP all cached stuff till now. We won't need again all stuff that have been read while booting
sync;
sysctl -w vm.drop_caches=3;

[Script]Kernel Auditor

Hello, i'm using the Sabermod Rom from @beeeto, how ever the settings and script that i would like to share will work for all ROMs/Kernels with the latest Intelliplug and Settings (such as the Spirit Kernel).
The goal is to have a snap on performance when the screen is on.... and a very deep sleep when it is off.
I did the setup with Kernel Adiutor, how ever i did not find it to always apply on boot. So in the end i made a script to be sure that it always run on boot.
Programs that you will need:
Kernel Adiutor: https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
SManager: https://play.google.com/store/apps/details?id=os.tools.scriptmanager
With the free edition of SManager, make a new script on it (it say new program) then set it to gain SU permisions and to apply on every boot on the script edit window at the program.
Then click to edit the script and put the follow code:
Code:
#!/system/bin/sh
chmod "644" /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
chmod "644" /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
chmod "444" /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo "msm-adreno-tz" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor
sysctl -w net.ipv4.tcp_congestion_control=reno
stop mpdecision
stop mpdecision
stop mpdecision
echo "1" > /sys/module/intelli_plug/parameters/intelli_plug_active
echo "3" > /sys/module/intelli_plug/parameters/nr_run_profile_sel
echo "3" > /sys/module/intelli_plug/parameters/nr_run_profile_sel
echo "4" > /sys/module/intelli_plug/parameters/nr_run_hysteresis
echo "4" > /sys/module/intelli_plug/parameters/nr_run_hysteresis
echo "550000000" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
chmod "644" /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
chmod "644" /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "1190400" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
chmod "444" /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "1190400" > /sys/module/cpu_boost/parameters/input_boost_freq
echo "1190400" > /sys/module/cpu_boost/parameters/input_boost_freq
echo "10" > /sys/module/cpu_boost/parameters/input_boost_ms
echo "10" > /sys/module/cpu_boost/parameters/input_boost_ms
echo "10" > /sys/module/cpu_boost/parameters/boost_ms
echo "10" > /sys/module/cpu_boost/parameters/boost_ms
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
echo "msm-adreno-tz" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor
echo "550000000" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "8000" > /sys/module/simple_gpu_algorithm/parameters/simple_ramp_threshold
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "9472,13824,19968,44544,58368,65536" > /sys/module/lowmemorykiller/parameters/minfree
echo "512" > /sys/block/mmcblk0/queue/read_ahead_kb
echo "256" > /sys/block/mmcblk1/queue/read_ahead_kb
sysctl "-w" net.ipv4.tcp_congestion_control=reno
echo "1" > /sys/kernel/mm/ksm/run
echo "0" > /sys/kernel/mm/ksm/deferred_timer
echo "35" > /sys/kernel/mm/ksm/sleep_millisecs
swapoff "/dev/block/zram0/" > dev/null 2>&1
echo "1" /sys/block/zram0/reset
echo "178257920" > sys/block/zram0/disksize
mkswap "/dev/block/zram0/" > dev/null 2>&1
swapon "/dev/block/zram0/" > dev/null 2>&1
echo "0" > sys/kernel/power_suspend/power_suspend_mode
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "2" > /sys/module/simple_gpu_algorithm/parameters/simple_laziness
echo "1" > /sys/module/simple_gpu_algorithm/parameters/simple_gpu_active
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "1190400" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "67" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo "60 787000:70 998000:75 1094000:80 1190400:55" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo "20000 1094000:40000 1190400:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "1000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "1" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo "-1" > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo "45000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "0" > /sys/devices/system/cpu/cpufreq/interactive/boost
echo "1036800" > /sys/devices/system/cpu/cpufreq/interactive/sync_freq
echo "50" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
echo "787000" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
On Kernel Auditor the settings should be the following after run the script:
CPU:
Code:
CPU Maximum Frequency: 1190MHz
CPU Governor: Interactive
CPU Minimum Frequency: 300MHz
Multcore Power Saving: Enable
CPUBOOST=
Interval: 10ms
Input Interval: 10ms
Sync Threshold: 300MHz
Input Boost Frequency 1190MHz
CPU Hotplug:
Code:
MP Decision: OFF
IntelliPlug=
IntelliPLug: ON
Touch Boost: ON
Threshold Value: 192
Profile: Eco Performance
Hysteresis Value: 4
CPU Maximum Screen Off Frequency: 300MHz.
GPU:
Code:
GPU Maximum Frequency: 550MHz
GPU Governor: msm-adreno-tz
Simple GPU Algorithm=
Simple GPU Algorithm: On
Ramp Threshold: 8
Laziness: 2
I/O Scheduler:
Code:
Internal Storage=
Scheduler: row
Read-adead: 512kb
External Storage=
Scheduler: rol
Read-Ahead: 256kb
Kernel Samepage Merging
Code:
Enable KSM: On
Deferred timer: Off
Sleep between scans: 35ms
Pages to Scan: 100
Low Memory Killer:
Code:
Foreground Applications: 37MB
Visible Applications: 54MB
Secondary Server: 78MB
Hidden Applications: 174MB
Contend Providers: 228MB
Empty Applications: 256MB
Virtual Memory:
Code:
Disksize: 130MB
Misc Controls:
Code:
TCP Congestion Algorithm: reno
Vibration Strenght: 32%
Power Suspend Mode: AutoSleep
UPDATE:
Some settings to tune the Interactive governor:
Code:
Already on main script:
echo "1190400" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "67" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo "60 787000:70 998000:75 1094000:80 1190400:55" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo "20000 1094000:40000 1190400:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "1000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "1" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse
echo "550000" > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo "-1" > /sys/devices/system/cpu/cpufreq/interactive/timer_slack
echo "45000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "0" > /sys/devices/system/cpu/cpufreq/interactive/boost
echo "1036800" > /sys/devices/system/cpu/cpufreq/interactive/sync_freq
echo "50" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
echo "787000" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
Code:
CPU -> CPU Overnor Tunables:
above_highspeed_delay: 20000 1094000:40000 1190400:20000
boost: 0
boostpulse: 1
boostpulse_duration: 550000
go_hispeed_load: 67
hispeed_freq: 1190400
io_is_busy: 1
min_sample_time: 100
sampling_down_factor: 550000
sync_freq: 1036800
target_loads: 60 787000:70 998000:75 1094000:80 1190400:55
timer_rate: 45000
timer_slack: -1
up_threshold_any_cpu_load: 50
up_threshold_any_cpu_freq: 787000
That's it, i would like a feedback on how this settings work for you guys and what would you guys change.
Just a small note, the app's name is actually Kernel Adiutor, not Auditor.
hmm which part of code is for deep sleep? im interested only with this can make separated part of only deepsleep part?
leoetlino said:
Just a small note, the app's name is actually Kernel Adiutor, not Auditor.
Click to expand...
Click to collapse
Nice catch, fixing
plantator said:
hmm which part of code is for deep sleep? im interested only with this can make separated part of only deepsleep part?
Click to expand...
Click to collapse
Well it is hard to pinpoint what part exact will help (only) on deep sleep but i'll try
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
echo "0" > sys/kernel/power_suspend/power_suspend_mode
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold (if kernel support)
echo "192000" > /sys/module/cpu_boost/parameters/sync_threshold (if kernel support)
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold (only use if kernel don't support 192000 frequency)
echo "300000" > /sys/module/cpu_boost/parameters/sync_threshold (only use if kernel don't support 192000 frequency)
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
echo "300000" > /sys/module/intelli_plug/parameters/screen_off_max
cpu_nr_run_threshold
Hi,
Could you explain to me a little bit this parameter?: echo "192" > sys/module/intelli_plug/parameters/cpu_nr_run_threshold
What does the 192 mean?, What happens if I tweak that number higher-lower?
Thanks
I'm having some issues with your script, I hope I'm not doing it wrong : I'm getting "file not found" exceptions on pretty much every line of the script, which is weird... Any idea ?
From what I know if ksm is on, camera is not working
demolatorul said:
From what I know if ksm is on, camera is not working
Click to expand...
Click to collapse
Same issue here. To get it working again I had to turn off KSM then reboot.

Categories

Resources