RFC: idle protocol

Michal Suchanek hramrach at gmail.com
Wed Dec 9 01:45:15 PST 2015


On 9 December 2015 at 08:12, Martin Graesslin <mgraesslin at kde.org> wrote:
> On Tuesday, December 8, 2015 2:59:38 PM CET Bryce Harrington wrote:
>> On Tue, Dec 08, 2015 at 02:12:01PM +0100, Martin Graesslin wrote:
>> > Hi Wayland-developers,
>> >
>> > at KDE we developed a protocol for our framework kidletime [1]. The idea
>> > is to notify Wayland clients when a wl_seat has been idle for a specified
>> > time. We use this for example for power management, screen locking etc.
>> > But a common use case is also setting a user as away in a chat
>> > application.
>> >
>> > We think that this protocol can be in general useful for all Wayland based
>> > systems. Our current protocol is attached to this mail. Of course for
>> > integration into wayland protocols the namespace needs adjustments (I'm
>> > open for suggestions).
>> >
>> > The reference implementation of the protocol can be found in the KWayland
>> > repository (client at [2], server at [3]).
>> >
>> > Best Regards
>> > Martin Gräßlin
>> >
>> > [1] http://inqlude.org/libraries/kidletime.html
>> > [2] git://anongit.kde.org/kwayland (path src/client/idle.h and src/client/
>> > idle.cpp)
>> > [3] git://anongit.kde.org/kwayland (path src/server/idle_interface.h and
>> > src/ server/idle_interface.cpp)
>>
>> Hi Martin, thanks for proposing this protocol.  You may have seen the
>> screensaver inhibition protocol proposed recently[1];
>
> no I hadn't seen this and I'm slightly surprised about a screensaver
> inhibition as that is IMHO a solved problem on DBus level - both on the
> org.freedesktop.ScreenSaver as well on
> org.freedesktop.PowerManagement.Inhibit.

This is IMHO not a solution but another problem to work around.

When an application requests screensaver inhibition over DBus you have
its DBus address but not its window ID so you have no idea on which
screen the window is displayed or if it is displayed at all. IIRC
Wayland has some sort of ping protocol to determine if an application
that created a window is responsive. So the compositor can deny the
inhibit request when the application stops responding or ceases to be
visible and it can point to the window that inhibits the screensaver
when the user asks for that.

IIRC there is no global window ID space shared between compositor and
all clients so it is not possible to send a window ID over DBus. Even
if it was it's no longer desktop-agnostic. Without that you get into
the situation that your screensaver does not save screen but you have
no idea why.

Thanks

Michal


More information about the wayland-devel mailing list