Bug 466551 - Increased CPU consumption in apps when you rapidly switch windows by scrolling on Task Manager widget
Summary: Increased CPU consumption in apps when you rapidly switch windows by scrollin...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 18:28 UTC by gudvinr+kde
Modified: 2023-11-11 15:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
load (82.02 KB, image/png)
2023-02-27 18:28 UTC, gudvinr+kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gudvinr+kde 2023-02-27 18:28:30 UTC
Created attachment 156800 [details]
load

SUMMARY

If I scroll through all open apps on panel, ALL apps that I scroll through start consuming significant amount of CPU (around 10% each). Load drops to zero when all apps idling.

It virtually doesn't matter if I use it with KDE apps or not (e.g. I tested with firefox, systemmanager and dolphin open). kwin process also gets some load here too. So I suspect that wayland is the culprit here. And since diverse set of apps starts to behave in a same way I have some doubts that firefox, systemmanager and dolphin all have same bug at the same time. Well, it could be wayland-client bug still but that's out of scope of what I am able to debug.

STEPS TO REPRODUCE
1. Open some apps
2. Scroll through tasks rapidly using task applet

OBSERVED RESULT
Significant CPU usage for all apps involved

EXPECTED RESULT
Something more moderate I guess?

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.12-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX Vega M GL Graphics
Comment 1 Nate Graham 2023-02-28 21:45:55 UTC
When you do this, KWin is rapidly showing and hiding them, and there are animated transitions, shadows, possible transparency and blur, etc. Not sure There's really a bug here. When you ask the system to do something hard, it takes some resources. :)
Comment 2 gudvinr+kde 2023-02-28 21:54:54 UTC
(In reply to Nate Graham from comment #1)
> When you ask the system to do something hard, it
> takes some resources. :)

I'd agree if only kwin was consuming resources. But it also causes apps to consume quite significant amount of CPU cycles while apps themselves basically not doing any active work. So there's probably something funny going on during interaction between compositor and apps and that is what doesn't seem like a normal thing to me.
Comment 3 gudvinr+kde 2023-02-28 22:31:52 UTC
I also checked out X11 session and well, if you do this there, CPU usage for all processes is less than 10-12%.
From that, Xorg and plasmashell processes consume more than half.
So I am pretty sure that this is quite significant issue when same actions now take 5x more CPU time than old times.
Comment 4 Nate Graham 2023-03-01 15:18:43 UTC
Ok, let's see what KWin people have to say about it.