Subject: Libinput touchpad driver not taking precedence over synaptics

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Sat, 27 Apr 2019 17:19:16 +0200

On my Macbook the buggy synaptics driver gets used.  The definition of
%default-xorg-modules indicates libinputs is meant to be the default.

The bug appears to be described on the Arch wiki, I quote
<https://wiki.archlinux.org/index.php/Libinput#Via_Xorg_configuration_file>:

“Tip: If you have libinput and synaptics installed in parallel with
default configuration (i.e. no files in /etc/X11/xorg.conf.d for
either), synaptics will take precedence due to its higher numeric
order 70- in the default installation directory. To avoid this, you
can symlink the default libinput configuration (40-libinput.conf) to
/etc/X11/xorg.conf.d/ where directory search order precedence over
70-synaptics.conf will take place instead: […]”

The description on the Arch wiki matches the contents of
/gnu/store/q585is6vky5hldb4j878ihqn60j1214a-xorg.conf.d/70-synaptics.conf

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
[…]
EndSection

and of
/gnu/store/q585is6vky5hldb4j878ihqn60j1214a-xorg.conf.d/40-libinput.conf

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

and of /var/log/Xorg.0.log:

[   810.978] (II) config/udev: Adding input device bcm5974 (/dev/input/event12)
[   810.978] (**) bcm5974: Applying InputClass "evdev touchpad catchall"
[   810.978] (**) bcm5974: Applying InputClass "libinput touchpad catchall"
[   810.978] (**) bcm5974: Applying InputClass "touchpad catchall"
[   810.979] (**) bcm5974: Applying InputClass "Default clickpad buttons"
[   810.979] (**) bcm5974: Applying InputClass "Disable clickpad buttons on Apple touchpads"
[   810.979] (II) LoadModule: "synaptics"

Perhaps you could change the numbering.

Regards,
Florian