Skip to content

BlurEffect: drop render data on resume from sleep - #108

Open
xxmathias wants to merge 1 commit into
xarblu:mainfrom
xxmathias:fix/invalidate-render-data-on-resume
Open

BlurEffect: drop render data on resume from sleep#108
xxmathias wants to merge 1 commit into
xarblu:mainfrom
xxmathias:fix/invalidate-render-data-on-resume

Conversation

@xxmathias

Copy link
Copy Markdown

Problem

After resuming from suspend/hibernate, the effect can wedge into a state where it keeps drawing stale cached content and never updates again. Observed on a ThinkPad T14 (amdgpu, Plasma 6.7.2, Wayland, BlurDecorations=true): after resume, window decorations stayed frozen at their pre-sleep pixels — titlebar buttons were visible but did not respond to clicks, because the on-screen titlebar no longer matched the live decoration. Unloading and reloading the effect via D-Bus cleared it, which pointed at stale per-window render state rather than config or KWin.

Cause

GPU memory is powered down across suspend (and fully lost across hibernate/S4), so the cached blur textures and the TextureComparer's counter SSBOs / query objects can come back holding garbage. A query stuck at "no pixels changed" permanently wedges the conditional render and dirty-region tracking: every paint takes the cached-only path and the stale texture is drawn forever. Nothing currently invalidates on resume — only viewRemoved/screenRemoved are handled.

Fix

Subscribe to logind's PrepareForSleep on the system bus and, on wake, drop every window's BlurRenderData — dual-Kawase textures, framebuffers, BlurCacheLRU entry, and the compare WindowData — so everything is rebuilt from scratch on the next paint. Also adds the previously missing explicit Qt6::DBus linkage (it only linked because kwin already loads libQt6DBus).

🤖 Generated with Claude Code

GPU memory is powered down across suspend/hibernate, so the cached blur
textures and the TextureComparer's counter buffers / query objects can
come back holding garbage. A stuck "no pixels changed" query then
permanently wedges the conditional render and dirty region tracking:
the effect keeps drawing the stale cached texture and never updates
again (visible as frozen decorations, e.g. unclickable titlebar
buttons, until the effect is reloaded).

Listen for logind's PrepareForSleep on the system bus and drop all
per-window render data on wake so textures, framebuffers, cache
entries and compare state are rebuilt from scratch on the next paint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant