[SOLVED] Logitech Marble Mouse and libinput

I have tried to configure my Logitech Marble Mouse to enable middle-clicking (which I really need...). Although FreeBSD has libinput the instructions given in https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse do not work. To be clear, I have added a file in /usr/local/etc/X11/xorg.conf.d/20-libinput.conf with the following content:

Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
Driver "libinput"
Option "ScrollMethod" "button"
Option "ScrollButton" "9"
Option "MiddleEmulation" "true"
Option "HorizontalScrolling" "false"
Option "ButtonMapping" "1 9 3 4 5 6 7 2 2"
Option "Emulate3Buttons" "true"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "8"
EndSection

But this has no effect (xf86-input-libinput is installed). Any ideas on how to do this..?
 
I do have libinput installed (I didn’t do it myself; so I guess it was a dependency of something else), but it’s not mentioned in my xorg.conf.
The following works fine for all of my Logitech mice and trackballs – including the special features of my Logitech MX Ergo, i.e. vertical + horizontal scrolling with the “3D” scroll wheel, and the additional two buttons that can be used for the “forward” and “back” functions in web browsers, for example.
Code:
Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Emulate3Buttons" "off"
    Option         "Buttons" "11"
    Option         "ButtonMapping" "1 2 3 8 9 6 7"
EndSection
In /etc/rc.conf I have the following lines:
Code:
moused_enable="YES"
moused_ums0_flags="-A 1.75,1.5 -a 0.5"
Type ps auxww | grep 'mo[u]sed' to verify that it runs with the desired options. If it doesn’t, restart the moused service. Then start X.
You might want to adjust the acceleration settings (-A and -a options), the above values are perfect for me, but it depends on mouse model, screen size and personal preference. See the moused(8) manual page for details.
 
Sorry for a late reply, some other issues cropped up :)

Code:
$ dmesg | grep -i mouse
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
$ ps axw | grep -i mouse
1016  -  Ss     0:00.09 /usr/sbin/moused -p /dev/psm0 -t auto
1266  -  I      0:00.07 hald-addon-mouse-sysmouse: /dev/psm0 (hald-addon-mouse-sy)
1461  -  Ss     0:00.21 /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid
1476  -  I      0:00.07 hald-addon-mouse-sysmouse: /dev/ums0 (hald-addon-mouse-sy)
1808  1  S+     0:00.00 grep -i mouse

Perhaps I should reemphasize that my issue here is with mouse configuration. The basic mouse operations (moving, left and right clicking) works out of the box. But its a weird kind of mouse (see: https://help.ubuntu.com/community/L...&do=get&target=marble-mouse-buttons-names.png), and it needs manual configuration to specify that button 8 and 9 work as middle-click, or alternatively that 1 and 3 clicked simultaneously (again see above link) work as middle click.

On Linux the command: xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 2 10 11 12 does this (or the xorg.conf.d file mentioned initially). In OpenBSD you have to use this command: xinput set-button-map /dev/wsmouse 1 5 3 2 2 6 7 8 9

As you can see the mouse name and the button numberings are different, I suspect there might also be some difference in these details in FreeBSD, but I dont know what they might be. Out of interest neither xinput -test "Logitech USB Trackball", nor xinput -test /dev/sysmouse, work in FreeBSD. How can I find out what my mouse is called in FreeBSD..?

Thanks for your replies guys :)
 

Attachments

  • Xorg.0.log.txt
    75.4 KB · Views: 207
Ah, wait I solved it! Finding out the name is a simple issue of running the command xinput. The correct command on FreeBSD is: xinput set-button-map "System mouse" 1 8 3 4 5 6 7 2 2 10 11 12.

It has a "Logitech USB Trackball" device registered, but for some unknown reason adjusting this device has no effect.
 
Thank you for the hint with xinput. It helped me to swap two finger scroll of my Synaptics Trackpad only with other mouse untouched :)
xinput set-button-map "SynPS/2 Synaptics TouchPad" 1 2 3 5 4 6 7 8 9 10
 
Back
Top