Discussion:
Weston compositor sleep from wayland client
n***@codeaurora.org
2018-09-12 12:37:41 UTC
Permalink
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?


Thanks,
Namit
Ucan, Emre (ADITG/ESB)
2018-09-12 12:47:09 UTC
Permalink
Hi,

I think it is not possible without modifications.

You have to develop your own wayland procotol extension. Then, you have to implement it in weston and your application.

Best regards

Emre Ucan
Engineering Software Base (ADITG/ESB)

Tel. +49 5121 49 6937
-----Original Message-----
Sent: Mittwoch, 12. September 2018 14:38
Subject: Weston compositor sleep from wayland client
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?
Thanks,
Namit
_______________________________________________
wayland-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Pekka Paalanen
2018-09-12 13:08:50 UTC
Permalink
On Wed, 12 Sep 2018 18:07:41 +0530
Post by n***@codeaurora.org
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
n***@codeaurora.org
2018-09-13 05:02:52 UTC
Permalink
Post by Pekka Paalanen
On Wed, 12 Sep 2018 18:07:41 +0530
Post by n***@codeaurora.org
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
Pekka Paalanen
2018-09-13 11:07:12 UTC
Permalink
On Thu, 13 Sep 2018 10:32:52 +0530
Post by n***@codeaurora.org
Post by Pekka Paalanen
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.
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?
Yes, if you do what I wrote about "write a new Wayland extension" above.

Also, it should not be exposed to all clients. It is what one would
call "compositor UI" or "desktop environment UI". Clients providing
such UI receive special permissions from the compositor, because nobody
wants arbitrary clients to be able to mess up their desktop at will.
But, if this is aiming for a closed system where all clients are
trusted, things could be different.


Thanks,
pq

Loading...