Skip to content

Instantly share code, notes, and snippets.

@martynjarvis
Last active August 29, 2015 14:08
Show Gist options
  • Save martynjarvis/6d9eb738c2ab83bf33ab to your computer and use it in GitHub Desktop.
Save martynjarvis/6d9eb738c2ab83bf33ab to your computer and use it in GitHub Desktop.
Disable Mouse Acceleration - Ubuntu

List all devices:

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation          id=10   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)    id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ CHICONY HP Basic USB Keyboard             id=9    [slave  keyboard (3)]

Find ID of mouse, in this case 8. List all settings:

$ xinput list-props 8
Device 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)':
        Device Enabled (142):   1
        Device Accel Profile (265):     0
        Device Accel Constant Deceleration (266):       1.000000
        Device Accel Adaptive Deceleration (268):       1.000000
        Device Accel Velocity Scaling (269):    10.000000
        Evdev Reopen Attempts (258):    10
        Evdev Axis Inversion (270):     0, 0
        Evdev Axes Swap (272):  0
        Axis Labels (273):      "Rel X" (150), "Rel Y" (151)
        Button Labels (274):    "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147), "Button Horiz Wheel Left" (148), "Button Horiz Wheel Right" (149)
        Evdev Middle Button Emulation (275):    2
        Evdev Middle Button Timeout (276):      50
        Evdev Wheel Emulation (277):    0
        Evdev Wheel Emulation Axes (278):       0, 0, 4, 5
        Evdev Wheel Emulation Inertia (279):    10
        Evdev Wheel Emulation Timeout (280):    200
        Evdev Wheel Emulation Button (281):     4
        Evdev Drag Lock Buttons (282):  0

Set 'Device Accel Profile (265)' to -1:

$ xinput set-prop 8 265 -1

Adjust mouse sensitivity ('Device Accel Constant Deceleration') if needed (minimum of 1.000):

xinput set-prop 8 266 1.000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment