Add support for fallback capture when Portal capture is selected but a
restore token is stale or not yet created.
New flow:
* User config sets capture = portal.
* Check for a Portal restore token on disk. If it exists, first verify that
Portal capture works by negotiating the existing restore token with
a 10 second timeout.
* If negotiation succeeds, start Portal capture as normal.
* If negotiation fails within 10 seconds, treat the token as stale, delete
and restart Sunshine.
* If no restore token exists, queue a non-blocking TaskPool task to trigger
token negotiation via the XDG dialog that can run concurrently with any
other capture method.
* If Portal cannot be used yet, disregard the 'capture = portal' config
and continue probing for other working capture methods.
* If a fallback capture method succeeded, the user can connect to the session;
the WebUI will echo a fatal error to indicate that this is temporary. The
user can then confirm the XDG permission dialog, which immediately
triggers a Sunshine restart, and subsequent sessions will use actual
Portal capture directly.
Minor changes:
* Increase TaskPool thread count to 2, as the XDG negotiation task can be
long-running and blocks input when the pool is single threaded.
* Promote KWin capture autodetection above Portal, as it is less complicated
to set up on supported systems.
* When Portal capture is selected but a restore token is stale,
Sunshine startup can potentially be delayed by ~12 seconds (2 second ping,
10 second timeout for negotiation) until the token is re-negotiated.
Bugfixes:
* Avoid blocking DBus calls which causes Sunshine to terminate uncleanly
if an XDG Remote Desktop dialog is still open during restart/shutdown.
* Clean up CAP_SYS_ADMIN log spam caused by recent DRM worker thread changes.
* Clean up legacy CAP_SYS_ADMIN workarounds in Portal and Kwin capture code.
* Fix KWin autodetection false positives on GNOME.
Description
Add support for fallback capture when Portal capture is selected but a restore token is stale or not yet created.
New flow:
Minor changes:
Bugfixes:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.