This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
forked from PixelExperience-Devices/device_google_crosshatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.power.rc
78 lines (67 loc) · 3.8 KB
/
init.power.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#
# Copyright (C) 2017 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
on property:sys.boot_completed=1
# Enable bus-dcvs
write /sys/class/devfreq/soc:qcom,cpubw/governor "bw_hwmon"
write /sys/class/devfreq/soc:qcom,cpubw/polling_interval 50
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/mbps_zones "2288 4577 6500 8132 9155 10681"
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/sample_ms 4
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent 40
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory 20
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length 10
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps 0
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/up_scale 250
write /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/idle_mbps 1600
write /sys/class/devfreq/soc:qcom,llccbw/governor "bw_hwmon"
write /sys/class/devfreq/soc:qcom,llccbw/polling_interval 50
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/mbps_zones "1720 2929 3879 5931 6881"
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/sample_ms 4
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/io_percent 80
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/hist_memory 20
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/hyst_length 10
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/guard_band_mbps 0
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/up_scale 250
write /sys/class/devfreq/soc:qcom,llccbw/bw_hwmon/idle_mbps 1600
write /sys/class/devfreq/soc:qcom,mincpubw/governor "cpufreq"
# Enable memlat governor
write /sys/class/devfreq/soc:qcom,memlat-cpu0/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,memlat-cpu0/polling_interval 10
write /sys/class/devfreq/soc:qcom,memlat-cpu0/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,memlat-cpu4/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,memlat-cpu4/polling_interval 10
write /sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,l3-cpu0/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,l3-cpu0/polling_interval 10
write /sys/class/devfreq/soc:qcom,l3-cpu0/mem_latency/ratio_ceil 400
write /sys/class/devfreq/soc:qcom,l3-cpu4/governor "mem_latency"
write /sys/class/devfreq/soc:qcom,l3-cpu4/polling_interval 10
write /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil 4000
# Turn on sleep modes.
write /sys/module/lpm_levels/parameters/sleep_disabled 0
# Enable idle state listener
write /sys/class/drm/card0/device/idle_encoder_mask 1
write /sys/class/drm/card0/device/idle_timeout_ms 100
# Change l3-cdsp to userspace governor
write /sys/class/devfreq/soc:qcom,l3-cdsp/governor userspace
chown system system /sys/class/devfreq/soc:qcom,l3-cdsp/userspace/set_freq
# Disable console_suspend to get better logging for kernel crashes
on boot
write /sys/module/printk/parameters/console_suspend N
#Enable suspend to idle mode to reduce latency during suspend/resume
write /sys/power/mem_sleep "s2idle"
# If UART is on, enable console_suspend on boot_complete to save power
on property:sys.boot_completed=1 && property:init.svc.console=running
write /sys/module/printk/parameters/console_suspend Y