How to disable mouse acceleration on ubuntu 18.04

My mouse has mouse acceleration and is too fast in ubuntu 18.04.
Creating 90-mouse.conf in xorg.conf.d doesn't work.
And when gnome will switch from xorg to wayland, these xorg.conf files wont work anymore.
Is there another way to disable mouse acceleration in ubuntu?


Ubuntu uses gnome and gnome uses dconf(a "database" full of settings).

How to:

  • Install dconf-editor
    • sudo apt install dconf-editor via terminal or
    • search for Dconf Editor in Ubuntu Software
  • Open the dconf-editor and go to org -> gnome -> desktop -> peripherals -> mouse

Here are the mouse settings.

  • accel-profile -> sets what kind of acceleration you want to have
  • speed -> sets the mouse speed

You have these options in accel-profile:

  • default
  • flat aka. disable mouse acceleration
  • adaptive

To disable mouse acceleration:

  • set Use default value to off
  • set Custom value to flat

To change the mouse speed:

  • go to org/gnome/desktop/peripherals/mouse/speed
  • set Use default value to off
  • change the Custom value to the number that works for you
    (the number can be between -1 and 1)

I found a solution that you can use directly from the terminal with the gsettings command.

# displays what this setting represents
gsettings describe org.gnome.desktop.peripherals.mouse accel-profile

# displays the values it accepts as input
gsettings range org.gnome.desktop.peripherals.mouse accel-profile

# sets the accelleration profile to 'flat'
gsettings set org.gnome.desktop.peripherals.mouse accel-profile 'flat'

I came to this solution because I stumbled on https://developer.gnome.org/GSettings/#gsettings which says.

For modifying the dconf backend storage itself, use the dconf tool; but gsettings should be used by preference.

The commands in this answer uses gsettings instead of dconf.