« Flashback Version 1.4 Posted | Main | Lac Fourmilab: Pictures from an Inundation »

Thursday, February 16, 2006

Disabling the Dell Inspiron Touchpad on Fedora Core Linux

The Dell Inspiron 9100 “laptop” I use as my primary development machine has both a touchpad (manufactured by Synaptics or ALPS) and an “eraserhead” pointing stick between the ‘B’, ‘G’, and ‘H’ keys of the keyboard. With the Red Hat Enterprise Linux 3 I previously used on the machine, if you performed the installation with a USB mouse attached, the touchpad and eraserhead would not be configured as pointing devices—if you wished to use them, you had to manually modify the X11 configuration to enable them which, since I always use the machine with a mouse, I never did.

With the Fedora Core 4 distribution I recently installed, however, the touchpad and eraserhead are enabled regardless of whether a mouse is attached during the installation or thereafter: all of the pointing devices are live simultaneously and you can use whichever strikes your fancy. This may seem convenient, since when travelling you might decide to put up with the touchpad rather than connect a mouse and find some surface on which to operate it. Unfortunately, the location of the touchpad, below the space bar on the keyboard, makes it extremely easy to inadvertently touch when you're furiously typing on the keyboard, and since it is not only sensitive to finger motion to move the cursor but also to tap gestures emulating button clicks (even though there are two dedicated buttons both above and below the touchpad), it's quite a common occurrence while editing a document to find that an accidental brush of the touchpad has made the cursor jump into an entirely different part of the text where your subsequent keystrokes wind up. Needless to say, this is intensely irritating.

It would be really nice if you could configure the machine so that when an external pointing device was plugged in the touchpad was simply disabled. (The eraserhead might be disabled as well, but it isn't the troublemaker the touchpad is.) I haven't figured out how to accomplish this yet, but I did track down how to turn the touchpad on and off; like most such things, it is less than obvious.

Since the touchpad is prominently configured in the /etc/X11/xorg.conf file, I thought that simply removing the configuration statements for it would do the trick, but nothing doing—it appears the touchpad is getting in at a lower level and emulating mouse motion even if it isn't explicitly configured. There is, however, a “synclient” program included with Fedora Core 4 which permits setting the touchpad's myriad configuration parameters (use the “−l” option to see them all) including, happily, one named “TouchpadOff” which, if set to 1, disables the touchpad entirely. Unfortunately, the synclient program does not work with the touchpad configuration installed by the distribution, because it requires a shared memory configuration facility which isn't enabled by default. In order to use synclient, you have to edit the /etc/X11/xorg.conf file and add the statement:

    Option       "SHMConfig" "on"
in the InputDevice section for the synaptics driver, then either restart the X server or reboot to put the change into effect. Then you can disable the touchpad with the command:
    synclient TouchpadOff=1
or turn it back on by specifying 0 instead of 1.

Since the specification is kind of backwards and difficult to remember, I've made a little shell script named touchpad which you can download to simplify matters. You simply say “touchpad on” or “touchpad off” to enable or disable the touchpad, or call the script with no argument to print whether the touchpad is currently on or off.

You're supposed to be able to enable and disable the eraserhead by setting “GuestMouseOff” instead of “TouchpadOff” in synclient, but it doesn't actually do anything as far as I can determine.

Posted at February 16, 2006 00:38