|
发表于 2020-8-15 13:00:22
9845 浏览 0 回复
MT6762如何手动去设置CPU核数,关闭thermal验证performance问题
[DESCRIPTION]
因CPU或者DVFS设置不同,或Thermal过高而导致性能下降,如何通过adb命令进行设置
[SOLUTION]
1、对于是否由于CPU或者DVFS不同引起的问题,可以通过下面的命令验证
首先取得root权限, 手动设定CPU core数量:
setup:(务必先下setup部分,才能下定频定核相关命令)不同平台,设置会有差别,下面针对MT6795 相关类似平台;
- adb shell "echo 0 > /proc/hps/enabled" (关闭cpu hotplug)
- adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" (固定最高频)
复制代码 开启CPU1~CPU7(CPU0 always on)
- adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
- adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online"
- ......
- 关闭CPU1~CPU7(CPU0 always on)
- adb shell "echo 0 > /sys/devices/system/cpu/cpu1/online"
- adb shell "echo 0 > /sys/devices/system/cpu/cpu2/online"
复制代码 ......
Note: echo 1 打开,echo 0 关掉
恢复最初 cpu core设置
- adb shell "echo 1 > /proc/hps/enabled"
- adb shell "echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
复制代码 手动设定大小核freq
请根据oppidx档位设定:(oppidx档位请参考以下cat出来的idx)
- adb shell "cat/proc/cpufreq/cpufreq_ptpod_freq_volt"
复制代码 如:(设定最高频率)
- adb shell "echo 0 >/proc/cpufreq/cpufreq_oppidx" (idx :0 is CPU frequency mapping)
复制代码
2. 对于是否系统过热而引起的性能差异判断方式:
为避免thermal关闭cpu,导致performance差异 ,关闭thermal测试:
- adb shell "echo 120000 130000 >/proc/cpufreq/cpufreq_ptpod_temperature_limit"
- adb shell "/system/bin/thermal_manager/etc/.tp/.th120.mtc" (重启后失效)
- adb shell "echo 0 > /proc/cpufreq/cpufreq_limited_power"
复制代码 Android P(重启平台后需要重新设置):- <div>#get current thermal settings
- adb shell "cat /data/vendor/.tp/.settings"</div><div>#Disable thermal policy
- adb shell "thermal_manager vendor/etc/.tp/.ht120.mtc"</div><div>
- </div><div>#Enable thermal policy
- adb shell "thermal_manager vendor/etc/.tp/thermal.conf"</div>
复制代码
Android N(重启平台后需要重新设置):
- #get current thermal settings
- adb shell "cat /data/.tp/.settings"
-
- #Disable thermal policy
- adb shell "thermal_manager vendor/etc/.tp/.ht120.mtc"
-
- #Enable thermal policy
- adb shell "thermal_manager vendor/etc/.tp/thermal.conf"
复制代码
Android M(重启平台后需要重新设置):
- #get current thermal settings
- adb shell "cat /data/.tp/.settings"
-
- #Disable thermal policy
- adb shell "/system/bin/thermal_manager /etc/.tp/.ht120.mtc"
-
- #Enable thermal policy
- adb shell "/system/bin/thermal_manager /etc/.tp/thermal.conf"
复制代码
|
|
手机微信同号:13682654092
|
|
|
|
|
登录或注册
|