Thursday 13 August 2009

Disabling my Synaptics Mouse using xinput

My Lenovo 3000 N200 Laptop has been suffering a bit lately from old age. On returning from a week working with my fellow colleagues in Dublin the 120GB HDD died. Fortunately I had early warning from some SMART monitoring tools telling me I had a potential HDD failure and I was able to backup all my data before the HDD finally died and restore it on a spare HDD. I managed to find a fairly reasonable Western Digital Scorpio 160GB HDD replacement for about £27 (w/o VAT and postage) which should arrive by Monday.

Unfortunately the Synaptics touchpad has been getting really flakey. Typically the touchpad gets random button press events and then the button states get locked and toggling the buttons just returns the mouse into some weird unpredictable state. Try using GNOME when the buttons states are reversed or stuck down and you get to see how frustrating this can be!

This has not been so much of a problem as I normally use a wireless mouse so the touchpad is never normally used. It's just a pain when the touchpad just goes into weird event mode at random times, usually when you least expect it! My long term solution is to strip the machine down and see why the touchpad is misbehaving (I've downloaded the maintenance manual from Lenovo and it's not a 5 minute task to fix it). Hence I need a quick workaround before I go insane from weird mouse events.

My original plan was to disable the mouse driver, but in Karmic it's built in so this would require rebuilding the kernel with the driver compiled out and I've been resisting this kind of ugly hack. However, tonight I found a better workaround to disable the touchpad:

1. Find the Synaptics Mouse using:

xinput list

This dumps out a load of info, e.g.:

SynPS/2 Synaptics TouchPad" id=8 [XExtensionPointer]
Type is TOUCHPAD
Num_buttons is 12
Num_axes is 2
Mode is Relative
Motion_buffer is 256
Axis 0 :
Min_value is 1472
Max_value is 5472
Resolution is 1
Axis 1 :
Min_value is 1408
Max_value is 4448
Resolution is 1

and a lot more besides.

2. This enabled me to find the textual handle and id number (8) to my touchpad. I then listed the properties using:

xinput list-props "SynPS/2 Synaptics TouchPad"

which dumps out all the properties, e.g.:

Device Enabled (115): 1
Synaptics Edges (260): 1752, 5192, 1620, 4236
Synaptics Finger (261): 24, 29, 255
Synaptics Tap Time (262): 180
Synaptics Tap Move (263): 221
Synaptics Tap Durations (264): 180, 180, 100

..and a lot more properties too..

I then spotted the "Device Enabled" property, which I then disabled using:

xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 0

..and my touchpad was disabled! No more annoying stray events!

3. I next added this rune into the Startup Applications Preferences (from System->Preferences->Startup Applications).

Hopefully when I've got a spare hour or two and the kids aren't around I will strip this laptop down and fix the touchpad. Meanwhile, I'm happy to get control back from my misbehaving touchpad!

2 comments:

  1. Thanks! This helped me to disable my touchpad. All I wanted was to disable it when typing because I keep touching it, but it is not recognized as a touchpad at all but as a Logitech mouse so that option was not available.

    ReplyDelete
  2. Another Synaptics driver property to toggle on/off the touchpad is the following:

    xinput set-int-prop "Device Name" "Synaptics Off" 8 0
    xinput set-int-prop "Device Name" "Synaptics Off" 8 1

    ReplyDelete