Completely disable mouse acceleration in the Linux desktop environment

(Notice) This article was written as a personal memorandum, just quoting the information found on the Arch Linux Wiki site.

Most (almost all) GUI environments (desktop OS / window manager, etc.) have a mouse acceleration function. Of course, xorg, the desktop environment of Linux, has such a function. The mouse acceleration function is a mechanism in which the pointer (mouse cursor) on the screen moves slowly when the mouse is moved slowly on the desk, and the pointer on the screen moves a longer distance when the mouse is moved quickly on the desk. is.

The problem here is that the physical mouse movement distance is not proportional to the pointer movement distance on the screen. If you try to press a button at a distance and move the mouse at a faster speed than usual, the pointer will fly away and stop the mouse pointer at the target location, as if you were moving the mouse normally. I went too far without being able to do it, and when I moved the mouse to return it, the pointer went too far in the opposite direction, and I had to operate the mouse fluttering for about 3 seconds just by pointing to the target coordinates, which was extremely stressful. Will be.

It seems that some people can easily adapt to the acceleration function of the mouse, but although I have used the mouse since the days of PC-9801, I could not get used to the acceleration function of the mouse. I'm frustrated every time I install the OS. In addition, game players, especially games in the FPS genre, require accurate and precise mouse operation, which can interfere with the acceleration function of the mouse. In the Windows environment, this is the setting to "improve pointer accuracy", and it is recommended by FPS gamers to uncheck this checkbox to disable the acceleration function. As already mentioned, not only games but also general desktop GUIs have a great effect on operability.

In Ubuntu 18 environment, install the package gnome-tweak-tool and turn off the acceleration function by setting the mouse acceleration profile to" Flat "with the setting tool gnome-tweaks. I can. That's fine, but I prefer the Xfce4 session to the Gnome session. I should have been able to set up to Ubuntu16, but I encountered a problem that the actual behavior is not reflected even if I change the mouse acceleration setting in the Xfce4 environment of Ubuntu18.

If this happens, I'll disable mouse acceleration on my own! !! That's why I searched and found ** [this](https://wiki.archlinux.jp/index.php/%E3%83%9E%E3%82%A6%E3%82%B9%E3 % 81% AE% E3% 82% A2% E3% 82% AF% E3% 82% BB% E3% 83% A9% E3% 83% AC% E3% 83% BC% E3% 82% B7% E3% 83 % A7% E3% 83% B3 # .E3.83.9E.E3.82.A6.E3.82.B9.E3.81.AE.E3.82.A2.E3.82.AF.E3.82.BB .E3.83.A9.E3.83.AC.E3.83.BC.E3.82.B7.E3.83.A7.E3.83.B3.E3.81.AE.E7.84.A1.E5 It is .8A.B9.E5.8C.96) **.

Edit the file /etc/X11/xorg.conf.d/50-mouse-acceleration.conf. At first, I don't think the directory itself exists, so create the directory and then create the file.

sudo mkdir -p /etc/X11/xorg.conf.d sudo nano /etc/X11/xorg.conf.d/50-mouse-acceleration.conf

/etc/X11/xorg.conf.d/50-mouse-acceleration.conf


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

Now, when I restart the OS, I can completely cut off the acceleration function of the mouse.

Recommended Posts

Completely disable mouse acceleration in the Linux desktop environment
Set a fixed IP in the Linux environment
The story of building the fastest Linux environment in the world
SSH restrictions in Linux environment
Build a Selenium environment on Amazon Linux 2 in the shortest time
Get the desktop path in Python
Get the desktop path in Python
Use a shortcut to enable or disable the touchpad in Linux Mint
pyenv + pyenv-Automatically load the virtualenv environment in the virtualenv environment
[Understanding in 3 minutes] The beginning of Linux
Install the package in an offline environment
Use the latest pip in a virtualenv environment
Install the python package in an offline environment
Precautions when installing packages in the conda environment
Problems and solutions for using the remote debugging environment for Linux apps in Visual Studio 2017