Synaptics natural scrolling results inconsistent scroll direction

Hi,

I've found this review: Add natural scrolling support to psm. So I went ahead and added natural scrolling in /etc/sysctl.conf:
Code:
# Enable naturall scrolling on Synaptics touchpads
hw.psm.synaptics.natural_scroll=1

It works, however occasionally the scrolling direction is reversed then goes back to "natural scrolling" mode again. Is there anything else, that I potentially have to configure in moused or Xorg to get rid of this behavior?

I have moused running with a couple of additional flags:
Code:
/usr/sbin/moused -F 200 -A 1.5,2.0 -a 0.6 -r high -p /dev/psm0 -I /var/run/moused-psm0.pid

And I also configured the same refresh rate in /etc/X11/xorg.conf:
Code:
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
        Option      "SampleRate" "200"
EndSection

/Thanks!
 
i think the problem is from the moused parameters, try to remove all parameters. I got same problem before when I set some psm parameter with moused or in loader.conf ,remove hints about psm.
 
What about just using xmodmap

create an ~/.xmodmap file

Bash:
echo 'pointer = 1 2 3 4 5 6 7 8 9 10' > ~/.xmodmap

then run xmodmap

Bash:
xmodmap ~/.xmodmap

or if you can reverse the scrolling direction
Bash:
echo 'pointer = 1 2 3 5 4 6 7 8 9 10' > ~/.xmodmap2

then run xmodmap

Bash:
xmodmap ~/.xmodmap2
 
Xorg is now using libinput for input handling. This is probably why sysctl does not work anymore? It is worth mentioning that libinput debug-events shows all sorts of gestures like two finger horizontal and vertical scrolling as well as pitch, etc :)

Update: I did find a way to configure libinput directly and this is the only sensible place to configure NaturalScroll as all other places will keep scroll/zoom inconsistent - some applications will scroll up some down etc. Use this to setup only Touchpad and you can still use your mouse as you like.

Code:
/usr/local/share/X11/xorg.conf.d/40-libinput.conf:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event5"
        Option "NaturalScrolling" "on"
        Option "Tapping" "on"
        Option "ClickMethod" "clickfinger"
        Driver "libinput"
EndSection
 
Last edited:
  • sysrc moused_flags+=" -l 2"
  • Read pkg info -D xorg-server and add kern.evdev.rcpt_mask=6 to sysctl.conf(5) (and of course service moused restart)
  • Remove any custom configuration in /usr/local/etc/X11/Xorg.conf.d except those that you really understand. Better let Xorg(1)'s automagic do it's job.
  • Likewise, any customization in your .dot files may interfere... Back them up and only enable what the automagic can not solve to your satisfaction.
  • Instead of fiddling around with sysctl(8) knobs for the psm(4) driver, use a graphical config tool (e.g. KDE) to configure the touchpad. I.e. all you need is hw.psm.synaptics_support="1" and hw.psm.trackpoint_support="1" in loader.conf(5)
 
Standard disclaimer:
  • install the docs: pkg install {de,en}-freebsd-doc, replace de with your native tongue, and point your favorite browser to /usr/local/share/doc/freebsd.
  • You may want to add message: "query '[%C/%n] %M'", to the ALIAS section of /usr/local/etc/pkg.conf, then read through all pkg message|less and apply the requested settings.
  • Instead of less(1), you may find sysutils/most more user-friendly. Beginners will prefer edit(1) (ee(1)), editors/aee or editors/nano over the old-school, UNIX'ish vi(1) (wizzard's choice ;) ).
  • The utilities sysutils/psearch or sysutils/portfind will help you to find available software in the ports(7) tree.
  • ports-mgmt/octopkg is a user-friendly graphical frontend to the pkg-ng package manager. It uses the Qt toolkit and runs on every GUI. AFAIK there is no Gtk-based counterpart
  • Use sysrc(8) to safely edit system rc(8) files instead of editing rc.conf(5). It does some checks to prevent typos, and allows for advanced tricks like sudo sysrc moused_flags+=" -l 2" (note the space).
 
Back
Top