How can I adjust the mouse scroll speed?
This question has been asked many times with no answer. I’ve used my basic Google skills and haven’t come across a fix. This is system wide. My mouse simply scrolls too fast. I’m new to ubuntu and linux in general. Would switching styles or whatever it is called (Ubuntu, KDE, Xubuntu) help at all? Is there a terminal code I can enter?
Forum won’t let me answer, but the solutions below didn’t work for me and I found one that did for my touchpad scroll: simply type ‘synclient VertScrollDelta=100’ into terminal.
I want to know why the System Settings does not support making adjustment on the mouse srolling speed.
14 Answers 14
I removed the USB dongle that comes with my wireless mouse and plugged it back and fixed my scrolling speed instantly.
This answer especially applies to a Logitech mouse connected via their Unifying wireless receiver after switching the «smooth scrolling» option in solaar.
Confirmed working on 20.04:
- Install imwheel and adjust (to make things work):
- Run sudo apt install imwheel
- Run bash <(curl -s http://www.nicknorton.net/mousewheel.sh)
-
- If the above fails, try this alternative address bash <(curl -s https://gist.githubusercontent.com/AshishKapoor/6f054e43578659b4525c47bf279099ba/raw/0b2ad8b67f02ebb01d99294b0ecb6feacc078f67/mousewheel.sh)
- Add imwheel as a startup application (to make things continue working after restart):
- Open Apps -> Startup Applications
- Add a new entry to the bottom of the list: Name= Wheel Scroll Speed , Command= imwheel , Comment= Activates wheel scroll speed fix on system startup (or whatever you like)
Important note:
If you have extra mouse buttons, this might mess things up as far as their functionality. If you find some buttons mis-behaving after following these instructions, you can always go «back» by removing imwheel as a startup application, and restarting your computer.
However, you can still make this work by specifying which buttons to modify in the imwheel command.
imwheel -b «45» this might work for certain mouse types.
imwheel -b «4 5 6 7» this might also work.
In any case, you can try and figure out the button numbers for you own specific mouse scroll wheel, and specify them and only them.
Use the command with button numbers both when running for the first time, and as the command you input as a startup application.
It is simply unbelievable that the speed of the scroll wheel cannot be adjusted without external apps in 2022.
The nicknorton.net is down, you can use: bash <(curl -s https://gist.githubusercontent.com/AshishKapoor/6f054e43578659b4525c47bf279099ba/raw/0b2ad8b67f02ebb01d99294b0ecb6feacc078f67/mousewheel.sh)
To change the mouse parameters:
- list the peripherals, note the good number with the device name of the mouse!
xinput set-prop 9 'Device Accel Constant Deceleration' 3
To permanently set the change :
A hidden file in your directory is «.profile» (Ctrl+H to see hidden files) Double click on it and open it. Copy paste the previous command at the end. That’s it!P.S. to apply the same command for all users you can edit the file /etc/profile (not an hidden file).
I tried it and this seems to act just on the cursor speed; it has no effect on the scroll wheel behavior.
-1 This is about the speed of moving mouse that can changed by default in settings. This is wrong answer to this question! Not about mouse scroll speed.
Also.. what the hell is this nonsense? The whole point of a mouse is to interact with GUIs, and you’re telling me nobody has made a GUI for changing the mouse settings?
First check which device is the mouse:
Now pick the ID of your mouse there, and list its current settings:
then change the settings like so where Evdev scrolling distance [vertical] [horizontal] [dial]
xinput set-prop 'Evdev Scrolling Distance' 1 3 5
where the combination of the last three numbers is mouse-dependent:
- first number, the direction of scrolling (minus reverse)
- second number, speed of scrolling somehow
- third number, speed of scrolling somehow
- Changing these values to bigger numbers means you scroll slower (AgentME).
this answer would be better if it provided a command to get the settings first, before user decdied to set them
I don’t think this answer is generic — if I do «xinput list-props 10» it says the device is «Sleep button» not the mouse, so check to see what device you’re altering.
@LéoLéopoldHertz준영 No need, just wanted to clarify what the values mean. Not enough info for an answer.
Changing these values to bigger numbers means you scroll slower. If the values are already all set to 1 then there isn’t any benefit to touching this setting.
I have a Logitech PerformanceMouse MX and none of the solutions here worked. The only thing that worked for me was using some parts of this project.
- Add this PPA and then install xserver-xorg-input-evdev .
- Check out the Solaar project and run rules.d/install.sh . It will copy the udev rules to the appropriate location and ask permissions if necessary.
- Remove the receiver and plug it back in.
- Add yourself to the plugdev group: $ sudo gpasswd -a
- Log out and log back in.
Now you can set your scroll-speed with the following xinput commands (source):
$ xinput set-prop "Evdev Scrolling Distance" 8 1 1 # for smooth scroll $ xinput set-prop "Evdev Scrolling Distance" -8 1 1 # for smooth 'natural' scroll
Changing the 8 to a lower value increases the sensitivity. Flipping it to negative changes the direction of scroll. Increasing the value decreases sensitivity.
I also have a Logitech Performance MX — on Ubuntu 16.04 just running xinput set-prop 9 ‘Evdev Scrolling Distance’ 3 1 1 solved the problem (9 is my
). No need to install anything. Add this to your .profile file to apply on login. To get the run xinput list . Doesn’t work in Ubuntu 20.10 as it is using libinput instead of evdev , plus the mentioned PPA seems to be abandoned.
1 1 1 is too slow, and I’d like to go faster. Setting any of them to below 1 has no effect (if I ask to read the properties, anything below 1 is simply set to 0!), but setting them higher than 1 definitely slows them down. Any ideas on how to achieve sub-1 values that take effect?
This solution works for me:
sudo apt-get install imwheel zenity
Create a bash script and insert this:
#!/bin/bash # Version 0.1 Tuesday, 07 May 2013 # Comments and complaints http://www.nicknorton.net # GUI for mouse wheel speed using imwheel in Gnome # imwheel needs to be installed for this script to work # sudo apt-get install imwheel # Pretty much hard wired to only use a mouse with # left, right and wheel in the middle. # If you have a mouse with complications or special needs, # use the command xev to find what your wheel does. # ### see if imwheel config exists, if not create it ### if [ ! -f ~/.imwheelrc ] then cat >~/.imwheelrc' ~/.imwheelrc) NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1) if [ "$NEW_VALUE" == "" ]; then exit 0 fi sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value. sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value. cat ~/.imwheelrc imwheel -kill # END OF SCRIPT FILE
Now run the script and set your desired mouse wheel speed.
@neverMind9 Zenity is a dialog creation utility. It is used by the script I pasted above in order to create the mouse wheel speed selector.
Change the last real line of the script to say imwheel -kill -b «4 5» and your back/forward mouse buttons will work again.
I have written a simple script which allows you to find which device has this property ( The script basically iterates over all xinput devices and lists only those which have any property containing scroll ).
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 '<>')" xinput --set-prop 11 295
Note, that for example in Firefox you can set in about:config
mousewheel.system_scroll_override_on_root_content.vertical.factor
mousewheel.system_scroll_override_on_root_content.enabled
Thans for that firefox tip. Because adjusting xinput props to 1 is still super sloppy scroll speed. I set my firefox scroll speed to 100 now! 😀
Aside from all of these You can use the old good synaptics dirver for this (Yeah I know it is not supported anymore but lets be honest libinput documentation sucks hard).
If you are on 18.04 or above just install synaptics:sudo apt-get install xserver-xorg-input-synaptics
now go to /usr/share/X11/xorg.conf.d and just edit the file 70-synaptics.conf
cd /usr/share/X11/xorg.conf.d sudo nano 70-synaptics.conf
find the section Section «InputClass» Identifier «touchpad catchall» then add these options:
Option "VertScrollDelta" "16" Option "HorizScrollDelta" "16"
The default number is 26 the lower the number it is faster to scroll, the higher it is slower to scroll. Finally it should look like this:
Section "InputClass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" # This option is recommend on all Linux systems using evdev, but cannot be # enabled by default. See the following link for details: # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html # MatchDevicePath "/dev/input/event*" Option "VertScrollDelta" "16" Option "HorizScrollDelta" "16" EndSection
Save the file and close it ( Ctrl + O then Enter then Ctrl + X ).
Log out and back in for the changes to take effect.
Synaptics driver is a driver with huge options I dont know who in a world has decided to move to the NO OPTION libinput.
Other options can be found at:
https://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.htmlThanks to this new pull request on https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/12 (WIP: Add scroll distance scale setting ), we will be able to change the scroll speed some time in the future (i.e., after that pull request gets merged and the package xserver-xorg-input-libinput is updated with it) without having to use bugged hacks as imwheel.
For now, you can install it directly from the source code:
- WARNING: misconfiguration of an X input driver may leave you without usable input devices in your X session. Use with caution.
- You can help yourself recover from an input problem by allowing an SSH connection to be performed right after your computer boot. So, if you do not have any usable input on your computer, you can always connect to it using the SSH connection to try and fix the input problem/misconfiguration.
- First check which version of xserver-xorg-input-libinput is available on your system:
- sudo apt-get install xserver-xorg-input-libinput
- dpkg -l | grep xserver-xorg-input-libinput
ii xserver-xorg-input-libinput 0.29.0-1 amd64 X.Org X server -- libinput input driver
--- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1651,6 +1651,7 @@ calculate_axis_value(struct xf86libinput *driver_data, value = libinput_event_pointer_get_axis_value(event, axis); > + value *= 3; *value_out = value; return true;
- sudo apt-get build-dep libinput
- autoreconf -vif
- ./configure —prefix=/usr
- make
- make install
Как увеличить скорость прокрутки колёсика мыши в Ubuntu и производных
Каждый пользователь имеет мышь определенного производителя на свой вкус. Поэтому скорость прокрутки на каждом компьютере индивидуальна. На более дорогих моделях бывает функция изменения прокрутки на самой мыши, но что делать, если у вас самая обычная мышь?
Уточним, что колесико прокручивает некоторое количество строк за один раз, а не просто ускоряется или замедляется. В Linux на сегодняшний день нет приложения с визуальной оболочкой для редактирования этого параметра, но, утилита, работающая в терминале imwheel, поможет вам.
Установка приложения производится следующей командой:
sudo apt-get install imwheel
После установки, создаем в домашнем каталоге файл .imwheelrc . Откроем его для того, чтобы отредактировать:
В файл необходимо дописать следующие строчки:
«.*»
None, Up, Button4, 3
None, Down, Button5, 3Сохраняем файл и выключаем редактор.
Итак, что же скрывают добавленные строки?
Первая строка говорит о том, что количество строк, которое колесико будет прокручивать будет одинаковым для каждого приложения.
В зависимости от вашего желания, параметры Down и Up можно менять на свой вкус, они соответствуют количеству прокручиваемых строк вниз и вверх.
Теперь, запускайте утилиту imwheel из меню Dash следующим образом:
Проверяйте скорость прокрутки в своих любимых приложениях. Если что-то не устроит, просто поменяйте параметры в файле imwheelrc и перезапустите утилиту. В терминале наберите:
И опять запустите приложение.
Чтобы каждый раз при запуске компьютера не лезть в меню Dash, добавьте приложение в автозапуск следующим образом:
Откройте настройки Автоматически запускаемые приложения в меню Dash и проведите следующие манипуляции:
Чтобы удалить утилиту, просто наберите в терминале:
sudo apt-get remove imwheel
и удалите ранее созданный файл: imwheelrc.