phocean / TopIcons-plus

An gnome-shell extension to put the icons back to the tray.
678 stars 98 forks source link

Very high CPU usage on GNOME 3.32 #118

Closed xuanruiqi closed 4 years ago

xuanruiqi commented 5 years ago

Basically the issue as in #96, but seems a problem with the extension this time: before updating to 3.32 TopIcons Plus ran seamlessly, but after the update CPU usage became very high (~80%-90%). Also, I don't have System Monitor.

I'm not sure if 3.32 API changes changed anything performance-wise.

zegkljan commented 5 years ago

Can confirm on Arch Linux. It might be good to know that other tray-related extensions (Topicons, Tray icons) also experience this issue.

ismaail commented 5 years ago

In topIcons Plus settigns, changing Tray horizontal alignement option to Center drops the CPU usage.

zegkljan commented 5 years ago

@ismaail Well, it's even more complicated. When I set the alignment to center, the CPU load drops. However, if I disable the extension and enable it again, the CPU load is back. If I then change the alignment to right, the load disappears. Reloading gnome shell (alt+f2 r) and unlocking the screen (after super+L or after wake up from suspend) has the same effect as disabling and enabling the extension.

ismaail commented 5 years ago

@zegkljan you're right, this doesn't solve the issue.

accdias commented 5 years ago

I can confirm the same problem on Fedora 30 pre-beta as well.

Cxarli commented 5 years ago

Also confirmed on 5.0.3-arch1-1, GNOME Shell 3.32.0, gnome-shell-extension-topicons-plus-git 22+5+g6bbdbaa-1 Moving the alignment from center to right drops the CPU load for gnome-shell from 95% to 0.5%

mattia-b89 commented 5 years ago

I confirm the strange behaviour

davidgxxl commented 5 years ago

I confirm in Archlinux with gnome 3.32!

pacho2 commented 5 years ago

Maybe this fix in dash-to-dock could help as it seems the root cause is the same: https://github.com/home-sweet-gnome/dash-to-panel/commit/3cdd20c057c9ffd0cd3cb2d46ab674da1b55d590

pacho2 commented 5 years ago

It seems it could be a gnome-shell bug: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1054

legluondunet commented 5 years ago

Same issue on Ubuntu 19.04, I deactivated Gnome Shell extensions one per one and found that it is Topicons-plus extension that made gnome-shell process at more than 90% cpu load.

0b11001111 commented 5 years ago

I can confirm that issue. It may be of interest that CPU usage is only high if any tray icon appears.

znmeb commented 5 years ago

This is not the only GNOME shell extension that has this issue. Dash to Dock also has this (or a related issue). I only see it on my laptop with an NVidia GPU though - it doesn't happen on my workstation.

rmader commented 5 years ago

Fixed upstream, should come to 3.32.2 (https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/521)

borovaka commented 5 years ago

I tested the fix from https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/521 on Fedora 30, and it is working.

Here is a little script that you can use on Fedora 30 before the patch is released: https://gist.github.com/borovaka/ba048f2d4153f23bcba0b5369823618c

p.s. Use this with caution and do not forget to cleanup /etc/environment after the Gnome 3.32.2 release

mooninite commented 5 years ago

@borovaka while that gist is a good start it needs some help and won't run properly in most cases.

This gist should work for a majority of cases and includes the gresource package required in a comment.

https://gist.github.com/mooninite/09d2f51240f6f03cf072fe106a5b32d9

borovaka commented 5 years ago

@mooninite You are totally right. But, we need tocheck for glib2-devel (Fedora) / libglib2.0-bin (Ubuntu). That was the reason I do not include the package in the script

widon1104 commented 5 years ago

wait for this extension support for gnome3.32

ismaail commented 5 years ago

I can confirm, the issue is fixed with latest update gnome-shell (3.32.2-1)

$ cat /usr/share/gnome/gnome-version.xml

<?xml version="1.0"?>
  <gnome-version>
  <platform>3</platform>
  <minor>32</minor>
  <micro>2</micro>
  <distributor>Arch Linux®</distributor>
  <date>2019-05-07</date>
</gnome-version>
bryango commented 5 years ago

image

For me it's not quite fixed yet... As shown above, you can see a clear drop of average CPU usage right after top icons are switched off.

$ cat /usr/share/gnome/gnome-version.xml

<?xml version="1.0"?>
<gnome-version>
 <platform>3</platform>
 <minor>32</minor>
 <micro>2</micro>
 <distributor>Arch Linux®</distributor>
 <date>2019-05-07</date>
</gnome-version>
martinpovolny commented 5 years ago

It seemed to be fixed for me with upgrade to 3.32.2. Yesterday suddenly the issue reappeared and the only way to stop the fan was to disable the extension again.

phocean commented 4 years ago

Any recent observations of this?

For now I am closing it as it's quite old and I cannot reproduce it. But feel free to reopen and comment if necessary.

Thank you ;)