[Q] Init.d problems - ONE Q&A, Help & Troubleshooting

I'm trying to make a script for my kernel settings on boot but can't seem to get them to apply it only applies the GPU clock, the max frequency, and voltage table. The CPU boost speeds, the go hispeed load value, and my I/o settings don't however. Is there something I'm doing wrong? At the end of the script I even have a line for it to create a text file verifying that the script ran but it in fact does not. There is no other kernel apps set to run at boot, and I've tried editing a vomertweaks zip with my settings and it won't apply either. Can anyone give me some tips?
Code:
#!/system/bin/sh
# CPU
echo 1267200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo 1267200 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
# GPU
echo 330000000 > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_gpuclk
# CPU Boost
echo 1036800 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 960000 > /sys/module/cpu_boost/parameters/sync_threshold
# Governor
echo 120000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 97 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 93 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
# Hotplug
echo 95 > /sys/devices/virtual/misc/mako_hotplug_control/load_threshold
# I/O Scheduler
echo row > /sys/block/mmcblk0/queue/scheduler
echo 1024 > /sys/block/mmcblk0/queue/read_ahead_kb
# Vibration
echo 20 > /sys/devices/virtual/timed_output/vibrator/vtg_level
# DISABLED:
# FSYNC System Call
#echo N > /sys/module/sync/parameters/fsync_enabled
#
# Voltage
echo "700 700 700 700 710 720 730 750 760 790 800 830 875 935 970" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
#
echo " ~ franco Tweaks Applied! ~ " > /sdcard/FKU.txt;

Related

[KERNEL] conservative governor for HTC 2.6.32-15 kernel

This module adds to the kernel the possibility of using the 'conservative' scaling governor. It may be a little less responsive than other governors, but may also result in better battery life overall.
This is from the kernel documentation:
"The CPUfreq governor "conservative", much like the "ondemand" governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour more suitable in a battery powered environment."
By default it will try to increase or decrease the CPU in 5% steps, and will tend to raise relatively slowly under load but decrease very quickly when idle. This means the CPU is likely to spend much more time at the lowest frequency (245MHz unless changed), but will offer the highest frequency when required for a longer period (like watching video).
The module in the attached files is compiled for the 2.6.32.15-g6a358a9 HTC kernel (released with 2.10.405.2) and the -gf9c0527 kernel (2.09.405.8).
To load, copy the module in recovery to /system/lib/modules and run:
insmod /system/lib/modules/cpufreq_conservative.ko
And to select run:
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
The attached update files will either load the module only, or load and select the module (active version).
Source is unmodified from the original, and thus is GPL compliant.
Hmm, great . On leedroid , waiting for yur flashable file
Sent from LeeDroid powered by HTC Sense using XDA App!
Thanks for sharing, it's great
Thanks..will try it
with kind regards...Alex
Tested and it runs fine for me. Sure enough you can see the CPU go up and down gradually as expected if you monitor it.
I've added a version for the -gf9c0527 kernel too. 'Active' versions will select this governor if flashed - custom ROMs may override this, so check your ROM.
I have added it for version g1fc4045, .ko only
cpufreq_conservative_gd96f2c0
added for version gd96f2c0, .ko only
How about g1fc4045?
SkilletDesire said:
How about g1fc4045?
Click to expand...
Click to collapse
Here it is.
How can i make this module to work with screenstate_scaling module?
screenstate_scaling script:
Code:
#!/system/bin/sh
#
# screenstate_scaling - switch CPU frequency governor on screen state change
# by [email protected] (FloHimself) - and modded NeoPhyTe
IWCONFIG=/system/xbin/iwconfig
AWAKE_GOVERNOR="ondemand"
SLEEP_GOVERNOR="ondemand"
(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 "998400" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "245000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "2" > /proc/sys/vm/dirty_background_ratio
echo "5" > /proc/sys/vm/dirty_ratio
echo "3" > /proc/sys/vm/laptop_mode
echo "10000000" > /proc/sys/kernel/sched_latency_ns
echo "4000000" > /proc/sys/kernel/sched_min_granularity_ns
echo "760000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "5150" > /proc/sys/kernel/threads-max
echo "20" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo "400000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo "4000" > /proc/sys/vm/dirty_expire_centisecs
echo "9000" > /proc/sys/vm/dirty_writeback_centisecs
$IWCONFIG eth0 txpower 100mW
log -p i -t screenstate_scaling "*** awake ***: switching CPU frequency governor to -> $AWAKE_GOVERNOR"
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 "245000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "245000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "2" > /proc/sys/vm/dirty_background_ratio
echo "5" > /proc/sys/vm/dirty_ratio
echo "5" > /proc/sys/vm/laptop_mode
echo "6000000" > /proc/sys/kernel/sched_latency_ns
echo "4000000" > /proc/sys/kernel/sched_min_granularity_ns
echo "4000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "4096" > /proc/sys/kernel/threads-max
echo "35" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo "800000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo "350" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias
echo "0" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
echo "40000" > /proc/sys/vm/dirty_expire_centisecs
echo "60000" > /proc/sys/vm/dirty_writeback_centisecs
$IWCONFIG eth0 txpower 10mW
log -p i -t screenstate_scaling "*** sleeping ***: switching CPU frequency governor to -> $SLEEP_GOVERNOR"
SLEEPING=
fi
done &)
i want to make that when the phone is awake 'conservative' scaling governor will run.
Thanks.
You'd have to change AWAKE_GOVERNOR="ondemand" to "conservative". But that is a heavily hacked script and may not work ideally.
how can i test if the module is working?
Hi
I upgraded my phone to the latest OTA (FPS fix) with a vanilla ROM.
The kernel version my phone is running is: 2.6.32.15-ge2fb08e [email protected] #11
Currently from what SetCPU tells me, my only supported governors are:
ondemand, userspace and performance.
Any way for me to add conservative to my kernel for use with SetCPU?
Thanks
Sheldon
Anyone can make the mod for the 2.6.32.15-g5d39305 kernel? (AuraxTSense_7.8.1)
Thanks!
PLEASE!
or at least anyone can explain to me how do i make it myself? Thanks.
please help me make this file.
2.6.32.15-gf5a401c kernel from 2.29.405.2 update
is there conservative goverenor for 2.6.32.15-gf5a401c kernel from 2.29.405.2 official HTC Desire update ?
Tnx.
i'm running dj droid rom 2.29 based, and it has conservative.

[Q] Faux kernel init.post_boot.sh customization

This is, i´m reeally noob, and do it just for fun and have muy sensation the way I like, so I want to know just the basics to do that.
Just added stock frequencies to init.post_boot.sh of faux kernel, and I wondering, how to control the transitions or steps of the frecuency scaling, I found this lines, but really don´t know if they will work. Some of them are already in my file. But I don´t know whats the function of sampling_rate, up_threshold, and sampling_down_factor, and if they will work on intellidemand governor.
echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 40000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/sampling_rate
echo "60000" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/sampling_rate
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 80 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
echo "95" > /sys/devices/system/cpu/cpu0/cpufreq/conservative/up_threshold
echo "95" > /sys/devices/system/cpu/cpu1/cpufreq/conservative/up_threshold
echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "20" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
chown system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
chown system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo "192000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "192000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu0/online
chown system /sys/devices/system/cpu/cpu1/online
chown system /sys/power/perflock
Thanks!

[MOD][REF]Set governer on boot with init.d

Since everyones asking how to set a governor on boot, heres a sample of my init.d script that sets "on demand" with max frequency 1400000 (1.4GHZ) and min frequency 200000 (0.2GHZ) on boot, if you would like to use it or modify it let me know, i dont bite and im one to help! enjoy!!
here's the guidelines!
100000 = 1GHZ
DOWNLOAD
This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# 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
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk
HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# 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
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk
Click to expand...
Click to collapse
thats pretty neat, mines just a basic compared to yours
HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
...
Click to expand...
Click to collapse
do i only have to change ondemand to hotplug to work on hotplug governor?
Maximus1a said:
do i only have to change ondemand to hotplug to work on hotplug governor?
Click to expand...
Click to collapse
If your Kernel supports it, sure.
You can set any available Governor on your Phone.
Just edit
GOVERNOR="hotplug"
To tweak it, just search the Forum for available Values. My Phone doesn't support it, that's why it's not in the script.
Gesendet von meinem Full Android on C6603 mit Tapatalk 2
HSD-Pilot said:
This is my Script to set / tweak my Governor on my XZ.
It's easy to handle, i guess.
#!/system/bin/sh
LOG_FILE=/data/Init.d_Tweaks.log
sleep 60
# Set Scaling Governor
GOVERNOR="conservative"
echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE;
# Set Min & Max Frequency
# 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000
CPU_MIN="384000"
CPU_MAX="1242000"
echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE;
# Set IO Sheduler
SHEDULER="deadline"
echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler
echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler
echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE;
# Set SD Cache
READ_AHEAD_KB="512"
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb
echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb
echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb
echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE;
# Tweak Governor
# Ondemand
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Ondemand Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Battery
# echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
# Ondemand Performance
# echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
# echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
# echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
# echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
# echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
# echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
fi;
# Interactive
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Interactive Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Battery
# echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
# Interactive Performance
# echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
# echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
# echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
# echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
fi;
# Conservative
if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then
# Conservative Tweaked
echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
# Conservative Battery
# 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
# Conservative Performance
# echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
# echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
# echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
# echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
# echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
fi;
echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE;
# Custom Kernel Tweaks
# reduce / increase [mv] for all Frequencys
# echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
# Set GPU Governor
# echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor
# Set GPU Clock
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
# Swap / Tap 2 Wake
# echo "0" > /sys/android_touch/doubletap2wake
# echo "0" > /sys/android_touch/sweep2wake
# echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
echo " " | tee -a $LOG_FILE;
Gesendet von meinem C6603 mit Tapatalk
Click to expand...
Click to collapse
How to set minimum gpu frequency? Will this work?:
# echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/min_gpuclk
:good:
@Ricky Divjakovski
Sorry for disturbing
Please give the script in the post or give a mirror link sir..
All your threads are very helpful
Thanks

Control CPU and many other features via Init.d

Control CPU without any custom application via Init.d :victory:
Disclaimer :
Code:
Please Note : You are solely responsible for what you do to your phone. I nor XDA are responsible for damage you may cause to your device if you mess up something
Here i present you a technique to control CPU and Dyn Fsync, Vibration on supported kernels & also Voltage.
I have attached the Init.d script you can change vdd, Turn on/off Dynamic Fsync, Change CPU Scaling levels.
Detailed Guide on how to use this is coming soon
Download the attached file rename it to just 99init no extension and save it give it 755 permission. & Restart and see i have edited this for my use and am on my personal build of Phoenix Kernel so experience and usage might change on other kernels.
Detailed Guide
echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig
echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled
•>> Enables suspend and sleep modules.( i think so.. :silly: )
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
•>> This tweak sets ondemand as default governor.
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
•>> Sets advanced options of ondemand Gov
echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
•>> Sets Min/Max frequencies respectively. for both the CPU's
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown root.system /sys/devices/system/cpu/mfreq
chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
chown root.system /sys/devices/system/cpu/cpu2/online
chmod 664 /sys/devices/system/cpu/cpu1/online
chmod 664 /sys/devices/system/cpu/cpu2/online
•>> Sets Permissions
echo 18 > /sys/devices/virtual/timed_output/vibrator/level
•>> Vibration Control on supported kernels, Supported in Phoenix Kernel
vdd=-62500
echo ${vdd} > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "All voltages changed by ${vdd}" > /data/local/tmp/vdd.txt
•>> Voltage Control Script, It has been set to max UV by defaule i.e. -62 mV
Note : As the Name suggests its init.d script saved in etc/init.d folder set the permission of the script to 755.​
Added Detailed info
I have added detailed info on each individual script :good: , All of the above scripts have been tested on my Sony Xperia L C2104 running my personal build of Phoenix Kernel
you don't mention where to save it on the phone....
Its init.d script
getochkn said:
you don't mention where to save it on the phone....
Click to expand...
Click to collapse
Actually as the Name suggests its init.d script saved in etc/init.d folder set the permission of the script to 755.
Gonna try this!
Sent from my C2105 using XDA Premium 4 mobile app
try it
abielzuliom said:
Gonna try this!
Sent from my C2105 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Try it and report back
first we have to enable init.d dude with universal init.d app
yep
yash989 said:
first we have to enable init.d dude with universal init.d app
Click to expand...
Click to collapse
Yep if you are on a kernel that doesnt have init.d support which might be weird :silly:

Ideal Init for AOSP-based ROMs

I wrote this program because Android's init process on Qualcomm phones is absolutely terrible. It's full of things like the following hidden code segment:
Code:
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq ]; then
echo 1 > /sys/devices/f9967000.i2c/i2c-0/0-0072/enable_irq
else
echo "doesn't find slimport enable_irq"
fi
case "$soc_id" in
"208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216")
for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
do
echo "cpubw_hwmon" > $devfreq_gov
done
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
#echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
#echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 20 > /sys/module/cpu_boost/parameters/boost_ms
#echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
#echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
#Set LGE Interactive-Grid parameters for G3 models
echo "20000 1100000:40000 1500000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo "85 1500000:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 960000 > /sys/module/cpu_boost/parameters/sync_threshold
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1 > /sys/devices/system/cpu/cpufreq/interactive/is_grid
echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay
echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_step
echo 37 > /sys/devices/system/cpu/cpufreq/interactive/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_step
echo 46 > /sys/devices/system/cpu/cpufreq/interactive/high_grid_load
echo 1000 > /sys/class/devfreq/g3-display.0/polling_interval
setprop ro.qualcomm.perf.cores_online 2
;;
*)
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
# even if scaling_max_freq go down because of themal mitigation, input_boost frequency does not go down.
# echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
#Set LGE Ondemand-Grid parameters for msm8974aa
echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_max_freq
echo 7 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_step
echo 40 > /sys/devices/system/cpu/cpufreq/ondemand/middle_grid_load
echo 14 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_step
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/high_grid_load
;;
esac
What is $soc_id equal to? Now we have to audit trail to see what and when $soc_id has been set to, which will open up another can of worms to see when it was initialized to, and what are the implications of having $soc_id set to a certain value, rather than another further down in the init process? Why can't we just extract all of the actual information to the boot process and leave the other junk (support for CPUs which are 5+ years old, unused features, etc) behind?
Enter Ideal Init. What Ideal Init is, consists of some changes to your device's stock kernel, and some changes to your device's stock ramdisk. Once you make the changes to the kernel and ramdisk, you create a boot.img with the new and updated kernel and ramdisk, and flash it to your device. The changes you just made to the kernel and ramdisk now allow the system calls made by your device's init.*.rc scripts and init shell scripts to be logged and dumped for later use.
From there you can dump your device's logs using the dmesg command, and run the ideal_init program on your computer to interpret these intercepted system calls and output a single valid init.<device>.rc. Then you can revert back to your original setup.
Basically, this program turns all of these init scripts and these init shell scripts and extracts only the information that was actually used in the boot process to create something like this
Check out the README for detailed instructions
https://github.com/JackpotClavin/Ideal-Init
Hope this helps the device bringup for future ROMs

Categories

Resources