Solved Xorg/udev: Middle mouse button not working

I've installed Xorg with udev and libinput support on FreeBSD 12.1. Keyboard and TrackPoint are working on my X270, but the middle mouse button seems to be ignored (no copy/paste, no scroll). But if I’m running moused -df -t auto -p /dev/psm0, the middle mouse button click (button 2) is recognised. My /usr/local/etc/X11/xorg.conf.d/90-libinput.conf:

Code:
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "EmulateWheel"       "true"
        Option "EmulateWheelButton" "2"
        Option "Emulate3Buttons"    "false"
EndSection

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

Any advice?
 
The problem seems to be that the detected TrackPoint has no "Middle Emulation":

Code:
$ 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)]
⎜   ↳ Generic PS/2 mouse                            id=9    [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)]
    ↳ AT keyboard                                     id=8    [slave  keyboard (3)]

$ xinput --list-props 9                                               
Device 'Generic PS/2 mouse':
        Device Enabled (143):   1
        Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (266):       1
        libinput Natural Scrolling Enabled Default (267):       0
        libinput Scroll Methods Available (268):        0, 0, 1
        libinput Scroll Method Enabled (269):   0, 0, 0
        libinput Scroll Method Enabled Default (270):   0, 0, 0
        libinput Button Scrolling Button (271): 3
        libinput Button Scrolling Button Default (272): 3
        libinput Accel Speed (275):     0.900000
        libinput Accel Speed Default (276):     0.000000
        libinput Accel Profiles Available (277):        1, 1
        libinput Accel Profile Enabled (278):   1, 0
        libinput Accel Profile Enabled Default (279):   1, 0
        libinput Left Handed Enabled (280):     0
        libinput Left Handed Enabled Default (281):     0
        libinput Send Events Modes Available (282):     1, 0
        libinput Send Events Mode Enabled (283):        0, 0
        libinput Send Events Mode Enabled Default (284):        0, 0
        Device Node (285):      "/dev/input/event3"
        Device Product ID (286):        2, 1
        libinput Drag Lock Buttons (287):       <no items>
        libinput Horizontal Scroll Enabled (288):       1

There is another device, System mouse (id 6), that has the "Middle Emulation" attribute, but all mouse input comes from the "Generic PS/2 mouse".

Does that mean that libinput fails to correctly determine the features of the TrackPoint?
 
Not sure if this may be helpful:
In my Dell Precision 7540 which has both trackpoint and touchpad, BOTH middle buttons are connected to trackpoint (which is PS/2). So, the touchpad (I2C) has no physcial middle button.
 
I had problems with the keyboard and mouse on my T420s after installing xorg-server 1.20 with udev. Installing x11-drivers/xf86-input-libinput and setting kern.evdev.rcpt_mask=6 works for me.
I have no mouse config in /usr/local/etc/X11/xorg.conf.d and I enabled moused in /etc/rc.conf. Now the mouse is working including middle button.
BTW, I dont use any libinput stuff in my xorg config files (use only 1 for german keyboard) and everything is running like before.
 
I removed all xorg configuration files and even enabled the Trackpad in BIOS, in case the mouse buttons are mapped to the Trackpad. But I still can’t get it running. Perhaps, the appropriate libinput configuration for the X270 is missing?
 
Back
Top