Hating The Touchpad

Spread the love

I hate touchpads. I sincerely hate the things. Maybe it's because I have big gorilla hands, but when I am trying to write at the keyboard, the darn things always pick up the slightest brush from my apparently huge, verging on monstrous, hands and translate those inadvertent touches into the most egregious of errors. Words, and sometimes whole sentences, are selected, to be overwritten by the next character I type at the keyboard. If I'm not paying attention, such as when I am looking away from the keyboard as I type, I have to go back several levels of "undo" in order to recapture the lost text, the net effect of which is that I lose the new text. I hate those things. And so I always plug in an external mouse and turn off the touchpad. But I digress . . . 

My old Acer laptop's hard drive crashed over the holidays. This is, remarkably, the first time in some 30 plus years that I've owned computers in which a hard drive actually crashed. In those many years, I've seen many crashed drives, including one belonging to Sally's PC, but never to mine. In my first book on Linux, back in 2001, I wrote that it wasn't a question of if your hard drive would eventually fail, but when. Marcel, meet "when". 

I actually liked my Acer notebook and I've had excellent luck with Acer products over the years, so despite the crashed hard drive, I decided to buy another Acer notebook. This one, the one I am writing on, is an Aspire V3-771 with an Intel i3-2370M processor, a 750 GB hard drive, 6 GB of RAM, and a bright 17 inch LED display. At $499, I simply could not pass it up.

The notebook came with Windows 7 but I erased it when I loaded the latest Linux Mint (based on Ubuntu Quetzal). It worked beautifully except for one thing. The touchpad wasn't being reported by the system as a touchpad. It worked fine in that I could use it to navigate the desktop, right-click here, left click there. Except that since I don't want the thing; remember, I want to use an external mouse. The trouble is that I just couldn't turn the thing off using the standard touchpad control programs. What to do, oh what to do?

We can find out how the X window system sees the various devices it works with by using the xinput command.  I opened a terminal session and typed "xinput list" at the shell prompt.

$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Optical Mouse                id=11   [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                        id=13   [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)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ HD Webcam                                 id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                          id=14   [slave  keyboard (3)]

As you can see, the touchpad is being recognized as a generic PS/2 mouse and not as a touchpad (I've bolded the appropriate line for emphasis). This is all fine and dandy except that I can't use touchpad control software to turn the thing off as I usually do when I load up a new notebook. This is a known issue for this particular chipset, and not just for Acer.  Luckily, the above command told me everything I needed to know in order to write a script that would do the job for me. I called my script, "disable_touchpad".

$ cat disable_touchpad 
#!/bin/bash
# 
echo "Disabling touchpad"
xinput set-prop 13 "Device Enabled" 0

The "0" at the end of the xinput line at the end of the script tells X to disable the device at id #13, which the "xinput list" command told us about. If you rerun the same command but add a 1 at the end of it instead of the 0, you will reactivate the touchpad. Consequently, I have a second script called "enable_touchpad" that does just that.

Now I can happily type away, with my touchpad safely locked away where it won't accidentally destroy all the work I've done. 

Liked it? Take a second to support Cooking With Linux on Patreon!
Become a patron at Patreon!