blob: 3b57896d6f4af7761990c66af6b094dad88893a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# Per-output video inhibition
Oledsaver 1.0.9 adds a Wayfire `oledsaver-idle` plugin. Load it alongside `ipc`,
`ipc-rules`, and `oledsaver-cursor` in Wayfire's `core/plugins` setting.
`INHIBIT_VIDEO = 1` in the `[global]` section of oledsaver.conf enables this feature
(default). Set it to 0 to disable it. The manager reloads configuration periodically.
Applications that create Wayland idle inhibitors, including tested mpv playback,
keep their window's output awake. Moving the window moves the protection; pausing
or closing it releases protection and the normal idle countdown resumes. Minimized
windows, disabled scene nodes, and windows off the current workspace are ignored.
An already active saver on the playback output is dismissed. Explicit activation
and lock requests still take precedence until user input resumes.
This follows application keep-awake requests, not video frame analysis. Players
that do not use Wayland idle inhibition cannot be detected this way. Applications
may also use inhibitors for non-video tasks. The window's primary output is used;
a window spanning multiple monitors does not inhibit every intersected monitor.
The manager uses ext-idle-notify v2's input-only notification to avoid one video
inhibiting idle detection across all monitors. With protocol v1 it falls back to
the old notification and logs a warning about the focused output also staying awake.
IPC diagnostic: `oledsaver/idle_inhibitors` returns `{"outputs":["DP-2"]}`.
Manager logs contain per-output `video inhibition active/released` transitions.
Validation: build with `make -C files all`; the C regression test is
`tests/test-inhibition.c` (link with the same protocol sources and libraries as
`files/oledsaver.c`). This also verifies that repeated seat-wide idle/resume
events refresh only the focused output, preserving other outputs' idle deadlines.
Live mpv tests covered playback on DP-1, moving to DP-3,
pause, resume, and preserving an existing DP-2 inhibitor throughout.
|