6

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.

9

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.

  • Thanks. This worked. I had to disable id 13, as it wouldn't let me disable the master. Either way, the touchpad appears to be dead. Thank you for your help! – ArimusAOV Sep 1 '16 at 23:28
  • Glad it worked! – TheWanderer Sep 1 '16 at 23:31
3

Yes it is very easy. Blacklist the touchpad module.

To find out what module it is, you can run

grep -iA 2 touchpad /proc/bus/input/devices

Here you will see something like elan or synaptic

And then

ls $(find /lib/modules/$(uname -r) -type d -name mouse)

To see all the mouse & touchpad modules for the current kernel. The touchpad will have i2c or touch in the name, mouse modules will have mouse or usb. Cross reference these two results

Edit: I recently figured out how to reliably get the name of the driver in use with a convoluted command, which terdon simplified nicely for me:

grep -hriPo 'DRIVER=\K.+' /sys 2>/dev/null | while read driver; do [ -e /lib/modules/$(uname -r)/kernel/drivers/input/mouse/"$driver"* ] && echo $driver; done

I'm guessing your touchpad module is synaptics_i2c.ko. You will omit the .ko when writing the blacklist

check you got the right module

sudo modprobe -r synaptics_i2c

immediately the touchpad will die, if you got the correct module. Now to prevent it from ever being loaded:

Create a file in the /etc/modprobe.d directory with the .conf extension, containing the words blacklist synaptics_i2c (replace with your module name, excluding .ko). For example

echo "blacklist synaptics_i2c" | sudo tee /etc/modprobe.d/blacklist-touch.conf

(but check that the filename you choose does not already exist)

  • Thank you for your help. After trying several of these, none seemed to disable the touchpad, but it was definitely worth a shot. Thanks again! – ArimusAOV Sep 1 '16 at 23:29
  • Oh well, glad you fixed it anyway @ArimusAOV it would work if you found the right one :) – Zanna Sep 1 '16 at 23:39
  • There were a total of 10 to try, went for the ones with Synaptics and elan in them first. When those were a no go, I decided to try the other answer. Still getting used to all this stuff. Can be a bit overwhelming at times lol. Thanks again :) – ArimusAOV Sep 1 '16 at 23:43
1

Run synclient TouchpadOff=1 to remove the touchpad.

  • When this works, it is a quick and straightforward method. I can use it in my laptops and it can be 'put into autostart'. But it does not work in all computers. – sudodus Jul 30 '17 at 2:31
1

You may wish to check and see if the touchpad can be disabled in the BIOS first. My Toshiba and Lenovo laptops both have this option. If the setting is available, you may prefer this over a software setting, as it will be easier to remember how to undo (as long as you remember that you used it).

0

Here's what I did for Lubuntu 18.04:

Preferences>Default applications for LXSession>AutoStart> then "Add" synclient TouchpadOff=1

My Touchpad is off even when the machine is restarted.

I do love GUI's.

Peace, Ed

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.