Giter VIP home page Giter VIP logo

Comments (15)

elvetemedve avatar elvetemedve commented on July 17, 2024

Hi @Silvery-Corgan,

Which gnome session do you run? Is it Xorg or Wayland?

from gnome-shell-extension-system-monitor.

Silvery-Corgan avatar Silvery-Corgan commented on July 17, 2024

@elvetemedve I am using Xorg with proprietary NVidia drivers installed via RPMFusion with akmod package.

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

@Silvery-Corgan I see lags on Arch Linux as well, using the open source Nouveau driver. So it's not video driver related or specific to an OS.
Nice catch, by the way.

I have no idea what is the source of this behaviour. The extension basically just reads files from /proc and /sys directories and utilises the Gnome St library to display the information. It does not touch the graphics directly.

I'll try to narrow down the problem to a specific GUI operation. Once that is done, maybe Gnome developers can give some help.

from gnome-shell-extension-system-monitor.

Silvery-Corgan avatar Silvery-Corgan commented on July 17, 2024

@elvetemedve I have upgraded to Fedora 24. I am still using Xorg and the proprietary drivers. So nothing changed except the base (F23 => F24). I am still having this issue. This might be related to GNOME.

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

I've done investigation and it looks like Gnome is not the source of the problem, but the too many file reads causes those spikes when a video plays.

First this line has to be refactored and implemented in a more efficient way: https://github.com/elvetemedve/gnome-shell-extension-system-monitor/blob/master/System_Monitor%40bghome.gmail.com/meter.js#L384
Secondly the list of process IDs are loaded multiple times per update interval, but should be loaded only once per iteration: https://github.com/elvetemedve/gnome-shell-extension-system-monitor/blob/master/System_Monitor%40bghome.gmail.com/meter.js#L379

I'll try to come up with a solution.

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

@Silvery-Corgan I have managed to improve the performance of the extension by loading statistics asynchronously. I attached the modified version below.
Can you test it please by extracting the content into the ~/.local/share/gnome-shell/extensions directory and restart Gnome session?
(I used this animation to measure the lag.)

[email protected]

from gnome-shell-extension-system-monitor.

Silvery-Corgan avatar Silvery-Corgan commented on July 17, 2024

@elvetemedve Sorry for the late reply. I have tested this for the past week. The issue is no longer present with a few exceptions. So the stuttering will appear sometimes but it's not going to be like it was before and it certainly fades away after about 10-20 seconds. The stuttering appears roughly after 1, 1 & a half hour of watching something but like I said it's really negligible. You did an awesome job with that. 👍 Is there something that can be done to have this fixed permanently? (Otherwise I'll just have to live with it) :)

By the way, this should be pushed to production. I had no crash in the past week.

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

@Silvery-Corgan Thanks for the feedback.
That's good. Actually further improvements can be done, but I have no much free time nowadays.

The extension loads system statistics by reading a lot of files from the kernel filesystem (/proc or /sys). It turned out that even if it reads asynchronously, Gnome Shell somehow blocks the rendering until all operation is complete. As one of the Gnome developer suggested, I moved some of the most used read operations into an "idle callback function" which resulted in a smoother rendering. However not all file reads are done this way, so it can be further improved.

I have no idea why do you see that happening after 1 hour or so. The extension does not accumulate tasks over time, except if there is a bug somewhere.

I'll publish the modified version soon.

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

New version has been published.

from gnome-shell-extension-system-monitor.

pts-sergiomartins avatar pts-sergiomartins commented on July 17, 2024

This problem affects me on Ubuntu 18.04. Is it possible we have a regression?

Package: gnome-shell-extension-system-monitor
Version: 35-1ubuntu0.18.04.1

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

@pts-sergiomartins The last related change is made in Version 9. Later releases did not touch that.

from gnome-shell-extension-system-monitor.

 avatar commented on July 17, 2024

@elvetemedve I was running into the same problem also on ubuntu 18.04.1 with
gnome-shell-extension-system-monitor/bionic-updates,bionic-updates,now 35-1ubuntu0.18.04.1 all

disabling all menu entries (e.g. cpu, temp,..) makes stuttering disappear, but as soon as one entry is activated(+ session logout/login) the effect is back and visible not just while video playback but also scrolling in firefox...

Any ideas?

from gnome-shell-extension-system-monitor.

elvetemedve avatar elvetemedve commented on July 17, 2024

@frnkd Sorry, I'm not a GNOME expert, so don't really know what can be done. Also I don't have free time to dig deeper into the internals of the GNOME desktop components.
Probably GNOME 4.0 will solve this kind of visual bug, but there is no planned release date yet. Also the extension might need complete rewrite.

I'm currently using Arch Linux and haven't experienced this bug since the improvement changes.

from gnome-shell-extension-system-monitor.

 avatar commented on July 17, 2024

Thx for taking the time. I just like the exension and cannot use it anymore because of the described problem. Will gladly provide debug info if you plan to work further on this issue in future.

from gnome-shell-extension-system-monitor.

kyrsjo avatar kyrsjo commented on July 17, 2024

The stuttering bug is definitively back for me. Fedora 35, on a big but old machine. When enabled, the whole desktop freezes for a fraction of a second every time the applet updates.

However: If I disable the swap activity monitoring, the problem goes away, and I can have the applet enabled without stuttering.

from gnome-shell-extension-system-monitor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.