gnome-shell-system-monitor-applet icon indicating copy to clipboard operation
gnome-shell-system-monitor-applet copied to clipboard

Not a number

Open vladimirnewissue opened this issue 4 years ago • 16 comments

Disk section shows "not a number" and filled with color. Screenshot below.

notanumber

vladimirnewissue avatar Apr 27 '20 06:04 vladimirnewissue

same problem after today Update.... :(

farhadinima75 avatar Apr 27 '20 12:04 farhadinima75

Can confirm this after update on 27 Apr 2020.

I am on Ubuntu 18.04.

Any workaround?

AlexFalappa avatar Apr 28 '20 06:04 AlexFalappa

Can confirm this after update on 27 Apr 2020.

I am on Ubuntu 18.04.

Any workaround?

me too ubuntu 18.04. no workaround yet...

vladimirnewissue avatar Apr 28 '20 07:04 vladimirnewissue

Same here, Ubuntu 18.04. Disk rates and Temp show NaN. Also, this is what temperature source selector shows:

image

Used to show sensor name.

ivocavalcante avatar Apr 28 '20 13:04 ivocavalcante

For the disk issue, I basically undid https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/commit/3ba2f60c45eac1fce8702387884f96840e224db2

In ~/.local/share/gnome-shell/extensions/[email protected]/extension.js Find the section

        let file = Gio.file_new_for_path('/proc/diskstats');
        file.load_contents_async(null, (source, result) => {
            let as_r = source.load_contents_finish(result);
            let lines = ByteArray.toString(as_r[1]).split('\n');

Replace the last line:

let lines = ByteArray.toString(as_r[1]).split('\n');

with

let lines = String(as_r[1]).split('\n');

Then restart GNOME, either with ALT+F2, r, or logging out and logging back in (only unloading and reloading the extension doesn't work)

This was done on Gnome Shell 3.28.4

For the Temperature issue, the exact same fix described in https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/520#issuecomment-498990185 works here too.

techsy730 avatar Apr 28 '20 15:04 techsy730

For the Disk issue, I basically undid 3ba2f60

In ~/.local/share/gnome-shell/extensions/[email protected]/extension.js Find the section

        let file = Gio.file_new_for_path('/proc/diskstats');
        file.load_contents_async(null, (source, result) => {
            let as_r = source.load_contents_finish(result);
            let lines = ByteArray.toString(as_r[1]).split('\n');

Replace the last line:

let lines = ByteArray.toString(as_r[1]).split('\n');

with

let lines = String(as_r[1]).split('\n');

For the Temperature issue, the exact same fix described in #520 (comment) works here too.

Great! Thanks!

vladimirnewissue avatar Apr 28 '20 15:04 vladimirnewissue

@techsy730 I just tested this fix, and unfortunately it does not resolve the problem for Gnome Shell 3.28.

chrisspen avatar Apr 28 '20 17:04 chrisspen

@techsy730 I just tested this fix, and unfortunately it does not resolve the problem for Gnome Shell 3.28.

mine is 3.28.4 and the problem is solved

vladimirnewissue avatar Apr 28 '20 18:04 vladimirnewissue

@techsy730 I just tested this fix, and unfortunately it does not resolve the problem for Gnome Shell 3.28.

Did you log out and log back in? (Merely disabling and re-enabling doesn't pick up the new code). Forgot to mention that in my instructions.

techsy730 avatar Apr 28 '20 20:04 techsy730

@techsy730 I just tested this fix, and unfortunately it does not resolve the problem for Gnome Shell 3.28.

Did you log out and log back in? (Merely disabling and re-enabling doesn't pick up the new code). Forgot to mention that in my instructions.

If you don't want to log out, reloading gnome (ALT+F2, r) works too.

ncallister avatar Apr 29 '20 00:04 ncallister

Fixed for me, Ubuntu 18.04.4 GNOME Shell 3.28.4. Thanks!

cmcinroy avatar Apr 29 '20 08:04 cmcinroy

Fixes for Disk R/W but not for Temp and Fan....

acesabe avatar Apr 30 '20 11:04 acesabe

Fixes for Disk R/W but not for Temp and Fan....

Yes, for Temp and Fan you will need to follow the instructions at https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/520#issuecomment-498990185

techsy730 avatar May 05 '20 15:05 techsy730

Becaues of the concern expressed in #601, I tried something a bit different. This works for me on Ubuntu 18.04.4 x64, gnome-shell 3.28.4. Also, with this fix, I can still lock the screen without being logged out.

Follow the instructions in https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/594#issuecomment-620663485, except replace

let lines = ByteArray.toString(as_r[1]).split('\n');

with:

        let lines = [];
        try  {
            lines = as_r[1].toString().split('\n');
        } catch(e) {
            global.logError('Could not split /proc/diskstats string: ' + e);
        }

I got the idea for as_r[1].toString() from this article by Avi Zajac.

Let me know if you try this! I am happy to submit a PR if desired.

cxw42 avatar Jun 10 '20 13:06 cxw42

Same problem here. Disk activity shown as NaN. Running GNOME Shell 3.28.4

frankvw2017 avatar Jun 26 '20 14:06 frankvw2017

The last mentioned fix works for me on GNOME Shell 3.28.4. Locking screen works without side-effects.

peci1 avatar Aug 10 '20 13:08 peci1