Overriding mouse/touchpad speed in Ubuntu

Laptop trackpads have sucked for a long while now, and will continue to do so in all probability along with the vast majority of laptop displays (atleast they used to be good a while back, remember 1680×1050? Yeah, I don’t either). I’ve been using the Ubuntu 13.04 development release and the slider under Mouse and Touchpad refuses to let me change the default speed of the trackpad, which is incredibly slow. If you’ve faced a similar problem and would like to increase or decrease the speed of your mouse pointer (either the touchpad or a mouse), here’s how you can.

As usual, we’re going to need some command line kung-fu. Open up a terminal window and type the following –

xinput --list --short

My output is as follows –

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [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)]
↳ Power Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
↳ HP WMI hotkeys id=11 [slave keyboard (3)]

The heading “Virtual core pointer” lists a Synaptics touchpad as an input pointer.

In the following commands, swap out “SynPS/2 Synaptics TouchPad” with the name of your desired input device from the output of the previous one.

xinput --list-props "SynPS/2 Synaptics TouchPad"

lists the properties of my trackpad as –

Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (133): 1
Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (255): 1
Device Accel Constant Deceleration (256): 1.000000
Device Accel Adaptive Deceleration (257): 1.000000
Device Accel Velocity Scaling (258): 12.500000
Synaptics Edges (259): 1548, 5416, 1216, 4684
Synaptics Finger (260): 25, 30, 256
Synaptics Tap Time (261): 180
Synaptics Tap Move (262): 265
Synaptics Tap Durations (263): 180, 180, 100
Synaptics ClickPad (264): 0
Synaptics Tap FastTap (265): 0
Synaptics Middle Button Timeout (266): 75
Synaptics Two-Finger Pressure (267): 282
Synaptics Two-Finger Width (268): 7
Synaptics Scrolling Distance (269): 120, 120
Synaptics Edge Scrolling (270): 1, 0, 0
Synaptics Two-Finger Scrolling (271): 0, 0
Synaptics Move Speed (272): 1.000000, 1.750000, 0.033118, 40.000000
Synaptics Edge Motion Pressure (273): 30, 160
Synaptics Edge Motion Speed (274): 1, 483
Synaptics Edge Motion Always (275): 0
Synaptics Off (276): 0
Synaptics Locked Drags (277): 0
Synaptics Locked Drags Timeout (278): 5000
Synaptics Tap Action (279): 2, 3, 0, 0, 1, 3, 0
Synaptics Click Action (280): 1, 1, 0
Synaptics Circular Scrolling (281): 0
Synaptics Circular Scrolling Distance (282): 0.100000
Synaptics Circular Scrolling Trigger (283): 0
Synaptics Circular Pad (284): 0
Synaptics Palm Detection (285): 0
Synaptics Palm Dimensions (286): 10, 200
Synaptics Coasting Speed (287): 20.000000, 50.000000
Synaptics Pressure Motion (288): 30, 160
Synaptics Pressure Motion Factor (289): 1.000000, 1.000000
Synaptics Resolution Detect (290): 1
Synaptics Grab Event Device (291): 1
Synaptics Gestures (292): 1
Synaptics Capabilities (293): 1, 0, 1, 1, 1, 1, 1
Synaptics Pad Resolution (294): 94, 47
Synaptics Area (295): 0, 0, 0, 0
Synaptics Noise Cancellation (296): 8, 8
Device Product ID (250): 2, 7
Device Node (251): "/dev/input/event6"

Now reduce the Device Accel Constant Deceleration to suit your needs –

xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Constant Deceleration" 1

The value 1 in the above command can be replaced with a number that suits your needs. The effect of the command is instantaneous, so play around with some numbers (decimals are allowed) to see what’s best for you (my sweet spot was 1).

To automate this every time your system boots up, create a shell script (say ~/touchpad.sh) and add the following lines to it –

#!/bin/sh

xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Constant Deceleration" 1

Make it executable – chmod +x ~/touchpad.sh

and add it to your list of Startup Applications. If this is still too slow for you, try increasing the value of Device Accel Velocity Scaling by modifying the command listed above (you’ll have to add the new one to the shell script as well).

Credit for this post goes to this thread

3 thoughts on “Overriding mouse/touchpad speed in Ubuntu

  1. Just a note, make sure that you write out everything exactly as its listed in xinput –list—short. Capitalization matters. For example, It should be TouchPad, not Touchpad.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s