Bug 478915 - Continuous CPU load after X11 login
Summary: Continuous CPU load after X11 login
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.91.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-23 04:21 UTC by Jakob Petsovits
Modified: 2023-12-23 22:18 UTC (History)
1 user (show)

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


Attachments
Flamegraph SVG of kwin_x11 at a constant but not debilitating load (343.60 KB, image/svg+xml)
2023-12-23 04:21 UTC, Jakob Petsovits
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2023-12-23 04:21:32 UTC
Created attachment 164388 [details]
Flamegraph SVG of kwin_x11 at a constant but not debilitating load

SUMMARY
Logged into my Plasma 6.0 Beta dev session (built two days after Beta 2) and the fans started spinning. On an 8-core Intel Core i7-8565U, ThinkPad X1 Carbon Gen 7 laptop with iGPU, ksysguard showed a constant 13%-14% of CPU usage for kwin_x11 and 4%-5% for picom. So it didn't quite incapacitate the system, and cursor overlays were fluid but window moves were at an estimated <5 FPS.

I don't have a full stacktrace, but I used https://github.com/flamegraph-rs/flamegraph to capture a few seconds of constant load and generate a flamegraph SVG. Find the SVG attached. It looks like debuginfod was not used because the system-level libraries don't show function-level info. Sorry. I figure the actual perf.data output is also not useful outside of my system, but I have it sitting here for a few days until I rebuild kwin again sometime.


STEPS TO REPRODUCE
1. Log into a KF6 X11 session.
2. Get lucky, notice high system load.
3. ???
4. `perf` it!

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1
Kernel Version: 6.6.3-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20QD001VUS
System Version: ThinkPad X1 Carbon 7th

ADDITIONAL INFORMATION
* The session I had previously logged into was a Plasma 5.27.9 session on X11. (Picked the wrong X11 SDDM entry because usually this user account is reserved for Plasma 6 only.)
* Upon logout from the CPU-intensive KF6 X11 session, SDDM did not come back and the screen stayed black. Probably unrelated as it also happened after the next session.
* Following a hard reboot, I logged into the same KF6/X11 Plasma session again to see if the issue is always reproducible. It is not, CPU load was nice and low now.
Comment 1 David Edmundson 2023-12-23 22:18:35 UTC
There's nothing in that flamechart, that indicate high CPU is at play. It's idling. 


>* Following a hard reboot, I logged into the same KF6/X11 Plasma session again to see if the issue is always reproducible. It is not

Lets keep an eye on this, for now it's inactionable