diff options
author | Max Weffers <rcstar6696@gmail.com> | 2017-03-20 13:27:04 +0100 |
---|---|---|
committer | Max Weffers <rcstar6696@gmail.com> | 2017-03-27 14:09:01 +0200 |
commit | 48856dd0c794ab0bba2133226d33e94c8c6465c3 (patch) | |
tree | 002b222f295b88c5cbf0f4f8979319d0cd6ced61 /rootdir/init.qcom.power.rc | |
parent | 0701ae5cdcd0df4e75556eb4cda23627c8e1073b (diff) |
Add Low-power-mode and MSM PM for better batterylife
Diffstat (limited to 'rootdir/init.qcom.power.rc')
-rw-r--r-- | rootdir/init.qcom.power.rc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/rootdir/init.qcom.power.rc b/rootdir/init.qcom.power.rc index 0d6044f..5b98be4 100644 --- a/rootdir/init.qcom.power.rc +++ b/rootdir/init.qcom.power.rc @@ -1,3 +1,6 @@ +on early-init + write /sys/block/mmcblk0/bdi/read_ahead_kb 512 + on init # cpuquiet rqbalance permissions chown system system /sys/devices/system/cpu/cpuquiet/nr_min_cpus @@ -14,6 +17,14 @@ on init chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds on charger + write /sys/module/lpm_levels/enable_low_power/l2 2 + 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_thermal/core_control/enabled 0 + # Enable Power modes and set the CPU Freq Sampling rates write /sys/module/msm_thermal/core_control/enabled 0 write /sys/devices/system/cpu/cpu1/online 1 @@ -53,6 +64,31 @@ on boot write /sys/devices/system/cpu/cpu1/online 1 write /sys/devices/system/cpu/cpu2/online 1 write /sys/devices/system/cpu/cpu3/online 1 + + trigger enable-low-power + +on enable-low-power + 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 on property:init.svc.bootanim=stopped write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" @@ -111,3 +147,6 @@ on property:init.svc.bootanim=stopped chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/use_sched_load chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq + +on property:init.svc.recovery=running + trigger enable-low-power |