diff options
author | Max Weffers <rcstar6696@gmail.com> | 2017-03-18 10:08:36 +0100 |
---|---|---|
committer | Max Weffers <rcstar6696@gmail.com> | 2017-03-27 14:08:37 +0200 |
commit | 73598c6b9b749d0321b61967d6664316ced812d5 (patch) | |
tree | f49c1df8f99a5d22ff29c9ae10e26815b7c50183 /rootdir/init.qcom.power.rc | |
parent | a101d620fed432c95ed147609f2d7f683900fbfa (diff) |
Add cpuquiet config in prop and init
Diffstat (limited to 'rootdir/init.qcom.power.rc')
-rw-r--r-- | rootdir/init.qcom.power.rc | 147 |
1 files changed, 84 insertions, 63 deletions
diff --git a/rootdir/init.qcom.power.rc b/rootdir/init.qcom.power.rc index 0702206..0d6044f 100644 --- a/rootdir/init.qcom.power.rc +++ b/rootdir/init.qcom.power.rc @@ -1,35 +1,60 @@ -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 + chown system system /sys/devices/system/cpu/cpuquiet/nr_power_max_cpus + chown system system /sys/devices/system/cpu/cpuquiet/nr_thermal_max_cpus + chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/balance_level + chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/nr_run_thresholds + chown system system /sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds + chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_min_cpus + chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_power_max_cpus + chmod 0660 /sys/devices/system/cpu/cpuquiet/nr_thermal_max_cpus + chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/balance_level + chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/nr_run_thresholds + chmod 0660 /sys/devices/system/cpu/cpuquiet/rqbalance/nr_down_run_thresholds -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 charger + # 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 + 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 "powersave" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave" + 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/module/msm_thermal/core_control/enabled 1 + write /sys/devices/system/cpu/cpu1/online 0 + write /sys/devices/system/cpu/cpu2/online 0 + write /sys/devices/system/cpu/cpu3/online 0 +on boot + # Disable thermal write /sys/module/msm_thermal/core_control/enabled 0 + # Device boots with performance governor. + # Switch one core to interactive to set permissions, for power hal and system server. + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" + chown system system /dev/cpuctl/cpu.notify_on_migrate + chmod 0660 /dev/cpuctl/cpu.notify_on_migrate + 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 664 /sys/devices/system/cpu/cpu1/online + chmod 664 /sys/devices/system/cpu/cpu2/online + chmod 664 /sys/devices/system/cpu/cpu3/online + + # Bring CPUs online + 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 +on property:init.svc.bootanim=stopped write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive" write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "interactive" @@ -48,45 +73,41 @@ on enable-low-power write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 20000 write /sys/class/kgsl/kgsl-3d0/devfreq/governor "msm-adreno-tz" write /dev/cpuctl/cpu.notify_on_migrate 1 - - 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 664 /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu2/online - chmod 664 /sys/devices/system/cpu/cpu3/online - - write /sys/module/msm_thermal/core_control/enabled 1 - write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" - write /sys/class/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz - -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 - 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 "powersave" - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave" - 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 + # Enable thermal write /sys/module/msm_thermal/core_control/enabled 1 - write /sys/devices/system/cpu/cpu1/online 0 - write /sys/devices/system/cpu/cpu2/online 0 - write /sys/devices/system/cpu/cpu3/online 0 - -on boot - trigger enable-low-power -on property:init.svc.recovery=running - trigger enable-low-power + # Switch to interactive and let PowerHAL configure it + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive + chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay + chown system system /sys/devices/system/cpu/cpufreq/interactive/align_windows + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/align_windows + chown system system /sys/devices/system/cpu/cpufreq/interactive/boost + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boost + chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse + chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration + chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq + chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy + chown system system /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis + chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time + chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/target_loads + chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_rate + chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_slack + chown system system /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif + chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif + chown system system /sys/devices/system/cpu/cpufreq/interactive/use_sched_load + 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 |