Input device to weston after start

Peter Hutterer peter.hutterer at who-t.net
Sun Dec 6 16:12:35 PST 2015


On Fri, Dec 04, 2015 at 05:25:35PM +0200, Pekka Paalanen wrote:
> On Fri, 4 Dec 2015 08:04:55 +0000
> "Keskinarkaus, Teemu" <Teemu.Keskinarkaus at Maximatecc.com> wrote:
> 
> > Hi,
> > 
> > I have a HW with touchscreen that is connected to serial port. I'm
> > using inputattach to attach the touch to Linux input system. After
> > that I start Weston and touch works just fine.
> > 
> > Problem now is that the inputattach takes some time to find/install
> > the touch device and if I start Weston before that the touch won't
> > work. This causes delay at startup that now is wanted to be
> > eliminated. I think the delay in adding the touch device comes from
> > kernel side so I'm not willing to touch to that if possible to avoid.
> > 
> > Question now is that is it possible to add input devices to Weston
> > _after_ it's been started? If so, then how to do it? Simply adding
> > the device the kernel input system doesn't automatically make it
> > visible in Weston. Ie. if in my case the inputattach is started after
> > Weston is started, the touch won't start working.
> 
> AFAIK Weston is listening on udev events and should be opening input
> devices as they appear. Perhaps you could compare what happens when
> hotplugging a normal keyboard or mouse vs. starting inputattach?
> 
> I suppose one would check if there are any udev events from that, does
> Weston see them and if so, does something in Weston reject the device,
> or is Weston never notified about it.

Weston doesn't handle this directly, libinput handles this transparently.
But since the code is effectively the same for devices seen at startup vs
devices hotplugged it's a bit odd that there is a difference.

Teemu: please file a bug against libinput and attach the udevadm info
output for the device. Run libinput-debug-events and check if the
DEVICE_ADDED event appears after you run inputattach.

Cheers,
   Peter


More information about the wayland-devel mailing list