Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Temperature not showing on Raspberry Pi4 #107

Closed
NeoTrace82 opened this issue Jun 8, 2022 · 17 comments
Closed

[Bug] Temperature not showing on Raspberry Pi4 #107

NeoTrace82 opened this issue Jun 8, 2022 · 17 comments
Assignees

Comments

@NeoTrace82
Copy link

Description of the bug

If I remember correctly in an earlier release the temp was displayed, but its not working with the latest image on RPI4
Bildschirmfoto 2022-06-08 um 23 12 05

How to reproduce

No response

Relevant log output

No response

What browsers are you seeing the problem on?

Safari

Where is your instance running?

Raspberry Pi

Additional context

No response

@MauriceNino
Copy link
Owner

Thanks for the issue. I remember, we already had this problem in #36. The thing is, that it seems like on ARM devices, the individual core temps can not be read, and I think systeminformation does not use the global temperature.

Can you please run sensors on your device and paste the output?

If sensors is not available, run apt install lm-sensors && sudo sensors-detect before. If you are not running some Debian flavor, you might need to look up how to install it.

@MauriceNino MauriceNino self-assigned this Jun 8, 2022
@NeoTrace82
Copy link
Author

NeoTrace82 commented Jun 8, 2022

did install correctly but no sensor shown

pi@dontpanic:~ $ sudo sensors-detect
# sensors-detect version 3.6.0
# Kernel: 5.15.32-v8+ aarch64
# Cannot show processor info on aarch64 architecture.

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
modprobe: FATAL: Module cpuid not found in directory /lib/modules/5.15.32-v8+
Failed to load module cpuid.

// ... log trimmed

Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
https://hwmon.wiki.kernel.org/device_support_status for driver status.
pi@dontpanic:~ $ 

@NeoTrace82
Copy link
Author

NeoTrace82 commented Jun 8, 2022

those are the methods I know how to read temps on a Pi

vcgencmd measure_temp => GPU
/sys/class/thermal/thermal_zone0/temp => CPU

pi@dontpanic:~ $ vcgencmd measure_temp
temp=44.8'C
pi@dontpanic:~ $ cat /sys/class/thermal/thermal_zone0/temp
44790

@MauriceNino
Copy link
Owner

cat /sys/class/thermal/thermal_zone0/temp is for socket/chipset temps as it seems. I could make it fall back to the chipset temp, but it is generally much lower afaik.

This would be a temp reading on my system:

{
  main: 37.9,
  cores: [ 70, 69, 69, 69, 68, 68 ],
  max: 70,
  socket: [],
  chipset: 42
}

As you can see, nothing comes close to the core temps.

One thing I could do, is fall back to the max temp, as it will be gathered using /opt/vc/bin/vcgencmd as it seems. Without changing any of your configuration, can you please run the following and paste the output:

docker container exec -it YOUR_CONTAINER_NAME /bin/sh -c "ls -la /opt/vc/bin/vcgencmd"

@NeoTrace82
Copy link
Author

pi@dontpanic:~ $ sudo docker exec -it dashdot /bin/sh -c "ls -la /opt/vc/bin/vcgencmd"
ls: /opt/vc/bin/vcgencmd: No such file or directory

@MauriceNino
Copy link
Owner

MauriceNino commented Jun 9, 2022

Ok another test (real sorry, I have no Raspberry Pi to test it myself), can you please execute the following:

docker container run -it --rm --privileged alpine /bin/sh -c "apk add raspberrypi; ls -la /opt/vc/bin/vcgencmd; /opt/vc/bin/vcgencmd measure_temp"

@MauriceNino
Copy link
Owner

Oh, and while you are at it, could you also test this please:

docker container run -it --rm --privileged -v /opt/vc/bin/vcgencmd:/opt/vc/bin/vcgencmd:ro alpine /bin/sh -c "ls -la /opt/vc/bin/vcgencmd; /opt/vc/bin/vcgencmd measure_temp"

@NeoTrace82
Copy link
Author

bash-5.1# ls -la /opt/vc/bin/vcgencmd 
-rwxr-xr-x    1 root     root         18024 Dec 28 18:49 /opt/vc/bin/vcgencmd
bash-5.1# 
bash-5.1# sh
/app # 
/app # /opt/vc/bin/vcgencmd measure_temp
sh: /opt/vc/bin/vcgencmd: Permission denied
/app # 
bash-5.1# ls -la /opt/vc/bin/vcgencmd
total 8
drwxr-xr-x    2 root     root          4096 Jun  9 11:04 .
drwxr-xr-x    3 root     root          4096 Jun  9 11:04 ..
bash-5.1# 

@NeoTrace82
Copy link
Author

pi@dontpanic:~ $ sudo docker container run -it --rm --privileged alpine /bin/sh -c "apk add raspberrypi && ls -la /opt/vc/bin/vcgencmd"
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
(1/2) Installing raspberrypi-libs (0.20200813-r1)
(2/2) Installing raspberrypi (0.20200813-r1)
OK: 6 MiB in 16 packages
-rwxr-xr-x    1 root     root         18024 Dec 28 18:49 /opt/vc/bin/vcgencmd

pi@dontpanic:~ $ sudo docker container run -it --rm --privileged -v /opt/vc/bin/vcgencmd:/opt/vc/bin/vcgencmd:ro alpine /bin/sh -c "ls -la /opt/vc/bin/vcgencmd; /opt/vc/bin/vcgencmd measure_temp"
total 8
drwxr-xr-x    2 root     root          4096 Jun  9 11:04 .
drwxr-xr-x    3 root     root          4096 Jun  9 11:12 ..
/bin/sh: /opt/vc/bin/vcgencmd: Permission denied
pi@dontpanic:~ $ 

@MauriceNino
Copy link
Owner

I'm sorry, I think you got the old version of my comment, but can you run the first command again please? There is a /opt/vc/bin/vcgencmd measure_temp at the end. I want to make sure, that it can read some temps inside the container.

@NeoTrace82
Copy link
Author

my second one is with "measure_temp" and it says Permission denied

@MauriceNino
Copy link
Owner

Yeah, but the second one was to try using the hosts /opt/vc/bin/vcgencmd via a volume mount and with the second one I wanted to try installing the package in the container instead. So they work differently.

@NeoTrace82
Copy link
Author

I See, got it

pi@dontpanic:~ $ sudo docker container run -it --rm --privileged alpine /bin/sh -c "apk add raspberrypi; ls -la /opt/vc/bin/vcgencmd; /opt/vc/bin/vcgencmd measure_temp"
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
(1/2) Installing raspberrypi-libs (0.20200813-r1)
(2/2) Installing raspberrypi (0.20200813-r1)
OK: 6 MiB in 16 packages
-rwxr-xr-x    1 root     root         18024 Dec 28 18:49 /opt/vc/bin/vcgencmd
temp=43.8'C
pi@dontpanic:~ $ 

MauriceNino added a commit that referenced this issue Jun 9, 2022
this is important for raspberry pi, because it has no lm-sensors

for #107
MauriceNino added a commit that referenced this issue Jun 9, 2022
## [3.1.2](v3.1.1...v3.1.2) (2022-06-09)

### Bug Fixes

* **api:** read temperature from main if no per-core data is found ([523e7a1](523e7a1)), closes [#107](#107)
* **view:** error on domains with multiple subdomains ([756774b](756774b))
* **view:** mobile browser address bar not hiding on scroll ([7a32a7c](7a32a7c))
* **view:** remove old CRA app name in manifest ([dd8e0a6](dd8e0a6))
* **view:** server image not shown on firefox ([adb6607](adb6607))
@MauriceNino
Copy link
Owner

🎉 This issue has been resolved in version 3.1.2

Please check the changelog for more details.

@MauriceNino
Copy link
Owner

Please test it out if it works, if not feel free to reopen this issue :)

@NeoTrace82
Copy link
Author

working, thanks!

@MauriceNino
Copy link
Owner

Great! Thank you for your help!

alan-caio added a commit to alan-caio/healthcare-dshboard-react-node that referenced this issue Jul 28, 2022
## [3.1.2](MauriceNino/dashdot@v3.1.1...v3.1.2) (2022-06-09)

### Bug Fixes

* **api:** read temperature from main if no per-core data is found ([523e7a1](MauriceNino/dashdot@523e7a1)), closes [#107](MauriceNino/dashdot#107)
* **view:** error on domains with multiple subdomains ([756774b](MauriceNino/dashdot@756774b))
* **view:** mobile browser address bar not hiding on scroll ([7a32a7c](MauriceNino/dashdot@7a32a7c))
* **view:** remove old CRA app name in manifest ([dd8e0a6](MauriceNino/dashdot@dd8e0a6))
* **view:** server image not shown on firefox ([adb6607](MauriceNino/dashdot@adb6607))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants