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] Bpytop doesn't show temps on RPi4 #45
Comments
I also noticed just now that Bashtop shows its name in the terminal title bar, while Bpytop doesn't. A minor issue, but it can be handy when Alt+Tabbing between many open terminal windows. |
Notice there is a mysterious "e" off by itself in the Bpytop screenshot. That disappears when I set "Check temp" to false. So maybe it's just some kind of screen rendering issue. Like the temps are being covered up by the rest of the CPU info box. |
@RedBearAK |
Celebrated too soon. Regret to report mission failure, Captain. The phantom "e" has certainly disappeared, but the temp block doesn't show even after cycling the "Check temp" option True-False-True. This time there is no visible difference regardless of the setting. Still working fine in bashtop. Let me know if there is something I can do to help troubleshoot, like running a debug version. |
Just noticed the name is back in the title bar already in BpyTOP. Nice. |
@RedBearAK |
Can you run commands: |
|
Forgot a newline at the end I think. try: |
or instead: |
|
Alright, thanks :) Should be fixed in next version. Always a bother to get these things working when not having the actual hardware to test on. |
Finally fixed in v1.0.10 |
I get the same output from those commands as drazil100. However, although I'm sure you're fixing something, I still don't see the temps. I've verified I'm using 1.0.10 and "Check temp" is enabled. Also this version seems to take an unusually long time to go through the checklist before it starts up. Like around 10 seconds, where previously it seemed more like around 3 seconds at the most. |
@RedBearAK The checklist is completely and entirely optional and can be turned off in the options. Loads pretty much instantly when "Show init" is disabled |
@drazil100 |
I figured out the problem. vcgencmd requires sudo to run. Bashtop has the same issue with pi temperatures but if I run it with sudo it works. Sudo does not however help with bpytop. My friend suggests checking out "/sys/class/thermal/thermal_zone0/temp". He says it works with x86 too. |
From my friend: |
@drazil100 |
Raspbian. And I ran them with sudo because it returned this when I didn't
|
+1. This still doesn't work yet (v1.0.10). I use both Bashtop & Bpytop. You mentioned this command and this works perfectly {sudo python3 -c "import subprocess; print(round(float(subprocess.check_output(['vcgencmd', 'measure_temp'], text=True).strip()[5:-2])))"} Love your work. Fan of this TUI |
@RedBearAK |
@drazil100 I don't feel like it's normal to need to sudo just to check the temps. I can't run something like "apt update" on my system without sudo, but I can run vcgencmd just fine with user permissions. Certainly it will need to be addressed if that is actually how Raspbian or current Raspberry Pi OS behaves by default, but I think your issue is actually a separate problem from why the temps aren't displaying, at least on my system. |
Its possible its because im not using the pi account the image came with. Either way vcgencmd is probably not something that should be permissionless cause it does quite a bit more than just check the temperatures. Also I got my pi is pretty current on the OS. |
@drazil100 |
Yes, it does fix it for RedBearAK. Whodunit? You dunit, @aristocratos 👍 I can't really tell because the room the Pi is in is cold at the moment and it has a big Ice Tower cooler with thermal paste, so the stress test is failing to increase the temp, but did you make the color of the temp display responsive to the temperature range? Or is it just changed from solid blue to solid purple? |
No it's because:
|
Not offhand unfortunately @aristocratos @RedBearAK he has confirmed he forgot to set the ranges for the colors thats why they are purple |
Seems like at least the pi 4 soft throttles at 60C and hard throttles at 80C. So might use those values for now. |
My output running 32-bit Twister OS 1.5.2
|
Might have to look into the psutil source to investigate if 'cpu_thermal' is something reported from the sensors or a common name used by psutil. If it is, I should be able to get rid of using "vcgencmd". |
So the temp display in bashtop and bpytop does respond to temp changes by changing color? Guess I never really noticed because my cooler is too efficient. I can never get it to go above 40C anymore under a stress test, even when the room is warm. With the thermal pad that came with the cooler the temps would go to 60C. |
AHA. Figured it out. The group that lets me run vcgencmd without root is "video". Still would be best if temps could be obtained by something that isn't permission locked but now I know what group I need to be in. |
Fixed color range in v1.0.12 |
Color range works! Thanks! |
@aristocratos
That totally figures since what vcgencmd is actually reporting is the GPU temp, isn't it? |
I have no clue actually. |
Wouldn't it be the temperate for the whole SoC that's reported if it's just 1 value? I know Pine64 reports multiple SoC values, but they are named CPU and GPU so pretty telling what's what. |
Yeah, let's close it for now. And just reopen if new related bugs surface. |
I know that vcgencmd is how I was told to check temperatures on the pi |
I would guess that |
Hey, I've been noticing on a couple of machines that bpytop seems to have some issues updating reliably at times. Almost as if it's getting "stuck" from time to time, especially when the CPU is very busy, but sometimes even when it isn't. For instance, here is bashtop and bpytop side by side, both set to update every 2000ms and both have been running since I started stress-ng, but as you can see the graphs are different. |
The graphs on bpytop have double the horizontal resolution that the default on bashtop has. (Two values for each character) |
Out of curiosity is there a reason you can't use that? @RedBearAK that should probably be its own issue since its not strictly related to the pi and is definitely not about temperatures. |
Would have to know for sure that it is a raspberry pi, otherwise that value could be anything. It's likely that that is the value psutil picks up as "cpu_thermal". |
The script I copied from a forum somewhere uses both
The output is often the same but also often shows a difference of 1-2 degrees.
|
Huh, could you run |
O-I-C Ah, so that is what "hires graphs" is supposed to do. I never quite figured that out through casual use. Makes sense. |
Could rewrite it so if |
Since now it's possibly reporting gpu temp as cpu... Gonna take a look at it tomorrow, need some sleep before work :) |
My friend says you can find it in "/sys/class/thermal/thermal_zone0/type" Just checked mine and it says "cpu-thermal" |
@aristocratos
Here is the modified (and fixed) script:
|
Added collection through psutil if "cpu_thermal" is available, will fall back to |
Hardware: Raspberry Pi 4B 8GB
Software: Twister OS 1.5 (basically just a skin on top of Raspbian 32-bit)
Bpytop doesn't show CPU temps for me on this platform, which is odd because Bashtop shows the temps just fine on the same machine. Doesn't seem to be a problem with the menu setting.
Screenshot (Bashtop left, Bpytop right):
The text was updated successfully, but these errors were encountered: