I've got a USB mouse attached to my Ubuntu notebook. This mouse is (unfortunately) really sensitive, and so it sometimes gets hard to hit small icons with the mouse pointer. This is really a hardware issue, it's not a bug and it's not Ubuntu's/gnome's fault. Still, I would very much like to this issue through software (solving through hardware would imply buying a new mouse).

Back in Windows, if I set the sensitivity as really low it was comfortable enough. In Ubuntu, even the lowest sensitivity and acceleration available (in the System>Prerences>Mouse menu) is still frustrating. How can I decrease it below the default minimum?

I tried xset, but it seems xset only deals with acceleration and threshold, but not actual sensitivity.

  • 1
    Where do i put these lines of code?
    – user430966
    Commented Jul 18, 2015 at 23:58

8 Answers 8


I have a Razer DeathAdder mouse and like in your case, the sensitivity/acceleration are too high even if I put them at the lowest level in the mouse preferences. So to solve this problem, I used the xinput command.

First, you will need your mouse ProductName and ID:

xinput list
 Razer Razer DeathAdder                     id=8    [slave  pointer  (2)]

Then you set the constant deceleration level that suits your needs with this command:

xinput set-prop 8 "Device Accel Constant Deceleration" 3
# 3 = LEVEL (factor) Higher = Slower.

To make the config persistent (and make it system wide), you will need to edit your xorg.conf (/etc/X11/xorg.conf).

Section "InputClass"
   Identifier      "Razer"                    # Whatever you want.
   MatchProduct    "Razer Razer DeathAdder"   # Product name from xinput list.
   Option          "ConstantDeceleration" "3" # The same value as xinput.

Once you reboot, you should have the same result as the xinput command.

Let me know if it helps.

  • Amazing! I had given it up weeks ago. Thank you so much, it does indeed help.
    – Malabarba
    Commented Nov 9, 2010 at 11:18
  • 6
    Bah: "property 'Device Accel Constant Deceleration' doesn't exist, you need to specify its type and format
    – mlissner
    Commented May 3, 2013 at 16:12
  • 1
    Still works, even for Linux Mint 17! Thanks :) Commented Jun 5, 2015 at 12:19
  • 3
    if I don't have the xorg.conf file, should I create it ? Commented Aug 5, 2016 at 22:58
  • 1
    @mlissner try a different divice id, mine has 3 pointers, and I had to use 10
    – flcoder
    Commented Oct 3, 2016 at 12:19

Ubuntu 17.04

Follow the instructions below, but change:

xinput set-prop 10 "Device Accel Constant Deceleration" 3


xinput set-prop 10 "libinput Accel Speed" -0.4

Thank you @tambre. Not sure this is quite as ideal as the old setting, but it's pretty close.

xset m 3

That still works pretty darn well. Need to figure out how to save so this is the default on reboot.

Ubuntu 16.04

@JackTravis 's answer was incredibly helpful, but I think it's worth updating for 16.04 because the xorg.conf file has moved and been split into multiple files. Before writing this answer, I tried using xset and played around with the xinput settings for a while before deciding that JackTravis's xinput ConstantDeceleration 3 setting was the best one for both my Logitech M510 on my desktop and some older wired mouse on my laptop.

1. List Mice

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech M510                             id=10   [slave  pointer  (2)]
⎜   ↳ Synaptics Inc. Composite TouchPad / TrackPoint    id=13   [slave  pointer  (2)]

My mouse was the Logitech M510, id=10 so I'm going to use that in this example. You will need to replace that with whatever your mouse is called. Now, use xinput set-prop to try out various settings until your mouse moves exactly as you want it to. The 10 in the following corresponds to the id=10 for my mouse on my system. You'll probably have to change that.

2. Change Your Settings Temporarily

$ xinput set-prop 10 "Device Accel Constant Deceleration" 3

If you're curious what other settings affect your device try

$ xinput --list-props 10

To clear the settings after I had really messed them up, all I had to do was unplug and re-plug my mouse.

3. Save the New Setting Permanently

If you like ConstantDeceleration of 3, then you need to add an xorg.conf file the new Ubuntu 16.04 way: by adding a new file in /usr/share/X11/xorg.conf.d/ You will want to change Logitech M510 and logitech-m510 in the file name to match your mouse. I think the 60- at the beginning of the file name is the priority with which these files are loaded. The following one-line shell command is what I put in my machineSetup.sh file in Dropbox so that I can quickly customize a new machine exactly how I like it within minutes of a fresh install:

sudo sh -c "echo 'Section \"InputClass\"\n\
   Identifier      \"My awesome new mouse\"\n\
   MatchProduct    \"Logitech M510\"\n\
   Option          \"ConstantDeceleration\" \"3\"\n\
EndSection\n' > /usr/share/X11/xorg.conf.d/60-logitech-m510.conf"

OR, if you want to do it the GUI way, open an editor as root then paste and edit the following into /usr/share/X11/xorg.conf.d/60-<whatever>.conf

Section "InputClass"
   Identifier      "My Awesome Blue Mouse"
   MatchProduct    "Logitech M510"
   Option          "ConstantDeceleration" "3"

4. Reboot

That's it. Just reboot and verify that the new settings took effect.

  • 1
    I unfortunately get the following: property 'Device Accel Constant Deceleration' doesn't exist, you need to specify its type and format when trying the command in the 2nd step (with my device id).
    – tambre
    Commented Feb 11, 2017 at 10:54
  • @tambre my guess is that you did not use the correct numerical ID identified in step 1 when you did step 2. If that's not the case, then I'm probably not going to know enough to be able to help you. Commented Feb 12, 2017 at 18:36
  • 2
    After listing the properties, Device Accel Constant Deceleration doesn't exsist there. It seems to be using libinput as the driver, so I had to modify the value of libinput Accel Speed, whose valid values are from -1 to 1, instead.
    – tambre
    Commented Feb 12, 2017 at 19:08
  • 1
    This worked for me, but my mouse (a "Razer Razer DeathAdder 2013") showed up multiple times under Virtual core pointer (twice) and Virtual core keyboard (once). Only the pointer devices had Device Accel Constant Deceleration, so I had to make sure to select one of those devices when testing with xinput. The xorg.conf.d file still worked perfectly.
    – Alex
    Commented Mar 18, 2017 at 19:19
  • To slow down the mouse at system startup, you can make Ubuntu run a bash script at startup. First, make a shell script (say, 'slow_mouse.sh') containing the 'xinput' command: #!/bin/bash xinput set-prop 12 "libinput Accel Speed" -0.9999999 Make it executable in terminal: $ chmod u+x slow_mouse.sh Then add this script to startup by running 'Startup Application Preferences' (use Unity search to find it) and adding this shell script you just created.
    – Joshua T
    Commented Mar 1, 2020 at 15:58

Late reply, but I think this is worth posting:

Since we're talking about gaming mouse here. Better is to turn off the mouse acceleration entirely (useful for FPS gamers etc.). Save up some CPU cycles by not using it to calculated any mouse acceleration and likely to be more accurate readings too (depend or the mouse hardware sensor has build-in extrapolation).

xinput set-prop <mousedevice_nr> "Device Accel Profile" -1


Section "InputClass"
   Identifier      "Razer"
   MatchProduct    "Razer DeathAdder"         # Product name from xinput list.
   Option          "AccelerationProfile" "-1" # Turn mouse accel off saving CPU cycles


  • I get this: X Error of failed request: BadValue (integer parameter out of range for operation). Commented Aug 9, 2016 at 10:33
  • great this was awesome thank you. I'm having issues with my Kingsis Peripherals Evoluent VerticalMouse 3. It has a DPI setting on the bottom of the mouse and at its highest DPI settings - even the lowest sensitivity settings are still too high. Commented Sep 20, 2017 at 17:20

A slight modification to Glen's answer, this works for my Logitech mouse and doubles "slowness" from 1 to 2.

Add to ~/.profile (as pointed out in comment) (or .bashrc but then you have to launch a terminal for the change to take place)

MOUSE_ID=`xinput list | grep Mouse | awk '{print $(NF-3)}' | cut -c4-5`
xinput set-prop $MOUSE_ID "Device Accel Constant Deceleration" $MOUSE_SLOWNESS
  • 1
    I think it is better to add those lines to the end of .profile instead of .bashrc. .profile is only run by interactive login shells meanwhile .bashrc will run every time a bash shell is started. See this answer for more information.
    – chus
    Commented Jun 28, 2017 at 0:49
  • technically .bash_aliases work work as well since the standard ubuntu .bashrc file loads it correct? Commented Sep 20, 2017 at 17:21

Sadly none of the answers worked 'enough' for my Ubuntu 18 Dell Wireless mouse. The speed was not slow enough.

This answer for a similar question helped me.

Use xinput list and get the device id. Refer top answer to do this properly.

Next do

xinput --set-prop 13(replace device id) "Coordinate Transformation Matrix" 0.2 0 0 0 0.2 0 0 0 1

Adjust the 0.2 above to any fraction as you want. Lower=Slower.

You can use the same technique as the top answer to make it permanent. Only replace "ConstantDeceleration" with "TransformationMatrix" and replace "3" with "0.2 0 0 0 0.2 0 0 0 1"

  • Also the only one that worked for my Razer Basilisk. Some more detail, after playing with the CTM: Along the diagonal, the first number is the horizontal direction. The second number is the vertical direction. The third number is the normalization factor - hence why a naive attempt, simply lowering all the numbers, is the same as leaving them all as 1 (as is replacing them all with negative 1). Commented May 10, 2022 at 17:32

If you use the PS2 port the mouse movement is much slower for the same mouse resolution.

For your mouse try to use a USB to PS2 converter and put the mouse it the PS2 port.


I have found the xorg.conf working solution:

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Sensitivity" "0.2"

Where a sensitivity of 1 is the default and the 0.2 one is decreasing it five times.

  • That's a creative idea. I think I've got a converter back at home, so I'll try it tomorrow.
    – Malabarba
    Commented Oct 27, 2010 at 17:26
  • I have found a working xorg.conf solution. Edited answer.
    – iugamarian
    Commented Feb 17, 2011 at 12:48
  • 1
    This won't work on laptops, though. Commented May 5, 2017 at 9:51
  • Where is xorg.conf?
    – Green
    Commented Feb 4, 2018 at 12:10

Read the manual for your mouse first before trying any of these other answers.

Razer brand mice have on the fly sensitivity features. For the DeathAdder that is mentioned in the accepted post, the one I use has 2 buttons on the top that controls sensitivity. If you make config changes first, you could one day have sensitivity that is too low because you unknowingly triggered the built in sensitivity features in the mouse.

I had just had this issue where I set the sensitivity as low as it would go and it was still too high, but it worked fine just days before. I had pressed the button to increase the sensitivity not knowing what they did, thinking I could use them as additional buttons for a game and ended up with very high mouse sensitivity. It's happened to me before, then would go back to normal and I never knew why, until just now.

  1. Install gnome-tweaks. Guide
  2. Open gnome-tweaks via terminal/Show Applications Button enter image description here
  3. Go to Keyboard & Mouse settings in the Gnome Tweaks window
  4. Set acceleration profile to Flat enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .