Solved change mousewheel scroll speed

Alain De Vos

Well-Known Member

Reaction score: 82
Messages: 463

I use mate-desktop and mousewheel scroll speed is too slow for most applications.
Running the command "xinput list-props 10" returns :
Code:
Device 'Logitech USB-PS/2 Optical Mouse':
    Device Enabled (142):    1
    Coordinate Transformation Matrix (143):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (279):    0
    libinput Natural Scrolling Enabled Default (280):    0
    libinput Scroll Methods Available (281):    0, 0, 1
    libinput Scroll Method Enabled (282):    0, 0, 0
    libinput Scroll Method Enabled Default (283):    0, 0, 0
    libinput Button Scrolling Button (284):    2
    libinput Button Scrolling Button Default (285):    2
    libinput Middle Emulation Enabled (286):    1
    libinput Middle Emulation Enabled Default (287):    0
    libinput Accel Speed (288):    -0.535088
    libinput Accel Speed Default (289):    0.000000
    libinput Accel Profiles Available (290):    1, 1
    libinput Accel Profile Enabled (291):    1, 0
    libinput Accel Profile Enabled Default (292):    1, 0
    libinput Left Handed Enabled (293):    0
    libinput Left Handed Enabled Default (294):    0
    libinput Send Events Modes Available (264):    1, 0
    libinput Send Events Mode Enabled (265):    0, 0
    libinput Send Events Mode Enabled Default (266):    0, 0
    Device Node (267):    "/dev/input/event4"
    Device Product ID (268):    1133, 49232
    libinput Drag Lock Buttons (295):    <no items>
    libinput Horizontal Scroll Enabled (296):    1
Does this allow to change the mousewheel scroll speed ?
 

memreflect

Member

Reaction score: 54
Messages: 99

Unfortunately the inability to set scroll distance is a common problem with libinput, and I know of no way to fix this. Evdev has a similar problem where its default VertScrollDelta=1 is still not enough for some mice and increasing the value means requiring more scrolling to activate the scroll effect rather than scrolling more distance.

However, if you're willing to hold your wheel button down and drag the mouse, you can work around the issue easily:
Code:
# 0 0 1 = <two-finger scrolling (touchpads)> <edge scrolling (touchpads)> <scroll while Scrolling Button is pressed>
xinput set-prop 'Logitech USB-PS/2 Optical Mouse' 'libinput Scroll Method Enabled' 0 0 1
This essentially makes your mouse act like a touch screen with inverted controls: if you have the mouse wheel pressed, moving the mouse up will move the screen contents down, just like a mouse wheel does. This also has the benefit of allowing you to scroll horizontally where a normal mouse wheel typically only allows vertical movement.

Because of the touchscreen-like controls, I would personally use this in combination with libinput Natural Scrolling Enabled set to 1 to achieve behavior closer to a touch screen, though it admittedly takes some adjustment since this means the scroll behavior of the mouse wheel will also be inverted.

Sadly, I know of no way to simply click to toggle this drag-scrolling behavior on/off, which means if you're frequently scrolling long distances, you can experience fatigue in your wheel-clicking finger.

However, you appear to have libinput Middle Emulation Enabled set to 1, so you can just use the left and right mouse buttons simultaneously and completely ignore the wheel entirely if you want. If you enjoy using two-finger scrolling on a touchpad, this will feel familiar. It can also help to mitigate some fatigue you might experience since some wheels require much more force to click compared to the left and right mouse buttons.
 
OP
Alain De Vos

Alain De Vos

Well-Known Member

Reaction score: 82
Messages: 463

Interesting. Still I wander if there is is a technical reason why it is not possible ?
A mousewheel is a rather "stupid" machine , which translates a rotation with my finger into probably "clicks" which got in some way translated into a "Delta y" or "Delta number of lines".
When you translate in software one click into two clicks you already doubled the speed of the mouse. :)

Somewhere something is not made correctly as it should in our modern year 2020.
The application receives it from the X-client, who receives it from the X-server, who receives it from the evdev, who receives it from the device.
Somewhere there aught to be a place to "speed things up" or there is inherently bad design.
 

T-Daemon

Aspiring Daemon

Reaction score: 304
Messages: 735

Have a look at the following guide, maybe it’s of use:

x11/imwheel is in ports. The mentioned script is written for Gnome, it might work with MATE, also mind the scripts #!/bin/bash shebang.
 

memreflect

Member

Reaction score: 54
Messages: 99

x11/imwheel and that guide worked for me. I don't use MATE or GNOME, so x11/zenity wasn't already installed, but it's easy to see that the script just creates ~/.imwheelrc and the range for buttons 4 and 5 is 1..100, even if the script fails because zenity isn't installed.

Note that imwheel relies on a mounted linprocfs (not procfs) for dealing with imwheel --kill. You can also just use pkill imwheel if you prefer.
 
OP
Alain De Vos

Alain De Vos

Well-Known Member

Reaction score: 82
Messages: 463

Imwheel seems to work perfect.
.imwheelrc
Code:
".*"
None,    Up,        Button4,    3
None,    Down,    Button5,    3
 
Top