File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
projects/ROCKNIX/packages Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 44
55cat << EOF >/storage/.config/profile.d/005-thermal_path
66DEVICE_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone10/temp")
7+ DEVICE_GPU_TEMP_SENSOR=("/sys/devices/virtual/thermal/thermal_zone15/temp")
78EOF
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export OS_VERSION \
2222 DEVICE_FUNC_KEYB_MODIFIER \
2323 DEVICE_HAS_FAN \
2424 DEVICE_GPU_OVERCLOCK \
25+ DEVICE_GPU_TEMP_SENSOR \
2526 DEVICE_HAS_HDMI \
2627 DEVICE_HAS_TOUCHSCREEN \
2728 DEVICE_HDMI_GPIO \
Original file line number Diff line number Diff line change @@ -169,6 +169,14 @@ case ${HW_ARCH} in
169169esac
170170if [ -n " $GPUCUR " ]; then
171171 echo " GPU INFORMATION:"
172+ # GPU temperature
173+ # Unit: millidegree Celsius
174+ if [ -n " ${DEVICE_GPU_TEMP_SENSOR} " ]; then
175+ GTEMPE=$( awk ' {total += $1; count++} END {printf "%d", total/count/1000}' ${DEVICE_GPU_TEMP_SENSOR} )
176+ if [ -n " ${GTEMPE} " ]; then
177+ echo " GPU TEMPERATURE: ${GTEMPE} °"
178+ fi
179+ fi
172180 echo " GPU CURRENT FREQUENCY: ${GPUCUR} MHz"
173181 echo " GPU MAXIMUM FREQUENCY: ${GPUMAX} MHz"
174182fi
You can’t perform that action at this time.
0 commit comments