Persistent memory leak from kwin_x11 and plasmashell

I've been experiencing memory leak from kwin_x11 and plasmashell for a couple of months. After boot, the memory usage of those two will steadily grow and can only mitigated by using --replace to restart the program.

Below is an relatively extreme case after I've run the system for about a week and memory drop from restarting those two.

Here's the inxi info:

System:    Host: aclef-mkub-ex Kernel: 5.6.11-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: KDE Plasma 5.18.5 tk: Qt 5.14.2 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: XPS 13 9343 v: N/A serial: <filter> Chassis: type: 9 
           serial: <filter> 
           Mobo: Dell model: 0310JH v: A00 serial: <filter> UEFI [Legacy]: Dell v: A19 date: 12/24/2018 
Battery:   ID-1: BAT0 charge: 41.4 Wh condition: 46.5/52.7 Wh (88%) volts: 8.2/7.6 model: SMP DELL RWT1R43 
           type: Li-poly serial: <filter> status: Unknown 
           Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M280/320/275 serial: <filter> 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i7-5500U bits: 64 type: MT MCP arch: Broadwell rev: 4 
           L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19161 
           Speed: 897 MHz min/max: 500/3000 MHz Core speeds (MHz): 1: 1123 2: 1160 3: 1052 4: 1148 
Graphics:  Device-1: Intel HD Graphics 5500 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:1616 
           Display: x11 server: X.Org 1.20.8 driver: intel unloaded: modesetting alternate: fbdev,vesa 
           compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 5500 (BDW GT2) v: 4.6 Mesa 20.0.6 direct render: Yes 
Audio:     Device-1: Intel Broadwell-U Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           chip ID: 8086:160c 
           Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Dell driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:9ca0 
           Sound Server: ALSA v: k5.6.11-1-MANJARO 
Network:   Device-1: Broadcom and subsidiaries BCM4352 802.11ac Wireless Network Adapter vendor: Dell driver: wl 
           v: kernel port: f040 bus ID: 02:00.0 chip ID: 14e4:43b1 
           IF: wlp2s0 state: up mac: <filter> 
Drives:    Local Storage: total: 327.15 GiB used: 42.09 GiB (12.9%) 
           ID-1: /dev/mmcblk0 model: SDC size: 30.23 GiB serial: <filter> scheme: MBR 
           ID-2: /dev/sda vendor: Samsung model: SSD PM851 M.2 2280 256GB size: 238.47 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: 5D0Q scheme: GPT 
           ID-3: /dev/sdb type: USB vendor: SanDisk model: Extreme size: 58.44 GiB serial: <filter> rev: 1.00 
           scheme: MBR 
Partition: ID-1: / size: 58.43 GiB used: 26.20 GiB (44.8%) fs: btrfs dev: /dev/sdb1 
           ID-2: /home size: 58.43 GiB used: 26.20 GiB (44.8%) fs: btrfs dev: /dev/sdb1 
Sensors:   System Temperatures: cpu: 68.0 C mobo: 63.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 281 Uptime: 3d 12h 21m Memory: 7.40 GiB used: 2.78 GiB (37.6%) Init: systemd v: 245 
           Compilers: gcc: 9.3.0 Shell: bash v: 5.0.16 running in: konsole inxi: 3.0.37 

Did you check the KDE bugtracker?

I'm not very familiar with KDE bugtracker, just googled it and searched memory leak in it, didn't find any recent issue that seems relevant

If you have installed any plasmoid that did not come on the stock Manjaro install remove it/them. Sometimes they have memory leaks.

It is likely coming from something you have installed. Otherwise it would be a widespread KDE issue reported very frequently (and its not).

I didn't use any plasmoids, nor did I changed anything about the desktop, just plain KDE out of the box.
Can other software installed cause something like this?

I don't know what happened, but switch the compositor rendering backend from OpenGL(Default) to XRender solved the memory leak.

I was tweaking compositor trying to fix tearing and flickering in obs streaming, changing rendering backend solved the flickering, but also happened to solved the leaking.

Also the leaking is already there before I started using obs, so I suspect it's something about OpenGL compositing but not obs.

1 Like

It can be an effect. You can switch all effects off and test it with OpenGL render. Then activate the ones you want one by one to check which one is causing the problems. You're wasting cpu cycles with XRender.

I didn't tweak any effect setting, I'll see if OpenGL will work again after disable some.

I have the same problem. Since I am using arch on the troubled machine I don't expect any solution here.

I have tried a lot of the workarounds even changing nvidia to nouveau.
with sddm I can't even switch sessions (using lightdm).

Similar issues are reported and reach back to 2007

Did change compositor work for you?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by