Bug 414132

Summary: Plasma 5.12 causes memory leak in Xorg not freeing pixmap memory
Product: [Plasma] plasmashell Reporter: Dantalian <dmitriew.pv>
Component: generic-performanceAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: engineering, kde, nate, plasma-bugs-null, thomwalker732
Priority: NOR    
Version First Reported In: 5.12.8   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: xrestop
Kwin info output
plasmarc
plasmashellrc
plasma-org.kde.plasma.desktop-appletsrc
Terminal illustrating problem

Description Dantalian 2019-11-14 12:35:08 UTC
Created attachment 123918 [details]
xrestop

SUMMARY

Plasmashell is causing gradual memory consumption by /usr/bin/X process.
In two days of Plasma session runtime it takes more than 1.2Gb of RSS by X process. As you can see in the attachment for xrestop, this is caused by gradually growing pixmap memory. The memory consumption is growing over days until full available memory is accupied, then X system crashes, because of earlyoom kills this process.

Some output:
$> ps l -p 1753
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0  1753  1734  20   0 1817008 1317112 -   Ssl+ tty7     223:55 /usr/bin/X -nolisten tcp -auth /run/sddm/{ccc...} -background none -noreset -displayfd 18 -seat seat0 vt7

$> ps l -p 16883
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
0  1000 16883     1  20   0 5631924 329984 SyS_po Sl ?         18:41 /usr/bin/plasmashell

STEPS TO REPRODUCE
1. Run X11 KDE5 session for days without logout
2. Usual use of KDE session with small and amount of apps opened
3. Memory consumption will grow gradually over days.

OBSERVED RESULT
Constantly growing memory consumption.

EXPECTED RESULT
Fixed pixmap memory consumption by plasmashell.

SOFTWARE/OS VERSIONS
Linux: Linux 4.12.14-lp151.28.25-default #1 SMP Wed Oct 30 08:39:59 UTC 2019 (54d7657) x86_64 x86_64 x86_64 GNU/Linux
KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.55.0
Qt Version: 5.9.7

ADDITIONAL INFORMATION

I am using openSUSE Leap 15.1 with standard set of KDE packages, provided from default distributive repository.

X session is Running on laptop with 32Gb RAM and Intel Graphics and OpenGL enabled.
Comment 1 Dantalian 2019-11-14 12:37:26 UTC
Created attachment 123919 [details]
Kwin info output
Comment 2 Dantalian 2019-11-14 12:49:07 UTC
Created attachment 123920 [details]
plasmarc

~/.config/plasmarc
Comment 3 Dantalian 2019-11-14 12:49:42 UTC
Created attachment 123921 [details]
plasmashellrc

~/.config/plasmashellrc
Comment 4 Dantalian 2019-11-14 12:50:00 UTC
Created attachment 123922 [details]
plasma-org.kde.plasma.desktop-appletsrc

~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 5 engineering 2020-04-18 07:17:04 UTC
I have this also, Leap 15.1, same plasma. My GPU ram is consumed but not released.
Clicking on Dolphin (open Dolphin instances) in the task bar seems to cause easily noticeable steps in GPU memory consumption.
Comment 6 engineering 2020-04-18 07:38:40 UTC
Created attachment 127633 [details]
Terminal illustrating problem

This file shows GPU memory consumption.

In my taskbar I have 11 instances of Dolphin under one "tab".
At line 1263 I report memory use, move the mouse over the Dolphin "tab" (no click) and report memory use again.
Comment 7 Quartz 2021-10-21 18:14:53 UTC
Bump. 

I'd appreciate if this bug takes priority - it might be causing other accidental threads being created in relation to memory leaks and mistaking side effects in other places (such as I did with plasma widgets).

It makes it impossible to keep a desktop linux distro running KDE for several days and it's making the desktop environment give a really poor impression and experience.
Comment 8 David Edmundson 2025-10-08 13:50:07 UTC
Plasma 5.x is no longer getting fixes, please file a new bug if this bug persists in Plasma 6.4 on newer.