The screen sleeps while a video stream is active (no display-sleep inhibitor) #913

Closed
opened 2026-11-18 20:13:29 +00:00 by charles · 1 comment
Owner

Forum report (thread 1572513215965822976), 2026-11-18: "The app does not keep the screen awake while streaming video — The screen sleeps even when a video stream is active".

The original. The Electron shell holds a display-sleep blocker while streaming priority is acquired: fluxer_desktop/src/main/StreamingPriority.ts — acquireStreamingPriority → powerSaveBlocker.start('prevent-display-sleep'), released when the last holder releases. To establish from the renderer: exactly when it is acquired and released (while sharing one's own screen, while watching someone's stream, with a camera on, during any voice call?), and whether the web client uses the Screen Wake Lock API for the same cases.

Flaxative. There is no inhibitor anywhere in the client (only the idle-time query in fluxer-platform/src/idle.rs).

Wanted. While the same conditions hold as in the original, the screen neither dims, locks nor sleeps, and the inhibition is released as soon as they end (also on crash/exit — it must not outlive the process):

  • Linux: the portal org.freedesktop.portal.Inhibit (flag idle) where available; org.freedesktop.ScreenSaver.Inhibit (KDE and others) and org.gnome.SessionManager.Inhibit as fallbacks; state which one is used on KDE Plasma Wayland and on GNOME. The inhibition is tied to the D-Bus connection, so it ends with the process.
  • Windows: SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED) on a thread that lives as long as the inhibition (or PowerCreateRequest/PowerSetRequest with a reason string, which shows up in powercfg /requests), cleared on release.
  • Core decides (a pure "should the display stay awake" selector over the voice/stream state); platform does it behind a trait with a fake for tests; the app runtime wires the two.
**Forum report (thread 1572513215965822976), 2026-11-18:** "The app does not keep the screen awake while streaming video — The screen sleeps even when a video stream is active". **The original.** The Electron shell holds a display-sleep blocker while streaming priority is acquired: `fluxer_desktop/src/main/StreamingPriority.ts` — `acquireStreamingPriority` → `powerSaveBlocker.start('prevent-display-sleep')`, released when the last holder releases. To establish from the renderer: exactly when it is acquired and released (while sharing one's own screen, while watching someone's stream, with a camera on, during any voice call?), and whether the web client uses the Screen Wake Lock API for the same cases. **Flaxative.** There is no inhibitor anywhere in the client (only the idle-time query in `fluxer-platform/src/idle.rs`). **Wanted.** While the same conditions hold as in the original, the screen neither dims, locks nor sleeps, and the inhibition is released as soon as they end (also on crash/exit — it must not outlive the process): - Linux: the portal `org.freedesktop.portal.Inhibit` (flag idle) where available; `org.freedesktop.ScreenSaver.Inhibit` (KDE and others) and `org.gnome.SessionManager.Inhibit` as fallbacks; state which one is used on KDE Plasma Wayland and on GNOME. The inhibition is tied to the D-Bus connection, so it ends with the process. - Windows: `SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)` on a thread that lives as long as the inhibition (or `PowerCreateRequest`/`PowerSetRequest` with a reason string, which shows up in `powercfg /requests`), cleared on release. - Core decides (a pure "should the display stay awake" selector over the voice/stream state); platform does it behind a trait with a fake for tests; the app runtime wires the two.
Author
Owner

Fixed in nightly 2026.1119.395.

Fixed in nightly 2026.1119.395.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#913
No description provided.