Ubuntu – Permanently Disable Touchpad – Lubuntu 16.04

16.04lubuntusynapticstouchpad

So here's the deal, my touchpad on my Gateway T-1623 is basically broken. As a result, I use an external plug and play mouse. I can use the keyboard just fine, however, if I inadvertently so much as breathe on the touchpad, it flips out, and prevents me from using my external mouse until I do the following:

sudo modprobe -r psmouse
sudo modprobe psmouse

So My question is this, is there a way to permanently disable my touchpad in Lubuntu (by using terminal, or other means) such that it will basically make my touchpad not function? I appreciate any help you can afford on the matter, and thank you in advance.

Best Answer

I believe so. You'll have to use a few commands and make a startup script, but you know the former and the latter isn't hard to do.

First, run xinput list. Your output should be similar to the following:

zachary@MCServer:~$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [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)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]

If you can, unplug your mouse beforehand.

Now you need to find the ID of the trackpad. Use the main ID (not the one that's indented under a main item) for now. If it turns out that the main item covers both the mouse and touchpad, choose the corresponding sub-ID.

Now you need to run

xinput set-prop DEVICEID "Device Enabled" 0

For example, if I wanted to disable my mouse, I'd use 2 for DEVICEID.

Plug in your mouse and make sure it works and the touchpad doesn't. If the mouse doesn't work, then run

xinput set-prop DEVICEID "Device Enabled" 1

and run the first command again with the sub-ID instead.

To make this apply on startup, you need to make it a startup command. Open Startup Applications (or the equivalent on your desktop environment) and add the first command.


Alternatively, you could just disconnect the trackpad internally.