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?
1213 Answers
I removed the USB dongle that comes with my wireless mouse and plugged it back and fixed my scrolling speed instantly.
26To change the mouse parameters:
list the peripherals, note the good number with the device name of the mouse!
xinput listlist parameters from peripheral number 9
xinput list-props 9set the acceleration of peripheral 9 to value 3. The higher the value is, the more you divide the acceleration. Acceleration is maximum for a value equal to 1. The "basis" value seems to be 1.7, for me...
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).
Have fun.
10First check which device is the mouse:
xinput listNow pick the ID of your mouse there, and list its current settings:
xinput list-props <device-id>then change the settings like so where Evdev scrolling distance [vertical] [horizontal] [dial]
xinput set-prop <device-id> 'Evdev Scrolling Distance' 1 3 5where 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).
Confirmed working on 20.04:
- Install imwheel and adjust (to make things work):
- Run
sudo apt install imwheel - Run
bash <(curl -s ) - Using the slider adjust the scroll speed 'multiplier'. (I like it on 4/5)
- 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)
excerpted from here
7I 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
plugdevgroup:$ sudo gpasswd -a <your-username plugdev - Log out and log back in.
Now you can set your scroll-speed with the following xinput commands (source):
$ xinput set-prop <devnum> "Evdev Scrolling Distance" 8 1 1 # for smooth scroll
$ xinput set-prop <devnum> "Evdev Scrolling Distance" -8 1 1 # for smooth 'natural' scrollChanging the 8 to a lower value increases the sensitivity. Flipping it to negative changes the direction of scroll. Increasing the value decreases sensitivity.
This solution works for me:
sudo apt-get install imwheel zenityCreate a bash script and insert this:
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints
# 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<<EOF
".*"
None, Up, Button4, 1
None, Down, Button5, 1
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
EOF
fi
##########################################################
CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.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 FILENow run the script and set your desired mouse wheel speed.
Thanks to:
10I 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 295Note, that for example in Firefox you can set in about:config
mousewheel.system_scroll_override_on_root_content.vertical.factorRemember to set
mousewheel.system_scroll_override_on_root_content.enabledto true.
4Aside 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-synapticsnow 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.conffind 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:
#
# MatchDevicePath "/dev/input/event*" Option "VertScrollDelta" "16" Option "HorizScrollDelta" "16"
EndSectionSave 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:
Thanks to this new pull request on (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-libinputis available on your system:sudo apt-get install xserver-xorg-input-libinputdpkg -l | grep xserver-xorg-input-libinputii xserver-xorg-input-libinput 0.29.0-1 amd64 X.Org X server -- libinput input driver
- Then, checkout on the git tag as
0.29.0correspondent to the installed version0.29.0on the package manager. - Edit the source code, applying the following patch:
--- 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; - Change the value of
3onvalue *= 3;accordingly to how much you would like to change your scroll speed. To reduce the scroll speed, you can use lower values like0.9,0.99,0.2, etc. - After configuring a desired value, build and install your changes:
sudo apt-get build-dep libinputautoreconf -vif./configure --prefix=/usrmakemake install
- In order for changes to take effect, you will have to logout and login of your xorg/user session.
- To revert your changes, just reinstall the
xserver-xorg-input-libinputusing your package manager, i.e.,sudo apt-get install xserver-xorg-input-libinput --reinstall
I'm using a "Logitech MAX Master 2". I've tried the solutions in here but what it only works was intalling solaar and modify the configuration through it. Hope this helps.
1My problem was slightly different and I'm posting the answer here to assist other users as well. My issue was that the default mouse hardware added by VmWare Fusion or Workstation was not supporting scrolling in Ubuntu and other Linux distros, while the cursor was moving.
The issue seemed at first to be erratic scrolling, slow scrolling (which lead me here), while in fact, it was a different problem. This thread help me fixed it.
By moving evdev to a later "init" order, the scrolling came back to act as normal.
1Turning the mouse on and off or removing the USB dongle shortly always did the trick for me. However, now it was not working anymore. Neither was the imwheel solution mentioned above a few times. Only after removing solaar the mouse reboot trick worked again.
On my ThinkPad, to change the scroll speed using the TrackPoint, inspired by other answers here, I did
xinput listand found the TrackPoint to be named TPPS/2 Elan TrackPoint. I use the name and not the ID as I found the ID can change on reboot, making. I continued with
xinput list-props 'TPPS/2 Elan TrackPoint'under which I saw libinput Scrolling Pixel Distance. I set this using
xinput set-prop 'TPPS/2 Elan TrackPoint' 'libinput Scrolling Pixel Distance' xwhere x could be values between 10 and 50 (I experimented), lower values meaning faster scrolling.
I finally added the last command in the end of my ~/.profile.