Bug 498297 - High CPU & memory usage on kwin_wayland
Summary: High CPU & memory usage on kwin_wayland
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: performance (show other bugs)
Version: 6.2.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-05 23:26 UTC by Matthew
Modified: 2025-02-12 03:46 UTC (History)
2 users (show)

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


Attachments
screenshot (1.04 MB, image/jpeg)
2025-01-05 23:26 UTC, Matthew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew 2025-01-05 23:26:00 UTC
Created attachment 177135 [details]
screenshot

SUMMARY
I would say for about 4 months now, kwin_wayland takes an insane amount of memory 8-10gb! Initially, after kwin would take about 8-8.2gb of memory, it would become slow, and then crash! In the more recent kernel versions (at the moment 6.12.8-2-cachyos), the system doesn't crash but when it reaches 10gb its completely unresponsive and I have to force reboot.

STEPS TO REPRODUCE
There arent really any specific steps that cause this issue. It just happens when it happens. Usually after a couple of hours of browsing.

OBSERVED RESULT
Initially the system works fine and is responsive. After a few hours you will feel like the system is slow, and there are frame drops, after which you will open the process manager (like btop) and will observe kwin using 8-10 gb of memory. I have attached a screenshot:
I also have a (somewhat) older bug report that might give you bit more insight: https://paste.cachyos.org/p/25bf4f9.log
This bug report is from when my system crashed after 8gb. I havent been able to create a newer bugreport yet because by the time I feel like lag, my system starts becoming unresposive.

EXPECTED RESULT
Obviously the expected result is for this not to happen. In other words, stable performance

Operating System: CachyOS Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.8-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i9-12900H
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Xe Graphics
(also have rtx 3070-ti but kinfo doesnt display it)

ADDITIONAL INFORMATION
Also saw this kde bug report: https://bugs.kde.org/show_bug.cgi?id=496469#add_comment, its similar to mine, but im not disconnecting any monitors (although i am connected to one though). Furthermore, its marked as resolved, so they are *probably* not related, but I though it would be good if I mentioned it.

Thank you for having a look
Comment 1 Matthew 2025-01-07 13:51:12 UTC
Hi, I managed to create a more recent bug report
https://paste.cachyos.org/p/01270e5.log
Comment 2 John Kizer 2025-01-13 19:02:58 UTC
Hi - a few questions to possibly help narrow this down:

Does disconnecting, and then reconnecting your monitor change anything? (Possibly related to https://bugs.kde.org/show_bug.cgi?id=497056 )

Assuming you're using the proprietary NVIDIA drivers, does the issue occur if you boot using the Nouveau drivers instead? (Possibly related to https://bugs.kde.org/show_bug.cgi?id=496898 )

Does the issue occur if you boot using a more "standard", closer-to-upstream Linux kernel, as opposed to cachyos, zen, etc.?

Just on the off chance, does the issue occur with standard Breeze theming? (Noticed a few lines about the CachyOS theming in that log and thought it might be worth a double-check)

Thanks!
Comment 3 Bug Janitor Service 2025-01-28 03:47:21 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2025-02-12 03:46:53 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.