1

I bought this lovely old Macally iBall Pro and I have it setup well in Ubuntu 22.04 using xinput to configure middle button emulation and scrolling with a button. Like so:

xinput set-prop "12" "libinput Scroll Method Enabled" 0,0,1 xinput set-prop "12" "libinput Middle Emulation Enabled" 1 

However moving to an ubuntu 22.04 installation running wayland I've found that I cannot do the same thing using libinput / gsettings / dconf. This appears to be because the device comes up as a mouse and not a trackball, so I cannot use the trackball settings which include the desired configuration options. The mouse settings do not have a "scroll when button pressed" option. This is what I'm seeing in dmesg.

[ 6445.824972] usb 1-2: new low-speed USB device number 7 using xhci_hcd [ 6445.954422] usb 1-2: New USB device found, idVendor=0618, idProduct=0305, bcdDevice= 2.00 [ 6445.954440] usb 1-2: New USB device strings: Mfr=4, Product=20, SerialNumber=0 [ 6445.954447] usb 1-2: Product: MacALLY USB Track Ball [ 6445.954453] usb 1-2: Manufacturer: MacALLY [ 6445.958161] input: MacALLY MacALLY USB Track Ball as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:0618:0305.0005/input/input14 [ 6445.958402] hid-generic 0003:0618:0305.0005: input,hidraw0: USB HID v1.00 Mouse [MacALLY MacALLY USB Track Ball] on usb-0000:00:14.0-2/input0 

I've been looking up how to fix this for hours and am stuck.

What can I do?

My only thought was to use udev to set the device as a trackball, but I cannot figure out how to do that.

1 Answer 1

2

As far as I understand, HID doesn't really have a dedicated 'trackball' type – both a mouse and a trackball are merely collections of buttons and axes with specific usages. Libinput has to guess the appropriate settings based on what axes and buttons are provided (and sometimes based on the product/model strings).

Libinput can be provided this information by setting the ID_INPUT_TRACKBALL udev property, either through .rules files using ENV{ID_foo}="1", or through .hwdb database files like the collection of overrides that systemd ships on all systems:

https://github.com/systemd/systemd/blob/main/hwdb.d/70-mouse.hwdb

The hwdb is generally preferred, and the 70-mouse.hwdb file even has instructions for adding custom entries to /etc/hwdb.d/71-whatever.hwdb.

Alternatively, libinput itself has a "device quirks" database at /usr/share/libinput. (One of the items there literally attempts to guess based on the product model name having the word 'Trackball' in it.)

You can add custom entries to /etc/libinput/local-overrides.quirks following the examples from grep -r ball /usr/share/libinput.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.