From 9b5bf2d1e5f3dfbbacf1e287a966473a675c4185 Mon Sep 17 00:00:00 2001 From: Tristan Bull Date: Tue, 5 May 2026 10:53:31 -0700 Subject: [PATCH] core: disable EGL vsync throttling on new surfaces With the default swap interval of 1, eglSwapBuffers blocks until the compositor sends wl_buffer.release. When a monitor is DPMS-off, the compositor never releases the buffer, stalling the main thread indefinitely. This prevents authentication from completing and leaves the lock screen frozen. Set the swap interval to 0 on each new EGL surface so swaps are non-blocking. Frame pacing is already controlled by wl_surface.frame callbacks, so this does not cause unbounded rendering. Co-Authored-By: Claude Sonnet 4.6 --- src/core/LockSurface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/LockSurface.cpp b/src/core/LockSurface.cpp index 9ab54ae..0edbea6 100644 --- a/src/core/LockSurface.cpp +++ b/src/core/LockSurface.cpp @@ -105,6 +105,13 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) { readyForFrame = false; return; } + + // Disable vsync throttling so eglSwapBuffers never blocks waiting for + // wl_buffer.release. Without this, a DPMS-off monitor can stall the main + // thread indefinitely because the compositor never releases the buffer. + // Rendering rate is already governed by wl_surface.frame callbacks. + g_pEGL->makeCurrent(eglSurface); + eglSwapInterval(g_pEGL->eglDisplay, 0); } if (readyForFrame && !(SAMESIZE && SAMESCALE)) {