You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
linux-capture: XComposite enumerates all windows and rebuilds the pixmap every 2 s while the window is minimized or unmapped #1357
Part of #1273 (found by the #1285 capture-plugin audit). B, graphics thread.
plugins/linux-capture/xcomposite-input.c.h:596-626 (FIND_WINDOW_INTERVAL 2.0, line 4): while the captured window is "lost" (not MAP_STATE_VIEWABLE, or no texture), every 2 s the tick does two things under obs_enter_graphics():
calls xcomp_find_window, which fetches the client list and then makes a name and class lookup per top-level window, with two synchronous replies each;
tears down and recreates the pixmap and the watcher.
Failure scenario: a window that is minimized, on another workspace, or whose pixmap creation fails (the code mentions NVIDIA) stays "lost" forever. For as long as the source is showing, OBS then enumerates every window and rebuilds the pixmap every 2 s on the render thread. On a desktop with many windows this is a periodic frame hitch. The 2 s interval keeps it from spinning.
Fix:
Don't rebuild the pixmap when the found window is the same one as before (same XID, still unmapped).
Back off the search interval while the window keeps being found-but-unmapped, for example doubling up to 30 s and resetting on MapNotify or a settings change.
Do the window search outside the graphics lock.
Test: with a minimized or unmapped target window, count xcomp_find_window calls and pixmap recreations over about 20 s: a backoff instead of one every 2 s, and no pixmap rebuild when the XID is unchanged.
Claiming. Plan: skip the pixmap rebuild when the search finds the same XID that's still unmapped, and back off the 2 s search (doubling to a cap, reset on MapNotify or a settings change). RED under Xvfb: with an unmapped target window, count the window searches and pixmap rebuilds over a fixed time.
Activity
zackees commentedon Oct 17, 2026
Claiming. Plan: skip the pixmap rebuild when the search finds the same XID that's still unmapped, and back off the 2 s search (doubling to a cap, reset on MapNotify or a settings change). RED under Xvfb: with an unmapped target window, count the window searches and pixmap rebuilds over a fixed time.
docs(features): link PR #1366 for #1357
linux-capture: XComposite backs off the window search while the windo…
zackees commentedon Oct 23, 2026
Fixed by #1366 (merged). That PR used
Refs, so the issue stayed open, but its body lists no remaining work.