Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 20th July 2011, 04:28
PagsLin PagsLin is offline
Junior Member
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question udev (How To Auto-Disable The Touchpad When The Mouse Is Plugged In (Fedora 13))

I have a Synaptics touchpad device on Ubuntu 11.04 unity

After adjusting the scripts appropriately (available upon request), if I do a
udevadm test --action=add /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input12/mouse0
I get (at the end of a big dump)
udevadm_test: run: '/bin/sh -c 'DISPLAY=:0 /usr/bin/xinput --set-prop SynPS/2\ Synaptics\ TouchPad Device\ Enabled 0''
(terminated with two 's)
if I type the stuff within the outer 's (/bin/sh -c 'DISPLAY=:0 /usr/bin/xinput --set-prop SynPS/2\ Synaptics\ TouchPad Device\ Enabled 0')
I get my touchpad to turn off. And if I do the same with the remove command, I get it to give a command that if I run manually, it'll turn my touchpad back on.

but...here's the kicker: it's not being triggered as appropriate
if I try to run this with the mouse not plugged in, it doesn't work presumably because the test program needs the mouse to be plugged in to actually activate the script? I get a response like "unable to open device '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input14/mouse0'"

when I run a test to see how many mice I have plugged in and I have one external and one int, I get a response of 2. no externals and only an internal, I get a response of 1. So everything seems to be kosher there.

Any ideas? udev seems to be running because if I try to start the service, it won't let me. but it will let me restart.
Odd thing is, if I disable it with the external mouse inserted, then unplug it, my internal tracker thing doesn't turn on. But if I plug the external mouse back in, then the trackpad is usable again. Reversing the add/remove in the script doesn't help. Enable 1/0 seems to work correctly manually

As some synaptics rules were in the 60s higher than 61, I renamed to 99. Another interesting thing from the test command is as follows

$ udevadm test --action=add /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input24/mouse0 2>&1 | grep "udev_rules_apply_to_event"
udev_rules_apply_to_event: MODE 0640 /lib/udev/rules.d/50-udev-default.rules:23
udev_rules_apply_to_event: IMPORT 'input_id /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input24/mouse0' /lib/udev/rules.d/60-persistent-input.rules:7
udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input24/mouse0' /lib/udev/rules.d/60-persistent-input.rules:8
udev_rules_apply_to_event: LINK 'input/by-id/usb-Logitech_USB-PS_2_Optical_Mouse-mouse' /lib/udev/rules.d/60-persistent-input.rules:23
udev_rules_apply_to_event: IMPORT 'path_id /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input24/mouse0' /lib/udev/rules.d/60-persistent-input.rules:32
udev_rules_apply_to_event: LINK 'input/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-mouse' /lib/udev/rules.d/60-persistent-input.rules:33
udev_rules_apply_to_event: RUN '/bin/sh -c 'DISPLAY=:0 /usr/bin/xinput --set-prop SynPS/2\ Synaptics\ TouchPad Device\ Enabled 0'' /etc/udev/rules.d/99-touchpad.rules:17

that have anything to do with anything?
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 15:51
After updating Fedora 13 - Unable to login in kernel 3 and 5 Besrilo Kernel Questions 6 12th August 2010 20:01

All times are GMT +2. The time now is 19:31.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.