diff options
-rw-r--r-- | rootdir/init.qcom.power.rc | 104 | ||||
-rw-r--r-- | rootdir/init.qcom.rc | 111 | ||||
-rw-r--r-- | rootdir/init.recovery.qcom.rc | 1 | ||||
-rw-r--r-- | shinano.mk | 5 |
4 files changed, 114 insertions, 107 deletions
diff --git a/rootdir/init.qcom.power.rc b/rootdir/init.qcom.power.rc new file mode 100644 index 0000000..970a7a2 --- /dev/null +++ b/rootdir/init.qcom.power.rc @@ -0,0 +1,104 @@ +on early-init + write /sys/block/mmcblk0/bdi/read_ahead_kb 512 + +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 + + 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 "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/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 + + write /sys/module/msm_thermal/core_control/enabled 1 + + 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/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" + write /sys/class/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz + + write /dev/cpuctl/cpu.notify_on_migrate 1 + + start mpdecision + +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 + 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 class_start:late_start + trigger enable-low-power + +on property:init.svc.recovery=running + trigger enable-low-power diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index bced960..93491ca 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -15,14 +15,13 @@ # limitations under the License. # -import init.device.rc -import init.sony.usb.rc +import /init.device.rc +import /init.sony.usb.rc +import /init.qcom.power.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 @@ -106,13 +105,6 @@ 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 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type @@ -202,8 +194,8 @@ on boot # Assign TCP buffer thresholds to be ceiling value of technology maximums # Increased technology maximums should be reflected here. - write /proc/sys/net/core/rmem_max 2097152 - write /proc/sys/net/core/wmem_max 2097152 + write /proc/sys/net/core/rmem_max 2097152 + write /proc/sys/net/core/wmem_max 2097152 chmod 660 /dev/rtc0 chown system system /dev/rtc0 @@ -374,31 +366,6 @@ on post-fs-data chown media camera /sys/devices/sony_camera_1/info chmod 0770 /sys/devices/sony_camera_1/info -on charger - # Enable Power modes and set the CPU Freq Sampling rates - 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 - 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 property:init.svc.wpa_supplicant=stopped stop dhcpcd @@ -611,75 +578,7 @@ service tfa9890_amp /system/bin/tfa9890_amp oneshot ioprio rt 4 -on 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 1497600 - 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/cpu.notify_on_migrate 0 - - write /sys/block/mmcblk0/queue/scheduler row - setprop ro.qualcomm.perf.cores_online 2 - start mpdecision - on property:init.svc.bootanim=running - # Switch to NOOP while booting - write /sys/block/mmcblk0/queue/scheduler noop # Clear Sony boot splash write /sys/class/graphics/fb0/blank 1 write /sys/class/graphics/fb0/blank 0 diff --git a/rootdir/init.recovery.qcom.rc b/rootdir/init.recovery.qcom.rc index b2091c5..dca838c 100644 --- a/rootdir/init.recovery.qcom.rc +++ b/rootdir/init.recovery.qcom.rc @@ -1,4 +1,3 @@ on init - write /sys/class/android_usb/android0/idVendor 0fce write /sys/class/android_usb/android0/idProduct 6182 @@ -41,6 +41,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ $(COMMON_PATH)/rootdir/fstab.qcom:root/fstab.qcom \ $(COMMON_PATH)/rootdir/init.qcom.rc:root/init.qcom.rc \ + $(COMMON_PATH)/rootdir/init.qcom.power.rc:root/init.qcom.power.rc \ $(COMMON_PATH)/rootdir/init.recovery.qcom.rc:root/init.recovery.qcom.rc \ $(COMMON_PATH)/rootdir/init.sony.usb.rc:root/init.sony.usb.rc \ $(COMMON_PATH)/rootdir/ueventd.qcom.rc:root/ueventd.qcom.rc @@ -174,6 +175,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \ persist.demo.hdmirotationlock=false +# IO Scheduler +PRODUCT_PROPERTY_OVERRIDES += \ + sys.io.scheduler=row + # Time PRODUCT_PROPERTY_OVERRIDES += \ persist.timed.enable=true |