Bug 336274 - "Connecting…" status causes high plasmashell CPU usage
Summary: "Connecting…" status causes high plasmashell CPU usage
Status: RESOLVED DUPLICATE of bug 356479
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: master
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords:
: 336444 339598 341795 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-15 18:15 UTC by Elias Probst
Modified: 2016-11-03 19:06 UTC (History)
28 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2014-06-15 18:15:57 UTC
When plasma-nm shows the "spinner" indicating a connection status change in the systray, plasmashell's CPU usage skyrockets to 135% (quad core).

I couldn't find out, whether that's a general plasmashell systray issue or limited to plasma-nm - please re-assign if needed.

All KF5/Plasma 5 components are up-to-date from git.
sys-apps/dbus-1.8.2
net-misc/networkmanager-0.9.8.10

qtdiag:
Qt 5.3.0 (Jun  3 2014, GCC 4.8.2, 64 bit, release build) on "xcb" little endian/

Library info:
  PrefixPath: /usr
  DocumentationPath: /usr/share/doc/qt-5.3.0
  HeadersPath: /usr/include/qt5
  LibrariesPath: /usr/lib64
  LibraryExecutablesPath: /usr/lib64/qt5/libexec
  BinariesPath: /usr/lib64/qt5/bin
  PluginsPath: /usr/lib64/qt5/plugins
  ImportsPath: /usr/lib64/qt5/imports
  Qml2ImportsPath: /usr/lib64/qt5/qml
  ArchDataPath: /usr/lib64/qt5
  DataPath: /usr/share/qt5
  TranslationsPath: /usr/share/qt5/translations
  ExamplesPath: /usr/share/qt5/examples
  TestsPath: /usr/share/qt5/tests

Standard paths:
  DesktopLocation: "Desktop" /home/elias/Desktop
  DocumentsLocation: "Documents" /home/elias
  FontsLocation: "Fonts" /home/elias/.fonts
  ApplicationsLocation: "Applications" /home/elias/.local/share/applications,/usr/local/share/applications,/usr/share/applications
  MusicLocation: "Music" /home/elias/Music
  MoviesLocation: "Movies" /home/elias/Videos
  PicturesLocation: "Pictures" /home/elias/Pictures
  TempLocation: "Temporary Directory" /tmp
  HomeLocation: "Home" /home/elias
  DataLocation: "Application Data" /home/elias/.local/share/Qt Project/qtdiag,/usr/local/share/Qt Project/qtdiag,/usr/share/Qt Project/qtdiag
  CacheLocation: "Cache" /home/elias/.cache/Qt Project/qtdiag
  GenericDataLocation: "Shared Data" /home/elias/.local/share,/usr/local/share,/usr/share
  RuntimeLocation: "Runtime" /run/user/1000
  ConfigLocation: "Configuration" /home/elias/.config,/etc/xdg
  DownloadLocation: "Download" /home/elias/Downloads
  GenericCacheLocation: "Shared Cache" /home/elias/.cache

Platform capabilities: ThreadedPixmaps OpenGL WindowMasks MultipleWindows ForeignWindows

Style hints:
  mouseDoubleClickInterval: 400
  startDragDistance: 10
  startDragTime: 500
  startDragVelocity: 0
  keyboardInputInterval: 400
  keyboardAutoRepeatRate: 30
  cursorFlashTime: 1000
  showIsFullScreen: 0
  passwordMaskDelay: 0
  fontSmoothingGamma: 1.7
  useRtlExtensions: 0
  mousePressAndHoldInterval: 800

Theme:
  Styles: oxygen,oxygen,fusion,windows
  Icon theme: breeze, hicolor from /usr/share/icons
  System font: "Sans Serif" 10
  General font : "Sans Serif" 10
  Fixed font   : "Oxygen Mono" 9
  Title font   : "Sans Serif" 10
  Smallest font: "Sans Serif" 8

  Native file dialog

Screens: 2
*# 0 "eDP1" Depth: 24
  Geometry: 1920x1080+480+1440 Available: 1920x1080+480+1440
  Virtual geometry: 2560x2520+0+0 Available: 2560x2490+0+30
  2 virtual siblings
  Physical size: 294x165 mm  Refresh: 60 Hz
  Physical DPI: 165.878,166.255 Logical DPI: 96.0473,96.1081
  DevicePixelRatio: 1 Primary orientation: 2
  Orientation: 2 OrientationUpdateMask: 0

 # 1 "DP1" Depth: 24
  Geometry: 2560x1440+0+0 Available: 2560x1410+0+30
  Virtual geometry: 2560x2520+0+0 Available: 2560x2490+0+30
  2 virtual siblings
  Physical size: 597x336 mm  Refresh: 60 Hz
  Physical DPI: 108.918,108.857 Logical DPI: 96.0473,96.1081
  DevicePixelRatio: 1 Primary orientation: 2
  Orientation: 2 OrientationUpdateMask: 0

LibGL Vendor: Intel Open Source Technology Center
Renderer: Mesa DRI Intel(R) Ivybridge Mobile
Version: 3.0 Mesa 10.0.4
Shading language: 1.30
Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGBA): 8,8,8,8
Comment 1 Jan Grulich 2014-06-15 18:38:54 UTC
I can't think of anything causing this issue. I justed tested it and I cannot reproduce it.
Comment 2 Kai Uwe Broulik 2014-06-15 20:30:43 UTC
Git commit 60ddc9f25d75686b56145120096fa741b2b2216f by Kai Uwe Broulik.
Committed on 15/06/2014 at 20:28.
Pushed by broulik into branch 'master'.

Use RotationAnimator for BusyIndicator

This makes the animation run directly on the scene graph to not stress the CPU that much

REVIEW: 118769
Related: bug 311799

M  +2    -2    src/declarativeimports/plasmacomponents/qml/BusyIndicator.qml

http://commits.kde.org/plasma-framework/60ddc9f25d75686b56145120096fa741b2b2216f
Comment 3 Jan Grulich 2014-06-19 16:55:48 UTC
*** Bug 336444 has been marked as a duplicate of this bug. ***
Comment 4 Elias Probst 2014-06-19 17:23:35 UTC
Re-Opening, as the patch from RR#118769 was just meant to decrease the load a bit, but the actual issue still isn't solved…
What about disabling/suppressing animated systray items until this has been solved?
Just having ~130% CPU load for the activity animation during copying files is IMHO not the way to go…
Comment 5 Aleix Pol 2014-07-07 17:01:57 UTC
Here it's certainly not 100%CPU. It gets to 10% (on intel i3 dual core) and I'm unsure how much it is the animation to blame.
Comment 6 Jan Grulich 2014-10-02 07:35:15 UTC
*** Bug 339598 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Reznik 2015-01-15 09:59:54 UTC
(In reply to Aleix Pol from comment #5)
> Here it's certainly not 100%CPU. It gets to 10% (on intel i3 dual core) and
> I'm unsure how much it is the animation to blame.

Usually I get 10-30% but sometimes goes to 90%, it depends. It's not only NM applet spinner but also Konversation's notification icon.
Comment 8 Jan Grulich 2015-01-26 13:27:02 UTC
*** Bug 341795 has been marked as a duplicate of this bug. ***
Comment 9 Malte Eggers 2015-03-11 05:44:55 UTC
Why is this bug marked as RESOLVED FIXED, when it clearly isn't fixed. I have this problem too.
Comment 10 Kishore 2015-05-18 05:35:25 UTC
I still experience similar issue with all busy animations in the systray including file copy
Comment 11 topaz 2015-06-12 06:58:29 UTC
I also have the problem during file copy (it's the only moment I notice it).
Comment 12 Elias Probst 2015-06-12 16:08:24 UTC
Re-opening as:
- a lot of users reported this issue on IRC, KDE Forums, etc.
- I see the same here too (busy spinner when copying files, systemmonitor applets in panel, …)
Comment 13 robspamm 2015-06-17 10:01:31 UTC
As the every time I though the issue was fixed it reappeared, I found some kind of solution in an old bug report https://bugs.kde.org/show_bug.cgi?id=31179

Workaround is to set the BusyIndicator to running: false in 
/usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationIcon.qml and the same for all annoying plasmoids.
Comment 14 robspamm 2015-06-17 10:03:53 UTC
Sorry, it is actually https://bugs.kde.org/show_bug.cgi?id=311799 .
Comment 15 mgolden 2015-06-17 13:49:54 UTC
On 14.04LTS that file is here:

/usr/share/kde4/apps/plasma/plasmoids/org.kde.notifications/contents/ui/NotificationIcon.qml
Comment 16 robspamm 2015-08-26 19:15:36 UTC
The bug is still present on ArchLinux running on a machine with Intel graphics and Core i7. Acceleration works flawlessly for games and effects. Spinner is rotating with a reasonable speed.

plasma-workspace 5.3.2-3
plasma-desktop 5.3.2-3
plasma-framework 5.13.0-1
qt5-base 5.5.0-2
Comment 17 Elias Probst 2015-08-26 22:57:17 UTC
This bug was fixed in the just released KDE Plasma 5.4.0.

Please re-open if you can still reproduce it using KDE Plasma 5.4.0.
Comment 18 Patrick Hanft 2015-08-27 07:06:08 UTC
Updated to 5.4.0 yesterday. Unfortunately still having plasmashell with CPU at 50-70%. :-(
Comment 19 Enno Köster 2015-09-08 11:28:13 UTC
I am on 5.4 under arch aswell and found two easy ways to slowly accumulate cpu usage.

i got two monitors and a panel on each.
When I added the system load widget to both panels I noticed quite high CPU usage and lagging animations after a while so i hit ctrl+esc and saw the shell using 33% CPU. I then removed one of the two widgets and the load went down to 17%. Removing the remaining widget removed the remaining constant usage aswell. Oddly the animations were still lagging even though there was no CPU usage problem anymore.

Second way was to check for updates with octopi (a pacman frontend).
Since last version it has an animated system tray icon when updates are available.
After three days of vacation I found my computer nearly unusable with a plasmashell using 33% CPU and 1.7GB memory. Installing the updates and going back to the unanimated green tray icon normalized the CPU usage but RAM was still high and the system stayed unusably slow and laggy so I rebooted.

Today I tried to reproduce this: Checked for updates again, found some, watched the animated ghost for a while. I could watch the CPU load of the plasma shell go up from 3% right after checking to 10% after about 10 minutes. Installing the updates and going back to the unanimated green symbol made it stop right away. I guess if I waited longer it would have gotten worse. RAM usage went up about 3MB over time but did not go down in the end.
Comment 20 Manuel Bärenz 2015-09-28 09:40:20 UTC
I'd like to reopen as well. As soon as the animation is shown, the system consumes about 160% on an 8-core machine. Using 5.4.1 on Gentoo.
Comment 21 Manuel Bärenz 2015-09-30 08:51:55 UTC
I'm getting the impression that the problem occurs especially after resuming from suspend.
Comment 22 imad 2015-10-12 11:00:47 UTC
In my case this occurs when I switch networks (wired). It is reproducible everytime I suspend my laptop at work, take it home and resume. For reasons not clear to me, the animation is shown and CPU usage rises steeply even if the network connection itself is established and working. I need to kill and restart  plasma-desktop everytime I'm in a new environment.
Comment 23 Facundo Aguilera 2015-11-06 14:09:23 UTC
(In reply to imad from comment #22)
> In my case this occurs when I switch networks (wired). It is reproducible
> everytime I suspend my laptop at work, take it home and resume. For reasons
> not clear to me, the animation is shown and CPU usage rises steeply even if
> the network connection itself is established and working. I need to kill and
> restart  plasma-desktop everytime I'm in a new environment.

Similar problem here. After resume, the animation is shown and CPU usage rises, although wireless is connected and working. My workaround is to disable and re-enable the network manager in the systray settings. With these steps the animation is stopped and the CPU load is reduced. 

Debian with plasma-desktop 5.4.2 amd64 here.
Comment 24 Julian 2015-11-18 18:57:21 UTC
Just here to report this also happens to me. Exactly the same as it happens to imad. Facundo's trick about hiding and showing the icon from the systray helps.

This is Plasma 5.4.2, kernel 4.2.0, 64 bit.
Comment 25 Julian 2015-11-19 16:05:13 UTC
Just to add one more thing, two separate bugs here:

1 - NetworkManager hangs in "connecting" after resume, even though network is up and running.
2 - Systray loading indicator uses to much CPU.
Comment 26 Facundo Aguilera 2015-11-20 11:41:21 UTC
Maybe the high CPU usage is not related to the icon animation but the bug in the NetworkManager widget. 

This bug is closed, should we open a new one?
Comment 27 Julian 2015-11-20 22:49:29 UTC
> Maybe the high CPU usage is not related to the icon animation but the bug in the NetworkManager widget. 

I doubt it since when applying your workaround, the icon doesn't animate anymore, but if you click the NetworkManager you can see it still says "connecting". So that tell me the "connecting" is not what's using the CPU but the icon animation.
Comment 28 jos poortvliet 2015-11-23 08:46:34 UTC
It certainly isn't NetworkManager as I don't have that - but when I let Kdenlive render a video using the KDE job tracking (which means the plasma panel animates) Plasma uses ~15-20% CPU and rendering takes significantly longer. I can't speak for the other icons or animations but the spinner easily takes >15% CPU when active on a quadcore with loads of RAM and CPU power. I don't want to know how it harms laptops' battery.

Yes, I already removed the CPU and Network monitor from my plasma panels as they, too, continued to eat loads of CPU. Without them and without any progress indicator, CPU usage is an acceptable ~1% but once something is going on,  usage of up to one full core is not rare.

There IS a nasty, cpu-using bug somewhere. Updating or recalculating something too often, I dunno. Something.
Comment 29 jos poortvliet 2015-11-23 09:05:17 UTC
I'm told by dear Kai that this should fix the problem: https://quickgit.kde.org/?p=plasma-framework.git&a=commit&h=a9d3d9a81ab282298088bf0753c1c77f0ec21afe

Coming to the next Frameworks release. For those not on a rolling release, bug your distro for a backport or - try a rolling release because it is awesome ;-)
Comment 30 Jameson 2015-12-16 20:00:39 UTC
I'm on plasma-framework 5.17.0-1 on Arch, and when the octopi-notifier status icon detects an update is available and animates, plasmashell still eats over 100% CPU.
Comment 31 Martin Stolpe 2015-12-23 19:06:08 UTC
I'm also using Archlinux and I'm also affected by this bug. For me this happens when I copy files. As soon as I deselect "Application Status" in the "System Tray Settings", which makes the spinning icon disappear, the CPU usage is much lower. I am using plasma-framework 5.17.0-3.
Comment 32 David Tonhofer 2015-12-31 20:16:17 UTC
> As soon as I deselect "Application Status" in the "System Tray Settings", which makes the spinning icon disappear, the CPU usage is much lower. 

Observed on Fedora 22 with

plasma-desktop-5.5.0-4
kf5-plasma-5.17.0-2

Upgrading to Fedora 23 soon anyway...
Comment 33 kde2eran 2016-03-27 18:45:09 UTC
I observe this on Fedora 23, with a cellular data connection. The "Networks" plasmoid is stuck at "Preparing to connect" with a progress animation and consumes 100% CPU, even though the connection is already up for an hour.

plasma-desktop-5.5.5-2.fc23.x86_64
kf5-plasma-5.19.0-2.fc23.x86_64
kf5-networkmanager-qt-5.19.0-1.fc23.x86_64
NetworkManager-1.0.10-3.fc23.x86_64
NetworkManager-wwan-1.0.10-3.fc23.x86_64
Comment 34 Vasishath Kaushal 2016-04-11 18:23:51 UTC
I have observed it too on my arch linux laptop. plasmashell process starts eating 100 percent cpu whenever that spinning animation is running in the taskbar. Happens during file operations and network connect/disconnect.
Comment 35 vanboxem.ruben 2016-04-17 08:12:14 UTC
I'd also like to vote for reopening, as this bug has been present for as long as I can remember and copying a large file or a large batch of files always ramps up CPU usage for no reason at all. Another time this happens is when a new program is started but its taskbar icon isn't immediately loaded, resulting in a spinning circle thing in the taskbar, which triggers the same CPU load.

I've also played around with compositing, switching its backend, vsync, all to no avail.
On a dual core laptop this starts messing with touchpad/keyboard input resulting in delays between actions and their reflection on the screen. If no one is reopening this soon, I'll clone it as a new bug in the hope that will get more attention.

System details: Arch Linux x86_64, Qt 5.6.0, KDE Frameworks 5.6.2, KDE Applications 5.21 (if I haven't mixed these two up).
Comment 36 Manuel Bärenz 2016-04-17 08:30:08 UTC
Status should probably have been "Resolved, Marked Duplicate" of https://bugs.kde.org/show_bug.cgi?id=356479.
Comment 37 Bo Simonsen 2016-10-30 08:22:14 UTC
This bug is still present in Plasma 5.8.1, Framework: 5.26.0.
Comment 38 Rex Dieter 2016-11-03 19:06:52 UTC
marking as dup of bug #356479

*** This bug has been marked as a duplicate of bug 356479 ***