How to change scroll speed with libinput

libinputscrolling

I'm running on Arch Linux, Xfce 4.12.

My mouse wheel scrolls too slowly, so I want to increase the number of lines for each scroll "tick". I read that this is possible by setting the Evdev Scrolling Distance with xinput, however, I am using libinput and I do not see anything related to scrolling distance.

Output of xinput list-props on my mouse:

Device Enabled (139):   1                                                                                                       
Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (275): -0.640000                                                                                           
libinput Accel Speed Default (276): 0.000000                                                                                    
libinput Accel Profiles Available (277):    1, 1                                                                                
libinput Accel Profile Enabled (278):   1, 0                                                                                    
libinput Accel Profile Enabled Default (279):   1, 0                                                                            
libinput Natural Scrolling Enabled (280):   0                                                                                   
libinput Natural Scrolling Enabled Default (281):   0                                                                           
libinput Send Events Modes Available (259): 1, 0                                                                                
libinput Send Events Mode Enabled (260):    0, 0                                                                                
libinput Send Events Mode Enabled Default (261):    0, 0                                                                        
libinput Left Handed Enabled (282): 0                                                                                           
libinput Left Handed Enabled Default (283): 0                                                                                   
libinput Scroll Methods Available (284):    0, 0, 1                                                                             
libinput Scroll Method Enabled (285):   0, 0, 0                                                                                 
libinput Scroll Method Enabled Default (286):   0, 0, 0                                                                         
libinput Button Scrolling Button (287): 2                                                                                       
libinput Button Scrolling Button Default (288): 274                                                                             
libinput Middle Emulation Enabled (289):    0                                                                                   
libinput Middle Emulation Enabled Default (290):    0                                                                           
Device Node (262):  "/dev/input/event1"                                                                                         
Device Product ID (263):    1133, 50487                                                                                         
libinput Drag Lock Buttons (291):   <no items>                                                                                  
libinput Horizonal Scroll Enabled (264):    1                                                  

How can I change my scrolling speed?

Best Answer

Libinput does not have any kind of "for every wheel scroll, do n lines/degrees" concept as a common party, the setting seems to be device-specific for now, as some Logitech has the parameter Evdev Scrolling Distance (278) that possibly came with the "old" Evdev driver includes.

This will be considered an regression for the user experience on my opinion, where at first, the inclusion of a configurable mouse scroll sensitivity into the common toolkit (libinput), was refused, it is now part of a pull request to be in future versions – possibly the function calls will have to be implemented in every Desktop Environment.

There are many possibilities to fix such issue, but depends on the Linux distribution.

  1. Be lucky and have driver-specific scroll sensitivity – check by doing a search for all inputs with scroll variables:

    xinput list | cut -f2 | cut -f2 -d'=' | \
                xargs -d $'\n' -I'{}' sh -c "xinput list-props '{}' | grep -iq scroll  &&  \
                                        (echo Listing dev id '{}'; xinput list-props '{}')"
    and setting the specific variable by xinput --set-prop <ID> <SUB-ID> <values>, where <ID> can be the device name and <SUB-ID> can be the setting name.

  2. A general fix is repatching the libinput code and rebuilding.

  3. You can try to rollback to udevadm/evdev interfaces with X11, and then try the X11 variable MOUSE_WHEEL_CLICK_ANGLE.

  4. From reference of last item, its possible to use imwheel to emulate mouse scroll clicks in multiply value.

    # Should use imwheel --kill --buttons "4 5" to restart imwheel,
    # if the mouse has back/forward buttons, otherwhise imwheel --kill is enough.
    # imwheel must be set to autostart in your DE tools.
    #Edit ~/.imwheelrc to include, where '3' is a multiplier
    ".*"
    None,      Up,   Button4, 3
    None,      Down, Button5, 3
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5
    Shift_L,   Up,   Shift_L|Button4
    Shift_L,   Down, Shift_L|Button5
    
  5. There are specific application settings for mouse wheel sensitivity, like Chrome SmoothScroll and Firefox SmoothWheel ref.

Related Question