Changing Mouse Sensitivity on Lubuntu 16.04

March 21, 2018

Context I recently switched to using an X1 Carbon (2nd Gen) with Lubuntu 16.04 LTS as my main work machine. I’d been wanting to do this for a while, but now circumstances are such that I HAD to. It’s working out well so far. Everything worked out of the box. Installation was a breeze with a live USB. I did have trouble booting with a USB created on OSX, but that’s another post.

I connected an external mouse, which was too sensitive. I wanted to slow it down. Hunting through the Preferences I didn’t see a GUI way of accomplishing this. So this is how you slow down an external mouse using the command line.

Edit: I realized there was a GUI option to do all of this through Preferences > Keyboard and Mouse.

How To

To get a list of input devices

$ xinput --list --short

Which will output something like this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=14   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=15   [slave  pointer  (2)]
⎜   ↳ MOSART Semi. 2.4G Wireless Mouse          id=9    [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)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=12   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=16   [slave  keyboard (3)]

Now you can view and set properties for any of those devices. I need to change properties on the wireless mouse, which has an ID of 9.

$ xinput --list-props 9

Can also do:

$ xinput --list-props "MOSART Semi. 2.4G Wireless Mouse"

Either of those will output a list of properties like this:

Device 'MOSART Semi. 2.4G Wireless Mouse':
        Device Enabled (142):   1
        Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (269): 0
        Device Accel Constant Deceleration (270):   2.000000
        Device Accel Adaptive Deceleration (271):   1.000000
        Device Accel Velocity Scaling (272):    10.000000
        Device Product ID (260):    1578, 16642
        Device Node (261):  "/dev/input/event5"
        Evdev Axis Inversion (273): 0, 0
        Evdev Axes Swap (275):  0
        Axis Labels (276):  "Rel X" (152), "Rel Y" (153), "Rel Horiz Wheel" (266), "Rel Vert Wheel" (268)
        Button Labels (277):    "Button Left" (145), "Button Middle" (146), "Button Right" (147), "Button Wheel Up" (148), "Button Wheel Down" (149), "Button Horiz Wheel Left" (150), "Button Horiz Wheel Right" (151), "Button Side" (264), "Button Extra" (265), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263)
        Evdev Scrolling Distance (278): 1, 1, 1
        Evdev Middle Button Emulation (279):    0
        Evdev Middle Button Timeout (280):  50
        Evdev Middle Button Button (281):   2
        Evdev Third Button Emulation (282): 0
        Evdev Third Button Emulation Timeout (283): 1000
        Evdev Third Button Emulation Button (284):  3
        Evdev Third Button Emulation Threshold (285):   20
        Evdev Wheel Emulation (286):    0
        Evdev Wheel Emulation Axes (287):   0, 0, 4, 5
        Evdev Wheel Emulation Inertia (288):    10
        Evdev Wheel Emulation Timeout (289):    200
        Evdev Wheel Emulation Button (290): 4
        Evdev Drag Lock Buttons (291):  0

Each property also has an id, which is given in the parentheses, like 142, 144 etc. Each property also has a value which is the number after the :.

You can change any of the properties like so:

xinput --set-prop <id> <property number> <value>

So in my case, it would be:

xinput --set-prop 9 270 2.5

I'll tell you when I post stuff.

Subscribe to get my latest posts by email.