RFC: idle protocol

Auke Booij auke at tulcod.com
Wed Dec 9 05:58:08 PST 2015


On 9 December 2015 at 07:43, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Wed, Dec 09, 2015 at 08:17:40AM +0100, Martin Graesslin wrote:
>> On Wednesday, December 9, 2015 4:19:12 PM CET Peter Hutterer 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)
>> > >
>> > > <?xml version="1.0" encoding="UTF-8"?>
>> > > <protocol name="idle">
>> > >
>> > >   <copyright><![CDATA[
>> > >
>> > >     Copyright (C) 2015 Martin Gr????lin
>> > >
>> > >     This program is free software: you can redistribute it and/or modify
>> > >     it under the terms of the GNU Lesser General Public License as
>> > >     published by
>> > >     the Free Software Foundation, either version 2.1 of the License, or
>> > >     (at your option) any later version.
>> > >
>> > >     This program is distributed in the hope that it will be useful,
>> > >     but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > >     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > >     GNU Lesser General Public License for more details.
>> > >
>> > >     You should have received a copy of the GNU Lesser General Public
>> > >     License
>> > >     along with this program.  If not, see <http://www.gnu.org/licenses/>.
>> > >
>> > >   ]]></copyright>
>> > >   <interface  name="org_kde_kwin_idle" version="1">
>> > >
>> > >       <description summary="User idle time manager">
>> > >
>> > >         This interface allows to monitor user idle time on a given seat.
>> > >         The interface allows to register timers which trigger after no
>> > >         user activity was registered on the seat for a given interval. It
>> > >         notifies when user activity resumes.
>> > you need to describe what classifies as "user activity".
>>
>> something like "after no input events with a new timestamp"? I'm always bad at
>> writing documentation ;-)
>
> yeah, but you'll need to figure out what you want too. does this include
> input events as seen on the protocol, as handled by the compositor, does it
> include input events not otherwise handled as input (e.g. lid switch), etc.
> it's a lot easier to bike-shed when these things are already filled in :)

(apologies for bike-shedding ahead of time)

I don't think you'll want to specify it in any of these terms. With
our increasingly sensitive devices, it is not unthinkable that future
devices will have a sensor to detect user activity: e.g. whether a
person is looking at the screen. This is not futuristic: for example,
some cars already have eye trackers that detect driver fatigue and
distraction (which could be one way to define "user activity").
Similarly, some smartphones have login by face recognition - so surely
they can also detect a reasonable notion of "user activity" with the
same mechanism.


More information about the wayland-devel mailing list