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

            Bug ID: 501211
           Summary: Memory leak when window leaves full-screen 8 times or
                    more
    Classification: Plasma
           Product: kwin
           Version: 6.3.2
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: qethanmoore+...@gmail.com
  Target Milestone: ---

SUMMARY
When a window toggles full-screen many times, RAM usage attributed to
kwin_wayland grows substantially.
Rebooting or kwin_wayland --replace returns RAM usage to normal. Closing all
windows does not.

STEPS TO REPRODUCE
1. Open VLC, mpv, Firefox or any other program that can enter full-screen
2. Press the toggle full-screen button (usually F11 or 'f') exactly 16 times to
observe the first memory leak and a lag spike
3. Leaving full-screen again (i.e. pressing toggle twice more) will leak much
more memory each time

OBSERVED RESULT
Total RAM usage while testing with mpv looked like this:
1.7GiB to start, with video open and playing in a small window
16 full-screen toggles later: the first permanent increase to 1.9GiB
Subsequent times leaving full-screen: 2.5, 4.8, 14.3 GiB
(Going further exhausts my RAM entirely. Only holding the power button has any
effect at that point.)

Other runs:
(kwin_wayland --replace)
[1.7,(16 full-screen toggles...) 1.8, 2.4, 4.8, 14.3] GiB
(and after a reboot)
[1.7,(16 full-screen toggles...) 1.9, 2.5, 4.9, 14.4] GiB

EXPECTED RESULT
RAM usage should be stable when a window cycles full-screen any number of times

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 2600X Six-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series

ADDITIONAL INFORMATION
Closing the window after step 2 will also result in a lag spike.
Pressing alt+F4 before the 16th toggle avoids the problem, even if the window
appears to leave full-screen for the problematic 8th time as it closes.
The issue is per window. I can drag a new tab from Firefox out into its own new
window and it has the full 16 toggle capacity, independent of its originating
window.
Another user has reported similar behaviour in coment 48 of bug id 496469; also
an EndeavourOS user, but different hardware.
All other methods of toggling full-screen are affected. I avoided
double-clicking videos because counting single key-presses feels more precise.
It is always the 16th toggle on my machine measured this way.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to