Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#22861 - [udev] manage ACLs on /dev/input/event[0-9]
Attached to Project:
Arch Linux
Opened by orbisvicis (orbisvicis) - Saturday, 12 February 2011, 00:33 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 16 August 2011, 14:32 GMT
Opened by orbisvicis (orbisvicis) - Saturday, 12 February 2011, 00:33 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 16 August 2011, 14:32 GMT
|
DetailsDescription:
The pulseaudio module-mmkbd-evdev requires read access to /dev/input/event* to access multimedia key presses. By default this module only attempts to access /dev/input/event0, but it can be configured to access any other evdev device. Currently: getfacl: Removing leading '/' from absolute path names # file: dev/input/event0 # owner: root # group: root user::rw- group::r-- other::--- It is possible to enable access by adding the line: KERNEL=="event*", SUBSYSTEM=="input", TAG+="udev-acl" This is vague but necessary, because at least in my case the keyboard and multimedia keys originate through the same device. I think ubuntu might work this a bit smarter, but I don't have access to an ubuntu system atm. Additional info: * package version(s) core/udev 165-1 extra/pulseaudio 0.9.22-2 |
This task depends upon
FS#19703). At least this is valid for "distros". Personally I use it in some files assuming the resposability ;)Add to /lib/udev/rules.d/90-pulseaudio.rules:
KERNEL=="event*", SUBSYSTEM=="input", ENV{ACL_MANAGE}="1"
And add to the ACL file (70-acl.rules) before LABEL="acl_apply":
# search for user-defined ACL files
# and apply the current "udev-acl" tag
ENV{ACL_MANAGE}=="1", TAG+="udev-acl"
This is clearly something that should be decided/implemented upstream. We could backport a patch if it is accepted upstream, but I don't think we should be messing with these kind of things ourselves.
$ pacmd
>>> load-module module-mmkbd-evdev
$ tail /var/log/errors.log:
Jul 16 00:28:56 localhost pulseaudio[3142]: module-mmkbd-evdev.c: Failed to open evdev device: Permission denied
Jul 16 00:28:56 localhost pulseaudio[3142]: module.c: Failed to load module "module-mmkbd-evdev" (argument: ""): initialization failed.
Would you mind filing the upstream bug report? I don't mind waiting till the patch hits mainstream if accepted (no need to back-port).
If you post a link back to the report I'll keep an eye on it and try to help as much as I can.
mmkbd-evdev needs (as OP pointed out) access rights to /dev/input/event*. One way to do this would be to add these devices to the udev acl rules. If this solution is chosen it must be done in udev, as only udev is allowed to set the acl tag.
However, we cannot use ACL on the input devices in general. The kernel has no way to revoke access to open devices when the user switches, so this would open the way for keyloggers, etc.
In other words, adding ACL upstream is off the table. Probably the module should be fixed in PA to get the events in some other way.
As a workaround, there are several things that could be done:
1) add the acl TAG locally, this is a bit naughty, but if you don't tell anyone it should be ok (just be aware that it might break when udev is updated in the future).
2) add an udev rule that assign the devices to a group you are a member of.
3) depending on what you are trying to do, you might not need to use the evdev module at all. For most setups you should be able to get the same functionality via your mixer applet in your DE (assuming you are using X).