wlr output power management

控制输出的电源管理模式

此协议允许客户端控制当前 compositor 空间中输出的电源管理模式。其目的是允许特殊客户端(如桌面 shell)在系统空闲时关闭输出。

要修改当前不在 compositor 空间中的输出,请参阅 wlr-output-management。

警告!此文件中描述的协议是实验性的,可能会进行不兼容的更改。兼容的更改可以与相应的接口版本递增一起添加。 不兼容的更改通过递增协议和接口名称中的版本号并重置接口版本来完成。 一旦协议宣布为稳定,协议和接口名称中的 'z' 前缀和版本号将被移除,接口版本号将被重置。

创建每输出电源管理的管理器

此接口是一个管理器,允许创建每输出的电源管理模式控制。

get_output_power(id: new_id<zwlr_output_power_v1>, output: object<wl_output>)
参数
类型
描述
idnew_id<zwlr_output_power_v1>
outputobject<wl_output>
获取输出的电源管理

创建一个输出电源管理模式控制,可用于调整给定输出的电源管理模式。

destroy()
销毁管理器

管理器创建的所有对象将保持有效,直到调用相应的销毁请求。


调整输出的电源管理模式

此对象提供设置输出电源管理模式的请求。

参数
类型
描述
modeuint<zwlr_output_power_v1.mode>
the power save mode to set
设置输出的省电模式

将输出的省电模式设置为给定模式。模式更改立即生效。如果输出不支持给定模式,将发送 failed 事件。

destroy()
销毁此电源管理

销毁输出电源管理模式控制对象。

参数
类型
描述
modeuint<zwlr_output_power_v1.mode>
the output's new power management mode
报告电源管理模式变更

报告输出的电源管理模式变更。

mode 事件在输出更改其电源管理模式后发送。原因可能是客户端使用了 set_mode,或 compositor 决定更改输出的模式。 此事件也会在对象创建时立即发送,以便客户端了解当前的电源管理模式。

failed()
对象不再有效

此事件表示输出电源管理模式控制不再有效。这可能由多种原因导致,包括:

  • 输出不支持电源管理
  • 另一个客户端已经拥有该输出的独占电源管理模式控制
  • 输出消失

收到此事件后,客户端应销毁此对象。

mode { off, on } 
参数
描述
off0
输出已关闭
on1
输出已开启,无省电
error { invalid_mode } 
参数
描述
invalid_mode1
不存在的省电模式

合成器支持

Cage
Cage
0.2.0
COSMIC
COSMIC
1.0.0~beta.8
GameScope
GameScope
3.15.14
Hyprland
Hyprland
0.52.1
Jay
1.12.0
KWin
KWin
6.6
Labwc
Labwc
0.9.2
Louvre
Louvre
2.14.1
Mir
Mir
2.26
Muffin
Muffin
6.6.0
Mutter
Mutter
49.2
niri
niri
25.11
phoc
phoc
0.52
river
river
0.3.13
Sway
Sway
1.11
Treeland
Treeland
0.8.0
Wayfire
Wayfire
0.9.0
Weston
Weston
14.0.2
zwlr_output_power_manager_v1
x
1
x
1
x
x
1
x
x
x
x
x
1
1
1
1
1
x

Copyright © 2019 Purism SPC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Footer

© 2026 Wayland Explorer

本网站与 Wayland 官方项目无任何关联。网站所有内容均根据 Wayland 协议 XML 文件自动生成。

本网站使用的 Visual Studio Code - Codicons 遵循 CC BY 4.0 许可。