cage-kiosk / cage

A Wayland kiosk
https://www.hjdskes.nl/projects/cage
MIT License
1.24k stars 79 forks source link

DPMS #245

Open nicoske opened 2 years ago

nicoske commented 2 years ago

Is there a way to issue DPMS using a CLI tool or an API call such as with sway: swaymsg output * dpms toggle The goal here is to schedule a DPMS to save energy out of business hours.

primeroz commented 1 year ago

I am very interested in this too

brianmay commented 1 year ago

I think this is suppose to be done with wlr-randr but see #211

brianmay commented 1 year ago

I had high hopes when I saw https://github.com/lilydjwg/dpms-off but seems cage doesn't implement zwlr_output_power_manager_v1.

emersion commented 1 year ago

Yeah, to implement this feature we need to add support for the wlr-output-power-management protocol.

joggee-fr commented 1 year ago

Yeah, to implement this feature we need to add support for the wlr-output-power-management protocol.

@emersion Does implementing on and off states of wlr-output-power-management mainly consist in calling wlr_output_enable() (and saving the new output configuration)? If so, it seems a bit a duplicate of the enabled field in the output configuration of wlr-output-management procol. Isn't it?

emersion commented 1 year ago

It's a bit different: disabling an output via wlr-output-management removes it from the output layout, making it as-if it never existed from the PoV of regular Wayland clients. OTOH, powering off an output via wlr-output-power-management keeps the output in the output layout, and doesn't evict any window from it nor re-arrange surfaces.

joggee-fr commented 1 year ago

It's a bit different.

Thanks for the clarification.

batonac commented 1 year ago

I'd like to implement an activity based timeout/sleep in my scenario. Is this the ticket to track all power management capabilities, or is this for scheduling sleep specifically?

emersion commented 1 year ago

We have support for the KDE idle protocol already, so e.g. swayidle can detect inactivity (we should migrate to the standard idle-notify protocol, since KDE idle is deprecated).

batonac commented 1 year ago

Thanks. Anything special required for swayidle? Could anyone share a sample working config?

achernya commented 2 weeks ago

I wanted to check in if there was any suggestions on how to put a display to sleep when idle when using cage? I see swayidle works, and I can turn the backlight of my LCD on/off using it, but I can still see the display is not fully off a la DPMS when this happens. I'm using an older cage (0.1.4 from debian bullseye) but from looking at the commits for 0.2.0 there's still no support for wlr-output-management / wlr-output-power-management?

I'm not familiar with wlroots/wayland development, but if there are pointers on how to contribute such a thing I could potentially take a look.

brianmay commented 2 weeks ago

I was under the impression this should be implemented now. https://github.com/cage-kiosk/cage/pull/263

But I haven't tried to use it.

emersion commented 2 weeks ago

wlr-output-power-management is different from wlr-output-management.

brianmay commented 2 weeks ago

For some reason I thought wlr-output-power-management was implemented also, but I can't see any reference to that anymore.

So maybe I was confused.