Page MenuHomeFreeBSD

PSM / Synaptics Touchpad detection fix
ClosedPublic

Authored by tomek_cedro.info on Feb 5 2021, 3:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 8:26 PM
Unknown Object (File)
Sat, Nov 9, 2:29 AM
Unknown Object (File)
Thu, Oct 31, 8:52 PM
Unknown Object (File)
Sat, Oct 26, 11:11 PM
Unknown Object (File)
Sun, Oct 20, 11:03 AM
Unknown Object (File)
Sun, Oct 20, 11:01 AM
Unknown Object (File)
Sun, Oct 20, 10:59 AM
Unknown Object (File)
Sun, Oct 20, 10:55 AM
Subscribers
Tokens
"Like" token, awarded by tomek_cedro.info.

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tomek_cedro.info created this revision.

Hi Tomek,

Although this patch fixes some Synaptics touchpads including your one, it has negative side effect. It disables PS/2 bytestream synchronization checks for all touchpads connected through the AUX MUX.

Could you create a PR in bugzilla and assign it to me. This patch needs some rework to avoid aforementioned flaw.

Sure thing, bug creates (no permission to assign), thanks! :-)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253279

Hello world :-) Did fix for this land in 13.0? I have just upgraded and my Trackpad does not work with gestures :-(

@wulf I had to recompile kernel to 13 stable with that fix for Touchpad to work. Is there any chance this kind of fix can land in upstream? :-)

It can not be committed "AS IS" as it disables PS/2 bytestream synchronization checks for all touchpads connected through the AUX MUX

I left some instructions to narrow down the problem in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253279

Can you follow them and give feedback?

Moving all trackpads up, after Intellimouse does not fix the problem. I will now try to move it above the IneliMouse..

diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 43d19b5174d..9d314d675b9 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -696,14 +696,16 @@ static struct {
          0x08, MOUSE_PS2_PACKETSIZE, enable_mmanplus },
        { MOUSE_MODEL_EXPLORER,         /* Microsoft IntelliMouse Explorer */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msexplorer },
-       { MOUSE_MODEL_4D,               /* A4 Tech 4D Mouse */
-         0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse },
-       { MOUSE_MODEL_4DPLUS,           /* A4 Tech 4D+ Mouse */
-         0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus },
        { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad */
          0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics },
        { MOUSE_MODEL_ELANTECH,         /* Elantech Touchpad */
          0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech },
+       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
+         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
+       { MOUSE_MODEL_4D,               /* A4 Tech 4D Mouse */
+         0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse },
+       { MOUSE_MODEL_4DPLUS,           /* A4 Tech 4D+ Mouse */
+         0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus },
        { MOUSE_MODEL_INTELLI,          /* Microsoft IntelliMouse */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli },
        { MOUSE_MODEL_GLIDEPOINT,       /* ALPS GlidePoint */
@@ -712,8 +714,6 @@ static struct {
          0x80, MOUSE_PS2_PACKETSIZE, enable_kmouse },
        { MOUSE_MODEL_VERSAPAD,         /* Interlink electronics VersaPad */
          0xe8, MOUSE_PS2VERSA_PACKETSIZE, enable_versapad },
-       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
-         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
        { MOUSE_MODEL_GENERIC,
          0xc0, MOUSE_PS2_PACKETSIZE, NULL },
 };

/var/log/Xorg.0.log parts below:

[    37.987] (II) config/udev: Adding input device System mouse (/dev/input/event0)
[    37.987] (**) System mouse: Applying InputClass "evdev pointer catchall"
[    37.987] (**) System mouse: Applying InputClass "libinput pointer catchall"
[    37.987] (II) LoadModule: "libinput"
[    37.987] (II) Loading /usr/local/lib/xorg/modules/input/libinput_drv.so
[    37.993] (II) Module libinput: vendor="X.Org Foundation"
[    37.993]    compiled for 1.20.11, module version = 0.30.0
[    37.993]    Module class: X.Org XInput Driver
[    37.993]    ABI class: X.Org XInput driver, version 24.1
[    37.993] (II) Using input driver 'libinput' for 'System mouse'
[    37.993] (**) System mouse: always reports core events
[    37.993] (**) Option "Device" "/dev/input/event0"
[    37.993] (**) Option "_source" "server/udev"
[    38.001] (II) event0  - System mouse: is tagged by udev as: Mouse
[    38.002] (II) event0  - System mouse: device is a pointer
[    38.002] (II) event0  - System mouse: device removed
[    38.002] (**) Option "config_info" "udev:/dev/input/event0"
[    38.002] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 7)
[    38.002] (**) Option "AccelerationScheme" "none"
[    38.002] (**) System mouse: (accel) selected scheme none/0
[    38.002] (**) System mouse: (accel) acceleration factor: 2.000
[    38.002] (**) System mouse: (accel) acceleration threshold: 4
[    38.003] (II) event0  - System mouse: is tagged by udev as: Mouse
[    38.003] (II) event0  - System mouse: device is a pointer
[    38.003] (II) config/udev: Adding input device System keyboard multiplexer (/dev/input/event1)
[    38.003] (**) System keyboard multiplexer: Applying InputClass "evdev keyboard catchall"
[    38.003] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[    38.003] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
(...)
[    38.036] (II) config/udev: Adding input device Generic PS/2 mouse (/dev/input/event5)
[    38.036] (**) Generic PS/2 mouse: Applying InputClass "evdev pointer catchall"
[    38.036] (**) Generic PS/2 mouse: Applying InputClass "libinput pointer catchall"
[    38.036] (II) Using input driver 'libinput' for 'Generic PS/2 mouse'
[    38.036] (**) Generic PS/2 mouse: always reports core events
[    38.036] (**) Option "Device" "/dev/input/event5"
[    38.036] (**) Option "_source" "server/udev"
[    38.036] (**) Option "Device" "/dev/input/event5"
[    38.037] (II) event5  - Generic PS/2 mouse: is tagged by udev as: Mouse
[    38.037] (II) event5  - Generic PS/2 mouse: device is a pointer
[    38.037] (II) event5  - Generic PS/2 mouse: device removed
[    38.037] (**) Option "config_info" "udev:/dev/input/event5"
[    38.037] (II) XINPUT: Adding extended input device "Generic PS/2 mouse" (type: MOUSE, id 11)
[    38.037] (**) Option "AccelerationScheme" "none"
[    38.037] (**) Generic PS/2 mouse: (accel) selected scheme none/0
[    38.037] (**) Generic PS/2 mouse: (accel) acceleration factor: 2.000
[    38.037] (**) Generic PS/2 mouse: (accel) acceleration threshold: 4
[    38.038] (II) event5  - Generic PS/2 mouse: is tagged by udev as: Mouse
[    38.038] (II) event5  - Generic PS/2 mouse: device is a pointer

In /boot/loader.conf setting hw.psm.mux_disabled to either 0 or 1 does not change anything.

Here is the xinput output:

% xinput list-props 6
Device 'trackpad':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (273):     0
        Device Accel Constant Deceleration (274):       1.000000
        Device Accel Adaptive Deceleration (275):       1.000000
        Device Accel Velocity Scaling (276):    10.000000
        Device Product ID (277):        2, 1
        Device Node (278):      "/dev/input/event5"
        Evdev Axis Inversion (279):     0, 0
        Evdev Axes Swap (281):  0
        Axis Labels (282):      "Rel X" (169), "Rel Y" (170)
        Button Labels (283):    "Button Left" (162), "Button Unknown" (272), "Button Right" (164), "Button Wheel Up" (165), "Button Wheel Down" (166)
        Evdev Scrolling Distance (284): 0, 0, 0
        Evdev Middle Button Emulation (285):    0
        Evdev Middle Button Timeout (286):      50
        Evdev Middle Button Button (287):       2
        Evdev Third Button Emulation (288):     0
        Evdev Third Button Emulation Timeout (289):     1000
        Evdev Third Button Emulation Button (290):      3
        Evdev Third Button Emulation Threshold (291):   20
        Evdev Wheel Emulation (292):    0
        Evdev Wheel Emulation Axes (293):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (294):    10
        Evdev Wheel Emulation Timeout (295):    200
        Evdev Wheel Emulation Button (296):     4
        Evdev Drag Lock Buttons (297):  0

% xinput list-props 7
Device 'System mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 2
        libinput Button Scrolling Button Default (310): 2
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Middle Emulation Enabled (313):        0
        libinput Middle Emulation Enabled Default (314):        0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event0"
        Device Product ID (277):        0, 0
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1

% xinput list-props 11
Device 'Generic PS/2 mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 3
        libinput Button Scrolling Button Default (310): 3
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event5"
        Device Product ID (277):        2, 1
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1

Although there are natural scroll properties on System Mouse and Generic PS/2 Mouse setting them does not enable two finger scroll:

% xinput set-prop "Generic PS/2 mouse" "libinput Natural Scrolling Enabled" 1
% xinput set-prop "System mouse" "libinput Natural Scrolling Enabled" 1

Hey @wulf , I guess I cannot put anything above tmux? So this does not solve the problem - gestures still does not work even if synaptics is on the second position. I remember the problem was caused because trackpad here is connected to two busses..

Here is my latest/last iteration:

diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 43d19b5174d..d3d97c3797b 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -688,6 +688,12 @@ static struct {
         */
        { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad on Active Mux */
          0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux },
+       { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad */
+         0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics },
+       { MOUSE_MODEL_ELANTECH,         /* Elantech Touchpad */
+         0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech },
+       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
+         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
        { MOUSE_MODEL_NET,              /* Genius NetMouse */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse },
        { MOUSE_MODEL_NETSCROLL,        /* Genius NetScroll */
@@ -700,10 +706,6 @@ static struct {
          0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse },
        { MOUSE_MODEL_4DPLUS,           /* A4 Tech 4D+ Mouse */
          0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus },
-       { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad */
-         0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics },
-       { MOUSE_MODEL_ELANTECH,         /* Elantech Touchpad */
-         0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech },
        { MOUSE_MODEL_INTELLI,          /* Microsoft IntelliMouse */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli },
        { MOUSE_MODEL_GLIDEPOINT,       /* ALPS GlidePoint */
@@ -712,8 +714,6 @@ static struct {
          0x80, MOUSE_PS2_PACKETSIZE, enable_kmouse },
        { MOUSE_MODEL_VERSAPAD,         /* Interlink electronics VersaPad */
          0xe8, MOUSE_PS2VERSA_PACKETSIZE, enable_versapad },
-       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
-         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
        { MOUSE_MODEL_GENERIC,
          0xc0, MOUSE_PS2_PACKETSIZE, NULL },
 };

xinput part:

0xCFMX4% xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ trackpad                                  id=6    [slave  pointer  (2)]
⎜   ↳ System mouse                              id=7    [slave  pointer  (2)]
⎜   ↳ Generic PS/2 mouse                        id=11   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=14   [slave  pointer  (2)]
⎜   ↳ Sharp Corp.   12.5EA0003                  id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ System keyboard multiplexer               id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ AT keyboard                               id=10   [slave  keyboard (3)]
    ↳ Yubico Yubikey NEO OTP+CCID               id=12   [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=13   [slave  keyboard (3)]

% xinput list-props 6
Device 'trackpad':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (273):     0
        Device Accel Constant Deceleration (274):       1.000000
        Device Accel Adaptive Deceleration (275):       1.000000
        Device Accel Velocity Scaling (276):    10.000000
        Device Product ID (277):        2, 1
        Device Node (278):      "/dev/input/event5"
        Evdev Axis Inversion (279):     0, 0
        Evdev Axes Swap (281):  0
        Axis Labels (282):      "Rel X" (169), "Rel Y" (170)
        Button Labels (283):    "Button Left" (162), "Button Unknown" (272), "Button Right" (164), "Button Wheel Up" (165), "Button Wheel Down" (166)
        Evdev Scrolling Distance (284): 0, 0, 0
        Evdev Middle Button Emulation (285):    0
        Evdev Middle Button Timeout (286):      50
        Evdev Middle Button Button (287):       2
        Evdev Third Button Emulation (288):     0
        Evdev Third Button Emulation Timeout (289):     1000
        Evdev Third Button Emulation Button (290):      3
        Evdev Third Button Emulation Threshold (291):   20
        Evdev Wheel Emulation (292):    0
        Evdev Wheel Emulation Axes (293):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (294):    10
        Evdev Wheel Emulation Timeout (295):    200
        Evdev Wheel Emulation Button (296):     4
        Evdev Drag Lock Buttons (297):  0

% xinput list-props 7
Device 'System mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 2
        libinput Button Scrolling Button Default (310): 2
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Middle Emulation Enabled (313):        0
        libinput Middle Emulation Enabled Default (314):        0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event0"
        Device Product ID (277):        0, 0
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1


% xinput list-props 11
Device 'Generic PS/2 mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 3
        libinput Button Scrolling Button Default (310): 3
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event5"
        Device Product ID (277):        2, 1
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1

Hey @wulf , I guess I cannot put anything above tmux? So this does not solve the problem - gestures still does not work even if synaptics is on the second position. I remember the problem was caused because trackpad here is connected to two busses..

Here is my latest/last iteration:

diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 43d19b5174d..d3d97c3797b 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -688,6 +688,12 @@ static struct {
         */
        { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad on Active Mux */
          0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux },
+       { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad */
+         0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics },
+       { MOUSE_MODEL_ELANTECH,         /* Elantech Touchpad */
+         0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech },
+       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
+         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
        { MOUSE_MODEL_NET,              /* Genius NetMouse */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse },
        { MOUSE_MODEL_NETSCROLL,        /* Genius NetScroll */
@@ -700,10 +706,6 @@ static struct {
          0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse },
        { MOUSE_MODEL_4DPLUS,           /* A4 Tech 4D+ Mouse */
          0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus },
-       { MOUSE_MODEL_SYNAPTICS,        /* Synaptics Touchpad */
-         0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics },
-       { MOUSE_MODEL_ELANTECH,         /* Elantech Touchpad */
-         0x04, MOUSE_ELANTECH_PACKETSIZE, enable_elantech },
        { MOUSE_MODEL_INTELLI,          /* Microsoft IntelliMouse */
          0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_msintelli },
        { MOUSE_MODEL_GLIDEPOINT,       /* ALPS GlidePoint */
@@ -712,8 +714,6 @@ static struct {
          0x80, MOUSE_PS2_PACKETSIZE, enable_kmouse },
        { MOUSE_MODEL_VERSAPAD,         /* Interlink electronics VersaPad */
          0xe8, MOUSE_PS2VERSA_PACKETSIZE, enable_versapad },
-       { MOUSE_MODEL_TRACKPOINT,       /* IBM/Lenovo TrackPoint */
-         0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
        { MOUSE_MODEL_GENERIC,
          0xc0, MOUSE_PS2_PACKETSIZE, NULL },
 };

xinput part:

0xCFMX4% xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ trackpad                                  id=6    [slave  pointer  (2)]
⎜   ↳ System mouse                              id=7    [slave  pointer  (2)]
⎜   ↳ Generic PS/2 mouse                        id=11   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=14   [slave  pointer  (2)]
⎜   ↳ Sharp Corp.   12.5EA0003                  id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ System keyboard multiplexer               id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ AT keyboard                               id=10   [slave  keyboard (3)]
    ↳ Yubico Yubikey NEO OTP+CCID               id=12   [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=13   [slave  keyboard (3)]

% xinput list-props 6
Device 'trackpad':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (273):     0
        Device Accel Constant Deceleration (274):       1.000000
        Device Accel Adaptive Deceleration (275):       1.000000
        Device Accel Velocity Scaling (276):    10.000000
        Device Product ID (277):        2, 1
        Device Node (278):      "/dev/input/event5"
        Evdev Axis Inversion (279):     0, 0
        Evdev Axes Swap (281):  0
        Axis Labels (282):      "Rel X" (169), "Rel Y" (170)
        Button Labels (283):    "Button Left" (162), "Button Unknown" (272), "Button Right" (164), "Button Wheel Up" (165), "Button Wheel Down" (166)
        Evdev Scrolling Distance (284): 0, 0, 0
        Evdev Middle Button Emulation (285):    0
        Evdev Middle Button Timeout (286):      50
        Evdev Middle Button Button (287):       2
        Evdev Third Button Emulation (288):     0
        Evdev Third Button Emulation Timeout (289):     1000
        Evdev Third Button Emulation Button (290):      3
        Evdev Third Button Emulation Threshold (291):   20
        Evdev Wheel Emulation (292):    0
        Evdev Wheel Emulation Axes (293):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (294):    10
        Evdev Wheel Emulation Timeout (295):    200
        Evdev Wheel Emulation Button (296):     4
        Evdev Drag Lock Buttons (297):  0

% xinput list-props 7
Device 'System mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 2
        libinput Button Scrolling Button Default (310): 2
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Middle Emulation Enabled (313):        0
        libinput Middle Emulation Enabled Default (314):        0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event0"
        Device Product ID (277):        0, 0
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1


% xinput list-props 11
Device 'Generic PS/2 mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (304):       0
        libinput Natural Scrolling Enabled Default (305):       0
        libinput Scroll Methods Available (306):        0, 0, 1
        libinput Scroll Method Enabled (307):   0, 0, 0
        libinput Scroll Method Enabled Default (308):   0, 0, 0
        libinput Button Scrolling Button (309): 3
        libinput Button Scrolling Button Default (310): 3
        libinput Button Scrolling Button Lock Enabled (311):    0
        libinput Button Scrolling Button Lock Enabled Default (312):    0
        libinput Accel Speed (315):     0.000000
        libinput Accel Speed Default (316):     0.000000
        libinput Accel Profiles Available (317):        1, 1
        libinput Accel Profile Enabled (318):   1, 0
        libinput Accel Profile Enabled Default (319):   1, 0
        libinput Left Handed Enabled (320):     0
        libinput Left Handed Enabled Default (321):     0
        libinput Send Events Modes Available (322):     1, 0
        libinput Send Events Mode Enabled (323):        0, 0
        libinput Send Events Mode Enabled Default (324):        0, 0
        Device Node (278):      "/dev/input/event5"
        Device Product ID (277):        2, 1
        libinput Drag Lock Buttons (325):       <no items>
        libinput Horizontal Scroll Enabled (326):       1

It seems to have scroll buttons in both cases. Do I miss something? :-)

Here is the setup that works with active_ports_count >= 1:

% xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ System mouse                              id=6    [slave  pointer  (2)]
⎜   ↳ Sharp Corp.   12.5EA0003                  id=8    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎜   ↳ Generic PS/2 mouse                        id=12   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ System keyboard multiplexer               id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ AT keyboard                               id=10   [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=14   [slave  keyboard (3)]
    ↳ Yubico Yubikey NEO OTP+CCID               id=13   [slave  keyboard (3)]

% xinput list-props 11
Device 'SynPS/2 Synaptics TouchPad':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Tapping Enabled (320): 1
        libinput Tapping Enabled Default (321): 0
        libinput Tapping Drag Enabled (322):    1
        libinput Tapping Drag Enabled Default (323):    1
        libinput Tapping Drag Lock Enabled (324):       1
        libinput Tapping Drag Lock Enabled Default (325):       0
        libinput Tapping Button Mapping Enabled (326):  1, 0
        libinput Tapping Button Mapping Default (327):  1, 0
        libinput Natural Scrolling Enabled (282):       1
        libinput Natural Scrolling Enabled Default (283):       0
        libinput Disable While Typing Enabled (328):    1
        libinput Disable While Typing Enabled Default (329):    1
        libinput Scroll Methods Available (284):        1, 1, 0
        libinput Scroll Method Enabled (285):   1, 0, 0
        libinput Scroll Method Enabled Default (286):   1, 0, 0
        libinput Accel Speed (293):     0.000000
        libinput Accel Speed Default (294):     0.000000
        libinput Accel Profiles Available (295):        1, 1
        libinput Accel Profile Enabled (296):   1, 0
        libinput Accel Profile Enabled Default (297):   1, 0
        libinput Left Handed Enabled (298):     0
        libinput Left Handed Enabled Default (299):     0
        libinput Send Events Modes Available (300):     1, 1
        libinput Send Events Mode Enabled (301):        0, 0
        libinput Send Events Mode Enabled Default (302):        0, 0
        Device Node (303):      "/dev/input/event5"
        Device Product ID (304):        2, 7
        libinput Drag Lock Buttons (305):       <no items>
        libinput Horizontal Scroll Enabled (306):       1
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎜   ↳ Generic PS/2 mouse                        id=12   [slave  pointer  (2)]

Two separate PS/2 mouses recognized by FreeBSD? Really? I don't understand what is going on here :-)

Anyway, I attached a patch to bugzilla PR. Please test it

This patch from Wulf fixes Trackpad on Panasonic Toughbook CF-MX4 - two finger scroll now works fine! TANK U SIR! =)

Thank you Wulf IT'S ALIVE!! =)

"Natural Scroll" shows up now in all mouses: system, touchpad, generic :-)

% xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ System mouse                              id=6    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]
⎜   ↳ Generic PS/2 mouse                        id=11   [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=13   [slave  pointer  (2)]
⎜   ↳ Sharp Corp.   12.5EA0003                  id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ System keyboard multiplexer               id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ AT keyboard                               id=9    [slave  keyboard (3)]
    ↳ Logitech USB Receiver                     id=12   [slave  keyboard (3)]

% xinput list-props 6
Device 'System mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (282):       0
        libinput Natural Scrolling Enabled Default (283):       0
        libinput Scroll Methods Available (284):        0, 0, 1
        libinput Scroll Method Enabled (285):   0, 0, 0
        libinput Scroll Method Enabled Default (286):   0, 0, 0
        libinput Button Scrolling Button (287): 2
        libinput Button Scrolling Button Default (288): 2
        libinput Button Scrolling Button Lock Enabled (289):    0
        libinput Button Scrolling Button Lock Enabled Default (290):    0
        libinput Middle Emulation Enabled (291):        0
        libinput Middle Emulation Enabled Default (292):        0
        libinput Accel Speed (293):     0.000000
        libinput Accel Speed Default (294):     0.000000
        libinput Accel Profiles Available (295):        1, 1
        libinput Accel Profile Enabled (296):   1, 0
        libinput Accel Profile Enabled Default (297):   1, 0
        libinput Left Handed Enabled (298):     0
        libinput Left Handed Enabled Default (299):     0
        libinput Send Events Modes Available (300):     1, 0
        libinput Send Events Mode Enabled (301):        0, 0
        libinput Send Events Mode Enabled Default (302):        0, 0
        Device Node (303):      "/dev/input/event0"
        Device Product ID (304):        0, 0
        libinput Drag Lock Buttons (305):       <no items>
        libinput Horizontal Scroll Enabled (306):       1

% xinput list-props 10
Device 'SynPS/2 Synaptics TouchPad':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Tapping Enabled (316): 1
        libinput Tapping Enabled Default (317): 0
        libinput Tapping Drag Enabled (318):    1
        libinput Tapping Drag Enabled Default (319):    1
        libinput Tapping Drag Lock Enabled (320):       1
        libinput Tapping Drag Lock Enabled Default (321):       0
        libinput Tapping Button Mapping Enabled (322):  1, 0
        libinput Tapping Button Mapping Default (323):  1, 0
        libinput Natural Scrolling Enabled (282):       1
        libinput Natural Scrolling Enabled Default (283):       0
        libinput Disable While Typing Enabled (324):    1
        libinput Disable While Typing Enabled Default (325):    1
        libinput Scroll Methods Available (284):        1, 1, 0
        libinput Scroll Method Enabled (285):   1, 0, 0
        libinput Scroll Method Enabled Default (286):   1, 0, 0
        libinput Accel Speed (293):     0.000000
        libinput Accel Speed Default (294):     0.000000
        libinput Accel Profiles Available (295):        1, 1
        libinput Accel Profile Enabled (296):   1, 0
        libinput Accel Profile Enabled Default (297):   1, 0
        libinput Left Handed Enabled (298):     0
        libinput Left Handed Enabled Default (299):     0
        libinput Send Events Modes Available (300):     1, 1
        libinput Send Events Mode Enabled (301):        0, 0
        libinput Send Events Mode Enabled Default (302):        0, 0
        Device Node (303):      "/dev/input/event5"
        Device Product ID (304):        2, 7
        libinput Drag Lock Buttons (305):       <no items>
        libinput Horizontal Scroll Enabled (306):       1


% xinput list-props 11
Device 'Generic PS/2 mouse':
        Device Enabled (159):   1
        Coordinate Transformation Matrix (160): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (282):       0
        libinput Natural Scrolling Enabled Default (283):       0
        libinput Scroll Methods Available (284):        0, 0, 1
        libinput Scroll Method Enabled (285):   0, 0, 1
        libinput Scroll Method Enabled Default (286):   0, 0, 1
        libinput Button Scrolling Button (287): 2
        libinput Button Scrolling Button Default (288): 2
        libinput Button Scrolling Button Lock Enabled (289):    0
        libinput Button Scrolling Button Lock Enabled Default (290):    0
        libinput Middle Emulation Enabled (291):        0
        libinput Middle Emulation Enabled Default (292):        0
        libinput Accel Speed (293):     0.000000
        libinput Accel Speed Default (294):     0.000000
        libinput Accel Profiles Available (295):        1, 1
        libinput Accel Profile Enabled (296):   1, 0
        libinput Accel Profile Enabled Default (297):   1, 0
        libinput Left Handed Enabled (298):     0
        libinput Left Handed Enabled Default (299):     0
        libinput Send Events Modes Available (300):     1, 0
        libinput Send Events Mode Enabled (301):        0, 0
        libinput Send Events Mode Enabled Default (302):        0, 0
        Device Node (303):      "/dev/input/event6"
        Device Product ID (304):        2, 1
        libinput Drag Lock Buttons (305):       <no items>
        libinput Horizontal Scroll Enabled (306):       1
This revision was not accepted when it landed; it landed in state Needs Review.Jul 14 2021, 10:31 AM
This revision was automatically updated to reflect the committed changes.