You are not logged in.

#1 2016-12-12 05:01:27

lolop
Member
Registered: 2015-02-19
Posts: 37

bluetooth headset local rule udev

Hello,

I'm trying to create a udev rule that allows me to run pulseaudio-equalizer enable when my bluetooth headset connects automatically.

So I create this:

# cat /etc/udev/rules.d/10-local.rules
ACTION == "add", SUBSYSTEM == "bluetooth", ATTRS {address} == "my:mac:address", RUN + = "/usr/bin /pulseaudio-equalizer enable"

I reloaded the rules:
Udevadm control --reload-rules

But during a devadm monitor I do not see any trace of my rule.
I missed something?

Offline

#2 2016-12-12 08:14:32

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: bluetooth headset local rule udev

As a start I would remove all the extra spaces you have added there and try again.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2016-12-12 12:32:38

lolop
Member
Registered: 2015-02-19
Posts: 37

Re: bluetooth headset local rule udev

Sorry my rule is (space because copy/paste to vim):

cat /etc/udev/rules.d/10-local.rules 
ACTION=="add", SUBSYSTEM=="bluetooth", ATTRS{address}=="16:01:04:27:09:4F", RUN+="/usr/bin/pulseaudio-equalizer enable"

Offline

#4 2016-12-12 17:39:30

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: bluetooth headset local rule udev

You want pulseaudio-equalizer to affect the pulseaudio instance running under your user? If yes that's not going to work, udev rules run as root.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-12-13 14:51:41

lolop
Member
Registered: 2015-02-19
Posts: 37

Re: bluetooth headset local rule udev

Thank you for these clarifications, I modified as follows:

 RUN+="/bin/su julien -c /home/julien/sys/script/pulse.sh"

But still no effect. The command works well as root.

Last edited by lolop (2016-12-13 14:52:21)

Offline

#6 2016-12-13 17:22:31

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: bluetooth headset local rule udev

Are you sure the executable is named pulseaudio-equalizer? I don't seem to find anything like that in the official repositories. Is it a package from the AUR?

If I'm not mistaken, running things from udev rules is a bit special, so it is not the same as running them from a terminal. I don't have more ideas, let others chime in on this and maybe someone else can spot the problem.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2016-12-13 23:27:49

lolop
Member
Registered: 2015-02-19
Posts: 37

Re: bluetooth headset local rule udev

The binary is called much more audiodio-equalizer. It comes from the package: aur/pulseaudio-equalizer-ladspa.

Starting with udev would be a good solution, you have to find the right rule. This is particular udev. If one of you knows.

Anyway thanks for your attention

Offline

#8 2017-10-07 08:56:50

vlado9
Member
Registered: 2015-11-21
Posts: 4

Re: bluetooth headset local rule udev

For the record. "phys" is used instead of "address". (And there is no phys/address of the controller available in udev, strange.)
> udevadm --version
234
> udevadm info -a -p /sys/class/input/mouse2 | grep phys
    ATTRS{phys}=="00:1a:7d:da:71:06"

Offline

Board footer

Powered by FluxBB