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
Best Answer
Won't Fix, at least, this is current status with
libinput
Upstream bug report: freedesktop - libinput - Support setting scroll speed #185
Old solution were working with
evdev
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
Check your mouse identification: Vendor ID, Product ID, Device Name
While mouse plugged in
Run one of commands below then reconnect the mouse
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.Open terminal, create the
71-mouse-local.hwdb
fileCopy 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:
If you can't find your device in
70-mouse.hwdb
, create it in this format with information collected in step (1)Save and close
Ctrl+O , Ctrl+X
Update udev hardware database, trigger the change for corresponding event node
event16
as reported inxinput
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 overridesMOUSE_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 valueExample:
MOUSE_WHEEL_CLICK_ANGLE
is a must for compatibility reasons even its value is not effective with declaredMOUSE_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.