android_device_samsung_msm8.../rootdir/init.qcom.power.rc
2019-03-19 17:28:47 +01:00

73 lines
3.1 KiB
Text

on init
# HMP scheduler settings
write /proc/sys/kernel/sched_ravg_hist_size 3
write /proc/sys/kernel/sched_window_stats_policy 3
# HMP Task packing settings for 8226
write /proc/sys/kernel/sched_small_task 50
# disable thermal core_control to update interactive governor settings
write /sys/module/msm_thermal/core_control/enabled 0
# Switch to interactive and let PowerHAL configure it
write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
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/cpu0/cpufreq/interactive/go_hispeed_load
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
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/timer_rate
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
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/target_loads
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/target_loads
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# enable thermal core_control now
write /sys/module/msm_thermal/core_control/enabled 1
# bring all CPUs online
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
# Enable low power modes
write /sys/module/lpm_levels/parameters/sleep_disabled 0
# Set RPS mask
write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 2
# add a cpuset for the camera daemon
# we want all the cores for camera
mkdir /dev/cpuset/camera-daemon
chown system system /dev/cpuset/camera-daemon
chown system system /dev/cpuset/camera-daemon/tasks
chmod 0664 /dev/cpuset/camera-daemon/tasks
# Update foreground and background cpusets
# Reserve CPU 3 for the top app
write /dev/cpuset/foreground/cpus 0-2
write /dev/cpuset/background/cpus 0-2
write /dev/cpuset/system-background/cpus 0-1
write /dev/cpuset/top-app/cpus 0-3
write /dev/cpuset/camera-daemon/cpus 0-3
on charger
write /sys/module/lpm_levels/parameters/sleep_disabled 0
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave"
on class_start:late_start
trigger enable-low-power
on property:init.svc.recovery=running
trigger enable-low-power
on property:dev.bootcomplete=1
setprop sys.io.scheduler "bfq"