6

I'm using Xubuntu 17.10.

I'm trying to get rid of the mouse acceleration and I achieved that by doing the following steps:

sudo nano /usr/share/X11/xorg.conf.d/50-mouse-acceleration.conf

And in this file, paste the following:

Section "InputClass"
    Identifier "My Mouse"
    MatchIsPointer "yes"
    Option "AccelerationProfile" "-1"
    Option "AccelerationScheme" "none"
    Option "AccelSpeed" "-1"
EndSection

As a result, the mouse acceleration is disabled. Despite the mouse sensitivity being 30 in the settings, it's terribly slow. Does anyone know a different way on how to deactivate mouse acceleration(without killing the mouse speed to such a degree), or a way to increase the mouse sensitivity over its limit? (I have tried some ways for Ubuntu but none seemed to work)

Econ
  • 111

4 Answers4

2

I use xinput to control mouse speed (I have a SteelSeries Rival 310 mouse):

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ SteelSeries SteelSeries Rival 310 eSports Mouse   id=12   [slave  pointer  (2)]

Note the id=12. Now issue this command to list all the possible attributes that You can manipulate for the mouse:

$ xinput --list-props 12
Device 'SteelSeries SteelSeries Rival 310 eSports Mouse':
Device Enabled (152):   1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (292): -0.700000
libinput Accel Speed Default (293): 0.000000
libinput Accel Profiles Available (294):    1, 1
libinput Accel Profile Enabled (295):   1, 0
libinput Accel Profile Enabled Default (296):   1, 0
libinput Natural Scrolling Enabled (288):   0
libinput Natural Scrolling Enabled Default (289):   0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274):    0, 0
libinput Send Events Mode Enabled Default (275):    0, 0
libinput Left Handed Enabled (297): 0
libinput Left Handed Enabled Default (298): 0
libinput Scroll Methods Available (299):    0, 0, 1
libinput Scroll Method Enabled (300):   0, 0, 0
libinput Scroll Method Enabled Default (301):   0, 0, 0
libinput Button Scrolling Button (302): 2
libinput Button Scrolling Button Default (303): 2
libinput Middle Emulation Enabled (304):    0
libinput Middle Emulation Enabled Default (305):    0
Device Node (276):  "/dev/input/event3"
Device Product ID (277):    4152, 5920
libinput Drag Lock Buttons (290):   <no items>
libinput Horizontal Scroll Enabled (291):   1

Note the libinput Accel Speed (292): -0.700000. This is the attribute You will want to change. Set new value like this:

$ xinput --set-prop 12 "libinput Accel Speed" -0.7

Try different values to find the best one that works for You.

1

From ArchLinux instructions you can try an alternate method of controlling acceleration.

Comment out these three lines in your file:

# Option "AccelerationProfile" "-1"
# Option "AccelerationScheme" "none"
# Option "AccelSpeed" "-1"

And insert these lines below them:

# set the following to 1 1 0 respectively to disable acceleration.
Option "AccelerationNumerator" "2"
Option "AccelerationDenominator" "1"
Option "AccelerationThreshold" "4"

Try this initially and then reduce the numbers all the way down to 1, 1, 0 if necessary to totally disable acceleration.

The ArchLinux instructions linked above contain a link to Xorg Documentation that goes into further detail. Refer to these instructions if you can't get satisfactory results. One key point is you can focus on deceleration when acceleration alone doesn't get the job done.


Ubuntu 17.10 can use libinput instead of synaptics

You can be using different drivers; libinput which changes the old synaptics way of doing things. You must be careful to make appropriate changes. This Q&A provides different methods of controlling your mouse with libinput: Adaptive acceleration for touchpad on Ubuntu 17.10.


Logitech Performance MX Mouse default configuration

In my Ubuntu 16.04 the mouse has no special overrides and works perfectly out of the box:

$ xinput --list-props 10
Device 'Logitech Performance MX':
    Device Enabled (159):   1
    Coordinate Transformation Matrix (161): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (288): 0
    Device Accel Constant Deceleration (289):   1.000000
    Device Accel Adaptive Deceleration (290):   1.000000
    Device Accel Velocity Scaling (291):    10.000000
    Device Product ID (277):    1133, 4122
    Device Node (278):  "/dev/input/event7"
    Evdev Axis Inversion (292): 0, 0
    Evdev Axes Swap (294):  0
    Axis Labels (295):  "Rel X" (169), "Rel Y" (170), "Rel Horiz Wheel" (286), "Rel Vert Wheel" (287)
    Button Labels (296):    "Button Left" (162), "Button Middle" (163), "Button Right" (164), "Button Wheel Up" (165), "Button Wheel Down" (166), "Button Horiz Wheel Left" (167), "Button Horiz Wheel Right" (168), "Button Side" (281), "Button Extra" (282), "Button Forward" (283), "Button Back" (284), "Button Task" (285), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280), "Button Unknown" (280)
    Evdev Scrolling Distance (297): 1, 1, 1
    Evdev Middle Button Emulation (298):    0
    Evdev Middle Button Timeout (299):  50
    Evdev Third Button Emulation (300): 0
    Evdev Third Button Emulation Timeout (301): 1000
    Evdev Third Button Emulation Button (302):  3
    Evdev Third Button Emulation Threshold (303):   20
    Evdev Wheel Emulation (304):    0
    Evdev Wheel Emulation Axes (305):   0, 0, 4, 5
    Evdev Wheel Emulation Inertia (306):    10
    Evdev Wheel Emulation Timeout (307):    200
    Evdev Wheel Emulation Button (308): 4
    Evdev Drag Lock Buttons (309):  0

I use the regular Ubuntu 16.04 settings menu for mouse sensitivity:

mouse and touchpad settings.png

Configuration files are all defaults:

$ ll /usr/share/X11/xorg.conf.d/
total 44
drwxr-xr-x 2 root root 4096 Mar  4 09:22 ./
drwxr-xr-x 5 root root 4096 Mar  4 09:21 ../
-rw-r--r-- 1 root root   92 Feb 15  2017 10-amdgpu.conf
-rw-r--r-- 1 root root 1099 Mar  3  2016 10-evdev.conf
-rw-r--r-- 1 root root 1350 Oct 13 07:59 10-quirks.conf
-rw-r--r-- 1 root root  590 Mar  3  2016 11-evdev-quirks.conf
-rw-r--r-- 1 root root  364 Mar  3  2016 11-evdev-trackpoint.conf
-rw-r--r-- 1 root root 1751 Mar  3  2016 50-synaptics.conf
-rw-r--r-- 1 root root  115 Mar  3  2016 50-vmmouse.conf
-rw-r--r-- 1 root root 1385 Mar  3  2016 50-wacom.conf
-rw-r--r-- 1 root root  590 Mar  3  2016 51-synaptics-quirks.conf
1

I have already posted this answer elsewhere, but I think it applies equally well to this situation.

List all properties in your mouse/touchpad using xinput --list-props 11 (my touchpad ID is 11, yours will be different) and see the id of the property Device Accel Constant Deceleration.

Now type the command xinput --set-prop 11 268 0.3 (my touchpad deceleration property ID is 268, yours will be different) to decrease your mouse/touchpad deceleration.

Since it's pretty tedious to type these two commands every time you log in, put these two commands in the end of the /home/{your user name}/.bashrc file so that these get executed automatically whenever you log in.

This solution has a minor error though. With time, you'll notice that your mouse/touchpad ID will often switch between a couple of values. You may also have seen that. Workaround for this is to put the commands with all these values. For example, yesterday my Touchpad ID was 11, but today after I ran xinput --list, I saw that my touchpad ID has changed to 13. So Instead of only a single command xinput --set prop 11 268 0.3, I'll now put two commands:

xinput --set-prop 11 268 0.3
xinput --set-prop 13 268 0.3

at the end of the ~/.bashrc file.

Now whenever you log in, you'll see something strange written over the terminal like property '268' doesn't exist, you need to specify its type and format. That's because out of those two commands you put inside the ~/.bashrc file, one doesn't have the property 268, and hence this stderr (standard error) message. If you're cool with this silly error, you may ignore it, otherwise put a clear command below those two commands in the ~/.bashrc file. Now after executing those two commands, the terminal will also be cleared every time.

Zanna
  • 70,465
0

On Ubuntu 22.04 LTS, These are the commands I use:

For my user:

gsettings set org.gnome.desktop.peripherals.mouse accel-profile flat

For the login screen:

sudo apt-get install dbus-x11
sudo -u gdm dbus-launch --exit-with-session gsettings set org.gnome.desktop.peripherals.mouse accel-profile flat

You may remove dbus-x11 afterwards.