SUMMARY kwin_wayland takes 9 GB of memory when launching a Lutris game. STEPS TO REPRODUCE 1. Launch World of Tanks inside Lutris/wine. 2. Wait till the game loads. 3. Sometimes it will make kwin_wayland take a lot of reserved memory. OBSERVED RESULT Before launching the game: 226 MB RSS adam@fedora144:~$ ps aux | grep "kwin_wayland[ ]--" adam 23105 28.7 1.4 4146252 226248 ? Rl 17:03 23:37 /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_YWDazz --xwayland After launching the game: 8293 MB RSS adam@fedora144:~$ ps aux | grep "kwin_wayland[ ]--" adam 23105 14.6 52.8 12318944 8293556 ? Sl 17:03 53:02 /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayland-xauthority /run/user/1000/xauth_YWDazz --xwayland SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.11.10-300.fc41.x86_64 Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.4 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 Kernel Version: 6.11.10-300.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics Memory: 15.0 GiB of RAM Graphics Processor: AMD Radeon Graphics ADDITIONAL INFORMATION
May be related to #496698 since I use second monitor too, through HDMI from Nvidia GPU.
Created attachment 176368 [details] Stacktrace taken when memory leak increases
I tried debugging with https://community.kde.org/KWin/Debugging#Debug_KWin_with_Valgrind But the memory leak command gives Permission denied. Same as: ``` adam@fedora144:~/Downloads$ dbus-run-session valgrind --log-file=kwinwayland.log --trace-children=no kwin_wayland ==254461== ==254461== Warning: Can't execute setuid/setgid/setcap executable: /usr/bin/kwin_wayland ==254461== Possible workaround: remove --trace-children=yes, if in effect ==254461== valgrind: /usr/bin/kwin_wayland: Permission denied ```
Still leaking memory. Everyday 70% RAM and then system crash :(
Apparently, more people is having this issue, including me. As long as I have external monitors connected the system will eventually reach its full RAM capacity. The workaround is to disconnect and reconnect the monitors, that frees the memory, but causes performance issues until reboot.
Memory leak still exists. Just using firefox for an hour. Then suddenly lag, screen flashes, logs me out and firefox gets killed. I'm using the HDMI output in a dual-gpu laptop.
Looks like I have the same issue. Just unplugging the external monitor doesn't work, I have to unplug it, then the actual replug fixes the issue. ❯ ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n | grep kwin 13796 MB /usr/bin/kwin_wayland 4.60938 MB /usr/bin/kwin_wayland_wrapper ❯ ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n | grep kwin 207.195 MB /usr/bin/kwin_wayland 4.60938 MB /usr/bin/kwin_wayland_wrapper I'm using an Nvidia card as well, don't know what else to report, if you need more information from me, I can help of course.
I can confirm, that after unplugging and plugging HDMI *again* the memory leaks goes away. Unplugging only doesn't fix the leak.
Still happening on 6.2.5, just using external monitors uses a lot of RAM on idle, around 8GB, and then the bug makes it go up to the maximum. In fact, after the update it happens more often.
*** This bug has been marked as a duplicate of bug 496469 ***