-
Notifications
You must be signed in to change notification settings - Fork 144
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
Temperature widget is not working ( not showing anything) !!! #16
Comments
Similar to #101. Is this a laptop or desktop? And if a laptop, what model? |
Also, can you run this and copy the output here: package main
import (
"fmt"
"github.com/shirou/gopsutil/host"
)
func main() {
temperatures, err := host.SensorsTemperatures()
fmt.Println(temperatures)
fmt.Println(err)
} |
It's a laptop: ASUS Vivobook 15 X542UN
I forgot to mention that everything was working perfectly when I first installed gotop, but after a while for some reason the temperatures widget became empty, I also didn't mention that the Disk Usage widget also doesn't work, i mean its there (not empty) the "Used" and "Free" sections show correct information but the "R/s" and "W/s" are always 0B, when i installed it everything was working perfectly !!! Of course, I updated the gotop folder to the latest release by using "git pull origin master", I tried to remove it, and reinstall again from the source, but the problem is still there. Here is 2 screenshots, one shows that everything was working fine, the other one i just took and you can see the empty temperature widget
I tried but it gives me these errors:
|
Oh, you have to copy that file into |
|
Here try:
|
pay attention that my previous answer was edited
|
Do you have a working GOPATH set up? What's your Go version? If you have go 1.11 then you can probably just clone that repo and run |
Or use this binary: |
First of all I'm sorry but it's my first time working with golang, so I'm kind of don't know what exactly I'm doing. My go version: Ok i did the following:
There I found 'main.go' file I ran:
I got the following output:
And I found this error in ~/.local.stat.gotop.errors.log
I thought this might be helpful: I also have gotop installed on Termux on my android tablet, the temperature widget is working there, and i got the following output after running the main.go file in the gotop directory after adding to it :
The output:
I also ran the following commands as you asked but this time on termux with working temperature widget:
|
Thanks for all the info and I'm glad you got it working! And no worries about being new. I should've been more helpful actually. It's a little tricky to setup Go for the first time and I shouldn't expect that everyone has done that already. So that actually clears a few things up for now. I'll check through this tomorrow and let you know what I come up with. |
So this should be fixed now! Let me know if you get any more issues otherwise. And thanks for taking the time to setup Go and do all the testing. |
Thanks for being responsive, and I'm glad to be part of this. But unfortunately the problem is still there. ~/.locale/state/gotop/errors.log:
|
Did you try running gotop from the master branch? I haven't released a new version yet so that's your only option for now. |
So I noticed the error message you recently got is the same as before, but I changed that message when I fixed this. :D So maybe it was leftover? Or maybe gotop didn't update correctly. Can you tell me how you updated exactly? If you have your gopath set up then you should be able to do |
Yay! Glad its working :D Thanks again being responsive and helping with this. |
This did not work for me. I installed go, and tried the Running the
I'm guessing more people will experience this same issue, and are wondering if there is a proper step-by-step on how to fix this? |
So I fixed this issue on gotop's end, but it turns out that gopsutil has an issue on its end within the Basically, I did some work on this here but I think I got stuck trying to test it and I've been pretty busy. |
So, I have an alternate fix for this, and a... Mildly expansion and abuse of the temperature widget tied into it. I'll make a pull request shortly. The short version is that both the gotop and gopsutils have some issues and limitations. First, gopsutils doesn't handle errors perfectly, though this seems to be improving. Second, if gopsutils returns any errors, gotop ignores all of the data, even when gopsutils also returns data. This isn't optimal. Third, and this is more in the realm of 'enhancements', gopsutils only deals with temperature data, and so gotop can't handle other useful data such as fan speeds even if it wanted to. The fix to item 1 seems to be coming along, or to possibly already be done. The fix for item 2 is fairly straight forward, and if my answer to 3 isn't acceptable, I'd be happy to do that instead. The fix for 3 though is to just stop using gopsutils for sensor data. Fixing 3 isn't horribly difficult once we switch to lmsensors, but it does mean that the entire 'temp' widget either shouldn't be doing everything, or should be renamed to sensors. I'm definitely open to requests on how to handle that. |
@zelch thanks for looking into this! Another thing I've been playing with is alternative libraries such as github.com/elastic/go-sysinfo. There are a few of them to choose from. I've done some work with other libraries, mainly focused on
You're right: the new abstracted device code handles errors better, but it could be better for temperatures. The Finally, WRT fan speeds: can you create a separate feature request for that? Design-wise, it should be a new device, and then we'll figure out how to display the information. Since fans are common, this can go into core |
The library I have my current implementation with also pulls from /sys via the hwmon interface, the same as gopsutils, so I would expect it to have similar performance implications, though that can certainly be tested. But it is also a linux specific library. On the fan speeds, I can definitely make a separate feature request, but I'm not actually sure that this is the right thing to do. Or perhaps to say it slightly differently, I'm fairly sure that we would want to replace the current temperature handling with a more generic sensor framework, one that can possibly handling feeding in not just different kinds of sensors, but also from multiple different sources, and then feed back out to widgets that want the right kind of data. Alternatively, we could just go for a generic sensor widget, which is far easier but is probably not the right actual answer. |
@zelch I believe this is already in place. CPU, Temp, and Mem are already broken out into devices; this decouples them from widgets. To add new devices, we add code to If we're adding new features, it should be separated from this bug, though. Would you mind forking this repository, adding code to test your library, running the tests, and sending a pull request? You can run the whole suite, but to run just the temp benchmarks, use
or something similar. Your comment about abstracting out the sensors got me thinking design, and it got long, so I started a wiki page. Are you able to comment? If not, let me know and I'll figure out how to give you permission to edit wiki pages. |
The conversation turned to using different libraries, and strayed from the original bug. In the meantime, changes have been pushed to abstract out devices, and work's been done to collect errors and render available data. In the meantime, Can anyone confirm if they still see this issue? |
I'm still getting this issue on an xps 7390 running archlinux. My desktop shows temperatures correctly. |
✋ same. Thinkpad x390 running Ubuntu 20.04. Tried both released binaries and current master. output from the snipped added to #16 (comment):
|
Hey, thanks for the response, sure!
Interestingly, after I upgraded from 4.1.0 to 4.1.1 the temperature widget became populated with the correct devices but all the values are The gotop temp widget on my new desktop: The s-tui temp widget on my new desktop: Let me know if you need anything more. |
Downloaded from releases, also tried current |
Same issue here, on thinkpad.
installed from the package manager. All is at 0 deg C. |
Have two systems, temp works on one but not the other. Working (Intel i7-3770):
Not working (Ryzen 5800X):
|
It's certainly possible that #219 addresses this for most people, so I'm going to close this and we'll re-open it if people are still experiencing issues. |
Required information:
gotop version (
gotop -v
): 2.0.0The output of
uname -a
: Linux XXX-X542UN 4.18.0-14-generic exit (crash) immediately to shell if -b is passed #15~18.04.1-Ubuntu SMP Mon Jan 14 11:09:26 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxTerminal shell (e.g. zsh or bash): bash
Terminal emulator (e.g. iTerm or gnome terminal): gnome terminal
Any relevenat hardware info: CPU: Intel i5-7200U, GPU: Intel HD Graphics 620, GPU: NVIDIA GeForce MX150
tmux version if using tmux:
Also please copy or attach the following file if it exists and contains logs:
~/.local/state/gotop/errors.log
~/Library/Logs/gotop/errors.log
~/.local/state/gotop/errors.log is EMPTY !!
Installlation method: Prebuilt binaries
The text was updated successfully, but these errors were encountered: