Weston compositor sleep from wayland client

nsolanki at codeaurora.org nsolanki at codeaurora.org
Thu Sep 13 05:02:52 UTC 2018


On 2018-09-12 18:38, Pekka Paalanen wrote:
> On Wed, 12 Sep 2018 18:07:41 +0530
> nsolanki at codeaurora.org wrote:
> 
>> Hi Wayland/Weston team,
>> 
>> 
>> I am working on weston 3.0.
>> 
>> I am trying to put weston on WESTON_COMPOSITOR_SLEEPING state.
>> 
>> Basically, I want to do this from client side (from wayland app).
>> 
>> I want to turn off display from application side.
>> 
>> Can you please help me how this can be achieved ?
>> 
>> Can I modify any of existing client apps (weston-flower,
>> weston-simple-egl etc) to achieve this functionality?
> 
> Hi,
> 
> there is no existing way to do that through Wayland. You could force a
> VT-switch away, that should put Weston to SLEEPING.
> 
> You could write a new Wayland extension, implement it in Weston and
> your app, and control the compositor state that way. However, generally
> it is a bad idea to let arbitrary clients freeze the compositor, but
> you could restrict it to a specific special client.
> 
> Why do you want to put Weston to SLEEPING? What would wake it up?
> 
> 
> Thanks,
> pq


Hi ,

Thanks for your response.

I am trying a similar functionality of "Sleep" as provided by Windows 
Operating system. Clicking "Sleep" option with the help of mouse turns 
display in sleeping state or else pressing the power button should put 
display to sleep state.

To wake, mouse should be clicked or a power button should be pressed.

In Current weston code, I see idle-time is default to 300 seconds, after 
300 seconds, compositor is in WESTON_COMPOSITOR_SLEEPING state, and 
touching the display panel wakes it up puts compositor to 
WESTON_COMPOSITOR_ACTIVE state.

Can a "Sleep" functionality similar to Windows operating system be 
implemented on Wayland Clients?


Thanks,
Namit


More information about the wayland-devel mailing list