[PATCH libinput] udev: add quirk for Chalkboard Electronics HID Touchscreen

Peter Hutterer peter.hutterer at who-t.net
Mon Sep 25 06:18:20 UTC 2017


On Fri, Sep 22, 2017 at 11:07:50AM +0200, Hans de Goede wrote:
> Hi,
> 
> On 21-09-17 16:00, Matt Porter wrote:
> > On Thu, Sep 21, 2017 at 10:59:08AM +0200, Hans de Goede wrote:
> > > Hi,
> > > 
> > > On 19-09-17 18:41, Matt Porter wrote:
> > > > The Chalkboard Electronics HID Touchscreen is classified as
> > > > a tablet device by systemd udev because it has BTN_TOOL_PEN
> > > > support. It also reports a resolution of 0 for both X and Y
> > > > axes in absinfo. This causes libinput to reject it as an
> > > > invalid tablet device.
> > > > 
> > > > This quirk reclassifies the device as a touchscreen which
> > > > allows it to be added as a valid input device.
> > > > 
> > > > Signed-off-by: Matt Porter <mporter at konsulko.com>
> > > 
> > > Have you considered adding special handling for this device
> > > to the kernel's hid drivers ? The hid subsys has sub drivers
> > > for device specific handling and if the device never actually
> > > has a pen, then the right fix would be to not make the kernel
> > > export this. Note I assume this is for a so called
> > > "smart" whiteboard for in classes ? If that is the case then
> > > the device may actually have a pen/stylus like device in
> > > some configuration. Some of these smart boards have what
> > > are basically empty whiteboard-marker in multiple colors
> > > and the device may report these as different styluses ...
> > 
> > I hadn't really considered that since this userspace fixup
> > basically follows the pattern I see for other devices in
> > systemd's hwdb.
> 
> In this case (exporting a wrong event capability) a kernel fix
> seems more appropriate to me. In general we try to fix things
> as early in the chain as possible. hwdb quirks are more for
> things like: Yes this device supports semi-mt and the kernel
> exports that info, but the semi-mt coordinates are so unreliable
> that we really should just treat it as a single touch device.

note that there are two hwdb's (well, for this discussion anyway). One is
shipped with systemd and one with libinput. The latter is the one you refer
to and refers largely to behaviours that matter for a specific device. Then
there's the 60-evdev.hwdb which is the one that fixes the various absinfo
ranges. That's a lot easier to deal with than playing whack-a-model with
the kernel (and Dmitry prefers it that way to iirc).

> Anyways this is just my 2 cents, Peter what do you think,
> kernel fix or hwdb ?

If this was a pure absinfo issue, it'd be a hwdb fix and done. Because it's
exporting bits it shouldn't have, a kernel fix is preferable because
there's no way we can fix this in userspace and every client would have to
implement the same hacks to handle this device correctly.

Cheers,
   Peter

> 
> > Just to clarify, these are not "smartboard"
> > style devices. They are typical 7-14" touchscreen displays
> > with HDMI/USB interface from https://www.chalk-elec.com/
> 
> Ok, that is good to know, really weird the export a
> BTN_TOOL_PEN then.
> 
> Regards,
> 
> Habs
> 
> 
> > 
> > The updated patch for this is at
> > https://github.com/systemd/systemd/pull/6880 based on Peter's
> > earlier comments. It could be solved in the kernel as you
> > suggest, however it appears that usually that approach is for
> > very different hid devices with custom protocols (e.g.
> > logitech-hidpp). I could suppress the pen tool and update absinfo
> > in a hid-chalkboard.c if that's preferred. There could be an
> > advantage here for those that aren't using systemd udev.
> > 
> > -Matt
> > 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list