[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: synaptics vs libinput and GNOME 3.20 no longer supporting synaptics



[Disclaimer: I'm jumping in because of the LWN quote of the week and I'm
just reconstructing the emails from the archives, I'm not subscribed.
Apologies if the thread breaks or any other side effects. Please keep me in
CC]

On Tue, Jul 12, 2016 at 09:36:16AM +1000, Russell Stuart wrote:
> On Mon, 2016-07-11 at 23:51 +0200, Raphael Hertzog wrote:
> > Well, if some KDE/XFCE/etc. packages work only with synaptics and not
> > with libinput, then we should get those packages updated to depend on
> > xserver-xorg-input-synaptics, no?
> 
> I don't know about KDE/XFCE, but in the etc category is LXDE, and it
> works with both.  I'd be surprised if KDE and XFCE didn't work with
> both too as libinput and synaptics are drivers, and as such are hidden
> by the X API these window managers use.  The surprising thing for me is
> GNOME evidently isn't using the X API, but instead talking to the
> driver directly.

You're misinterpreting things here. GNOME is using the X device property API
to talk to the driver - the same way as it does for synaptics or anything
else. The property API is a generic key/value API (see XIChangeProperty) and
when you set properties you have to know which format to set. It's the same
API the xinput tool uses (and synclient, syndaemon, xsetwacom, etc.)

The reason why supporting both drivers is because the properties are highly
driver specific. If you want to enable tap-to-click on synaptics, you need
to set the fifth, sixth and seventh byte of the "Synaptics Tap Action"
property to 1, 3 and 2, respectively. This is exactly what g-s-d and any
other config tool did before.

libinput has different configuration options. We discussed making it 1:1
compatible but it was deemed impossible, especially given how little benefit
we would get from it. So xf86-input-libinput's properties are different -
e.g. tapping is enabled by setting the boolean "libinput Tapping Enabled"
property to 1.

also note: xf86-input-libinput is the X driver that wraps "libinput the
library", we tend to use the two interchangably though, especially in the X
context. the X driver has very little functionality beyond mapping between X
and libinput APIs.

> In my case, the thing that broke when xserver-xorg briefly switched to
> using libinput instead of synaptics wasn't LXDE, it was me.  The
> reasons are spelled out in the bug that was filed when the change was
> made:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822835
> 
> Briefly: synaptics is much better touchpad driver than libinput.
> Libinput treats a touchpad as a mouse.  Modern MAC like touchpads are
> great input devices, but when you strip them of multitouch and gesture
> recognition they become so unwieldly people give up and plug in a real
> mouse.

That statement is false. We have plenty of documentation online that
explains what we do with touchpads.
https://wayland.freedesktop.org/libinput/doc/latest/touchpads.html
The only features I can think of that definitely don't work anymore are
circular scrolling and corner tapping. I think everything else is supported,
albeit not always in exactly the same manner as synaptics did. Tapping,
two-finger scrolling, edge scrolling, etc. they're all supported.
Speaking of gesture recognition: we have actual gesture recognition in
libinput, something synaptics never had (beyond two-finger scrolling).
See https://wayland.freedesktop.org/libinput/doc/latest/gestures.html

back to the bug:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822835

there are two components to this bug: one is that you're using synclient
which is a tool specifically written to interact with the synaptics driver.
Historical fact: it used to use shm to communicate with the driver before I
added the device properties to the server (~8 years ago). 
As an analogy: fsck.ext3 won't work on btrfs either.

syndaemon is the same, it monitors the events in the server and uses
synaptics-specific properties to disable the touchpad. This isn't needed
anymore in libinput and the equivalent disable-while-typing feature is
enabled by default.

The second component is that apparently tapping doesn't work when enabled.
That's most probably a bug, file one against libinput at
bugs.freedesktop.org and it'll get fixed.

Cheers,
   Peter


Reply to: