Skip to content
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

Not a number #594

Open
vladimirnewissue opened this issue Apr 27, 2020 · 16 comments
Open

Not a number #594

vladimirnewissue opened this issue Apr 27, 2020 · 16 comments

Comments

@vladimirnewissue
Copy link

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

notanumber

@farhadinima75
Copy link

same problem after today Update.... :(

@AlexFalappa
Copy link

AlexFalappa commented Apr 28, 2020

Can confirm this after update on 27 Apr 2020.

I am on Ubuntu 18.04.

Any workaround?

@vladimirnewissue
Copy link
Author

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...

@ivocavalcante
Copy link

ivocavalcante commented Apr 28, 2020

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.

@techsy730
Copy link

techsy730 commented Apr 28, 2020

For the disk issue, I basically undid 3ba2f60

In ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/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
#520 (comment) works here too.

@vladimirnewissue
Copy link
Author

For the Disk issue, I basically undid 3ba2f60

In ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/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!

@chrisspen
Copy link
Collaborator

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

@vladimirnewissue
Copy link
Author

@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

@techsy730
Copy link

@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.

@ncallister
Copy link

@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.

@cmcinroy
Copy link

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

@acesabe
Copy link

acesabe commented Apr 30, 2020

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

@techsy730
Copy link

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

Yes, for Temp and Fan you will need to follow the instructions at
#520 (comment)

@cxw42
Copy link

cxw42 commented Jun 10, 2020

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 #594 (comment), 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.

@frankvw2017
Copy link

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

@peci1
Copy link
Contributor

peci1 commented Aug 10, 2020

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

cxw42 added a commit to cxw42/gnome-shell-system-monitor-applet that referenced this issue Oct 18, 2020
If the disk information cannot be parsed, behave as if there were no
information rather than displaying NaN.

Implements <paradoxxxzero#594 (comment)>.
bluet added a commit to bluet/gnome-shell-system-monitor-applet that referenced this issue Apr 6, 2021
… on Ubuntu 18.04

add backward support for Gnome 3.28 , fix NaN temperature and disk IO on Ubuntu 18.04 . 

related issues: paradoxxxzero#520 paradoxxxzero#526 paradoxxxzero#594 paradoxxxzero#597 paradoxxxzero#601  thankjura/ds4battery#4  
I don't have dedicated GPU to test paradoxxxzero#592 but it should be possible to fix in the same way.

inspired by @shemgp and @EBoisseauSierra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests