[PATCH] libinput-seat: Don't regard no input devices as failure

Sjoerd Simons sjoerd.simons at collabora.co.uk
Fri Jan 2 04:24:36 PST 2015


On Fri, 2015-01-02 at 13:34 +0200, Pekka Paalanen wrote:
> On Tue, 30 Dec 2014 17:19:45 +0000
> Daniel Stone <daniel at fooishbar.org> wrote:
> 
> > Hi,
> > 
> > On 29 December 2014 at 00:03, Peter Hutterer <peter.hutterer at who-t.net>
> > wrote:
> > 
> > > On Sun, Dec 28, 2014 at 11:25:16PM +0100, Sjoerd Simons wrote:
> > > > The reason for not having any input devices could actually be that there
> > > > are no input devices attached, imagine that. Mention that cause in the
> > > > warning and no longer return an error.
> > > >
> > > > This fixes starting weston on boards with no input devices attached.
> > > >
> > > > Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
> > >
> > > Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
> > >
> > > though I'd use "available" over "attached" which is less ambiguous in
> > > a multi-seat scenario.
> > >
> > 
> > It'd be nice to distinguish between 'devices are available but could not be
> > opened', and no devices whatsoever. In either case, we made Xorg require an
> > option (AllowEmptyInput) to start with no devices, and I guess it could be
> > nice to do the same for weston-launch.
> 
> Yes, definitely.
> 
> I believe it is a relatively common user error in installation or
> configuration to not be able to open any input devices when they do
> exist. 

Note that the patch is for weston to make the drm backend not simply
abort.. Not for weston-launch to abort on odd/incorrect configurations.
So what is suggested here would be for another patch, not a change to
this one.

> When that happens, the user is left with a completely
> unresponsive computer, except maybe the ACPI power button for a
> controlled shutdown. Yes, remote access too, but only if you happen to
> have it.

> Some way to avoid that accident by default would be nice. It is in the
> same fashion as we have some other checks to avoid e.g. "black screen"
> symptoms and prefer exiting with a message.

Under the assumption that weston-launch is a tool for developers to
start weston, then sure fine. If weston-launch gets used to autostart
weston on bootup (as i'm doing in some cases), that behaviour is
horrible.

Apart from blatent configuration issues there can be a lot of reasons
why there are no input devices available at the time weston start,
which can range from devices not being plugged in to devices not being
enumerated yet (which can potentially happen with USB input devices,
but are a lot more likely with bluetooth devices).. In those cases
it's a lot more user-friendly to display an onscreen message indicating
there are no input devices instead of simply aborting.


-- 
Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Collabora Ltd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6170 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150102/3dee7a36/attachment.bin>


More information about the wayland-devel mailing list