Skip to content

Conversation

@Bot-wxt1221
Copy link

@Bot-wxt1221 Bot-wxt1221 commented Dec 20, 2025

Almost #1108.

Rebase and resolve conflict.

I believe it's ready for review.

Still left a ton of problems.

It's impossible to implent multi displays because I haven't. 😅

Actually, niri hasn't been designed carefully to correctly handle disable some monitors.

@Bot-wxt1221 Bot-wxt1221 force-pushed the feat-wlr-output-power-management branch 2 times, most recently from 82500e2 to 1d91c70 Compare December 20, 2025 14:02
@Bot-wxt1221 Bot-wxt1221 marked this pull request as ready for review December 20, 2025 14:02
@Bot-wxt1221 Bot-wxt1221 force-pushed the feat-wlr-output-power-management branch 5 times, most recently from c208d0b to fb86a81 Compare December 21, 2025 09:07
This protocol allows external programs (e.g. wlopm) to control and query
the output power state (on/off).

In the current implementation, when the client sends a
`set_mode` request, the handler calls `activate_monitors()` or
`deactivate_monitors()` to set that state for all monitors. This
is probably simpler than adding full support for per-output power
management, and is good enough for the most common use cases like idle
screensavers.

The `output_power.mode` event is now emitted by `activate_monitors()`
and `deactivate_monitors()` when the state changes. A bit of a rewrite
was needed because the tty backend tries to activate monitors on resume,
but previously it wasn't calling `activate_monitors()` because it is
unable to provide a reference to the `Backend` that wraps it. I worked
around this by adding a second method that does not take a backend
parameter, instead assuming that the backend will take care of calling
itself.
@Bot-wxt1221 Bot-wxt1221 force-pushed the feat-wlr-output-power-management branch from fb86a81 to 88a46ba Compare January 1, 2026 14:24
Atan-D-RP4 added a commit to Atan-D-RP4/niri that referenced this pull request Jan 3, 2026
Adds per-output power control on top of PR YaLTeR#3077's global implementation:

- Add power_mode: Mode field to OutputState (defaults to On)
- Add set_output_power() method in TtyBackend following VRR pattern
- Block redraw when per-output power_mode is Off
- Update protocol handler to use per-output state instead of global monitors_active
- Global monitors_active still takes precedence (AND logic)
- activate_monitors() restores individual output power states

Fixes YaLTeR#108 with true per-output DPMS support.
Atan-D-RP4 added a commit to Atan-D-RP4/niri that referenced this pull request Jan 5, 2026
Adds per-output power control on top of PR YaLTeR#3077's global implementation:

- Add power_mode: Mode field to OutputState (defaults to On)
- Add set_output_power() method in TtyBackend following VRR pattern
- Block redraw when per-output power_mode is Off
- Update protocol handler to use per-output state instead of global monitors_active
- Global monitors_active still takes precedence (AND logic)
- activate_monitors() restores individual output power states

Fixes YaLTeR#108 with true per-output DPMS support.
Atan-D-RP4 added a commit to Atan-D-RP4/niri that referenced this pull request Jan 8, 2026
Adds per-output power control on top of PR YaLTeR#3077's global implementation:

- Add power_mode: Mode field to OutputState (defaults to On)
- Add set_output_power() method in TtyBackend following VRR pattern
- Block redraw when per-output power_mode is Off
- Update protocol handler to use per-output state instead of global monitors_active
- Global monitors_active still takes precedence (AND logic)
- activate_monitors() restores individual output power states

Fixes YaLTeR#108 with true per-output DPMS support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants