* udev rules wont work
@ 2009-07-21 12:58 eial
2009-07-21 13:13 ` eial
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: eial @ 2009-07-21 12:58 UTC (permalink / raw)
To: linux-hotplug
hello.
I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus 1.2.12, xorg-server 1.6.2 and udev 140.
I have these following three rules:
ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*", RUN+="bluetooth.sh"
but when I turn on the adapter, the modules won't load, when I plug the mouse, the touchpad is still working and when I unplug it, if it is off, it won't come back on.
I've tried to change the mouse line to these line:
ACTION="add", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION="remove", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=0"
but no luck, when I check /var/log/messages I see this:
Jul 20 19:05:12 NCC-5001-D udevadm[5426]: bind failed: Operation not permitted
Jul 20 19:05:18 NCC-5001-D usb 6-1: USB disconnect, address 6
Jul 20 19:05:22 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 7
Jul 20 19:05:22 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
Jul 20 19:05:22 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input19
Jul 20 19:05:22 NCC-5001-D generic-usb 0003:15CA:00C3.0008: input: USB HID v1.10 Mouse [USB_PS2 Optical Mouse] on usb-0000:00:1d.1-1/input0
Jul 20 19:05:58 NCC-5001-D udevadm[5556]: bind failed: Operation not permitted .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
@ 2009-07-21 13:13 ` eial
2009-07-21 13:13 ` eial
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-21 13:13 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 15:58 2009 eial@cs.bgu.ac.il wrote:
>
> hello.
> I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus 1.2.12, xorg-server 1.6.2 and udev 140.
> I have these following three rules:
> ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
> ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
> SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*", RUN+="bluetooth.sh"
>
> but when I turn on the adapter, the modules won't load, when I plug the mouse, the touchpad is still working and when I unplug it, if it is off, it won't come back on.
> I've tried to change the mouse line to these line:
> ACTION="add", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=1"
> ACTION="remove", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=0"
> but no luck, when I check /var/log/messages I see this:
> Jul 20 19:05:12 NCC-5001-D udevadm[5426]: bind failed: Operation not permitted
> Jul 20 19:05:18 NCC-5001-D usb 6-1: USB disconnect, address 6
> Jul 20 19:05:22 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 7
> Jul 20 19:05:22 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
> Jul 20 19:05:22 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input19
> Jul 20 19:05:22 NCC-5001-D generic-usb 0003:15CA:00C3.0008: input: USB HID v1.10 Mouse [USB_PS2 Optical Mouse] on usb-0000:00:1d.1-1/input0
> Jul 20 19:05:58 NCC-5001-D udevadm[5556]: bind failed: Operation not permitted .
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
my mail was cut short for some reason, here is what was cut:
Jul 20 19:10:37 NCC-5001-D udevadm[6232]: bind failed: Operation not permitted
Jul 20 19:10:45 NCC-5001-D usb 6-1: USB disconnect, address 7
Jul 20 19:10:57 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 8
Jul 20 19:10:57 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
Jul 20 19:10:57 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input20
Jul 20 19:10:57 NCC-5001-D generic-usb 0003:15CA:00C3.0009: input: USB HID v1.10 Mouse [USB_PS2
Optical Mouse] on usb-0000:00:1d.1-1/input0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
2009-07-21 13:13 ` eial
@ 2009-07-21 13:13 ` eial
2009-07-21 13:16 ` eial
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-21 13:13 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 15:58 2009 eial@cs.bgu.ac.il wrote:
>
> hello.
> I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus 1.2.12, xorg-server 1.6.2 and udev 140.
> I have these following three rules:
> ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
> ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
> SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*", RUN+="bluetooth.sh"
>
> but when I turn on the adapter, the modules won't load, when I plug the mouse, the touchpad is still working and when I unplug it, if it is off, it won't come back on.
> I've tried to change the mouse line to these line:
> ACTION="add", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=1"
> ACTION="remove", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=0"
> but no luck, when I check /var/log/messages I see this:
> Jul 20 19:05:12 NCC-5001-D udevadm[5426]: bind failed: Operation not permitted
> Jul 20 19:05:18 NCC-5001-D usb 6-1: USB disconnect, address 6
> Jul 20 19:05:22 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 7
> Jul 20 19:05:22 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
> Jul 20 19:05:22 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input19
> Jul 20 19:05:22 NCC-5001-D generic-usb 0003:15CA:00C3.0008: input: USB HID v1.10 Mouse [USB_PS2 Optical Mouse] on usb-0000:00:1d.1-1/input0
> Jul 20 19:05:58 NCC-5001-D udevadm[5556]: bind failed: Operation not permitted .
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
my mail was cut short for some reason, here is what was cut:
Jul 20 19:10:37 NCC-5001-D udevadm[6232]: bind failed: Operation not permitted
Jul 20 19:10:45 NCC-5001-D usb 6-1: USB disconnect, address 7
Jul 20 19:10:57 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 8
Jul 20 19:10:57 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
Jul 20 19:10:57 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input20
Jul 20 19:10:57 NCC-5001-D generic-usb 0003:15CA:00C3.0009: input: USB HID v1.10 Mouse [USB_PS2
Optical Mouse] on usb-0000:00:1d.1-1/input0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
2009-07-21 13:13 ` eial
2009-07-21 13:13 ` eial
@ 2009-07-21 13:16 ` eial
2009-07-21 13:17 ` Matthias Schwarzott
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-21 13:16 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 16:13 2009 eial@cs.bgu.ac.il wrote:
>
> On Tue 21 Jul 15:58 2009 eial@cs.bgu.ac.il wrote:
> >
> > hello.
> > I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus 1.2.12, xorg-server 1.6.2 and udev 140.
> > I have these following three rules:
> > ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
> > ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
> > SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*", RUN+="bluetooth.sh"
> >
> > but when I turn on the adapter, the modules won't load, when I plug the mouse, the touchpad is still working and when I unplug it, if it is off, it won't come back on.
> > I've tried to change the mouse line to these line:
> > ACTION="add", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=1"
> > ACTION="remove", SUBSYSTEM="usb", ATTRS{product}="USB_PS2 Optical Mouse" , RUN+="/usr/bin/synclient TouchpadOff=0"
> > but no luck, when I check /var/log/messages I see this:
> > Jul 20 19:05:12 NCC-5001-D udevadm[5426]: bind failed: Operation not permitted
> > Jul 20 19:05:18 NCC-5001-D usb 6-1: USB disconnect, address 6
> > Jul 20 19:05:22 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 7
> > Jul 20 19:05:22 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
> > Jul 20 19:05:22 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input19
> > Jul 20 19:05:22 NCC-5001-D generic-usb 0003:15CA:00C3.0008: input: USB HID v1.10 Mouse [USB_PS2 Optical Mouse] on usb-0000:00:1d.1-1/input0
> > Jul 20 19:05:58 NCC-5001-D udevadm[5556]: bind failed: Operation not permitted .
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> my mail was cut short for some reason, here is what was cut:
> Jul 20 19:10:37 NCC-5001-D udevadm[6232]: bind failed: Operation not permitted
> Jul 20 19:10:45 NCC-5001-D usb 6-1: USB disconnect, address 7
> Jul 20 19:10:57 NCC-5001-D usb 6-1: new low speed USB device using uhci_hcd and address 8
>
> Jul 20 19:10:57 NCC-5001-D usb 6-1: configuration #1 chosen from 1 choice
> Jul 20 19:10:57 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input20
> Jul 20 19:10:57 NCC-5001-D generic-usb 0003:15CA:00C3.0009: input: USB HID v1.10 Mouse [USB_PS2
> Optical Mouse] on usb-0000:00:1d.1-1/input0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
I apologize for the flood, my university mail server has gone mad, here is the full log: http://pastebin.com/f77603288
these commands worked before, I have no idea why it won't work, I can really appreciate the help.
thanks in advance.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
` (2 preceding siblings ...)
2009-07-21 13:16 ` eial
@ 2009-07-21 13:17 ` Matthias Schwarzott
2009-07-21 13:29 ` eial
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Matthias Schwarzott @ 2009-07-21 13:17 UTC (permalink / raw)
To: linux-hotplug
On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> hello.
> I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus
> 1.2.12, xorg-server 1.6.2 and udev 140. I have these following three rules:
> ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse",
> RUN+="/usr/bin/synclient TouchpadOff=1"
> ACTION="remove",
> SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient
> TouchpadOff=0" SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*",
> RUN+="bluetooth.sh"
>
What is the name of the file these rules are in?
It must be lexically after the file setting ID_CLASS.
For remove event it is possible not all properties can be checked, but you may
use REMOVE_CMD for it.
REMOVE_CMD is set in ACTION="add" to the value you want to pass to RUN in
remove case.
If that does not help, please run "udevadmin monitor --udev --env" while
plugging the mouse in and post the results.
Regards
Matthias
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
` (3 preceding siblings ...)
2009-07-21 13:17 ` Matthias Schwarzott
@ 2009-07-21 13:29 ` eial
2009-07-21 13:43 ` Matthias Schwarzott
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-21 13:29 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 16:17 2009 Matthias Schwarzott wrote:
> On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > hello.
> > I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus
> > 1.2.12, xorg-server 1.6.2 and udev 140. I have these following three rules:
> > ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse",
> > RUN+="/usr/bin/synclient TouchpadOff=1"
> > ACTION="remove",
> > SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient
> > TouchpadOff=0" SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*",
> > RUN+="bluetooth.sh"
> >
>
> What is the name of the file these rules are in?
> It must be lexically after the file setting ID_CLASS.
> For remove event it is possible not all properties can be checked, but you may
> use REMOVE_CMD for it.
> REMOVE_CMD is set in ACTION="add" to the value you want to pass to RUN in
> remove case.
>
> If that does not help, please run "udevadmin monitor --udev --env" while
> plugging the mouse in and post the results.
>
> Regards
> Matthias
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
for some reason I can't seem to find the bluetooth file, I'll focus on the mouse, the file is /etc/udev/rules.d/01-touchpad.rules
lexically?
not sure I've understood the REMOVE_CMD
here is the output:
ul 21 16:27:36 NCC-5001-D usb 6-2: new low speed USB device using uhci_hcd and address 7
Jul 21 16:27:36 NCC-5001-D usb 6-2: configuration #1 chosen from 1 choice
Jul 21 16:27:36 NCC-5001-D input: USB_PS2 Optical Mouse as /class/input/input17
Jul 21 16:27:36 NCC-5001-D generic-usb 0003:15CA:00C3.0006: input: USB HID v1.10 Mouse [USB_PS2 Optical Mouse] on usb-0000:00:1d.1-2/input0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
` (4 preceding siblings ...)
2009-07-21 13:29 ` eial
@ 2009-07-21 13:43 ` Matthias Schwarzott
2009-07-21 13:59 ` eial
2009-07-23 6:14 ` eial
7 siblings, 0 replies; 9+ messages in thread
From: Matthias Schwarzott @ 2009-07-21 13:43 UTC (permalink / raw)
To: linux-hotplug
On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> On Tue 21 Jul 16:17 2009 Matthias Schwarzott wrote:
> > On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > > hello.
> > > I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus
> > > 1.2.12, xorg-server 1.6.2 and udev 140. I have these following three
> > > rules: ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse",
> > > RUN+="/usr/bin/synclient TouchpadOff=1"
> > > ACTION="remove",
> > > SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient
> > > TouchpadOff=0" SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*",
> > > RUN+="bluetooth.sh"
> >
> > What is the name of the file these rules are in?
> > It must be lexically after the file setting ID_CLASS.
> > For remove event it is possible not all properties can be checked, but
> > you may use REMOVE_CMD for it.
> > REMOVE_CMD is set in ACTION="add" to the value you want to pass to RUN
> > in remove case.
> >
> > If that does not help, please run "udevadmin monitor --udev --env" while
> > plugging the mouse in and post the results.
> >
> > Regards
> > Matthias
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-hotplug"
> > in the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> for some reason I can't seem to find the bluetooth file, I'll focus on the
> mouse, the file is /etc/udev/rules.d/01-touchpad.rules lexically?
The rule files are sorted in alphabetic order.
So the file where ID_CLASS is set must be before your own file, and it is set
in 60-persistent-input.rules
So when your rules are executed ID_CLASS simply is not yet set and they can
never match.
Why do you write your own bluetooth rules? net-wireless/bluez already provides
the rule you quoted above.
> not sure I've understood the REMOVE_CMD
If you have a rule to match on remove and the properties you want to test are
not available at that point the rule need to match on add. The match is then
stored into udev database to know what to do on remove.
ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", \
RUN+="/usr/bin/synclient TouchpadOff=1", \
ENV{REMOVE_CMD}="/usr/bin/synclient TouchpadOff=0"
>
> here is the output:
> ul 21 16:27:36 NCC-5001-D usb 6-2: new low speed USB device using uhci_hcd
> and address 7 Jul 21 16:27:36 NCC-5001-D usb 6-2: configuration #1 chosen
> from 1 choice Jul 21 16:27:36 NCC-5001-D input: USB_PS2 Optical Mouse as
at least this is not the output of udevadmin monitor, looks more like dmesg.
Regards
Matthias
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
` (5 preceding siblings ...)
2009-07-21 13:43 ` Matthias Schwarzott
@ 2009-07-21 13:59 ` eial
2009-07-23 6:14 ` eial
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-21 13:59 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 16:43 2009 Matthias Schwarzott wrote:
> On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > On Tue 21 Jul 16:17 2009 Matthias Schwarzott wrote:
> > > On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > > > hello.
> > > > I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus
> > > > 1.2.12, xorg-server 1.6.2 and udev 140. I have these following three
> > > > rules: ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse",
> > > > RUN+="/usr/bin/synclient TouchpadOff=1"
> > > > ACTION="remove",
> > > > SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient
> > > > TouchpadOff=0" SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*",
> > > > RUN+="bluetooth.sh"
> > >
> > > What is the name of the file these rules are in?
> > > It must be lexically after the file setting ID_CLASS.
> > > For remove event it is possible not all properties can be checked, but
> > > you may use REMOVE_CMD for it.
> > > REMOVE_CMD is set in ACTION="add" to the value you want to pass to RUN
> > > in remove case.
> > >
> > > If that does not help, please run "udevadmin monitor --udev --env" while
> > > plugging the mouse in and post the results.
> > >
> > > Regards
> > > Matthias
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-hotplug"
> > > in the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> > for some reason I can't seem to find the bluetooth file, I'll focus on the
> > mouse, the file is /etc/udev/rules.d/01-touchpad.rules lexically?
>
ok, 01 is before 60 so I need to call it 61-touchpad.rules?
> The rule files are sorted in alphabetic order.
> So the file where ID_CLASS is set must be before your own file, and it is set
> in 60-persistent-input.rules
> So when your rules are executed ID_CLASS simply is not yet set and they can
> never match.
>
> Why do you write your own bluetooth rules? net-wireless/bluez already provides
> the rule you quoted above.
>
well, that script was there in my distribution, what I want to do is the following, when I run on the bt+wireless adapter on, udev will load the bt and wl modules and run the kbluetooth program, and when I turn in off, it will kill the program and remove them from the memory
> > not sure I've understood the REMOVE_CMD
thanks for the tip.
> If you have a rule to match on remove and the properties you want to test are
> not available at that point the rule need to match on add. The match is then
> stored into udev database to know what to do on remove.
>
> ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", \
> RUN+="/usr/bin/synclient TouchpadOff=1", \
> ENV{REMOVE_CMD}="/usr/bin/synclient TouchpadOff=0"
>
will try it,
> >
> > here is the output:
> > ul 21 16:27:36 NCC-5001-D usb 6-2: new low speed USB device using uhci_hcd
> > and address 7 Jul 21 16:27:36 NCC-5001-D usb 6-2: configuration #1 chosen
> > from 1 choice Jul 21 16:27:36 NCC-5001-D input: USB_PS2 Optical Mouse as
> at least this is not the output of udevadmin monitor, looks more like dmesg.
>
> Regards
> Matthias
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: udev rules wont work
2009-07-21 12:58 udev rules wont work eial
` (6 preceding siblings ...)
2009-07-21 13:59 ` eial
@ 2009-07-23 6:14 ` eial
7 siblings, 0 replies; 9+ messages in thread
From: eial @ 2009-07-23 6:14 UTC (permalink / raw)
To: linux-hotplug
On Tue 21 Jul 16:59 2009 eial@cs.bgu.ac.il wrote:
>
> On Tue 21 Jul 16:43 2009 Matthias Schwarzott wrote:
> > On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > > On Tue 21 Jul 16:17 2009 Matthias Schwarzott wrote:
> > > > On Dienstag, 21. Juli 2009, eial@cs.bgu.ac.il wrote:
> > > > > hello.
> > > > > I'm running gentoo with kernel tuxonice 2.6.29, hal 0.5.12_rc1, dbus
> > > > > 1.2.12, xorg-server 1.6.2 and udev 140. I have these following three
> > > > > rules: ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse",
> > > > > RUN+="/usr/bin/synclient TouchpadOff=1"
> > > > > ACTION="remove",
> > > > > SUBSYSTEM="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient
> > > > > TouchpadOff=0" SUBSYSTEM="bluetooth", KERNEL="hci[0-9]*",
> > > > > RUN+="bluetooth.sh"
> > > >
> > > > What is the name of the file these rules are in?
> > > > It must be lexically after the file setting ID_CLASS.
> > > > For remove event it is possible not all properties can be checked, but
> > > > you may use REMOVE_CMD for it.
> > > > REMOVE_CMD is set in ACTION="add" to the value you want to pass to RUN
> > > > in remove case.
> > > >
> > > > If that does not help, please run "udevadmin monitor --udev --env" while
> > > > plugging the mouse in and post the results.
> > > >
> > > > Regards
> > > > Matthias
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-hotplug"
> > > > in the body of a message to majordomo@vger.kernel.org
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> > > for some reason I can't seem to find the bluetooth file, I'll focus on the
> > > mouse, the file is /etc/udev/rules.d/01-touchpad.rules lexically?
> >
>
> ok, 01 is before 60 so I need to call it 61-touchpad.rules?
>
> > The rule files are sorted in alphabetic order.
> > So the file where ID_CLASS is set must be before your own file, and it is set
> > in 60-persistent-input.rules
> > So when your rules are executed ID_CLASS simply is not yet set and they can
> > never match.
> >
> > Why do you write your own bluetooth rules? net-wireless/bluez already provides
> > the rule you quoted above.
> >
>
> well, that script was there in my distribution, what I want to do is the following, when I run on the bt+wireless adapter on, udev will load the bt and wl modules and run the kbluetooth program, and when I turn in off, it will kill the program and remove them from the memory
>
> > > not sure I've understood the REMOVE_CMD
>
> thanks for the tip.
>
> > If you have a rule to match on remove and the properties you want to test are
> > not available at that point the rule need to match on add. The match is then
> > stored into udev database to know what to do on remove.
> >
> > ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", \
> > RUN+="/usr/bin/synclient TouchpadOff=1", \
> > ENV{REMOVE_CMD}="/usr/bin/synclient TouchpadOff=0"
> >
>
> will try it,
>
> > >
> > > here is the output:
> > > ul 21 16:27:36 NCC-5001-D usb 6-2: new low speed USB device using uhci_hcd
> > > and address 7 Jul 21 16:27:36 NCC-5001-D usb 6-2: configuration #1 chosen
> > > from 1 choice Jul 21 16:27:36 NCC-5001-D input: USB_PS2 Optical Mouse as
> > at least this is not the output of udevadmin monitor, looks more like dmesg.
> >
> > Regards
> > Matthias
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
any hints on the issue?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-07-23 6:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 12:58 udev rules wont work eial
2009-07-21 13:13 ` eial
2009-07-21 13:13 ` eial
2009-07-21 13:16 ` eial
2009-07-21 13:17 ` Matthias Schwarzott
2009-07-21 13:29 ` eial
2009-07-21 13:43 ` Matthias Schwarzott
2009-07-21 13:59 ` eial
2009-07-23 6:14 ` eial
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).