Bug 454101 - kwin_wayland had high CPU usage
Summary: kwin_wayland had high CPU usage
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.24.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-20 17:39 UTC by Lyubomir
Modified: 2022-06-11 14:24 UTC (History)
4 users (show)

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


Attachments
perf.data (1.28 MB, application/octet-stream)
2022-05-20 17:39 UTC, Lyubomir
Details
flamegraph (1.92 MB, image/bmp)
2022-05-24 11:41 UTC, Lyubomir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lyubomir 2022-05-20 17:39:33 UTC
Created attachment 149033 [details]
perf.data

SUMMARY
Attaching a perf report

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.17.7-zen1-2-zen (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7,6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Comment 1 Zamundaaa 2022-05-24 09:56:11 UTC
perf data is not really transferable between installations, please open it in hotspot on your PC and attach the flamegraph here.
It would also be ideal if you could build KWin yourself in RelWithDebInfo mode for recording the data; without debug information there won't be much useful to see.
Comment 2 Lyubomir 2022-05-24 11:41:24 UTC
Created attachment 149162 [details]
flamegraph

I think it should be this?
Comment 3 Michael D 2022-06-09 07:05:41 UTC
I also see high cpu usage with kwin_wayland on my integrated ryzen renoir gpu. It idles between 6-12% which is way higher than kwin_X11.
Comment 4 Michael D 2022-06-09 07:09:14 UTC
I discovered the problem is due to Thunderbird (ver. 91.9.1). Firefox isn't a problem, however. Strange.
Comment 5 Nate Graham 2022-06-09 14:40:36 UTC
So when you quit Thunderbird, the high CPU usage goes away? Is Thunderbird running in native Wayland more, or as an XWayland app?
Comment 6 Michael D 2022-06-09 14:43:54 UTC
Thunderbird is running native Wayland. The problem goes away when I quit thunderbird.
Comment 7 Nate Graham 2022-06-09 15:50:36 UTC
Are there any animations playing in your Thunderbird window? I notice that kwin_wayland CPU usage spikes whenever anything animates on the screen (w.g. when a notification appears or NeoChat's "someone is typing" indicator appears). But I cannot reproduce that simply having Thunderbird's window open without is doing anything causes kwin_wayland to increase in CPU usage.
Comment 8 Michael D 2022-06-09 15:54:37 UTC
No animation is playing and the usage doesn't change whether I minizethr window or not.
Comment 10 Michael D 2022-06-10 08:19:01 UTC
Thanks for the link to the mozilla bug report. CPU usage does indeed drop when running thunderbird in XWayland.
Comment 11 Nate Graham 2022-06-10 16:03:38 UTC
Ok, so I guess this is a known Thunderbird issue. I guess their Wayland support is indeed still experimental. :)