Raspberry Pi4 CPU temp is not recognized #4

Open
opened 3 years ago by chytrex · 2 comments

Basic information

  • TDE version: R14.1.x
  • Distribution: Devuan chimaera
  • Hardware: arm64

Description

Location where raspberry pi4 reports its temperature is not recognized by kima.

cat /sys/class/thermal/thermal_zone0/temp
is outputing temperature like:
50147
so it needs to be divided by 1000 to get real value.

...

Steps to reproduce

  1. start kima and open preferences
  2. there will be no CPU temperature listed as valid source

Screenshots

<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: R14.1.x <!-- such as R14.1.x - see tde-config -v --> - Distribution: Devuan chimaera <!-- such as Debian Stretch - see lsb_release -sd --> - Hardware: arm64 <!-- amd64 / i386 / armhf / ... --> <!-- Use SL/* labels to set the severity level. Please do not set a milestone. --> ## Description Location where raspberry pi4 reports its temperature is not recognized by kima. `cat /sys/class/thermal/thermal_zone0/temp` is outputing temperature like: `50147` so it needs to be divided by 1000 to get real value. ... ## Steps to reproduce 1. start kima and open preferences 2. there will be no CPU temperature listed as valid source ## Screenshots <!-- If it seems useful, please provide provide one or more screenshots. -->
Poster

Just side note. This is not critical for me as I was able to workaround it by faking HDDtemp output by simple ruby script:

#!/usr/bin/ruby

require 'socket'
server = TCPServer.new 7634

while session = server.accept
        temp = File.read("/sys/class/thermal/thermal_zone0/temp").chomp
        temp = temp.to_i / 1000

        session.print "|/dev/cpu|BCM2835|#{temp.to_i}|C|"
        session.close
end

Edit:
I think fix for this is not dificult and may be handy as running raspberry Pi 4 as desktop is possible and on top of that Trinity is great lightweight DE for this usecase.

Just side note. This is not critical for me as I was able to workaround it by faking HDDtemp output by simple ruby script: ``` #!/usr/bin/ruby require 'socket' server = TCPServer.new 7634 while session = server.accept temp = File.read("/sys/class/thermal/thermal_zone0/temp").chomp temp = temp.to_i / 1000 session.print "|/dev/cpu|BCM2835|#{temp.to_i}|C|" session.close end ``` Edit: I think fix for this is not dificult and may be handy as running raspberry Pi 4 as desktop is possible and on top of that Trinity is great lightweight DE for this usecase.
Poster
> tree /sys/class/thermal/thermal_zone0/
/sys/class/thermal/thermal_zone0/
├── available_policies
├── hwmon0
│   ├── device -> ../../thermal_zone0
│   ├── name
│   ├── power
│   │   ├── autosuspend_delay_ms
│   │   ├── control
│   │   ├── runtime_active_time
│   │   ├── runtime_status
│   │   └── runtime_suspended_time
│   ├── subsystem -> ../../../../../class/hwmon
│   ├── temp1_input
│   └── uevent
├── integral_cutoff
├── k_d
├── k_i
├── k_po
├── k_pu
├── mode
├── offset
├── passive
├── policy
├── power
│   ├── autosuspend_delay_ms
│   ├── control
│   ├── runtime_active_time
│   ├── runtime_status
│   └── runtime_suspended_time
├── slope
├── subsystem -> ../../../../class/thermal
├── sustainable_power
├── temp
├── type
└── uevent

I tested this even further and looked into the code. Above is also tree listing of the whole relevant directory.

> cat /sys/class/thermal/thermal_zone0/hwmon0/device/temp

or

> cat /sys/class/hwmon/hwmon0/device/temp

seems to work also as intended as it returns correct value. Not sure yet why it is not recognized by kima itself.

If some more info is needed just ask in the comment.

``` > tree /sys/class/thermal/thermal_zone0/ /sys/class/thermal/thermal_zone0/ ├── available_policies ├── hwmon0 │   ├── device -> ../../thermal_zone0 │   ├── name │   ├── power │   │   ├── autosuspend_delay_ms │   │   ├── control │   │   ├── runtime_active_time │   │   ├── runtime_status │   │   └── runtime_suspended_time │   ├── subsystem -> ../../../../../class/hwmon │   ├── temp1_input │   └── uevent ├── integral_cutoff ├── k_d ├── k_i ├── k_po ├── k_pu ├── mode ├── offset ├── passive ├── policy ├── power │   ├── autosuspend_delay_ms │   ├── control │   ├── runtime_active_time │   ├── runtime_status │   └── runtime_suspended_time ├── slope ├── subsystem -> ../../../../class/thermal ├── sustainable_power ├── temp ├── type └── uevent ``` I tested this even further and looked into the code. Above is also tree listing of the whole relevant directory. `> cat /sys/class/thermal/thermal_zone0/hwmon0/device/temp` or `> cat /sys/class/hwmon/hwmon0/device/temp` seems to work also as intended as it returns correct value. Not sure yet why it is not recognized by kima itself. If some more info is needed just ask in the comment.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/kima#4
Loading…
There is no content yet.