Why is there nothing related to scrolling speed in xinput for Microsoft Comfort Mouse 4500

Before I go randomly installing any additional software, I'd like to understand how xinput works and why there's nothing related to scrolling speed for my mouse.

Could you please enlighten me?

Ubuntu 18.04.1 LTS x64, GNOME 3.28.2 (not sure if it matters). Up to date.

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=11   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Comfort Mouse 4500   id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ HP TrueVision HD Camera: HP Tru           id=8    [slave  keyboard (3)]
    ↳ Intel Virtual Button driver               id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP Wireless hotkeys                       id=12   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=13   [slave  keyboard (3)]
    ↳ Microsoft Microsoft® Comfort Mouse 4500   id=15   [slave  keyboard (3)]
    ↳ Chicony USB Keyboard                      id=16   [slave  keyboard (3)]
    ↳ Chicony USB Keyboard                      id=17   [slave  keyboard (3)]

Details of the mouse under "pointers":

$ xinput list-props 14
Device 'Microsoft Microsoft® Comfort Mouse 4500':
    Device Enabled (142):   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 (289):   0
    libinput Natural Scrolling Enabled Default (290):   0
    libinput Scroll Methods Available (293):    0, 0, 1
    libinput Scroll Method Enabled (294):   0, 0, 0
    libinput Scroll Method Enabled Default (295):   0, 0, 0
    libinput Button Scrolling Button (727): 2
    libinput Button Scrolling Button Default (728): 2
    libinput Middle Emulation Enabled (729):    0
    libinput Middle Emulation Enabled Default (730):    0
    libinput Accel Speed (296): -0.258993
    libinput Accel Speed Default (297): 0.000000
    libinput Accel Profiles Available (731):    1, 1
    libinput Accel Profile Enabled (732):   1, 0
    libinput Accel Profile Enabled Default (733):   1, 0
    libinput Left Handed Enabled (298): 0
    libinput Left Handed Enabled Default (299): 0
    libinput Send Events Modes Available (266): 1, 0
    libinput Send Events Mode Enabled (267):    0, 0
    libinput Send Events Mode Enabled Default (268):    0, 0
    Device Node (269):  "/dev/input/event16"
    Device Product ID (270):    1118, 1900
    libinput Drag Lock Buttons (300):   <no items>
    libinput Horizontal Scroll Enabled (301):   1

Only parts related to scrolling:

$ xinput list-props 14 | grep -i 'scroll'
    libinput Natural Scrolling Enabled (289):   0
    libinput Natural Scrolling Enabled Default (290):   0
    libinput Scroll Methods Available (293):    0, 0, 1
    libinput Scroll Method Enabled (294):   0, 0, 0
    libinput Scroll Method Enabled Default (295):   0, 0, 0
    libinput Button Scrolling Button (727): 2
    libinput Button Scrolling Button Default (728): 2
    libinput Horizontal Scroll Enabled (301):   1

Details of the mouse under "keyboard":

$ xinput list-props 15
Device 'Microsoft Microsoft® Comfort Mouse 4500':
    Device Enabled (142):   1
    Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Send Events Modes Available (266): 1, 0
    libinput Send Events Mode Enabled (267):    0, 0
    libinput Send Events Mode Enabled Default (268):    0, 0
    Device Node (269):  "/dev/input/event16"
    Device Product ID (270):    1118, 1900

Solution 1:

Won't Fix, at least, this is current status with libinput

  • Upstream bug report: freedesktop - libinput - Support setting scroll speed #185

    1. Mice manufacturer uses different high-resolution scroll implementations
    2. Scroll speed need to be variable and controlled by applications depending on context
  • Old solution were working with evdev

  • Setting method: xinput, xorg.conf.d

Workaround, using Udev HWDB (Low level fix)

  • (1) HWDB setting within udev for specific mouse model.

    Source: U&L: Change scroll speed with libinput

    I confirm, it is current solution from Upstream code repository of udev

    1. Check your mouse identification: Vendor ID, Product ID, Device Name

      While mouse plugged in

      sudo lsusb
      

      Run one of commands below then reconnect the mouse

      sudo udevadm monitor -u
      sudo journalctl -k -b -f
      

      And check systemd/hwdb.d/70-mouse.hwdb or look for local file /lib/udev/hwdb.d/70-mouse.hwdb in your system. Search for same or similar device.

    2. Open terminal, create the 71-mouse-local.hwdb file

      sudo nano /etc/udev/hwdb.d/71-mouse-local.hwdb
      
    3. Copy from step (1) these lines and append them to the new file, Add wheel click angle entry and set angle as you want (default=15 degree/click, as integer value), as bellow:

      # Microsoft Comfort Mouse 4500
      mouse:usb:v045ep076c:name:Microsoft Microsoft® Comfort Mouse 4500:
       MOUSE_DPI=1000@125
       MOUSE_WHEEL_CLICK_ANGLE=15
      

      If you can't find your device in 70-mouse.hwdb, create it in this format with information collected in step (1)

      mouse:usb:v <VendorID> p <ProductID> :name: <DeviceName> :
      
    4. Save and close

      Ctrl+O , Ctrl+X

    5. Update udev hardware database, trigger the change for corresponding event node

      sudo systemd-hwdb update
      sudo udevadm trigger /dev/input/event16
      

      event16 as reported in xinput output.

    Note

    This answer is customized for the OP case but can be tuned for another model. Already expended it to be more generic.

    • Full upstream instructions are here: systemd/hwdb.d/70-mouse.hwdb or look for local file 70-mouse.hwdb in your system. Also you may look other advanced feature in there.

    • There is MOUSE_WHEEL_CLICK_COUNT which overrides MOUSE_WHEEL_CLICK_ANGLE, use it when angle parameter is not precise enough.

      MOUSE_WHEEL_CLICK_COUNT default=24 click/rotation or click/360deg, accepts integer value

      Example:

      # Microsoft Comfort Mouse 4500
      mouse:usb:v045ep076c:name:Microsoft Microsoft® Comfort Mouse 4500:
       MOUSE_DPI=1000@125
       MOUSE_WHEEL_CLICK_ANGLE=15
       MOUSE_WHEEL_CLICK_COUNT=24
      

      MOUSE_WHEEL_CLICK_ANGLE is a must for compatibility reasons even its value is not effective with declared MOUSE_WHEEL_CLICK_COUNT.

Future, GUI tool kits (High level fix)

  • (2) Probably get implemented at the level of GUI tool kits. Fair hopes when it comes to collaboration between large free community projects, like it is the case for arbitrary Unicode input, it got implemented only in GTK.

    Some apps won't wait for that, like some browsers and games (Firefox, Chromium, SDL games, ..).

    There is a list of bug report from GUI kits in the linked bug report above.