forked from NotZeetaa/ZeetaaTweak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile_gaming
139 lines (115 loc) · 3.86 KB
/
profile_gaming
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#!/system/bin/sh
# ZeetaaTweak V1
# by NotZeetaa
# Log path
LOG_FILE="/data/data/com.zeetaa.zeetaatweaks/files/log/main_log"
if [ -e $LOG_FILE ]; then
rm -rf $LOG_FILE
fi
sendToLog() {
timeZone=$(getprop persist.sys.timezone)
printDate=$(TZ="$timeZone" date +"%H:%M:%S:%3N %d-%m-%Y")
echo "[$printDate] $1" >>"$LOG_FILE"
}
write() {
#chmod 0644 "$1"
echo "$2" >"$1"
currentValue=$(cat "$1")
if [ "$currentValue" -eq "$2" ]; then
sendToLog "$2 -✅-> $1"
else
sendToLog "$2 -⚠️-> $1"
fi
unset currentValue
}
for sch in /sys/devices/system/cpu/cpu*/cpufreq/schedutil/
do
write "$sch/down_rate_limit_us" "30000"
write "$sch/up_rate_limit_us" "500"
write "$sch/iowait_boost_enable" "1"
done
for irc in /sys/devices/system/cpu/cpu*/cpufreq/interactive/
do
write "$irc/timer_slack" "-1"
done
for pro in /sys/devices/system/cpu/cpu*/cpufreq/interactive_pro/
do
write "$pro/timer_slack" "-1"
done
# Gpu Tweaks
write /sys/class/kgsl/kgsl-3d0/devfreq/polling_interval "5"
write /sys/class/kgsl/kgsl-3d0/throttling "0"
write /sys/class/kgsl/kgsl-3d0/default_pwrlevel "0"
write /sys/class/kgsl/kgsl-3d0/bus_split "0"
write /sys/class/kgsl/kgsl-3d0/devfreq/adrenoboost "3"
write /sys/class/kgsl/kgsl-3d0/force_clk_on "1"
write /sys/class/kgsl/kgsl-3d0/force_bus_on "1"
write /sys/class/kgsl/kgsl-3d0/force_rail_on "1"
write /sys/class/kgsl/kgsl-3d0/force_no_nap "1"
# Scheduler tweak
for sched in /sys/block/*/queue
do
write "$sched/scheduler" "cfq"
write "$sched/rq_affinity" "2"
write "$sched/iostats" "0"
write "$sched/read_ahead_kb" "128"
done
for iosched in /sys/block/*/queue/iosched
do
write "$iosched/slide_idle" "0"
write "$iosched/group_idle" "1"
done
# Dev Stune Boost
write /dev/stune/background/schedtune.boost "0"
write /dev/stune/foreground/schedtune.boost "1"
write /dev/stune/rt/schedtune.boost "1"
write /dev/stune/top-app/schedtune.boost "5"
write /dev/stune/schedtune.boost "1"
write /dev/stune/nnapi-hal/schedtune.boost "1"
write /dev/stune/nnapi-hal/schedtune.prefer_idle "0"
write /dev/stune/top-app/schedtune.prefer_idle "0"
write /dev/stune/background/schedtune.prefer_idle "0"
write /dev/stune/foreground/schedtune.prefer_idle "0"
write /dev/stune/rt/schedtune.prefer_idle "0"
write /dev/stune/schedtune.prefer_idle "0"
# Vm
write /proc/sys/vm/vfs_cache_pressure "20"
write /proc/sys/vm/swappiness "100"
# Fs
write /proc/sys/fs/lease-break-time "5"
write /proc/sys/kernel/perf_cpu_time_max_percent "15"
write /proc/sys/kernel/sched_min_task_util_for_colocation "0"
write /proc/sys/kernel/sched_min_task_util_for_boost "0"
write /proc/sys/kernel/sched_child_runs_first "0"
write /proc/sys/kernel/sched_boost_top_app "1"
write /proc/sys/kernel/sched_walt_rotate_big_tasks "1"
write /proc/sys/kernel/sched_boost "1"
write /proc/sys/kernel/sched_cfs_boost "1"
# UTW (UFS Turbo Write Tweak)
write /sys/devices/platform/soc/1d84000.ufshc/ufstw_lu0/tw_enable "1"
# Boost Control Tweak
# Credits to @Ratoriku
write /sys/module/boost_control/parameters/app_launch_boost_ms "3000"
# Cpu_Input_Boost
for cboost in /sys/* /cpu_input_boost/parameters
do
write "$cboost/dynamic_stune_boost" "Y"
write "$cboost/dynamic_stune_boost" "Y"
write "$cboost/wake_boost_duration" "1200"
done
# Disable TouchBoost
write /sys/module/msm_performance/parameters/touchboost "0"
write /sys/power/pnpmgr/touch_boost "0"
# Scheduler features
write /sys/kernel/debug/sched_features "NEXT_BUDDY"
for cpu in /sys/devices/system/cpu/*/sched_load_boost
do
write "$cpu" "1"
done
for boost in /sys/devices/system/*/cpu_boost
do
write "$boost/sched_boost_on_input" "1"
write "$boost/sched_boost_on_powerkey_input" "1"
write "$boost/input_boost_ms" "2000"
write "$boost/powerkey_input_boost_ms" "500"
done