martenjj / wallpaperswitch

A virtual desktop wallpaper switcher for KDE Plasma 6
GNU General Public License v2.0
36 stars 2 forks source link

Memory leak #14

Closed glennmurray closed 4 years ago

glennmurray commented 6 years ago

Thank you very much for this app. It makes KDE much more usable for me.

I am noticing a memory problem with Plasma 5 in Kubuntu 18.04 (plasma-desktop 4:5.12.4-0ubuntu1). I have configured three virtual desktops with different image files. Every time I switch desktops, the "Shared Mem" usage in ksysguard or in "ps aux" increases by about 50 MB. It doesn't take long for plasmashell memory usage to reach over 2GB.

Here is an example of the memory usage change after one desktop switch.

~/$ ps aux --sort -rss | grep plasmashell
gamurray 15123  1.8  9.7 5340844 1568164 ?     Sl   09:28   0:28 /usr/bin/plasmashell

~/$ ps aux --sort -rss | grep plasmashell
gamurray 15123  1.9 10.0 5402288 1623596 ?     Sl   09:28   0:29 /usr/bin/plasmashell

I first noticed this when my Maven builds started running out of memory. The only workaround I have is to log out and log back in.

martenjj commented 6 years ago

Thanks for your report, it looks like this may be an upstream KDE bug which depends on Qt and the video driver in use and their versions. Reported KDE bugs are:

https://bugs.kde.org/show_bug.cgi?id=368838 https://bugs.kde.org/show_bug.cgi?id=391063

You may be able to confirm this by using the slideshow wallpaper alone (i.e. not via wallpaperswitch), changing the background image and checking the Plasma memory usage.

With my configuration the problem does not seem to happen, even after more than a week of working including switching desktops frequently:

$ ps aux --sort -rss | grep -w plasmashell xxxx 9857 0.2 2.9 4185992 488984 ? Sl May10 18:19 plasmashell

Those memory figures don't significantly change, and sometimes even go down, on a desktop switch.

I'll monitor the upstream bugs and note here if there is a resolution.

glennmurray commented 6 years ago

I've done a little more investigation. On my desktop system with a single monitor the problem does not occur. The memory problem only occurs when I have my laptop open and it is plugged into an external monitor; perhaps wallpaperswitch is not designed for this use case?

martenjj commented 4 years ago

Was not designed for multiple monitor setup. Now unmaintained due to Plasma changes, see README.md for another solution.