Plasmashell using 40+ GB RAM

I have already submitted this:

But I really need help as I need to get back to work

basically is what the link says, plasmashell is rapidly consuming all my RAM (64GB real memory + 64GB disk swap) and I don’t know the cause of this
I removed the plasmoids I had and only thing left are wallpapers and taskbar on each screen (3).

Can somebody please help me fix this? I don’t know how to do proper tracking of the possible issue, this never happened to me before

Arch GNU/Linux KDE Wayland, all software to latest version

Personally I’d turn off the wallpapers and set the background to a plain color. See if the memory issue goes away. I have many KDE systems and all of them are either “plain solid color” background or custom image as a background. I don’t like any of the wallpapers, I just take a image I’ve found or taken that I like and make that my backgrounds. I don’t have any problems with plasmashell memory when I do that.

Do you maybe use slide-shows as wallpaper settings? In the past KDE has had problems with that, filling memory with new picture which was shown. Since you have 3 screens it might even go faster that way.
I haven’t heard that this error has appeared again but it could be, it wouldn’t be the first time, nor the second.

No, that’s not it. Just tried it and in 5 minutes with a new picture every 2 seconds memory use did not increase at all.
Maybe somebody has a better idea. Success.

What’s the output of

grep plugin= ~/.config/plasma-org.kde.plasma.desktop-appletsrc

See High Memory Usage from Plasmashell. Is it a memory leak? - #31 by sitter

❯ grep plugin= ~/.config/plasma-org.kde.plasma.desktop-appletsrc
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image
plugin=org.kde.kdeconnect
plugin=org.kde.plasma.cameraindicator
plugin=org.kde.plasma.clipboard
plugin=org.kde.plasma.devicenotifier
plugin=org.kde.plasma.manage-inputmethod
plugin=org.kde.plasma.notifications
plugin=org.kde.plasma.keyboardindicator
plugin=org.kde.kscreen
plugin=org.kde.plasma.keyboardlayout
plugin=org.kde.plasma.printmanager
plugin=org.kde.plasma.volume
plugin=org.kde.plasma.brightness
plugin=org.kde.plasma.battery
plugin=org.kde.plasma.mediacontroller
plugin=org.kde.plasma.bluetooth
plugin=org.kde.plasma.networkmanagement
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
plugin=org.kde.panel
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.digitalclock
plugin=org.kde.plasma.showdesktop
plugin=org.kde.plasma.windowlist
plugin=org.kde.plasma.kickoff
plugin=org.kde.plasma.pager
plugin=org.kde.plasma.marginsseparator
plugin=org.kde.plasma.systemtray
plugin=org.kde.panel
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.kickoff
plugin=org.kde.plasma.pager
plugin=org.kde.plasma.marginsseparator
plugin=org.kde.plasma.systemtray
plugin=org.kde.plasma.digitalclock
plugin=org.kde.plasma.showdesktop
plugin=org.kde.plasma.windowlist
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image
plugin=org.kde.kdeconnect
plugin=org.kde.plasma.cameraindicator
plugin=org.kde.plasma.clipboard
plugin=org.kde.plasma.devicenotifier
plugin=org.kde.plasma.manage-inputmethod
plugin=org.kde.plasma.notifications
plugin=org.kde.plasma.keyboardindicator
plugin=org.kde.kscreen
plugin=org.kde.plasma.keyboardlayout
plugin=org.kde.plasma.printmanager
plugin=org.kde.plasma.volume
plugin=org.kde.plasma.brightness
plugin=org.kde.plasma.battery
plugin=org.kde.plasma.mediacontroller
plugin=org.kde.plasma.bluetooth
plugin=org.kde.plasma.networkmanagement
plugin=org.kde.panel
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.digitalclock
plugin=org.kde.plasma.showdesktop
plugin=org.kde.plasma.windowlist
plugin=org.kde.plasma.kickoff
plugin=org.kde.plasma.pager
plugin=org.kde.plasma.marginsseparator
plugin=org.kde.plasma.systemtray
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.bluetooth
plugin=org.kde.plasma.networkmanagement
plugin=org.kde.kdeconnect
plugin=org.kde.plasma.cameraindicator
plugin=org.kde.plasma.clipboard
plugin=org.kde.plasma.devicenotifier
plugin=org.kde.plasma.manage-inputmethod
plugin=org.kde.plasma.notifications
plugin=org.kde.plasma.keyboardindicator
plugin=org.kde.kscreen
plugin=org.kde.plasma.keyboardlayout
plugin=org.kde.plasma.printmanager
plugin=org.kde.plasma.volume
plugin=org.kde.plasma.brightness
plugin=org.kde.plasma.battery
plugin=org.kde.plasma.mediacontroller

I updated the Bug Report so check it, but basically default breeze theme gives memory leak too

You are using kvantum. That is very important to mention in such cases.

Check if changing your themes fix your issue.
It is probably an issue with your theme.

From the heaptrack trace we can see Kvantum::Style::Style(bool) called in Kvantum::KvantumPlugin::create causing leaks.

(Fuite means leak)

Please report the issue to kvantum devs.

1 Like

When I faced this issue on Zenned, I coded Plasma Leakguard to mitigate it.

It doesn’t solve the problem, but at least the desktop doesn’t freeze and it can be used.

In my case the leak wasn’t due to a Plasma component, but to a status icon from a different application.

Create a new user, login to your desktop with that user with the default plasma settings. I would bet it’s one of the plugins that has a memory leak somewhere. If you don’t observe the high memory usage with the default desktop for that new user, then there is your proof.

Reporting or an upstream fixing is so much more important than any workaround.

KDE works only because some of its users do the actual work, please be part of those.

This heaptrack trace is great in that effort.
Now kvantum devs would benefit from hearing about it.

FOSS needs to nurturing.

3 Likes

When I work around something is because nobody listened to me.

I suggested limiting the amount of RAM the plasmashell process can consume. Systemd allows to automatically restart a process that consumes certain RAM.

But then I was told I shall provide scientific evidence of how much RAM shall be that, rather than choosing any arbitrary number.

I just told I had no idea what evidence means in this context, and that any high number would be better than no number.

To which my suggestion was rejected. Hence I made the work-around.

People wasting my time. FOSS doesn’t need nurturing, needs higher standards.