Created
February 19, 2024 05:33
-
-
Save reduktr/63c33b1f4de3c17a033b95a88a360193 to your computer and use it in GitHub Desktop.
Mouse Acceleration Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This particular guide is targeted at users who have seemingly set all the acceleration profile and dpi to the correct settings, but the mouse still feels slower than windows at the same dpi setting. | |
The problem here is not with the settings you have, but rather using the wrong settings for the input driver (or library for people who know what this means) that is running your devices. | |
In Arch Wiki (https://wiki.archlinux.org/index.php/Mouse_acceleration), it listed two different configs for disabling mouse acceleration. For computers not running libinput, the config for /etc/X11/xorg.conf.d/50-mouse-acceleration.conf is as follows: | |
/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 | |
Keep an eye on the "AccelSpeed" value (which is -1). | |
Here is the one for computers running libinput: | |
/etc/X11/xorg.conf.d/50-mouse-acceleration.conf | |
------------------------------------------------------------ | |
Section "InputClass" | |
Identifier "My Mouse" | |
Driver "libinput" | |
MatchIsPointer "yes" | |
Option "AccelProfile" "flat" | |
Option "AccelSpeed" "0" | |
EndSection | |
Notice that "AccelSpeed" is 0 here instead. | |
This is the culprit of the problem. | |
For computers not running libinput, using the first config is perfectly fine, and you should not have issue with sensitivity mismatch. On the other hand, computers running libinput but using the first config would experience mouse deceleration that causes your mouse sensitivity to mismatch that of windows. | |
This is because the -1 acceleration speed for libinput means deceleration, while the | |
Option "AccelerationProfile" "-1" | |
Option "AccelerationScheme" "none" | |
are useless since libinput does not recognise these settings. In other words, the mouse is set to have an adaptive (default accel profile in libinput) deceleration at all times. | |
Therefore, to fix this problem, we should look into checking if we are using the correct config for the corresponding driver. | |
To check that, first open the terminal emulator and enter the following: | |
xinput | |
This should give you a list of device name and their corresponding id. Find the id that correspond to your mouse (should be under Virtual core pointer -> something something mouse). | |
Using this id, enter: | |
xinput list-props <your-id> | |
Then it should show the corresponding properties associated with your mouse (i.e. the mouse settings). If you see list of properties with "libinput" as prefix, your computer is using libinput and you should use the second config listed above. Or else, you should use the first one (and you probably isn't having this issue either if you followed other guides already, if not seek for another guide). | |
To fix this issue temporarily before you reboot with the new config, enter these two lines: | |
xinput --set-prop <your-id> 'libinput Accel Profile Enabled' 0, 1 | |
xinput --set-prop <your-id> 'libinput Accel Speed' 0 | |
The first line set the accel profile to "flat" meaning a constant acceleration value. And the second line set the acceleration speed to 0, meaning no acceleration. Combined, this keep acceleration off at all times. | |
Hope this guide helps! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment