Skip to content

Commit

Permalink
some fixes + add performance profiles
Browse files Browse the repository at this point in the history
Change-Id: Id45ebcee3a9d70136e4616ccf417a36c111f82ea

Conflicts:
	BoardConfig.mk
	patches/build/0001-disable-build.patch
	rootdir/init.w7.rc
  • Loading branch information
Highwind1991 authored and judas77 committed Aug 8, 2015
1 parent 5ec9c1e commit b4e9adf
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 61 deletions.
3 changes: 3 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,8 @@
The default is false. -->
<bool name="config_suspendWhenScreenOffDueToProximity">true</bool>

<!-- Performance profiles -->
<string name="config_perf_profile_prop">sys.perf.profile</string>
<string name="config_perf_profile_default_entry">1</string>

</resources>
160 changes: 99 additions & 61 deletions rootdir/init.w7.rc
Original file line number Diff line number Diff line change
Expand Up @@ -529,69 +529,107 @@ service config_bluetooth /system/bin/sh /system/etc/init.zetaw.bt.sh "onboot"
oneshot

on property:sys.boot_completed=1
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_show_resume_irq/parameters/debug_mask 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
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "intelliactive"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "intelliactive"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "intelliactive"
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "intelliactive"
write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 70
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 600000
write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
write /sys/devices/system/cpu/cpufreq/interactive/target_loads 90
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
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 system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
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 0664 /sys/devices/system/cpu/cpu1/online
chmod 0664 /sys/devices/system/cpu/cpu2/online
chmod 0664 /sys/devices/system/cpu/cpu3/online
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_show_resume_irq/parameters/debug_mask 1

# Set intelli_plug parameters and lowmemorykiller parameters
# Experimental settings by J-kun
write /sys/module/intelli_plug/parameters/intelli_plug_active 1
write /sys/module/intelli_plug/parameters/touch_boost_active 0
write /sys/module/lowmemorykiller/parameters/minfree 2048,4096,8192,16384,24576,32768
write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz
write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1
write /sys/block/mmcblk1/queue/scheduler fiops
write /sys/block/mmcblk0/queue/scheduler fiops
stop mpdecision
write /sys/kernel/power_suspend/power_suspend_mode 1
write /sys/block/mmcblk0/queue/read_ahead_kb 512
write /sys/block/mmcblk1/queue/read_ahead_kb 512
write /sys/devices/system/cpu/cpufreq/interactive/boost 1
write /sys/kernel/power_suspend/power_suspend_mode 1
write /sys/block/mmcblk1/queue/scheduler sioplus
write /sys/block/mmcblk0/queue/scheduler sioplus
write /sys/block/mmcblk0/queue/read_ahead_kb 512
write /sys/block/mmcblk1/queue/read_ahead_kb 512
write /sys/module/lowmemorykiller/parameters/minfree 12800,15360,17920,20480,25600,33280

# Performance Profiles
# Powersave
on property:sys.perf.profile=0
stop mpdecision
write /sys/module/intelli_plug/parameters/intelli_plug_active 1
write /sys/module/intelli_plug/parameters/touch_boost_active 0
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 600000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 600000
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 600000
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 600000
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 0
write /sys/devices/system/cpu/cpu3/online 0
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 0664 /sys/devices/system/cpu/cpu1/online
chmod 0664 /sys/devices/system/cpu/cpu2/online
chmod 0664 /sys/devices/system/cpu/cpu3/online
write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor powersave
write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 0

# Balanced
on property:sys.perf.profile=1
stop mpdecision
write /sys/module/intelli_plug/parameters/intelli_plug_active 1
write /sys/module/intelli_plug/parameters/touch_boost_active 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "dynamic"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "dynamic"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "dynamic"
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "dynamic"
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/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1190400
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1190400
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 1190400
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 1190400
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz
write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 1

# Performance
on property:sys.perf.profile=2
stop mpdecision
write /sys/module/intelli_plug/parameters/intelli_plug_active 0
write /sys/module/intelli_plug/parameters/touch_boost_active 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "performance"
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "performance"
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
chown root system /sys/devices/system/cpu/cpu0/online
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 0664 /sys/devices/system/cpu/cpu0/online
chmod 0664 /sys/devices/system/cpu/cpu1/online
chmod 0664 /sys/devices/system/cpu/cpu2/online
chmod 0664 /sys/devices/system/cpu/cpu3/online
write /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq/governor performance
write /sys/module/simple_gpu_algorithm/parameters/simple_gpu_activate 0

# Charger
on property:ro.bootmode=chargerlogo
Expand Down

0 comments on commit b4e9adf

Please sign in to comment.