You are not logged in.

#1 2012-02-24 19:54:42

random.bits
Member
From: Ottawa Canada
Registered: 2004-07-18
Posts: 39

touchpad not turning off with mouse - fixed

I recently installed the test version of the linux kernel, 3.2.7-1-ARCH
Shortly after that I noticed that my touchpad was working even though my mouse was plugged in.

After looking at udev info/debug logs for way too long, I realized the mouse was coming in as mouse0

The udev script posted in the touchpad wiki detects mouse1 - mouse9.

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

 ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0",
 ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
 ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0",
 ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"

Minor edit and reload using udevadm control --reload fixed the problem.

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

 ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
 ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
 ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
 ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"

Someone might want to fix the wiki.

Cheers,
Mark

Offline

#2 2013-09-01 22:18:23

fhaddad78
Member
Registered: 2013-09-01
Posts: 1

Re: touchpad not turning off with mouse - fixed

Is there a way to get udev to query the current user rather than having to hard-code the username?

For example:

ENV{XAUTHORITY}="/home/$USER/.Xauthority"

This attempt doesn't work, and I've tried various methods similar to that, but haven't had any luck.

Offline

Board footer

Powered by FluxBB