0

I want to disable automatically the laptop touchpad when I plug in a Wacom CTH-470L graphic tablet. I read here an answer about a touchpad-indicator, but it isn't available to 12.10.

I have also tried the gpointing-device-settings, but it doesn't provide such an option. Besides, there is a bug with this package regarding setting persistence after reboot.

I'm aware of the «Disable touchpad while typing» feature of the «Mouse and Touchpad» settings, but this is not what I'm looking for.

Ed Villegas
  • 3,413

1 Answers1

1

Create/edit this file

gksudo gedit /etc/udev/rules.d/01-touchpad.rules

Add this content

ACTION=="remove", SUBSYSTEM=="hid", RUN+="/sbin/modprobe psmouse"
ACTION=="add", SUBSYSTEM=="hid", RUN+="/sbin/rmmod psmouse" 
ACTION=="remove", ATTRS{idVendor}=="056a", RUN+="/sbin/modprobe psmouse"
ACTION=="add", ATTRS{idVendor}=="056a", RUN+="/sbin/rmmod psmouse"

You can find all information here: http://wiki.ubuntuusers.de/Touchpad in the section "Touchpad in Abhängigkeit einer Maus ein- und ausschalten".

Another way to solve the problem making use of phyton-scrips and synclient and examination of the content of mouse file in /proc/bus/input/devices is described here: http://wiki.ubuntuusers.de/Skripte/Touchpad-Verwaltung

diamy27
  • 64
  • The wiki you linked to is in German. Can you provide an English equivalent? – Glutanimate Jan 13 '13 at 18:37
  • Sorry, I didn't find anything equivalent in English language. The interesting part of the article is under the headline "Touchpad in Abhängigkeit einer Maus ein- und ausschalten" and it says, you have to create a rule for UDEV. Create a file /etc/udev/rules.d/01-touchpad.rules and edit as root.

    paste the lines

    ACTION=="remove", SUBSYSTEM=="hid", RUN+="/sbin/modprobe psmouse" ACTION=="add", SUBSYSTEM=="hid", RUN+="/sbin/rmmod psmouse"

    and save. There must be synclient present in your system, if not, do sudo apt-get install gpointing-device-settings Quoted http://wiki.ubuntuusers.de/Touchpad

    – diamy27 Jan 14 '13 at 06:05
  • Just found something in English language: http://brainstorm.ubuntu.com/idea/554 look for answer from "saivann (Brainstorm moderator) wrote on the 5 Mar 09 at 04:03" – diamy27 Jan 14 '13 at 06:11
  • @diamy27 I've tested this and works flawlessly with the USB mouse, but not with the Wacom tablet – Ed Villegas Jan 14 '13 at 18:49
  • Looks like the system has different keywords for the tablet. Seams you have to tailor an UDEV-rule yourself. To get a clue how this all works (it is not too much difficult) it is a good idea to read this: http://www.weather-watch.com/smf/index.php/topic,39257.0.html there are pretty nice examples. I think the command 'udevadm monitor --environment' will show you the device name you need to make the rule work with your tablet. More detailed information you will find here http://www.reactivated.net/writing_udev_rules.html Another aproach would be to try the phytonscripts from my first german lin – diamy27 Jan 15 '13 at 01:17
  • 1
    Maybe this could help: ACTION=="remove", ATTRS{idVendor}=="056a", RUN+="/sbin/modprobe psmouse" ACTION=="add", ATTRS{idVendor}=="056a", RUN+="/sbin/rmmod psmouse" since idVendor 056a is for Wacom. If not, replace HID with the aproppriate clue from the output of udevadm command. (you'll have to unplug the tablet first, then enter the udevadm monitor --environment command, and then plug the tablet again in order to get the udev events displayed.) – diamy27 Jan 15 '13 at 15:00
  • If the command synclient touchpadoff=0 resp. synclient touchpadoff=1 entered in a terminal activates and deactivates your touchpad, these UDEV-rules could work as well: ACTION=="remove", ATTRS{idVendor}=="056a", RUN+="synclient touchpadoff=0" and ACTION=="add", ATTRS{idVendor}=="056a", RUN+="synclient touchpadoff=1" – diamy27 Jan 15 '13 at 15:27
  • @diamy27 The synclient command didn't work, but the previous comment solved the question, so I edited your original text to reflect the comments and the right answer. Vielen Dank! – Ed Villegas Jan 16 '13 at 00:11
  • Fine it served your needs. I dived first time into UDEV for this, and was surprised by the fact that it is that easy to write rules yourself, although it is a very powerful thing indeed. Thanks for improving my first answer. I've written some additional lines, now the links match closer. – diamy27 Jan 16 '13 at 04:39