Configure touchpad for touchscreen driver

Martin Kepplinger martink at
Mon May 8 01:33:33 UTC 2017

Am 2017-05-08 um 02:40 schrieb Peter Hutterer:
> On Mon, May 08, 2017 at 10:39:32AM +1000, Peter Hutterer wrote:
>> On Fri, May 05, 2017 at 05:30:51PM +0200, Martin Kepplinger wrote:
>>> Hi,
>>> I'm doing a touchscreen xorg input driver. 
>> First question: why? :)
>> we generally discourage people from doing that, instead it's better to write
>> a kernel driver and use the existing evdev/libinput drivers.

I'm reviving / rewriting xf86-input-tslib, the main sources now living

With tslib, I *am* somewhat pushing towards having evdev kernel drivers.
(Sadly, there are *real* userspace drivers in tslib because there's no
proper driver, but I don't have the hardware to write them; even more
sadly, there are companies that still ship tslib drivers in their BSPs
instead of kernel drivers) but that's a different thing. tslib itself
lives at

So the real reason I need tslib is the filter stack and easy to use
graphical calibration (and the little dependencies and portability are a
bonus too).

All these "drivers" :) To me, xf86-input-tslib is no driver. tslib (or
the libts library) isn't either. It's either a userspace driver as tslib
module or a proper kernel driver. But, oh well :)

I'm getting off track here, but libinput is really interesting in that
it does gesture recognition too. Do you somehow sync that work with gtk+
or others who do that too?

>>> For testing purposes, I'd like to configure my laptop's touchpad for the
>>> driver to use. It's totally comparable and I've done it for other stuff
>>> for rough testing. I append the evtest output below. Should be fine.
>>> I'm unsure how to override all other touchpad configs in my system.
>>>  * is it enough to say "MatchIsTouchpad" instead of touchscreen? There's
>>> obviously only one touchpad. Ideally I think I should omit
>>> "MatchIsTouchpad" and say only "Device=/dev/input/event1" or whatever
>>> number it is? Would that be possible?
>> MatchIsTouchpad maps to the udev property ID_INPUT_TOUCHPAD, your homework
>> is to figure out what MatchIsTouchscreen maps to ;)
>> so doing that would be enough, but you could also add a
>> MatchProduct "ETPS/2 Elantech Touchpad" to only match on that touchpad.
>> Don't match on device nodes as they can change during reboots.
>>>  * My driver config installs to /usr/local/share/X11/... Will this
>>> *ever* override /usr/share/X11 configs? Even if I call it
>>> "00-mydriver.conf" in /usr/local/
>> the server is usually configured to look into /usr/share/X11/ and /etc/X11,
>> but not elsewhere. So anything you put in /usr/local is ignored. The start
>> of the xorg.log should list where the server is looking for configs.
>> for local configurations, you're supposed to put them into /etc/ anyway,
>> distribution-provided config snippets go into /usr/local.
> make that:
>     distribution-provided config snippets go into /usr/share.

Sure. thanks Peter for getting back at me. I actually had figured it out
and have a pretty nice dev setup.

> Cheers,
>    Peter

More information about the xorg mailing list