High Memory Usage from Plasmashell. Is it a memory leak?

Just to be very clear for people reading this, Color profiles is not needed to reproduce it but like you said, it might make it easier.
I have 28 leaked buffers currently out of 62.

Last 4 was less than 5 minutes ago when I enabled Color profiles.

Something worth mentioning also is that disabling taskbar thumbnail previews and thumbnail grid in the task swicher seems to make the leaks stop. At least for me.

For the sake of completeness: I’ve spent quite some time reproducing this on various GPUs and distros, and I do need to have a color profile loaded to see any significant leak at all with my steps. But since other people have reproduced it without color management enabled, agreed - it’s probably not the only way to trigger the leaks.

Yes, that stops the leak in my case as well.

To anyone who comes across this thread: if you run into this leak, you can restart plasmashell during a running Plasma session with systemctl --user restart plasma-plasmashell - that will release all leaked memory without breaking your session (apart from messing up manual task order on the taskbar).

Yeah, we did our part. You did an amazing job and thank you for coming in and confirming the issue. It’s very possible that the color profile leak is yet another leak somewhere than the one I’m seeing.

A quick update: after an awesome deep dive into Plasma and Qt internals, @shelterx came up with a set of fixes that seems to close the leak both for his reproducer and for my steps.

I’m still testing on all the affected iGPUs, but so far things are looking very promising.

See https://bugs.kde.org/show_bug.cgi?id=520190 for the actual diffs.

Hello all.

I’m writing to report that I’m experiencing a memory leak with plasmashell too. Here my system info:

Operating System: FreeBSD 15.0
KDE Plasma Version: 6.6.5
KDE Frameworks Version: 6.26.0
Qt Version: 6.11.1
Kernel Version: 15.0-RELEASE-p9 (64-bit)
Graphics Platform: Wayland
Memory: 15.8 GiB of usable RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Manufacturer: LENOVO
Product Name: 20AW0002IX
System Version: ThinkPad T440p

What I’m experiencing is mainly evident when entering Edit mode and using Spectacle to record my screen (I’m not using external widgets).

I’ve used heaptrack to gather some infos in three different moments (included screenshoots of heaptrack logs):

  • During normal usage (didn’t get much tough, with heaptrack attached plasmashell apparently freezes when I tried to interact with the task bar widget or enter Edit mode; its CPU usage goes up to 95%-100%): file heaptrack.plasmashell.5034.zst

  • When running Spectacle (the biggest memory usage experienced: from ~700MiB to ~1,2GiB in a few minutes): file heaptrack.plasmashell.46609.zst

  • Leaving the PC turned on over night (not much increase in memory usage, but still something seems to be in common with the data collected when using Spectacle): file heaptrack.plasmashell.97300.zst

Thank you in advance.