htop icon indicating copy to clipboard operation
htop copied to clipboard

cant show cpu temperature on Orangepi 5(with rk3588s)

Open talking-toaster opened this issue 2 years ago • 8 comments

I use Ubuntu jummy and install the htop (3.0.5-7build2) image

this is sensor -u

orangepi@orangepi5:~/code$ sensors -u
gpu_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 33.307

littlecore_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230

bigcore0_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230

tcpm_source_psy_6_0022-i2c-6-22
Adapter: rk3x-i2c
in0:
  in0_input: 0.000
  in0_min: 0.000
  in0_max: 0.000
curr1:
  curr1_input: 0.000
  curr1_max: 0.000

npu_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230

center_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230

bigcore1_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230

soc_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 34.230
  temp1_crit: 115.000

talking-toaster avatar Jan 04 '23 06:01 talking-toaster

also cant show the cpu frequency

talking-toaster avatar Jan 04 '23 07:01 talking-toaster

I can confirm this issue on Orange PI 5, also its appears on Banana BPI-R3

image

templarundead avatar Jan 10 '23 12:01 templarundead

I can confirm the temperature issue too on Orange Pi 5 with Kernel: 5.10.110-rockchip-rk3588 (ubuntu/debian & armbian). I compiled and tried the newest htop release 3.2.2 as well as the current git clone, both with --enable-sensors. Temp stays N/A. No problem with frequencies.

bb5d0 avatar Feb 08 '23 00:02 bb5d0

Can confirm, this also happens on Orange Pi 5 Plus Tested with kernels: 5.10.110, 5.10.160, 6.5 Works fine with btop however

System64fumo avatar Sep 19 '23 10:09 System64fumo

Mapping the temperature sensors to the proper CPU topology is not implemented, cf. #1284. Is there some documentation available for the mapping?

BenBE avatar Sep 19 '23 10:09 BenBE

I'm not sure what you mean by that but sensors -u shows this

npu_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 46.230

center_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 46.230

bigcore1_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 46.230

soc_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 47.153
  temp1_crit: 115.000

tcpm_source_psy_6_0022-i2c-6-22
Adapter: rk3x-i2c
in0:
  in0_input: 0.000
  in0_min: 0.000
  in0_max: 0.000
curr1:
  curr1_input: 0.000
  curr1_max: 0.000

gpu_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 46.230

littlecore_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 47.153

bigcore0_thermal-virtual-0
Adapter: Virtual device
temp1:
  temp1_input: 46.230

System64fumo avatar Sep 19 '23 10:09 System64fumo

I'm not sure what you mean by that but sensors -u shows this

Let me explain (using a shortened version of your output):

npu_thermal-virtual-0
  temp1_input: 46.230

center_thermal-virtual-0
  temp1_input: 46.230

bigcore1_thermal-virtual-0
  temp1_input: 46.230

soc_thermal-virtual-0
  temp1_input: 47.153

gpu_thermal-virtual-0
  temp1_input: 46.230

littlecore_thermal-virtual-0
  temp1_input: 47.153

bigcore0_thermal-virtual-0
  temp1_input: 46.230

This is all the temperatures reported for your Pi. There are temperatures not just for the CPU cores, but also for things like the GPU (gpu_thermal-virtual-0), the overall SoC (soc_thermal-virtual-0), the NPU (npu_thermal-virtual-0). Also the temperatures reported for the CPU are for certain areas on the CPU die. Thus you have one sensor for each of the BIG cores (bigcore0_thermal-virtual-0, bigcore1_thermal-virtual-0), but only one reading for all of the little cores (littlecore_thermal-virtual-0).

In code you can now filter for those sensors and you end up with the three readings that belong to the CPU itself (2x BIG, 1x little). The next step is identifying the CPU topology from the output of /proc/cpuinfo by checking which of the reported CPU threads is a BIG core (and which one) and which CPU threads are little cores. Once that is done you need to map the temperature readings to the corresponding core.

Currently detecting this topology is (somewhat) implemented for Intel CPUs (using the coretemp driver of the kernel), but missing for ARM CPUs as used by the Pi.

NB: The CPU of the Pi uses the so-called BIG.little architecture with a few fully capable CPU cores (BIG) and several, functionally reduced ones (little) to supplement. Hence the name.

BenBE avatar Sep 19 '23 11:09 BenBE

I have a hack for Rockchip Rk3588 https://github.com/htop-dev/htop/pull/1411

segabor avatar Mar 11 '24 08:03 segabor