Re: Weird mouse behaviour

From: Michael Gmelin <freebsd_at_grem.de>
Date: Mon, 27 Apr 2020 17:45:59 +0200
On Mon, 27 Apr 2020 17:06:28 +0200
Malcolm Matalka <mmatalka_at_gmail.com> wrote:

> Michael Gmelin <freebsd_at_grem.de> writes:
> 
> >
> > Could you share your setup by running
> >
> >   pkg install ca_root_nss
> >   fetch \
> >   https://raw.githubusercontent.com/grembo/xorg-udev-setup-check/master/xorg-udev-setup-check.sh
> >   ./xorg-udev-setup-check.sh -desk
> >
> > and mailing the resulting file to the list (or just me directly)?  
> 
> I ran this and emailed results to Michael.  I fixed the issues it
> brought up and, tada, it's working.
> 
> One thing I'm not sure about is: how do I persist the changes?  I have
> done:
> 
> xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping
> Enabled" 1
> 
> xinput --set-prop "SynPS/2 Synaptics TouchPad" "libinput Accel Speed"
> 0.3
> 

There are two fundamental ways:

  1. Place a configuration file in /usr/local/etc/X11/xorg.conf.d
  2. Add the xinput commands to ~/.xinitrc

I usually go with option 2 these days whenever possible (unless it's
something that can only be done in Xorg's configuration files).

So a typical ~/.xinitrc would look like this:

    setxkbmap -model pc105 -layout de
    xmodmap $HOME/.Xmodmap
    xinput --set-prop "xyz" "0 0 0"
    xsetroot ...
   /path/to/my/windowmanager

You can find the one I used a few years ago here as an example:
https://blog.grem.de/pages/t470s.html#my-home-xinitrc

That way it's also part of my home directory and I can easily take
it to another machine. It also means I don't change Xorg's default
configs directly, which makes updating easier.

The best part is, that once I found the right tweak, I can simply copy
and paste the command that fixed the issue in there and call it a day.
And if anyone asks for help, I can consult my ~/.xinitrc and ask them
to execute the commands to test if it fixes their ache - which is easier
and often doesn't require to restart X.

> But these names don't seem to directly correspond to names in man 4
> libinput.  Why the difference?

That's kind of an upstream question, but you can see at least where
it's done it in the source of xf86-input-libinput[0]. Basically it's
done that way for pragmatic reasons (unifying xf86 input section config
vs xinput ABI would probably violate the Pareto principle).

It's a bit confusing, but as most things that you can configure and
their current configuration vales can be seen and tweaked by calling
xinput on the command line, I barely visit that man page. One more
reason why I tweak these things in ~/.xinitrc.

> 
> I also noticed in xorg logs:
> 
> [    34.491] (EE) event6  - SynPS/2 Synaptics TouchPad: kernel bug:
> Touch jump detected and discarded. See
> https://wayland.freedesktop.org/libinput/doc/1.15.5/touchpad-jumping-cursors.html
> for details [    34.491] (EE) event6  - SynPS/2 Synaptics TouchPad:
> WARNING: log rate limit exceeded (5 msgs per 7200000ms). Discarding

That's to be expected and can be ignored, unless you notice any
usability problems.

Cheers,
Michael

[0]
cd /usr/ports/x11-drivers/xf86-input-libinput
make patch
cd work/xf86-input-libinput*

see src/xf86libinput.c and include/libinput-properties.h

-- 
Michael Gmelin
Received on Mon Apr 27 2020 - 13:46:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:23 UTC