当前位置: 首页 > article >正文

20250304在飞凌OK3588-C的linux R4下提高温度控制阈值为95度

20250304在飞凌OK3588-C的linux R4下提高温度控制阈值为95度
2025/3/4 15:56


缘起:我司应用工程师需要调用NPU来进行AI识别/检测,CPU/核心板在有塑胶外壳的情况下满负荷工作,风扇也压不住^_
权衡之后还是提高温度阈值到95度了。


@程帅?程工,请问rk3588的温度控制降频怎么关闭,我设置了温控策略为user_space,但是测试cpu核心温度到了85度还是会出现降频,我需要系统一直保持performance的频率

您那边有什么降温策略吗,不建议取消温控,容易缩短寿命

目前没有很好的降温的策略,但是我们不希望温度升高后频率下降
或者可以把温控的阈值调高,到95度以上
把85000改成95000


Y:\version\OK3588_Linux_fs\docs\Common\THERMAL\Rockchip_Developer_Guide_Thermal_CN.pdf
Y:\version\OK3588_Linux_fs\docs\Common\THERMAL\Rockchip_Developer_Guide_Thermal_EN.pdf


root@ok3588:/# cd /sys/class/thermal/
root@ok3588:/sys/class/thermal# ll
sh: ll: command not found
root@ok3588:/sys/class/thermal# ls -l
total 0
lrwxrwxrwx 1 root root 0 Jan  1 08:00 cooling_device0 -> ../../devices/virtual/thermal/cooling_device0
lrwxrwxrwx 1 root root 0 Jan  1 08:00 cooling_device1 -> ../../devices/virtual/thermal/cooling_device1
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone0 -> ../../devices/virtual/thermal/thermal_zone0
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone1 -> ../../devices/virtual/thermal/thermal_zone1
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone2 -> ../../devices/virtual/thermal/thermal_zone2
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone3 -> ../../devices/virtual/thermal/thermal_zone3
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone4 -> ../../devices/virtual/thermal/thermal_zone4
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone5 -> ../../devices/virtual/thermal/thermal_zone5
lrwxrwxrwx 1 root root 0 Jan  1 08:00 thermal_zone6 -> ../../devices/virtual/thermal/thermal_zone6
root@ok3588:/sys/class/thermal# 
root@ok3588:/sys/class/thermal# 
root@ok3588:/sys/class/thermal# cd thermal_zone0/
root@ok3588:/sys/class/thermal/thermal_zone0# ls -l
total 0
-r--r--r-- 1 root root 4096 Jan  1 08:01 available_policies
lrwxrwxrwx 1 root root    0 Jan  1 08:01 cdev0 -> ../cooling_device1
-r--r--r-- 1 root root 4096 Jan  1 08:01 cdev0_trip_point
-rw-r--r-- 1 root root 4096 Jan  1 08:01 cdev0_weight
drwxr-xr-x 3 root root    0 Jan  1 08:00 hwmon1
-rw-r--r-- 1 root root 4096 Jan  1 08:01 integral_cutoff
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_d
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_i
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_po
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_pu
-rw-r--r-- 1 root root 4096 Jan  1 08:01 mode
-rw-r--r-- 1 root root 4096 Jan  1 08:01 offset
-rw-r--r-- 1 root root 4096 Jan  1 08:01 policy
drwxr-xr-x 2 root root    0 Jan  1 08:01 power
-rw-r--r-- 1 root root 4096 Jan  1 08:01 slope
lrwxrwxrwx 1 root root    0 Jan  1 08:01 subsystem -> ../../../../class/thermal
-rw-r--r-- 1 root root 4096 Jan  1 08:01 sustainable_power
-r--r--r-- 1 root root 4096 Jan  1 08:01 temp
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_type
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_type
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_type
-r--r--r-- 1 root root 4096 Jan  1 08:01 type
-rw-r--r-- 1 root root 4096 Jan  1 08:00 uevent
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# ls -l
total 0
-r--r--r-- 1 root root 4096 Jan  1 08:01 available_policies
lrwxrwxrwx 1 root root    0 Jan  1 08:01 cdev0 -> ../cooling_device1
-r--r--r-- 1 root root 4096 Jan  1 08:01 cdev0_trip_point
-rw-r--r-- 1 root root 4096 Jan  1 08:01 cdev0_weight
drwxr-xr-x 3 root root    0 Jan  1 08:00 hwmon1
-rw-r--r-- 1 root root 4096 Jan  1 08:01 integral_cutoff
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_d
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_i
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_po
-rw-r--r-- 1 root root 4096 Jan  1 08:01 k_pu
-rw-r--r-- 1 root root 4096 Jan  1 08:01 mode
-rw-r--r-- 1 root root 4096 Jan  1 08:01 offset
-rw-r--r-- 1 root root 4096 Jan  1 08:01 policy
drwxr-xr-x 2 root root    0 Jan  1 08:01 power
-rw-r--r-- 1 root root 4096 Jan  1 08:01 slope
lrwxrwxrwx 1 root root    0 Jan  1 08:01 subsystem -> ../../../../class/thermal
-rw-r--r-- 1 root root 4096 Jan  1 08:01 sustainable_power
-r--r--r-- 1 root root 4096 Jan  1 08:01 temp
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_0_type
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_1_type

-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_temp
-r--r--r-- 1 root root 4096 Jan  1 08:01 trip_point_2_type
-r--r--r-- 1 root root 4096 Jan  1 08:01 type
-rw-r--r-- 1 root root 4096 Jan  1 08:00 uevent
root@ok3588:/sys/class/thermal/thermal_zone0# cat type 
soc-thermal
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# cat temp
40692
root@ok3588:/sys/class/thermal/thermal_zone0# CAT trip_point_0_hyst
sh: CAT: command not found
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_0_hyst 
2000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_0_temp 
75000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_0_t
trip_point_0_temp  trip_point_0_type  
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_0_type 
passive
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_1_hyst 
2000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_1_temp 
85000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_1_type 
passive

root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_2_hyst 
2000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_2_temp 
115000
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_2_type 
critical
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# 


修改DTS:
Y:\version\OK3588_Linux_fs\kernel\arch\arm64\boot\dts\rockchip\rk3588s.dtsi

    thermal_zones: thermal-zones {
        soc_thermal: soc-thermal {
            polling-delay-passive = <20>; /* milliseconds */
            polling-delay = <1000>; /* milliseconds */
            sustainable-power = <2100>; /* milliwatts */

            thermal-sensors = <&tsadc 0>;
            trips {
                threshold: trip-point-0 {
                    temperature = <75000>;
                    hysteresis = <2000>;
                    type = "passive";
                };
                target: trip-point-1 {
                    temperature = <95000>;
                    hysteresis = <2000>;
                    type = "passive";
                };
                soc_crit: soc-crit {
                    /* millicelsius */
                    temperature = <115000>;
                    /* millicelsius */
                    hysteresis = <2000>;
                    type = "critical";
                };
            };

修改为:

    thermal_zones: thermal-zones {
        soc_thermal: soc-thermal {
            polling-delay-passive = <20>; /* milliseconds */
            polling-delay = <1000>; /* milliseconds */
            sustainable-power = <2100>; /* milliwatts */

            thermal-sensors = <&tsadc 0>;
            trips {
                threshold: trip-point-0 {
                    temperature = <75000>;
                    hysteresis = <2000>;
                    type = "passive";
                };
                target: trip-point-1 {
                    temperature = <85000>;
                    hysteresis = <2000>;
                    type = "passive";
                };
                soc_crit: soc-crit {
                    /* millicelsius */
                    temperature = <115000>;
                    /* millicelsius */
                    hysteresis = <2000>;
                    type = "critical";
                };
            };


修改之后的效果图:
root@ok3588:/# 
root@ok3588:/# 
root@ok3588:/# 
root@ok3588:/# uname -a
Linux ok3588 5.10.66 #4 SMP Tue Mar 4 15:07:40 CST 2025 aarch64 GNU/Linux
root@ok3588:/# 
root@ok3588:/# 
root@ok3588:/# cd /sys/class/thermal/thermal_zone0
root@ok3588:/sys/class/thermal/thermal_zone0# ls -l
total 0
-r--r--r-- 1 root root 4096 Jan  1 08:00 available_policies
lrwxrwxrwx 1 root root    0 Jan  1 08:00 cdev0 -> ../cooling_device1
-r--r--r-- 1 root root 4096 Jan  1 08:00 cdev0_trip_point
-rw-r--r-- 1 root root 4096 Jan  1 08:00 cdev0_weight
drwxr-xr-x 3 root root    0 Jan  1 08:00 hwmon1
-rw-r--r-- 1 root root 4096 Jan  1 08:00 integral_cutoff
-rw-r--r-- 1 root root 4096 Jan  1 08:00 k_d
-rw-r--r-- 1 root root 4096 Jan  1 08:00 k_i
-rw-r--r-- 1 root root 4096 Jan  1 08:00 k_po
-rw-r--r-- 1 root root 4096 Jan  1 08:00 k_pu
-rw-r--r-- 1 root root 4096 Jan  1 08:00 mode
-rw-r--r-- 1 root root 4096 Jan  1 08:00 offset
-rw-r--r-- 1 root root 4096 Jan  1 08:00 policy
drwxr-xr-x 2 root root    0 Jan  1 08:00 power
-rw-r--r-- 1 root root 4096 Jan  1 08:00 slope
lrwxrwxrwx 1 root root    0 Jan  1 08:00 subsystem -> ../../../../class/thermal
-rw-r--r-- 1 root root 4096 Jan  1 08:00 sustainable_power
-r--r--r-- 1 root root 4096 Jan  1 08:00 temp
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_0_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jan  1 08:00 trip_point_0_type
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_1_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_1_temp
-r--r--r-- 1 root root 4096 Jan  1 08:00 trip_point_1_type
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_2_hyst
-rw-r--r-- 1 root root 4096 Jan  1 08:00 trip_point_2_temp
-r--r--r-- 1 root root 4096 Jan  1 08:00 trip_point_2_type
-r--r--r-- 1 root root 4096 Jan  1 08:00 type
-rw-r--r-- 1 root root 4096 Jan  1 08:00 uevent
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# cat trip_point_1_temp 
95000
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# 
root@ok3588:/sys/class/thermal/thermal_zone0# poweroff


参考资料:
https://blog.csdn.net/weixin_43245753/article/details/124341281
Rockchip RK3588获取芯片的实时温度

Rockchip RK3588获取芯片的实时温度
RK3588的芯片有7路TS-ADC分别对应:芯片中心位置、A76_0/1、A76_2/3、DSU 、A55_0/1/2/3、PD_CENTER、 NPU、GPU。
可以通过如下命令获取实时的芯片温度:
单位:0.001摄氏度

芯片中心位置温度:soc-thermal
rk3588_s:/ # cat /sys/class/thermal/thermal_zone0/temp                                                                                                                                        
62846
1
2
CPU大核A76_0/1 即CPU4和CPU5的温度:
rk3588_s:/ # cat /sys/class/thermal/thermal_zone1/temp                                                                                                                                        
63769
1
2
CPU大核A76_2/3 即CPU6和CPU7的温度:
rk3588_s:/ # cat /sys/class/thermal/thermal_zone2/temp                                                                                                                                        
62846
1
2
CPU小核A55_0/12/3 即CPU0、CPU1、CPU2、CPU3的温度
rk3588_s:/ # cat /sys/class/thermal/thermal_zone3/temp                                                                                                                                        
62846
1
2
PD_CENTER的温度:
rk3588_s:/ # cat /sys/class/thermal/thermal_zone4/temp                                                                                                                                        
60076
1
2
GPU的温度
rk3588_s:/ # cat /sys/class/thermal/thermal_zone5/temp                                                                                                                                        
61000
1
2
NPU的温度
rk3588_s:/ # cat /sys/class/thermal/thermal_zone6/temp                                                                                                                                        
61000


https://zhuanlan.zhihu.com/p/678024036
RK3588 CPU GPU NPU 定频和性能模式设置方法以及温度监控


http://www.kler.cn/a/572497.html

相关文章:

  • 阿里万相,正式开源
  • Rk3568驱动开发_自动创建设备节点_8
  • Qt 文件操作+多线程+网络
  • git的恢复命令
  • Linux命令常用的有哪些?
  • 计算机考研复试高频五十问(第一期)
  • pytorch高可用的设计策略和集成放大各自功能
  • 推荐几款优秀的PDF转电子画册的软件
  • Token相关设计
  • Oracle 数据库中的用户
  • SP导入智能材质球
  • 《OpenCV》—— dlib(换脸操作)
  • 洛谷 P2142 高精度减法(详解)c++
  • Spring Cloud Alibaba学习 4- Spring Cloud Gateway入门使用
  • 湖仓一体概述
  • React封装通用Table组件,支持搜索(多条件)、筛选、自动序号、数据量统计等功能。未采用二次封装调整灵活,包含使用文档
  • leetcode日记(77)子集Ⅱ
  • Apache IoTDB 树表双模型直播回顾(上)
  • pytest中pytest.ini文件的使用
  • python八皇后游戏