Bug 378010 - Generic High CPU Usage Rendering
Summary: Generic High CPU Usage Rendering
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: master
Platform: Other Linux
: VHI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: efficiency
: 353507 371889 372839 375044 375457 375736 376146 377276 377583 377953 379210 381280 381592 381608 381817 382551 382618 383227 383956 384663 387223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-24 10:55 UTC by David Edmundson
Modified: 2023-05-17 01:34 UTC (History)
41 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
callgrind output (487.03 KB, application/x-xz)
2017-03-24 12:16 UTC, kdebuac.rhn
Details
QSG_INFO=1 plasmashell (13.96 KB, text/x-log)
2017-03-26 21:13 UTC, rnet723
Details
QT_LOGGING_RULES=qt.scenegraph.general.debug=true plasmashell (7.46 KB, text/x-log)
2017-03-27 16:57 UTC, rnet723
Details
plasmashell log with modified kwindowsystem.cpp (39.16 KB, text/x-log)
2017-04-04 20:32 UTC, rnet723
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2017-03-24 10:55:13 UTC
If your bug is marked as a duplicate as this it means it's a bug about high CPU with no other information, which makes it not very useful.

The following links may also be useful:
https://bugreports.qt.io/browse/QTBUG-45959
https://bugs.kde.org/show_bug.cgi?id=311799
https://bugs.kde.org/show_bug.cgi?id=373368
Comment 1 David Edmundson 2017-03-24 10:55:21 UTC
*** Bug 372839 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2017-03-24 10:55:24 UTC
*** Bug 377953 has been marked as a duplicate of this bug. ***
Comment 3 David Edmundson 2017-03-24 10:55:26 UTC
*** Bug 375044 has been marked as a duplicate of this bug. ***
Comment 4 David Edmundson 2017-03-24 10:58:34 UTC
*** Bug 377276 has been marked as a duplicate of this bug. ***
Comment 5 kdebuac.rhn 2017-03-24 12:15:27 UTC
It would be more useful to say what about those links are useful - leaving just the links doesn't seem like an optimal way to get people to improve their reports.

That being said, I did the legwork of finding relevant posts and collecting the trace - see attachment.

I must admit I'm amazed the KDE people can't solve panel animations once and for good since 2013...
Comment 6 kdebuac.rhn 2017-03-24 12:16:58 UTC
Created attachment 104719 [details]
callgrind output

Compressed output of about 20-30s of running `valgrind --tool=callgrind --instr-atstart=no plasmashell` while copying a file over network with Dolphin.
Comment 7 Pascal d'Hermilly 2017-03-25 16:07:04 UTC
(In reply to David Edmundson from comment #0)
> If your bug is marked as a duplicate as this it means it's a bug about high
> CPU with no other information, which makes it not very useful.

So can you use the log that kdde.rhn provided?
Comment 8 David Edmundson 2017-03-25 19:31:44 UTC
That trace has a few interesting things in it:

 - we're still losing a tonne of time (30% or so) processing X events.
We're getting over 670,000 of them in 30 seconds. 

They end up costing a lot because it then goes through all the nativeEventFitlers in KDE code that do a somewhat pointless string compare.. but the root question is what the hell are these events, and where's the real bug?
That's come up before: https://bugs.kde.org/show_bug.cgi?id=373368 

 - we're losing 7% in some X window updating it's properties 313 times in 30 seconds.

I've not seen that before. That window then propogates through the task manager changing, which builds up.
Qt 5.9 will fix a lof of that propogation but again the root question which window is changing and what and why? 

Can you put some debug in KWidnwSystem::windowChanged and find out?

Once we know we can break that out into a new bug.

 - we're losing another 15% in some JS evaluation. It's quite possibly related to the issue above; the evaluation needs to have some trigger. QML profiler could confirm that.
Comment 9 kdebuac.rhn 2017-03-25 19:45:08 UTC
> Can you put some debug in KWidnwSystem::windowChanged and find out?

How to do that? Is it possible to do that without recompiling, e.g. some LD_PRELOAD trick? If not, what's the minimal set of things and easiest way to recompile?

You explained where 30% + 15% CPU time goes, do you have any ideas as to where the other 50-55% goes? 50% CPU usage while copying is still very bad.
Comment 10 David Edmundson 2017-03-25 20:56:19 UTC
*** Bug 376146 has been marked as a duplicate of this bug. ***
Comment 11 David Edmundson 2017-03-25 21:21:03 UTC
Recompiling is the quickest way.

You could do probably do it with GDB skills, but frankly it's not worth it especially as we don't want to interrupt the processing as that could skew results.

if you're on Debian/Ubuntu
apt-get build whateverPackageKWindowSystemIsIn
apt-get source whateverPackageKWindowSystemIsIn
make the changes

fakeroot debian/rules binary
sudo dpkg -i ../*.deb

as for the debug in kwindowsystem.cpp

under         if (dirtyProperties || dirtyProperties2) {
add 
qDebug() << "DAVE " << eventWindow << dirtyProperties << dirtyProperties2;

For other distros check out their own guides, if you can't figure it out, let me know what you're on and I'll get someone from that distro to help.

Get debug by running plasmashell from a konsole, you're also going to then have to turn the window ID into something useful by running "xprop -id SOMENUMBERHERE" 

As for the remaining CPU, it's a bit hard to interpret something. Not everything is very readable, especially when you have an event queue.
The biggest issue is it's quite easy to fall into traps like micro-optimising a method that gets called a lot rather than figuring out why it gets called a lot, which is why I can't just read a log and do something about it, it requires deeper investigation.

Also, thanks in advance.
Comment 12 rnet723 2017-03-26 12:01:59 UTC
I found no "if (dirtyProperties || dirtyProperties2) {" line in my kwindowsystem.cpp, but when I run plasmashell with GALLIUM_HUD=fps, it shows up that notifications are drawing with 200+ frames per second. Maybe it's good idea to draw them vsynced in the first place?
Comment 13 rnet723 2017-03-26 12:39:15 UTC
Also, the interesting thing i noticed:
1. I've started copying a large file (60 Gbytes), cpu load for plasmashell was 125%
2. I killed plasmashell, and restarted it again. cpu-load was almost zero.
3. I clicked on notifications widget, cpu-load jumped to 75%
4. I clicked on "details" triangle in notifications widget several time, cpu load upped to 105%-110%.
Comment 14 David Edmundson 2017-03-26 19:17:48 UTC
What do you mean exactly by "notifications are drawing at 200fps"?

and yes, it should be vsynced, there's code to do it (in Qt)

There's a nice line in the Qt documentation on that:
>Note: The threaded and windows render loops rely on the OpenGL implementation for throttling by requesting a swap interval of 1. Some graphics drivers allow users to override this setting and turn it off, ignoring Qt's request. Without blocking in the swap buffers operation (or elsewhere), the render loop will run animations too fast and spin the CPU at 100%. If a system is known to be unable to provide vsync-based throttling, use the basic render loop instead by setting QSG_RENDER_LOOP=basic in the environment.

Though if you're on intel on X, you should be running on basic anyway.
Can you run QSG_INFO=1 plasmashell

but I also don't want to get distracted from the first thing we were actually doing:
there are multiple kwindowsystem.cpp files, I meant ./platforms/xcb/kwindowsystem.cpp
Comment 15 rnet723 2017-03-26 21:13:47 UTC
Created attachment 104748 [details]
QSG_INFO=1 plasmashell
Comment 16 rnet723 2017-03-26 21:18:33 UTC
I've uploaded output for QSG_INFO=1.
As fps, it's what I see in on-screen fps counter if I run plasmashell with GALLIUM_HUD=fps variable set. Works only with gallium-based opengl drivers.

Thank you for clarifying which kwindowsystem.cpp should be modified, I'll try to do it next weekend.
Comment 17 David Edmundson 2017-03-27 08:37:10 UTC
So that says we're using the basic driver, so I looked into how that chooses the frame rate which is all in the QSGAnimationDriver constructor, which is all based around the refresh rate of the primary screen at the time of the context launch. 
It then switches between that or a timer.

That first part is obviously dependendent on your setup so could be interesting.

Can you instead run:
QT_LOGGING_RULES=qt.scenegraph.general.debug=true plasmashell
Comment 18 rnet723 2017-03-27 16:57:05 UTC
Created attachment 104761 [details]
QT_LOGGING_RULES=qt.scenegraph.general.debug=true plasmashell

>can you instead run:
>QT_LOGGING_RULES=qt.scenegraph.general.debug=true plasmashell

Here it is. Checked twice.
Comment 19 David Edmundson 2017-03-27 23:31:44 UTC
Urgh.

Can you tell me your Qt version again? Maybe someone renamed the debug categories.

@any other plasma dev, any idea why my line doesn't work for network723
Comment 20 rnet723 2017-03-28 05:21:17 UTC
#zypper info libqt5Core5
Loading repository data...
Reading installed packages...


Information for package libQt5Core5:
------------------------------------
Repository     : openSUSE-42.2-Oss
Name           : libQt5Core5      
Version        : 5.6.1-2.1        
Arch           : x86_64           
Vendor         : openSUSE         
Installed Size : 4.9 MiB          
Installed      : Yes              
Status         : up-to-date       
Summary        : Qt 5 Core Library
Description    :                  
    The Qt 5 Core library.
Comment 21 David Edmundson 2017-03-28 14:26:11 UTC
Ok so to follow up on that:
 - it'll just give the same info as we got from your QSG_INFO=1 run
 - the reason you don't have QSGAnimationDriver output is because basic render loop doesn't make one - which kinda makes sense we don't need to advance animations in the same thread we can just do it pre-rendering.
 - means we need a new lead

In any case, for now lets focus on that kwindowsystem thing I asked for - then we can go back to vsync issues afterwards
Comment 22 David Edmundson 2017-04-04 14:43:21 UTC
I'm still waiting on that kwindowsystem information I asked for.
Comment 23 David Edmundson 2017-04-04 15:31:43 UTC
*** Bug 377583 has been marked as a duplicate of this bug. ***
Comment 24 rnet723 2017-04-04 20:32:52 UTC
Created attachment 104885 [details]
plasmashell log with modified kwindowsystem.cpp

Sorry, I forgot about it. Here is the log. I'm not sure what I should do with xprop and window IDs. If you need that info along with plasma terminal output, please explain better.
Comment 25 David Edmundson 2017-04-10 19:35:07 UTC
*** Bug 371889 has been marked as a duplicate of this bug. ***
Comment 26 David Edmundson 2017-04-12 13:45:03 UTC
It seems it wasn't any one window going mental. Over what timespan is this log for?

203423846 must have been the panel, we can see it updating its user time a lot
We're updating all the window's icon geoemtries a lot, which means the task manager is resizing itself (QFlags(0x200000) but that's only 3 times.

Can I assume you're your panel is not the full width and resizes when you get new windows? 

There's also 56 geoemtry updates from 10 windows, that's one of the few that will update the task manager.

We can see that it might be worth batching some X window changes, it'll have some impact, but nothing astronomical.

This assumes of course this trace has the same stuff happening as when you were running callgrind earlier...which I'm not too convinced of.
Comment 27 rnet723 2017-04-12 16:02:31 UTC
I did wait for several minutes. It's as close to callgrind as possible: I've opened the very same programs, started plasma and induced high cpu usage by clicking on plasma tray icon. So, 56 geometry updates is probably me clicking on show/hide button to trigger the bug.
Comment 28 David Edmundson 2017-04-26 00:29:29 UTC
*** Bug 379210 has been marked as a duplicate of this bug. ***
Comment 29 David Edmundson 2017-04-30 15:53:03 UTC
*** Bug 375457 has been marked as a duplicate of this bug. ***
Comment 30 Steven Haigh 2017-06-14 14:39:05 UTC
I wonder if my report from re kwin_x11 belongs here too?

https://bugs.kde.org/show_bug.cgi?id=378010
Comment 31 David Edmundson 2017-06-26 21:57:44 UTC
*** Bug 381608 has been marked as a duplicate of this bug. ***
Comment 32 David Edmundson 2017-06-26 21:58:10 UTC
*** Bug 381592 has been marked as a duplicate of this bug. ***
Comment 33 David Edmundson 2017-06-30 12:20:58 UTC
*** Bug 381817 has been marked as a duplicate of this bug. ***
Comment 34 Koen 2017-07-05 07:08:04 UTC
Is there any workaround for this at the moment?
Comment 35 Koen 2017-07-05 08:18:04 UTC
At the moment I just do 'killall plasmashell' to be able to work without the sound of a space shuttle taking of next to me.
Comment 36 David Edmundson 2017-07-06 11:49:02 UTC
See also https://bugs.kde.org/show_bug.cgi?id=379866#2 which I think may be what some people are seeing.
Comment 37 Hubert Kario 2017-07-10 11:14:04 UTC
I think some of it may be caused by having multiple taskbars (some hidden). I largely alleviated the issue by deleting the plasmashell configuration and letting it create a fresh one. Seems like the plasma-workspace-5.8.7-1.fc24.x86_64 doesn't have the bug that creates unnecessary taskbars every time a screen is plugged in (don't know when it was fixed though).

Still get between 6 and 12% CPU use (single core) of an i7-6600U just rendering 2 taskbars with static icons and two second-precision clocks...
Comment 38 Koen 2017-07-10 20:24:20 UTC
How can we find out how many hidden ones there are?
Comment 39 David Edmundson 2017-07-10 20:37:52 UTC
Easy way, click on add widgets and you'll see the number in the circle
Comment 40 Max Schettler 2017-07-10 21:58:10 UTC
This seems to be the case for me, there are apparently seven taskbars on my system.
Comment 41 David Edmundson 2017-07-10 22:30:11 UTC
Split comment about multiple taskbars into here https://bugs.kde.org/show_bug.cgi?id=382221

Can anyone who has multiple taskbars (see #39) please provide the information requested at the top of that bug report.
Comment 42 David Edmundson 2017-07-13 18:54:20 UTC
*** Bug 381471 has been marked as a duplicate of this bug. ***
Comment 43 Vetko 2017-07-13 19:57:44 UTC
I also seem affected.

OpenSuse Tumbleweed, up to date. After the 4th July Tumbleweed snapshot I experience high CPU usage (and probably also GPU), after 15 mins of Plasma usage flickering appears, high temperature.

My current plasma5-workspace version is 5.10.3-1.2
libQt5Core5 version 5.9.1-1.1
Comment 44 David Edmundson 2017-07-21 12:23:46 UTC
*** Bug 382551 has been marked as a duplicate of this bug. ***
Comment 45 David Edmundson 2017-07-30 22:41:44 UTC
*** Bug 382618 has been marked as a duplicate of this bug. ***
Comment 46 David Edmundson 2017-08-04 09:29:14 UTC
*** Bug 381280 has been marked as a duplicate of this bug. ***
Comment 47 David Edmundson 2017-08-07 16:47:25 UTC
*** Bug 383227 has been marked as a duplicate of this bug. ***
Comment 48 Vetko 2017-08-11 09:35:27 UTC
After upgrading yesterday to the latest openSUSE Tumbleweed snapshot, the symptoms have disappeared for me! :) NO high CPU usage, NO flickering artifacts, NO overheat. Everything back to normal.

I saw that there were a bunch of updates for Qt 5.9.
I will report its exact version and build number this evening when I get home (if needed).

Thx for the help.
Comment 49 Alex Ioannou 2017-08-11 10:59:53 UTC
Heya, Yes the Qt versions would be nice.
Comment 50 Vetko 2017-08-11 19:33:38 UTC
False flag, sorry! :( For some reason yesterday evening after the update (and a restart of course) the problem got solved. But today after boot I experience the same issue as before. I don't know what influences this.

Anyway, my current Qt versions vary between 5.9.1-2.1 (e.g. libQt5Core5), 5.9.1-1.1 (e.g. libQt5X11Extras5) and 4.8.7-7.2 (e.g. libqt4), and also some others. I can provide the full list if required.

- I would also like to emphasize that I experience heavy component flickering: I interact with a window resulting in state change so gets updated/redrawn but in the next moment it flickers back to the previous state for a few seconds, or it even gets frozen, etc. 
For example:
-- I change windows (taskbar / ALT + Tab), but after a few moments for a few moments the old window gets displayed again.
-- Tooltips will flicker or get frozen during animation.
-- I delete some characters in a text editor, but for a few moments they get displayed again, etc.

- kwin_X11, plasmashell and X (in this order) are using ~20-30% of CPU.
- warm laptop

openSUSE Tumbleweed (kwin5 version 5.10.4-1.1) on an Acer Aspire R13 R7-372T.
Comment 51 Gunter Ohrner 2017-08-11 21:44:02 UTC
(In reply to Vetko from comment #50)
> openSUSE Tumbleweed (kwin5 version 5.10.4-1.1) on an Acer Aspire R13 R7-372T.

Intel Graphics? Are you using the intel kernel modesetting driver, or the classical Intel driver?

Both do not work very well, but both seem to exhibit different quirks...
Comment 52 Vetko 2017-08-12 21:58:23 UTC
(In reply to Gunter Ohrner from comment #51)
> Intel Graphics? Are you using the intel kernel modesetting driver, or the
> classical Intel driver?
> 
> Both do not work very well, but both seem to exhibit different quirks...

the xf86-video-intel package is not installed, so I suppose I'm using the modesetting driver.
(But I hadn't had any issues until a few weeks back..)
Comment 53 David Edmundson 2017-08-24 16:22:34 UTC
*** Bug 383956 has been marked as a duplicate of this bug. ***
Comment 54 flyos 2017-09-06 11:47:53 UTC
Adding a comment here rather than opening a new bug, as I think this a duplicate of what is discussed here.

I noticed that sometimes I have a mild, but constant, CPU usage of kwin_x11. I opened a post on Reddit about that and M. Gräßlin advised me to open a bug report about it against plasmashell:
https://www.reddit.com/r/kde/comments/6wpvmr/kwin_is_always_the_top_of_top_cpu_usage/

Using his advice, I can confirm this high CPU usage of kwin_x11 is always linked to a constant and rapid repaint of plasmashell. What triggers this repaint is unknown to me. I suspected the Comics plasmoid, but I just had this exact behaviour even though I removed it and now only have "Folder View" plasmoids. 

One thing I noticed though, it that this repaint is very similar to the one I get when the Comics plasmoid was updating the content with the "circling animation". This triggered a repaint of the whole plasmashell.

Sorry for this not very precise bug report, I did my best to pinpoint the origin of this, without success. I can provide more information with enough guidance. This is openSUSE Tumbleweed with Plasma 5.10.5.
Comment 55 flyos 2017-09-06 11:48:18 UTC
Adding a comment here rather than opening a new bug, as I think this a duplicate of what is discussed here.

I noticed that sometimes I have a mild, but constant, CPU usage of kwin_x11. I opened a post on Reddit about that and M. Gräßlin advised me to open a bug report about it against plasmashell:
https://www.reddit.com/r/kde/comments/6wpvmr/kwin_is_always_the_top_of_top_cpu_usage/

Using his advice, I can confirm this high CPU usage of kwin_x11 is always linked to a constant and rapid repaint of plasmashell. What triggers this repaint is unknown to me. I suspected the Comics plasmoid, but I just had this exact behaviour even though I removed it and now only have "Folder View" plasmoids. 

One thing I noticed though, it that this repaint is very similar to the one I get when the Comics plasmoid was updating the content with the "circling animation". This triggered a repaint of the whole plasmashell.

Sorry for this not very precise bug report, I did my best to pinpoint the origin of this, without success. I can provide more information with enough guidance. This is openSUSE Tumbleweed with Plasma 5.10.5.
Comment 56 kdebuac.rhn 2017-09-12 18:19:00 UTC
Since upgrading to Fedora 25 with plasma-workspace-5.9.5.1-1.fc25, the CPU usage is acceptable:

- idle CPU usage is <3% of one core
- copying files does not change that significantly - CPU does not go through the root any longer

This is on an Intel HD4000 GPU, with modesetting driver.
Comment 57 David Edmundson 2017-09-13 15:09:55 UTC
*** Bug 384663 has been marked as a duplicate of this bug. ***
Comment 58 Johan Hartzenberg 2017-09-14 08:35:32 UTC
I am also affected by high CPU and Memory related issues in plasmashell/kwin_x11.

I got the feeling though that the high CPU was the system trying to find pages to swap, etc e.g dealing with the memory "leak" in plasmashell.  My Linux debugging skills does not allow me to verify this suspicion.

After reading this thread as well as other discussions (Kubuntuforums) I have now removed all but the most essential plasmoids.  I will monitor but this is rather irksome.
Comment 59 Robby Engelmann 2017-09-17 18:25:13 UTC
Perhaps you may have a look here: https://bugs.kde.org/show_bug.cgi?id=381280#c15.
Here I could reproduce a high cpu usage with the folderview widget showing activity-linked files (on two separate activities). After switching the activities I could trigger a constantly high cpu usage.

under plasma 5.10.95 and frameworks 5.38
Comment 60 Mahendra Tallur 2017-09-18 09:42:07 UTC
Hi ! I observed high plasma shell CPU usage (from 20% to 100%) after resuming on a laptop with an integrated GPU (hd 3000) + unused Nvidia GPU (610M). Restarting plasmashell fixed it. Using KDE Neon, plasma 5.10.x.

Generally, resuming seems problematic on this machine, even with other DEs. But at least on Plasma it does resume everytime... Though it can take some time and induce this CPU usage.

I'd be glad to help debug it !

(apart from it, Neon / Plasma really rule even on slow hardware :-)
Comment 61 David Edmundson 2017-11-13 09:55:35 UTC
*** Bug 375736 has been marked as a duplicate of this bug. ***
Comment 62 Alex Ioannou 2017-11-17 11:43:29 UTC
The issue went away for me!   It's back now though after this happened:

Downgrade: plasma-integration:amd64 (4:5.11.0-0neon+16.04+xenial+build58, 5.11.3-0neon+16.04+xenial+build64)
Comment 63 David Edmundson 2017-11-22 21:47:42 UTC
*** Bug 387223 has been marked as a duplicate of this bug. ***
Comment 64 David Edmundson 2017-12-23 22:19:51 UTC
*** Bug 381608 has been marked as a duplicate of this bug. ***
Comment 65 valdikss 2018-01-10 00:14:08 UTC
(In reply to Vetko from comment #50)
> - I would also like to emphasize that I experience heavy component
> flickering: I interact with a window resulting in state change so gets
> updated/redrawn but in the next moment it flickers back to the previous
> state for a few seconds, or it even gets frozen, etc. 
> For example:
> -- I change windows (taskbar / ALT + Tab), but after a few moments for a few
> moments the old window gets displayed again.
> -- Tooltips will flicker or get frozen during animation.
> -- I delete some characters in a text editor, but for a few moments they get
> displayed again, etc.

I'm running Lenovo X220 (Intel HD3000, Sandy Bridge, Intel driver) and sometimes have the same issue. Do you use external monitor? Does it occur only if you plugged external monitor at least once since KDE start?
If yes, can you confirm https://bugs.kde.org/show_bug.cgi?id=388759
It could be linked.
Comment 66 kdebuac.rhn 2018-01-10 08:34:49 UTC
valdikss@gmail.com - this sounds like a kwin issue. Try doing `kwin --replace` and see if it goes away. Then perhaps it can be filed in the kwin category. I'm occasionally experiencing something similar on Ivy Bridge btw.
Comment 67 valdikss 2018-01-10 12:13:58 UTC
(In reply to kdebuac.rhn from comment #66)
> valdikss@gmail.com - this sounds like a kwin issue. Try doing `kwin
> --replace` and see if it goes away. Then perhaps it can be filed in the kwin
> category. I'm occasionally experiencing something similar on Ivy Bridge btw.

No, that's a plasmashell issue, probably linked to bug 388759. I just got this issue, and the symptoms are just like in 388759, but it did not involve resolution change or screen reconfiguration. It was probably because of high CPU load, I was compiling a project for several minutes and the CPU was 96°C.
Restarting plasmashell fixed the issue.
Comment 68 pier andre 2018-02-02 15:45:57 UTC
(In reply to Mahendra Tallur from comment #60)
> Hi ! I observed high plasma shell CPU usage (from 20% to 100%) after
> resuming on a laptop with an integrated GPU (hd 3000) + unused Nvidia GPU
> (610M). Restarting plasmashell fixed it. Using KDE Neon, plasma 5.10.x.
> 
> Generally, resuming seems problematic on this machine, even with other DEs.
> But at least on Plasma it does resume everytime... Though it can take some
> time and induce this CPU usage.
> 
> I'd be glad to help debug it !
> 
> (apart from it, Neon / Plasma really rule even on slow hardware :-)

my laptop also is affected Laptop=Dell latitude E6510, RAM=8Gb, GPU=GT218 NVS 3100M, CPU=i7 Q 720 @ 1.60GHz: host=pla-3-TW, partition=suse2, OS=leap 42.3, DE=plasma 5.11.95, KDE frameworks 5.42.0, KDE applications 17.12.1, Kernel 4.4.104-39-default, nvidia drivers
Comment 69 pier andre 2018-02-02 15:49:04 UTC
and also my desktop pc: CPU (Processor):Intel Core i5-7400 4x3.00GHz 7th Kaby Lake, Mainboard:B250M MSI Pro-VDH (7A70-003R), Video Card (VGA Card) onBoard Graphic, System Memory (RAM):8GB Kingston DDR4-2400, SSD:240GB Western Digital WD Green M.2
running leap 42.3 with KDE when I boot it is fast and responsive, after one day staying on and with no operations by a user it becames slow and laggy, mouse is slow, selection is slow ecc, only reboot solve, and after reboot it start again to be responsive.
Comment 70 valdikss 2018-02-02 15:52:16 UTC
(In reply to pier andre from comment #69)

As far as I can see, KDE Neon does not have commit 6990ae6c1bad32952e371fa72bee65a7af11c313 applied for qt5-qtdeclarative (Fedora's package naming, could be different in KDE Neon).
Track it here: https://bugs.kde.org/show_bug.cgi?id=389218

If you can rebuild this package with the following patch:
http://code.qt.io/cgit/qt/qtdeclarative.git/patch/?id=6990ae6c1bad32952e371fa72bee65a7af11c313
And see if it helps.
Comment 71 Alex Ioannou 2018-02-02 16:01:35 UTC
I can make plasmashell spike by doing this:

1) Open Dolphin and click Split
2) In right hand window sftp onto a server
3) Move a file from the left to the right window

I wonder if this is related?
Comment 72 David Edmundson 2018-03-29 14:38:47 UTC
Git commit ec1931f7b2980a3cd445c09def1bb4a9b5ad607f by David Edmundson.
Committed on 29/03/2018 at 14:38.
Pushed by davidedmundson into branch 'master'.

Batch window changes events on XCB

Summary:
In a log from someone talking about high CPU we can see get multiple X
events for the same window as multiple events, but directly next to each
other. This causes the TaskManager to process changes multiple times
instead of just once which is a waste.

An example is just pressing "enter" in konsole, which will pointlessly
update the title.

This causes problems for expensive app lookup and also QML performs text layouts immediately so any text changes cause quite large CPU usage if done more than 60fps; especially a task text resizing
could result in resizing the entire panel.

Something not relevant in kwin that also monitors these rolls.

This class sits between KWindowSystem and XWindowTasksModel
transparently buffering the changes.
Related: bug 365317

Reviewers: #plasma, hein, broulik

Reviewed By: #plasma, hein, broulik

Subscribers: ngraham, cfeck, broulik, hein, graesslin, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7481

M  +1    -0    libtaskmanager/CMakeLists.txt
M  +0    -1    libtaskmanager/TODO.txt
A  +80   -0    libtaskmanager/xwindowsystemeventbatcher.cpp     [License: BSD]
A  +51   -0    libtaskmanager/xwindowsystemeventbatcher.h     [License: BSD]
M  +6    -5    libtaskmanager/xwindowtasksmodel.cpp

https://commits.kde.org/plasma-workspace/ec1931f7b2980a3cd445c09def1bb4a9b5ad607f
Comment 73 David Edmundson 2018-12-14 15:43:10 UTC
*** Bug 353507 has been marked as a duplicate of this bug. ***
Comment 74 Nate Graham 2023-05-17 00:43:07 UTC
Closing since this isn't really actionable and doesn't help anyone to keep it open, unfortunately.

Actionable bug reports can be investigated on a case-by-case basis.