diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 241e7ea..b0ab9d4 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -334,5 +334,8 @@
The default is false. -->
true
+
+ sys.perf.profile
+ 1
diff --git a/rootdir/init.w7.rc b/rootdir/init.w7.rc
index 9e55ee8..61e5101 100755
--- a/rootdir/init.w7.rc
+++ b/rootdir/init.w7.rc
@@ -529,69 +529,107 @@ service config_bluetooth /system/bin/sh /system/etc/init.zetaw.bt.sh "onboot"
oneshot
on property:sys.boot_completed=1
- write /sys/module/lpm_levels/enable_low_power/l2 4
- write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
- write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
- write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
- write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
- write /sys/devices/system/cpu/cpu1/online 1
- write /sys/devices/system/cpu/cpu2/online 1
- write /sys/devices/system/cpu/cpu3/online 1
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "intelliactive"
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "intelliactive"
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "intelliactive"
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "intelliactive"
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 70
- write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 600000
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads 90
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
- write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
- chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- chown root system /sys/devices/system/cpu/cpu1/online
- chown root system /sys/devices/system/cpu/cpu2/online
- chown root system /sys/devices/system/cpu/cpu3/online
- chmod 0664 /sys/devices/system/cpu/cpu1/online
- chmod 0664 /sys/devices/system/cpu/cpu2/online
- chmod 0664 /sys/devices/system/cpu/cpu3/online
+ write /sys/module/lpm_levels/enable_low_power/l2 4
+ write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
+ write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
+ write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
+ write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
-# Set intelli_plug parameters and lowmemorykiller parameters
# Experimental settings by J-kun
- write /sys/module/intelli_plug/parameters/intelli_plug_active 1
- write /sys/module/intelli_plug/parameters/touch_boost_active 0
- write /sys/module/lowmemorykiller/parameters/minfree 2048,4096,8192,16384,24576,32768
- write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz
- write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1
- write /sys/block/mmcblk1/queue/scheduler fiops
- write /sys/block/mmcblk0/queue/scheduler fiops
- stop mpdecision
- write /sys/kernel/power_suspend/power_suspend_mode 1
- write /sys/block/mmcblk0/queue/read_ahead_kb 512
- write /sys/block/mmcblk1/queue/read_ahead_kb 512
- write /sys/devices/system/cpu/cpufreq/interactive/boost 1
+ write /sys/kernel/power_suspend/power_suspend_mode 1
+ write /sys/block/mmcblk1/queue/scheduler sioplus
+ write /sys/block/mmcblk0/queue/scheduler sioplus
+ write /sys/block/mmcblk0/queue/read_ahead_kb 512
+ write /sys/block/mmcblk1/queue/read_ahead_kb 512
+ write /sys/module/lowmemorykiller/parameters/minfree 12800,15360,17920,20480,25600,33280
+
+# Performance Profiles
+ # Powersave
+ on property:sys.perf.profile=0
+ stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 1
+ write /sys/module/intelli_plug/parameters/touch_boost_active 0
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 600000
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 600000
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 600000
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 600000
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ write /sys/devices/system/cpu/cpu0/online 1
+ write /sys/devices/system/cpu/cpu1/online 1
+ write /sys/devices/system/cpu/cpu2/online 0
+ write /sys/devices/system/cpu/cpu3/online 0
+ chown root system /sys/devices/system/cpu/cpu1/online
+ chown root system /sys/devices/system/cpu/cpu2/online
+ chown root system /sys/devices/system/cpu/cpu3/online
+ chmod 0664 /sys/devices/system/cpu/cpu1/online
+ chmod 0664 /sys/devices/system/cpu/cpu2/online
+ chmod 0664 /sys/devices/system/cpu/cpu3/online
+ write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor powersave
+ write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 0
+
+ # Balanced
+ on property:sys.perf.profile=1
+ stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 1
+ write /sys/module/intelli_plug/parameters/touch_boost_active 1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "dynamic"
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "dynamic"
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "dynamic"
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "dynamic"
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1190400
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1190400
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 1190400
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 1190400
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz
+ write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1
+
+ # Performance
+ on property:sys.perf.profile=2
+ stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 0
+ write /sys/module/intelli_plug/parameters/touch_boost_active 1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "performance"
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "performance"
+ write /sys/devices/system/cpu/cpu0/online 1
+ write /sys/devices/system/cpu/cpu1/online 1
+ write /sys/devices/system/cpu/cpu2/online 1
+ write /sys/devices/system/cpu/cpu3/online 1
+ chown root system /sys/devices/system/cpu/cpu0/online
+ chown root system /sys/devices/system/cpu/cpu1/online
+ chown root system /sys/devices/system/cpu/cpu2/online
+ chown root system /sys/devices/system/cpu/cpu3/online
+ chmod 0664 /sys/devices/system/cpu/cpu0/online
+ chmod 0664 /sys/devices/system/cpu/cpu1/online
+ chmod 0664 /sys/devices/system/cpu/cpu2/online
+ chmod 0664 /sys/devices/system/cpu/cpu3/online
+ write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor performance
+ write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 0
# Charger
on property:ro.bootmode=chargerlogo