Bug 426252 - Plasmashell constantly consuming 12% cpu on Fedora / openSUSE KDE
Summary: Plasmashell constantly consuming 12% cpu on Fedora / openSUSE KDE
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.22.4
Platform: Other Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-06 16:23 UTC by Daljit
Modified: 2022-11-05 12:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Flamegraph for plasmashell generated by hotspot (808.40 KB, image/svg+xml)
2021-08-05 15:13 UTC, postix
Details
perf file generated by hotspot (606.65 KB, application/zip)
2021-08-05 15:14 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daljit 2020-09-06 16:23:09 UTC
SUMMARY
I have Fedora KDE installed on my HP Envy X360 and there is a very annoying bug which consists in the "plasmashell" process constantly (never going down) 12% of the CPU (as shown in ksysguard), this triggers the fans of the laptop and battery consumption becomes high as well. Furthermore, due to this the laptop is generally laggy and not smooth. 

STEPS TO REPRODUCE
I can't seem to detect what exactly reproduces the problem, but it happens almost 100% if I use the laptop for a bit (1 hour or more). When I restart the laptop the problem is gone and reappears after usage.

SOFTWARE/OS VERSIONS
Operating System: Fedora 32
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.7.17-200.fc32.x86_64
OS Type: 64-bit
Processors: 8 × AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx
Memory: 6.8 GiB of RAM
Comment 1 David Edmundson 2020-09-06 21:01:34 UTC
To narrow this down

Please run "kcmshell5 qtquicksettings",  change the render loop to basic and restart plasmashell. Then report back if that makes a difference
Comment 2 Daljit 2020-09-08 08:13:17 UTC
Hi I just tried that and yes I think I haven't seen the issue reproducing by changing the render loop to basic. I assume than this is a bug related to Qt or the Opengl drivers?
Comment 3 Daljit 2020-09-08 14:10:30 UTC
Actually upon rechecking the bug still persists with the render loop set to basic. The "plasmashell" process constantly consumes 12% of the CPU without ever stopping. Also only a few programs were running (Chromium and Slack) when I observed this behaviour.
Comment 4 Bug Janitor Service 2020-09-23 04:33:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Christoph Feck 2020-09-23 22:59:52 UTC
New information was added with comment 3; changing status for inspection.
Comment 6 Vadym Krevs 2020-11-19 21:27:01 UTC
I have a similar issue on my Dell Inspiron 5770 laptop running opensuse 15.2 with latest Plasma/Frameworks/Qt from OBS. After restart, plasmashell consumes 5-6 percent of cpu and the fans are off. After a while of normal activity - like browsing the web or watching Youtube videos or doing a Hangouts session, plasmashell cpu usage jumps to ~37% and the fans kick in. Killing and restarting plasmashell "fixes" the problem till next time.

Changing render loop to basic (as per comment 1) has no effect. 

$ rpm -q plasma-framework plasma5-workspace libQt5Core5
plasma-framework-5.76.0-lp152.310.1.x86_64
plasma5-workspace-5.20.3-lp152.562.1.x86_64
libQt5Core5-5.15.1-lp152.5.2.x86_64

$ inxi -G
Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
           Device-2: Sunplus Innovation type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.3 driver: amdgpu,ati,modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.6 Mesa 19.3.4 

I'm happy to troubleshoot, etc - just let me know what to try.
Comment 7 postix 2021-08-05 11:21:40 UTC
I can confirm this issue at least on 

Operating System: openSUSE Tumbleweed 20210730
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.13.4-1-default (64-bit)
Graphics Platform: X11 and Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor

htop shows that ```/usr/bin/plasmashell --no-respawn``` uses rather constantly around 9% CPU, both on X11 and Wayland.

I have also tried ```kcmshell5 qtquicksettings```, set the render loop to basic followed by ```kquitapp5 plasmashell && plasmashell```
This however did not change anything related to the CPU usage.

---

I also run Fedora 34 on a Thinkpad X1 laptop with a much weaker Intel CPU but there I do not have this issue at all: The `/usr/bin/plasmashell --no-respawn``` uses around 1-2% only.
Comment 8 postix 2021-08-05 11:26:28 UTC
I also would like to mention that I experience this right after login respectively during idle, when no extra application is running.

When I start any application, I see too that plasmashell's CPU ramps straight up to around 40% just to fall off again, when the application is fully loaded. This however is probably normal and expected.
Comment 9 postix 2021-08-05 15:13:36 UTC
Created attachment 140541 [details]
Flamegraph for plasmashell generated by hotspot

In the hope to give you some useful hints, I have started hotspot and generated some data to see what plasmashell is doing all the time while the system is idling. 

Here's the flamegraph, next I will attach the perf file.
Comment 10 postix 2021-08-05 15:14:38 UTC
Created attachment 140542 [details]
perf file generated by hotspot
Comment 11 Nate Graham 2022-11-05 03:29:31 UTC
Thank you for reporting this issue in KDE software. As it has been a while since it was reported, can we please ask you to see if you can reproduce the issue with a recent software version? Like Plasma 5.25, or ideally 5.26?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 12 postix 2022-11-05 12:48:08 UTC
At least I don't see it anymore. ;)
Comment 13 Daljit 2022-11-05 12:51:54 UTC
(In reply to Nate Graham from comment #11)
> Thank you for reporting this issue in KDE software. As it has been a while
> since it was reported, can we please ask you to see if you can reproduce the
> issue with a recent software version? Like Plasma 5.25, or ideally 5.26?
> 
> If you can reproduce the issue, please change the status to "CONFIRMED" when
> replying. Thank you!

Hi, although I no longer have the machine on which I originally tested this bug I have been using Plasma 5.25 and cannot longer reproduce this. So it seems fixed :) . So I will mark this as resolved (sorry I should have probably update this sooner).