Created attachment 156822 [details] screenshot plasma memory usage I originally posted this in Bug 430139 but Nate asked for a new bug to be created. Since very recently (not sure when exactly though) I have observed that the plasmashell process is consuming more and more memory at a frightening pace (e.g. usage grows to 22GB in the space of 3 minutes). Killing it doesn't always help (see video below). video of plasmashell memory usage growing to 22GB in the space of less than 3 minutes. https://mega.nz/file/o8pBARSY#QxC_k6BYt84bSUQje7RI74QNqMwYA9UjIuf3iMSFdMg valgrind trace: https://mega.nz/file/J0AhFIwK#pI_pFGmN8gWZCjHAjeuo1APerJ1rWoJavFPuwq3o1eo I also tried: 1) monitoring the process with memleax but nothing was reported despite growing memory usage; 2) downgrading to glibc 2.36 but that didn't seem to help Operating System: Arch Linux KDE Plasma Version: 5.27.1 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 6.2.1-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon RX 6800 XT
see 466320 - this is the only thing that gets spammed in the log
Do you have multiple screens? If so does this stop when you use `xrandr` to manually enforce a particular configuration? And do you have anything automatically changing screen settings outside of KScreen?
Hi Nate, I only have 1 screen and I am not aware of anything changing my screen settings.
Ok then it's probably not something screen-related.
probably not. I have also tried since: 3) disabling libcamera in wireplumber 4) replacing wireplumber with pipewire-media-session 5) completely disconnecting the external camera steps 3-5 based on https://gitlab.freedesktop.org/pipewire … issues/385
heaptrack file: https://mega.nz/file/NgJF0RZb#WGrXmuTf26oYrYZuttpejGNDioNOZAib3saEofWr-Tw
note, this does not seem to reproduce on X11, only on wayland!
That trace seems to suggest there's a large memory leak in the clipboard data engine. According to heaptrack, there's about 230 MiB of QArrayData leaked and 190 MiB of QMimeData instances. Those are created in response to wayland events, probably explaining why it happens on Wayland only. How much clipboard history have you set?
Created attachment 156954 [details] history clipboard (In reply to Arjen Hiemstra from comment #8) > That trace seems to suggest there's a large memory leak in the clipboard > data engine. According to heaptrack, there's about 230 MiB of QArrayData > leaked and 190 MiB of QMimeData instances. Those are created in response to > wayland events, probably explaining why it happens on Wayland only. > > How much clipboard history have you set? Hi Adrian, 50 items - see attached.
sorry, Arjen, not Adrian!
Created attachment 156955 [details] clipboard defaults Resetting clipboard settings to defaults resolves the issue and makes the memory leak go away. So one (or more) of the non-default options is causing the issue.
I think this a leak in QWaylandClipboard, surfaced since KSystemClipboard syncs to QClipboard, there was a qt6 commit to fix it. I opened a MR to backport it https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/68
I have been running the Wayland session with https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/68 applied and I can no longer reproduce this bug using the original clipboard settings. Plasma memory usage is sitting at ~325 MiB.
Yay! And it looks like that backport was merged; closing!