MisterGuinness / gnome-shell-extension-sensors

Gnome shell extension: Shows CPU temperature, HDD temperature, voltage and fan RPM
0 stars 0 forks source link

Fedora 35: Errors in sensors.conf display message with incorrect link to github issues #63

Closed MisterGuinness closed 2 years ago

MisterGuinness commented 2 years ago

I thought I could write a custom sensors conf file to relabel the CPU and GPU temps on my wife's new mini PC, but alas I introduced typos all over the place.

This is what the sensors command displays:

Screenshot from 2022-04-21 08-59-06

And the popup menu now shows this: Screenshot from 2022-04-21 08-49-38

Clicking on that text opens the browser in the original repository, so there must be an old link somewhere that I missed

MisterGuinness commented 2 years ago

The odd thing is that all the sensors output is there, just missing the renames & ignores etc specified in the config file containing the error. Why does the error text on the first line cause the extension to think there is no output?

MisterGuinness commented 2 years ago

With an invalid config, sensors on the command line still returns zero, does output the error to stderr, but the usual data also appears on stdout (minus the changes specified in the invalid config file, of course). Somehow the presence of stderr causes the stdout to not be available.

I don't see much value in puting more time into tracking that down further, although it might be useful to display the text from stderr instead of assuming sensors-detect needs to be run, or that an issue needs to be raised.

MisterGuinness commented 2 years ago

Of course I had to have another look at the stderr causing stdout to disappear issue, I just created a new method to read stderr based on the existing one for stdout, but just logging the text instead of invoking the callback. Immediately the stderr was logged and the sensor data appeared as usual (without the relabelling specified in the invalid config). So it seems confirmed that if there is stderr you must read it, otherwise your punishment is no stdout either.

That's all well and good, but now I have data from two async child processes, but only want one return point where the callback is invoked.

MisterGuinness commented 2 years ago

Ok, I will fix it in new Issue #66, more to get a better idea on what was going on with the oddly named "Future" class so I can eventually (in yet another Issue) make a move towards Promises and async/await, etc.