31

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?

Andrew Sun
  • 488
  • 1
  • 4
  • 11
  • 3
    There is now a [feature request](https://gitlab.freedesktop.org/libinput/libinput/issues/185) for libinput to implement this (courtesy of [@clel](https://unix.stackexchange.com/users/165112/clel)). – n.st Nov 25 '18 at 21:43

3 Answers3

12

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.

  • 3
    Libinput transition has been a UX regression in many ways, almost all of which come down to user control of their hardware's behavior... Which is unfortunate given the platform this is occurring on. – Douglas Gaskell Jan 14 '20 at 21:45
  • Nothing worked for me, I just installed Chrome extension. – Salem F Jan 12 '23 at 10:58
7

There is no current api for changing the scroll speed for libinput devices, but this blog explains how mouse wheel clicks correspond to an angle of movement that you can change per mouse in systemd's udev configuration file /usr/lib/udev/hwdb.d/70-mouse.hwdb. Read the comments about MOUSE_WHEEL_CLICK_ANGLE at the start of this file.

To make a local change, create a new file

 /etc/udev/hwdb.d/71-mouse-local.hwdb

and add your overriding rule. For example if you have the ImExPS/2 mouse you can double the default 15 degree per click to 30 degrees with

# ImExPS/2 Logitech Wheel Mouse
mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:
 MOUSE_DPI=400@250
 MOUSE_WHEEL_CLICK_ANGLE=30

Reload the udev database

 sudo udevadm hwdb --update
 sudo udevadm trigger /dev/input/event1
meuh
  • 49,672
  • 2
  • 52
  • 114
  • Thanks, but I don't believe this changed anything. Is there a way to know if the rule is taking effect? What should I be using for the name, is it the one displayed in `xinput list`? Mine displays as `Logitech USB Receiver` (it's a wireless mouse) – Andrew Sun Sep 07 '16 at 02:53
  • Sadly I'm not able to test any of this. If you look through the `70-mouse.hwdb` you should find several entries matching `Logitech USB Receiver`. They have a field with `:usb:` and then a vendor id and product id `:vp:`. I presume these are the same you see in `lsusb`. If possible create an entry `mouse:usb:v9999p9999:name:Logitech USB Receiver:` with 9999 replaced by the lowercase vendor and device ids, or a more generic `mouse:usb:*:name:Logitech USB Receiver:`. – meuh Sep 07 '16 at 18:43
  • @meuh did it work for you at least? – caub Apr 01 '17 at 11:38
  • @caub I've not been able to test this. I don't usually post answers that I haven't personally tried and got to work, but as the subject is not much answered elsewhere, I had hoped that this apparent solution might be helpful. – meuh Apr 01 '17 at 12:13
  • Thanks, I used `mouse:*:name:Logitech M705:` and `MOUSE_WHEEL_CLICK_ANGLE=3` to reenable smooth scrolling on my Logitech Marathon Mouse (M705) after switching from evdev to libinput. – hyperair Apr 22 '17 at 09:43
  • 1
    `There is no current api for changing the scroll speed for libinput devices`: has this changed since then? – orschiro Jun 25 '17 at 10:51
  • 2
    @orschiro I get the impression that an api is not the intention. The hope would be that all devices get properly identified and configured in udev and there is then no need for user configuration. Check out all the [libinput blogs](https://who-t.blogspot.fr/search/label/libinput). In particular [1.4](https://who-t.blogspot.fr/2016/07/libinput-is-done.html) corresponds to finishing the initial TODO list for libinput. – meuh Jun 25 '17 at 12:23
  • 7
    in Ubuntu 16.10 the system udev conf is in /lib/udev/hwdb.d/70-mouse.hwdb – Jonas Berlin Jul 10 '17 at 10:48
  • 2
    anyway to do the same with a touchpad ? – Francesco Feb 05 '18 at 21:00
  • @meuh What if the user wants to scroll faster or slower? Isn't this something that should be inherently configurable regardless of hardware "angle"? – daboross Sep 15 '18 at 21:38
  • 1
    @daboross Yes. There are two aspects to consider: the above answer is just trying to normalize output from a device so that when a user does the same amount of movement on 2 different mice, for example, the system can calculate that they are equivalent, despite the reports from the hardware being different. The second aspect is then how much screeen movement this should represent, and that is determined by the complex amount of software facing the user, like the graphics toolkit, the windowing system, dpi of the screen and so on. – meuh Sep 16 '18 at 07:38
  • That makes sense, it's still disappointing, though. I mean before `libinput`, I could just say "I want to scroll twice as much when any of my hardware scrolls the same amount" and that could be configured system-wide. It sounds like this is never going to be possible again, and that the consensus is that this is a bad thing to do, which is sad. – daboross Sep 30 '18 at 00:47
  • 3
    @daboross The consensus seems to be that most user-configurable settings are a bad thing, which makes no sense to me as it is just making Linux less approachable and user friendly/accessible for people moving from mac or windows. The whole libinput thing, by itself, is making me reconsider my switch since I have an RSI, and fine-tuning my mice is crucial for me.... – Douglas Gaskell Dec 21 '18 at 04:49
  • 1
    Note that the `1` in `sudo udevadm trigger /dev/input/event1` is the device node, it could be diferent to `1`, it was a `4` for my Microsoft Confort 4500. You can get this number with `xinput list` first to get the list of devices (note the id) and then `xinput list-props 10` where 10 is the id from the last command and the output search for `Device Node`. – PhoneixS May 27 '19 at 10:05
  • 1
    Has this actually worked for anyone? There's also this answer https://askubuntu.com/a/304653/593995, which mentions the same solution in the *Future* section, but there are multiple comments claiming it doesn't work. – Filip Kilibarda Jun 12 '20 at 23:34
2

You can make the "steps" of the scrolling smaller therefore making the scroll overall slower with:

xinput --set-prop "YOUR TOUCHPAD" "libinput Scrolling Pixel Distance" YOUR_SPEED

Add Option "ScrollPixelDistance" "YOUR_SPEED" to your xorg conf of the Trackpad to make it permanent.

Heres the docs for some more info:

https://man.archlinux.org/man/libinput.4#SCROLL_PIXEL_DISTANCE

GMON
  • 21
  • 1
  • This took me way too many hours to find out and i hope i can help someone else with this – GMON Dec 07 '21 at 22:49