diff --git a/README.md b/README.md index 3aac1f7..8bcc78d 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ https://github.com/yc9559/uperf/releases ### Magisk方式 1. 下载后通过Magisk Manager刷入,Magisk版本不低于18.0 -2. 重启后查看`/sdcard/Android/yc/uperf/log_uperf.txt`检查uperf是否正常自启动 +2. 重启后查看`/sdcard/Android/yc/uperf/uperf_log.txt`检查uperf是否正常自启动 ### 手动安装 @@ -40,7 +40,7 @@ https://github.com/yc9559/uperf/releases 6. 打开`/data/cache/injector.log`,检查sfanalysis注入是否成功 7. 如果关联自启动到第三方APP,设置在开机完成后执行`run_uperf.sh` 8. 如果关联自启动到系统启动脚本,插入`sh /data/uperf/initsvc_uperf.sh` -9. 重启后查看`/sdcard/yc/uperf/log_uperf.txt`检查uperf是否正常自启动 +9. 重启后查看`/sdcard/yc/uperf/uperf_log.txt`检查uperf是否正常自启动 ### 性能模式切换 diff --git a/changelog.md b/changelog.md index 52dcd2f..bff6333 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # 更新日志 +## DEV 22.05.09 + +- 回退 混合CPU调频 +- 改进 触摸响应 +- 改进 CPU负载滤波器 +- 修复 sdm82x部分场景CPU频率无法写入 +- 修复 Exynos 2200支持 + ## DEV 22.05.04 - 新增 混合CPU调频 diff --git a/magisk/common/system.prop b/magisk/common/system.prop index 524c581..d4e44c2 100644 --- a/magisk/common/system.prop +++ b/magisk/common/system.prop @@ -3,5 +3,5 @@ # ro.sf.lcd_density=320 # headroom for GC -dalvik.vm.heapminfree=8m -dalvik.vm.heapmaxfree=12m +dalvik.vm.heapmaxfree=8m +dalvik.vm.heapminfree=2m diff --git a/magisk/module.prop b/magisk/module.prop index 1fb7911..17d1acc 100644 --- a/magisk/module.prop +++ b/magisk/module.prop @@ -1,6 +1,6 @@ id=uperf name=Uperf -version=v3(22.05.04) +version=v3(22.05.09) versionCode=3 author=Matt Yang description=Userspace performance controller for android. Repo: https://github.com/yc9559/uperf/ diff --git a/magisk/script/libpowercfg.sh b/magisk/script/libpowercfg.sh index 0bbf027..4cd22b5 100644 --- a/magisk/script/libpowercfg.sh +++ b/magisk/script/libpowercfg.sh @@ -39,10 +39,6 @@ set_cpufreq_min() { # $1:"0:576000 4:710400 7:825600" set_cpufreq_max() { lock_val "$1" /sys/module/msm_performance/parameters/cpu_max_freq -} - -# $1:"0:576000 4:710400 7:825600" -set_cpufreq_dyn_max() { local key local val for kv in $1; do diff --git a/magisk/script/libsysinfo.sh b/magisk/script/libsysinfo.sh index fc63d82..8d5ac78 100644 --- a/magisk/script/libsysinfo.sh +++ b/magisk/script/libsysinfo.sh @@ -127,11 +127,11 @@ get_config_name() { "msm8998") echo "sdm835" ;; "msm8996") echo "sdm820" ;; "msm8996pro") echo "sdm820" ;; - "exynos2200") echo "e2200" ;; + "s5e9925") echo "e2200" ;; "exynos2100") echo "e2100" ;; "exynos1080") echo "e1080" ;; "exynos990") echo "e990" ;; - "universal2200") echo "e2200" ;; + "universal9925") echo "e2200" ;; "universal2100") echo "e2100" ;; "universal1080") echo "e1080" ;; "universal990") echo "e990" ;; diff --git a/magisk/script/powercfg.json b/magisk/script/powercfg.json index 1b370e2..c9f57c5 100644 --- a/magisk/script/powercfg.json +++ b/magisk/script/powercfg.json @@ -1,7 +1,7 @@ { "name": "Uperf", "author": "Matt Yang", - "version": "22.05.04", + "version": "22.05.09", "versionCode": 3, "features": { "strict": true, diff --git a/magisk/script/powercfg_once.sh b/magisk/script/powercfg_once.sh index 9c474b1..3d8df62 100644 --- a/magisk/script/powercfg_once.sh +++ b/magisk/script/powercfg_once.sh @@ -24,16 +24,6 @@ BASEDIR="$(dirname $(readlink -f "$0"))" . $BASEDIR/libcgroup.sh unify_cgroup() { - # clear stune & uclamp - for g in background foreground top-app; do - lock_val "0" /dev/stune/$g/schedtune.sched_boost_no_override - lock_val "0" /dev/stune/$g/schedtune.boost - lock_val "0" /dev/stune/$g/schedtune.prefer_idle - lock_val "0" /dev/cpuctl/$g/cpu.uclamp.sched_boost_no_override - lock_val "0" /dev/cpuctl/$g/cpu.uclamp.min - lock_val "0" /dev/cpuctl/$g/cpu.uclamp.latency_sensitive - done - # clear top-app for cg in cpuset stune cpuctl; do for p in $(cat /dev/$cg/top-app/tasks); do @@ -48,11 +38,10 @@ unify_cgroup() { change_task_cgroup "surfaceflinger" "foreground" "cpuset" change_thread_cgroup "surfaceflinger" "^Binder" "" "cpuset" change_task_cgroup "system_server" "foreground" "cpuset" - change_thread_cgroup "system_server" "^Binder" "" "cpuset" change_thread_cgroup "system_server" "^android.bg" "" "cpuset" change_task_cgroup "composer|allocator" "foreground" "cpuset" - change_task_cgroup "android.hardware.media" "top-app" "cpuset" change_task_cgroup "netd" "foreground" "cpuset" + change_task_cgroup "android.hardware.media" "background" "cpuset" change_task_cgroup "vendor.mediatek.hardware" "background" "cpuset" change_task_cgroup "aal_sof|kfps|dsp_send_thread|vdec_ipi_recv|mtk_drm_disp_id|hif_thread|main_thread|ged_" "background" "cpuset" change_task_cgroup "pp_event|crtc_" "background" "cpuset" @@ -64,25 +53,17 @@ unify_sched() { done } -unify_cpufreq() { - # unify hmp interactive governor, only 2+2 4+2 4+4 - set_governor_param "interactive/use_sched_load" "0:1 2:1 4:1" - set_governor_param "interactive/use_migration_notif" "0:1 2:1 4:1" - set_governor_param "interactive/enable_prediction" "0:1 2:1 4:1" - set_governor_param "interactive/ignore_hispeed_on_notif" "0:1 2:1 4:1" - set_governor_param "interactive/fast_ramp_down" "0:0 2:0 4:0" - set_governor_param "interactive/boostpulse_duration" "0:0 2:0 4:0" - set_governor_param "interactive/boost" "0:0 2:0 4:0" - set_governor_param "interactive/above_hispeed_delay" "0:0 2:0 4:0" - set_governor_param "interactive/hispeed_freq" "0:0 2:0 4:0" - set_governor_param "interactive/go_hispeed_load" "0:90 2:90 4:90" - set_governor_param "interactive/target_loads" "0:80 2:80 4:80" - set_governor_param "interactive/min_sample_time" "0:0 2:0 4:0" - set_governor_param "interactive/max_freq_hysteresis" "0:0 2:0 4:0" -} - unify_devfreq() { - mutate "9999000000" "/sys/class/devfreq/*/max_freq" + for d in /sys/class/devfreq/*; do + local maxfreq="0" + for f in $(cat $d/available_frequencies); do + [ "$f" -gt "$maxfreq" ] && maxfreq="$f" + done + [ "$maxfreq" -gt "0" ] && mutate "$maxfreq" "$d/max_freq" + done + for d in DDR LLCC L3; do + mutate "9999000000" "/sys/devices/system/cpu/bus_dcvs/$d/*/max_freq" + done } disable_hotplug() { @@ -116,12 +97,9 @@ disable_kernel_boost() { lock_val "0" "/sys/devices/system/cpu/cpu_boost/parameters/*" lock_val "0" "/sys/module/cpu_boost/parameters/*" lock_val "0" "/sys/module/msm_performance/parameters/*" + lock_val "0" "/sys/kernel/msm_performance/parameters/*" lock_val "0" "/proc/sys/walt/input_boost/*" - # no msm_performance limit - set_cpufreq_min "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0" - set_cpufreq_max "0:9999000 1:9999000 2:9999000 3:9999000 4:9999000 5:9999000 6:9999000 7:9999000" - # MediaTek # policy_status # [0] PPM_POLICY_PTPOD: Meature PMIC buck currents @@ -186,6 +164,7 @@ disable_userspace_boost() { lock_val "0" "/sys/module/fbt_cpu/parameters/boost_affinity*" lock_val "0" /sys/kernel/fpsgo/fbt/switch_idleprefer lock_val "1" /proc/perfmgr/syslimiter/syslimiter_force_disable + # lock_val "1" /sys/module/mtk_core_ctl/parameters/policy_enable # Qualcomm&MTK perfhal perfhal_stop @@ -211,11 +190,12 @@ restart_userspace_boost() { } disable_userspace_thermal() { + # yes, let it respawn + killall mi_thermald # prohibit mi_thermald use cpu thermal interface for i in 0 2 4 6 7; do - lock_val "cpu$i 9999999" /sys/devices/virtual/thermal/thermal_message/cpu_limits + lock_val "cpu$i 9999000" /sys/devices/virtual/thermal/thermal_message/cpu_limits done - chmod 0444 /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq } restart_userspace_thermal() { @@ -233,7 +213,6 @@ echo "sh=$(which sh)" disable_kernel_boost disable_hotplug unify_sched -unify_cpufreq unify_devfreq disable_userspace_thermal @@ -245,7 +224,6 @@ restart_userspace_boost disable_kernel_boost disable_hotplug unify_sched -unify_cpufreq unify_devfreq # make sure that all the related cpu is online diff --git a/magisk/script/setup.sh b/magisk/script/setup.sh index 963ee75..4e4adb1 100644 --- a/magisk/script/setup.sh +++ b/magisk/script/setup.sh @@ -74,7 +74,7 @@ install_uperf() { echo "" echo "* Uperf https://github.com/yc9559/uperf/" echo "* Author: Matt Yang" -echo "* Version: v3(22.05.04)" +echo "* Version: v3(22.05.09)" echo "" echo "- Installing uperf" diff --git a/version.json b/version.json index 9662138..35ab898 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "versionCode": 3, - "version": "v3(22.05.04)", - "zipUrl": "https://github.com/yc9559/uperf/releases/download/dev-22.05.04/uperf-dev-22.05.04.zip", + "version": "v3(22.05.09)", + "zipUrl": "https://github.com/yc9559/uperf/releases/download/dev-22.05.09/uperf-dev-22.05.09.zip", "changelog": "https://github.com/yc9559/uperf/raw/master/changelog.md" }