Solved Confusion about synaptics

jbo@

Developer
I'm a bit confused regarding synaptics. I setup FreeBSD 13.0 on a Lenovo ThinkPad P2000. While the touchpad worked out-of-the-box, I did want to tweak some values such as turning on palm detection. Therefore, I started looking around.

I found these two things:
Both of these resources talk about modifying the Xorg config.
The synaptics(4):
SYNOPSIS
Section "InputDevice"
Identifier "devname"
Driver "synaptics"
Option "Device" "devpath"
Option "Path" "path"
...
EndSection

The wiki page:
To enable psm(4) Synaptics support, add the following line to /boot/loader.conf



hw.psm.synaptics_support="1"

Enable moused(8). Add the following to /etc/rc.conf



moused_enable="YES"

To use it within X.Org, disable the X.Org-specific Synaptics driver, and configure a sysmouse mouse. Here's an example section for /etc/X11/xorg.conf



Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection
So one specifically talks about specifying synaptics in the config, while the other seems to be more generic.
Furthermore, the wiki page talks about tweaking values using sysctl.

So what's up with that? Are these different approaches or am I misunderstanding something? Which one am I supposed to use (on FreeBSD 13.0)?
I'm extra confused by the fact that the wiki page talks about moused. I somehow have on the back of my mind that FreeBSD 13.0 "replaced" moused with something else ( evdev)?
 
Yes. Libinput though is mainly targeted at Wayland. It is a standard component used by many Wayland compositors.

The reason why is simple: under X11 the handling of the hardware is done by the X server. So if you switch between DEs/window managers, the handling of the hardware is always the same.

Under Wayland though the handling of the hardware is done by the compositor - might it be Sway, Haraki or whatever. So in theory every compositor could implement its own input handling procedures.

To make writing compositors much easier, libinput was being introduced. It handles mouse and keyboard for Wayland, meaning most Wayland compositors are just using it nowadays for that task. So the vast majority of Wayland compositors nowadays just uses libinput for that task.

x11/libinput then is just a small wrapper around what libinput does internally. And since it is well maintained enough and contains many drivers from X11, which were before being split apart projects, it replaced many drivers for X11.

One exception is Wacom, because Wacom still maintains their X11 drivers on their own.
 
In my experience: yes, give it a try. Many X drivers became quite stale lately in terms of development. Only few active remained, libinput is one of them.
 
For the past few days I have been successfully using libinput for the TouchPad, TrackPoint and the keyboard inputs.

Here's my config file /usr/local/etc/X11/xorg.conf.d/touchpad.conf:
Code:
Section "InputClass"
    Identifier "libinput touchpad catchall"
    Driver "libinput"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Option "AccelSpeed" "0.5"
    Option "ClickMethod" "clickfinger"
    Option "DisableWhileTyping" "on"
    Option "HorizontalScrolling" "on"
    Option "LeftHanded" "off"
    Option "NaturalScrolling" "off"
    Option "ScrollMethod" "twofinger"
    Option "Tapping" "on"
    Option "TappingDrag" "on"
    Option "TappingDragLock" "off"
EndSection

For me personally the most important option is DisableWhileTyping as otherwise (by default) the touchpad does still fire inputs while typing which can lead to nasty situations when the palms of my/your/the hands come close to it.

Thanks for the help!
 
  • Thanks
Reactions: a6h
Back
Top