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

Vlad Zahorodnii <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/kwin/-/commit/12a066c05a |ma/kwin/-/commit/2dad5484a6
                   |457e58a2bbc118abf2347ed73c9 |c56f480e7c35aa6f4cd6fc0d44f
                   |3dc                         |f92

--- Comment #3 from Vlad Zahorodnii <[email protected]> ---
Git commit 2dad5484a6c56f480e7c35aa6f4cd6fc0d44ff92 by Vlad Zahorodnii.
Committed on 14/09/2026 at 10:21.
Pushed by vladz into branch 'Plasma/6.8'.

wayland: destroy mode resources when the output device resource is released

OutputDeviceV2InterfacePrivate::kde_output_device_v2_release() destroyed
only the output device resource itself. The kde_output_device_mode_v2
resources created for it in sendNewMode() were never destroyed, so whenever
an output device resource is destroyed and a new one advertised to a bound
client, one resource per advertised mode leaks until the client disconnects.

Measured on a system with a single output advertising 42 modes: after 13
days of uptime, 3.66 million leaked ModeResource objects (~760 MB of live
heap), all owned by two long-lived libkscreen clients (the kscreen kded
module and powerdevil), accumulating in bursts of up to 440 MB during
output churn episodes such as screen blanking and failed atomic commits
retrying.

Destroy the mode resources belonging to the released resource, following
the same send_removed() + wl_resource_destroy() pattern the mode
destructor and updateModes() already use.


(cherry picked from commit 12a066c05a457e58a2bbc118abf2347ed73c93dc)

Co-authored-by: Steven Naumov <[email protected]>

M  +16   -0    src/wayland/outputdevice_v2.cpp

https://invent.kde.org/plasma/kwin/-/commit/2dad5484a6c56f480e7c35aa6f4cd6fc0d44ff92

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

Reply via email to