summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rootdir/init.qcom.rc236
1 files changed, 86 insertions, 150 deletions
diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc
index 545567d..e5ca772 100644
--- a/rootdir/init.qcom.rc
+++ b/rootdir/init.qcom.rc
@@ -21,6 +21,8 @@ import init.sony.usb.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chown system system /sys/kernel/debug/kgsl/proc
+ write /sys/block/mmcblk0/queue/scheduler noop
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 512
on init
mkdir /mnt/shell/emulated 0700 shell shell
@@ -115,6 +117,13 @@ on early-boot
exec /system/bin/sh /system/etc/pre_hw_config.sh
on boot
+ # bring CPUs online
+ 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/module/msm_thermal/core_control/enabled 1
+
write /sys/module/qpnp_power_on/parameters/forcecrash_on 1
exec /system/bin/btnvtool -O
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
@@ -323,138 +332,6 @@ on post-fs-data
mkdir /dev/socket/mpdecision 0770 system system
chmod 2770 /dev/socket/mpdecision
- # Enable Power modes and set the CPU Freq Sampling rates
- 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_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/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon"
-
- # ondemand
- #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
- #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand"
- #write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand"
- #write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand"
- #write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
- #write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
- #write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
- #write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
- #write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 10
- #write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core 70
- #write /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core 3
- #write /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq 918000
- #write /sys/devices/system/cpu/cpufreq/ondemand/sync_freq 1026000
- #write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load 80
- #chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
- #chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
- #chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
-
- # interactive
- 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"
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "interactive"
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000"
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
- write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70"
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
- write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
-
- write /sys/module/cpu_boost/parameters/boost_ms 20
- write /sys/module/cpu_boost/parameters/sync_threshold 1728000
- write /sys/module/cpu_boost/parameters/input_boost_freq 1497600
- write /sys/module/cpu_boost/parameters/input_boost_ms 40
-
- 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 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- write /sys/module/msm_thermal/core_control/enabled 1
- chown root system /sys/devices/system/cpu/mfreq
- chmod 220 /sys/devices/system/cpu/mfreq
- 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 /dev/cpuctl/apps/cpu.notify_on_migrate 0
- # set DCVS parameters for CPU
- write /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us 40000
- write /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us 40000
- write /sys/module/msm_dcvs/cores/cpu0/em_win_size_min_us 100000
- write /sys/module/msm_dcvs/cores/cpu0/em_win_size_max_us 500000
- write /sys/module/msm_dcvs/cores/cpu0/slack_mode_dynamic 0
- write /sys/module/msm_dcvs/cores/cpu0/disable_pc_threshold 1000000
- write /sys/module/msm_dcvs/cores/cpu1/slack_time_max_us 25000
- write /sys/module/msm_dcvs/cores/cpu1/slack_time_min_us 25000
- write /sys/module/msm_dcvs/cores/cpu1/em_win_size_min_us 100000
- write /sys/module/msm_dcvs/cores/cpu1/em_win_size_max_us 500000
- write /sys/module/msm_dcvs/cores/cpu1/slack_mode_dynamic 0
- write /sys/module/msm_dcvs/cores/cpu1/disable_pc_threshold 1000000
- write /sys/module/msm_dcvs/cores/cpu2/slack_time_max_us 25000
- write /sys/module/msm_dcvs/cores/cpu2/slack_time_min_us 25000
- write /sys/module/msm_dcvs/cores/cpu2/em_win_size_min_us 100000
- write /sys/module/msm_dcvs/cores/cpu2/em_win_size_max_us 500000
- write /sys/module/msm_dcvs/cores/cpu2/slack_mode_dynamic 0
- write /sys/module/msm_dcvs/cores/cpu2/disable_pc_threshold 1000000
- write /sys/module/msm_dcvs/cores/cpu3/slack_time_max_us 25000
- write /sys/module/msm_dcvs/cores/cpu3/slack_time_min_us 25000
- write /sys/module/msm_dcvs/cores/cpu3/em_win_size_min_us 100000
- write /sys/module/msm_dcvs/cores/cpu3/em_win_size_max_us 500000
- write /sys/module/msm_dcvs/cores/cpu3/slack_mode_dynamic 0
- write /sys/module/msm_dcvs/cores/cpu3/disable_pc_threshold 1000000
- # set DCVS parameters for GPU
- write /sys/module/msm_dcvs/cores/gpu0/slack_time_max_us 20000
- write /sys/module/msm_dcvs/cores/gpu0/slack_time_min_us 20000
- write /sys/module/msm_dcvs/cores/gpu0/slack_mode_dynamic 0
- # set msm_mpdecision parameters
- write /sys/module/msm_mpdecision/slack_time_max_us 45000
- write /sys/module/msm_mpdecision/slack_time_min_us 15000
- write /sys/module/msm_mpdecision/em_win_size_min_us 100000
- write /sys/module/msm_mpdecision/em_win_size_max_us 1000000
- write /sys/module/msm_mpdecision/online_util_pct_min 3
- write /sys/module/msm_mpdecision/online_util_pct_max 25
- write /sys/module/msm_mpdecision/em_max_util_pct 97
- write /sys/module/msm_mpdecision/rq_avg_poll_ms 2
- write /sys/module/msm_mpdecision/mp_em_rounding_point_min 10
- write /sys/module/msm_mpdecision/mp_em_rounding_point_max 85
- write /sys/module/msm_mpdecision/iowait_threshold_pct 50
- # set permissions for the nodes needed by display on/off hook
- chown system /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
- chown system /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
- chown system /sys/module/msm_mpdecision/slack_time_max_us
- chown system /sys/module/msm_mpdecision/slack_time_min_us
- chmod 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
- chmod 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
- chmod 664 /sys/module/msm_mpdecision/slack_time_max_us
- chmod 664 /sys/module/msm_mpdecision/slack_time_min_us
-
# SONY: Camera
mkdir /data/camera 0770 media camera
chown media camera /sys/devices/sony_camera_0/info
@@ -464,27 +341,16 @@ on post-fs-data
on charger
# Enable Power modes and set the CPU Freq Sampling rates
- write /sys/module/lpm_levels/enable_low_power/l2 4
+ 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_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_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"
@@ -493,10 +359,10 @@ on charger
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
- write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon"
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
@@ -547,7 +413,6 @@ service qrngp /system/bin/qrngp
on property:sys.boot_completed=1
start qrngp
- write /sys/block/mmcblk0/bdi/read_ahead_kb 512
service qseecomd /system/bin/qseecomd
class core
@@ -652,6 +517,8 @@ service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk
service mpdecision /system/bin/mpdecision --avg_comp
class main
user root
+ group system
+ disabled
# Start suntrold
service suntrold /system/bin/suntrold
@@ -734,6 +601,75 @@ on property:init.svc.surfaceflinger=running
on property:init.svc.surfaceflinger=stopped
stop ppd
+property:service.bootanim.exit=1
+ # Enable Power modes
+ 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/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 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
+
+on property:init.svc.bootanim=stopped
+ # Switch to ROW and balanced mode after boot for better UX
+ write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon"
+ 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"
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "interactive"
+ write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000"
+ write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
+ write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400
+ write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
+ write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70"
+ write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
+ write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
+ write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
+ write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1036800
+ write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50
+ write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 1190400
+ write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 20000
+
+ write /sys/module/cpu_boost/parameters/boost_ms 10
+ write /sys/module/cpu_boost/parameters/sync_threshold 1728000
+ write /sys/module/cpu_boost/parameters/input_boost_freq 1497600
+ write /sys/module/cpu_boost/parameters/input_boost_ms 40
+ write /sys/class/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz
+ write /dev/cpuctl/apps/cpu.notify_on_migrate 0
+
+ write /sys/block/mmcblk0/queue/scheduler row
+ start mpdecision
+
+on property:init.svc.bootanim=running
+ # Switch to NOOP while booting
+ write /sys/block/mmcblk0/queue/scheduler noop
+
# Powersave
on property:sys.perf.profile=0
start mpdecision