0ry0n / Resource_Monitor

Resource_Monitor is a GNOME Shell extension that Monitor the use of system resources like cpu, ram, disk, network and display them in GNOME Shell top bar.
GNU General Public License v3.0
143 stars 20 forks source link

[Temperature Error] on random startups (fixes itself on opening extension settings) #47

Closed ghost closed 1 year ago

ghost commented 2 years ago

Describe the bug Some sort of extension initialization issue. Sometimes it just shows [Temperature Error] beside cpu usage & nothing else. It sort of fixes itself after I open the extension settings (or right click shortcut ingeneral).

To Reproduce Steps to reproduce the behavior: It's actually random. I donno how to reproduce it but, it often appears on random startups.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots Will post the screenshot soon when I have get it next time

Desktop (please complete the following information):

0ry0n commented 2 years ago

Thanks for reporting, I am aware of the problem. I will try to fix it in the next version.

LenaKiseleva commented 2 years ago

Hi, any idea how to fix this? Opening the settings does not fix it

изображение

ghost commented 2 years ago

Hi, any idea how to fix this? Opening the settings does not fix it

изображение

That's different error from what I've got. Mine's just an initialization issue of cputemp. Yours look like the temperature sensor itself didn't have a reading.

ghost commented 1 year ago

anyway to debug this @0ry0n ?

0ry0n commented 1 year ago

I am aware of the problem and am finding a solution. it is due to the asynchronous temperature reading mechanism.

ghost commented 1 year ago

Any updates on the fix mate ? This bug is repetitive & starting to annoy me xD.

0ry0n commented 1 year ago

Ok, I think I have solved the problem. I have yet to test it well but waiting for the new version you can make these changes to your code https://github.com/0ry0n/Resource_Monitor/blob/dc9e8957bfc37c3eea5ef1c8c3883acebff758e3/Resource_Monitor%40Ory0n/extension.js#L1544-L1547 move this "else" here https://github.com/0ry0n/Resource_Monitor/blob/dc9e8957bfc37c3eea5ef1c8c3883acebff758e3/Resource_Monitor%40Ory0n/extension.js#L1514 like this

if (GLib.file_test(path, GLib.FileTest.EXISTS)) { this._loadFile(path).then(contents => { const value = parseInt(ByteArray.toString(contents));

this._cpuTemperatures += value / 1000; this._cpuTemperaturesReads++; }); } else { this.cpuTemperatureValue.text = ('[Temperature Error'); this._cpuTemperatureUnit.text = ''; }

mavrik132 commented 1 year ago

I'm still experiencing this random temperature error.

I'm running: Ubuntu 23.04 but it was still happening on the previous version as well Gnome 44.0 Resource_Monitor 19

After rebooting, if it doesn't fix itself, opening the settings and scrolling through the tabs seems to fix it.

eual8 commented 1 year ago

Facing the same error on Ubuntu 22.04.2 LTS X11. Opening Resource Monitor extension settings helps, the error disappears and the temperature value is displayed.