Bug 471314 - kwin_x11 uses 2.2GB vram
Summary: kwin_x11 uses 2.2GB vram
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: 5.27.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: X11-only
Depends on:
Blocks:
 
Reported: 2023-06-22 00:16 UTC by Kasper Sandberg
Modified: 2025-02-24 17:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kasper Sandberg 2023-06-22 00:16:44 UTC
SUMMARY
amdgpu_top shows kwin_x11 to be using roughly 2.2GB ram

STEPS TO REPRODUCE
1. have an amdgpu supported gpu (i have rx 590)
2. start a plasma X11 session
3. observe vram usage

OBSERVED RESULT
kwin_x11 uses a lot of vram! opening more windows only marginally affects the usage. it is not a slow acting leak, doing kwin_x11 --replace to kill old kwin and start new results in the new one using roughly same amount immediately.



EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: gentoo, vanilla kernel 6.2.5(but also affects all older versions i've run)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version:  5.15.9

and kwin_x11 prints following:
OpenGL vendor string:                   AMD
OpenGL renderer string:                 AMD Radeon RX 590 Series (polaris10, LLVM 15.0.7, DRM 3.49, 6.2.5)
OpenGL version string:                  4.6 (Compatibility Profile) Mesa 23.0.3
OpenGL shading language version string: 4.60
Driver:                                 Unknown
GPU class:                              Unknown
OpenGL version:                         4.6
GLSL version:                           4.60
Mesa version:                           23.0.3
X server version:                       1.21.1
Linux kernel version:                   6.2.5
Requires strict binding:                yes
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no

ADDITIONAL INFORMATION
This has affected older verisons of kde/plasma/kernel/mesa aswell, or atleast i am 99% sure. I used to only observe total vram usage in radeontop, which has remained the same for more than a year, only very recently did i learn of amdgpu_top that can display per-app usage, and realized it was kwin_x11 (and I was so sure it was somehow browsers causing it, I guess there are something in the world we cannot blame them for, who would have thought)

I should note, though I dont know if it is relevant, that reasonably frequently, every couple of days, I notice that switching between workspaces/desktops becomes stuttery in the effect (where it just pans). This is fixed by restarting kwin with kwin_x11 --replace, and its once again smooth. After a kwin_x11, I get yellow/green/weird artifacts in most windows, that disappear as soon as I resize them or they repaint themselves.

Sometimes(maybe once a week or so), I observe that right clicking on things will bring up a  black menu, sometimes a couple of times in a row, but then just disappear, probably unrelated, but I dont know
Comment 1 Kasper Sandberg 2023-06-22 00:17:13 UTC
I should add, I run 4k resolution, in 120hz mode
Comment 2 TraceyC 2025-02-24 17:59:01 UTC
Adding the x11-only keyword