Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to turn the touchpad off when an usb mouse is plugged in
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Wed Dec 20, 2006 3:01 am    Post subject: How to turn the touchpad off when an usb mouse is plugged in Reply with quote

1) Compile your touchpad driver as a kernel module (in my system, appletouch);
2) Create an udev rule (/etc/udev/rules.d/10-local.rules) similar to that (from my system):
Code:
SUBSYSTEM=="usb", SYSFS{configuration}=="HID-Compliant Mouse", ACTION=="add", RUN+="/sbin/rmmod appletouch"
KERNEL=="3-1", SUBSYSTEM=="usb", ACTION=="remove", RUN+="/sbin/modprobe appletouch"
KERNEL=="2-1", SUBSYSTEM=="usb", ACTION=="remove", RUN+="/sbin/modprobe appletouch"
I got the kernel names (3-1, 2-1) from the dmesg output when attaching the usb mouse to each of my two usb ports. The sysfs parameter I got from udevinfo -a -p /sys/bus/usb/devices/3-1.

More information:
http://www.reactivated.net/writing_udev_rules.html

Enjoy! :wink:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Dirk.R.Gently
Guru
Guru


Joined: 29 Jan 2007
Posts: 546
Location: Titan

PostPosted: Sun Feb 11, 2007 6:38 am    Post subject: Reply with quote

I tried this but couldn't get it to work. When I did 'udevinfo...' instead of 'SYSFS{configuration}=="HID-Compliant Mouse"' I got SYSFS{configuration}=="" I tried this anyhow. I also tried using SYSFS name then SYSFS vendorid. Didn't work.
_________________
Helpful Linux Tidbits
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Sun Feb 11, 2007 9:27 am    Post subject: Reply with quote

Now I'm using
Code:
SYSFS{product}=="*Mouse*"
, as it is more general across different models. Maybe your mouse is not in 3-1, but in 2-1 or in other place? Did you check with dmesg if this is you mouse's address when you connect it?
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum