[systemd-devel] [udev] Giving exclusive rights over a sound card to a user

David Herrmann dh.herrmann at gmail.com
Mon Dec 15 05:07:10 PST 2014


On Sat, Dec 13, 2014 at 5:34 PM, Léo Gillot-Lamure
<leo.gillot at navaati.net> wrote:
> Hi.
> I want to give ownership of a particular sound card to a specific user
> permanently, so that 1/ I have a guarantee that other users' sessions
> can not emit sound on this card and 2/ the sound playing on the
> specific users' session does not stop when Ctrl+Alt+F<x>'ing to
> another session (due to Pulse releasing the card after noticing the
> ACL changed).

This is really not something we're going to support. You're free to
make your system run like this, but I don't think any upstream will
help you make it work. Anyway, see below..

> To this goal the straight approach was to write an udev rule stating :
>> SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2705, OWNER="navaati"
> But this was not enough, as the ACL rights were still dynamically
> granted to the user when it had a front session on the seat.
> I then found out that the combination of this rule in 70-uaccess.rules :
>> SUBSYSTEM=="sound", TAG+="uaccess"
> and this rule in 73-seat-late.rules :
>> TAG=="uaccess", ENV{MAJOR}!="", RUN{builtin}+="uaccess"
> provoked the device to be ACL-managed (with udev talking to logind and stuff).
> Thus I changed my udev rule to
>> SUBSYSTEM=="sound", ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2705, OWNER="navaati", TAG:=""
> (the doc says that the := operator forbid any subsequent overriding of
> the variable, and my rule file is ordered early starting with 01-) but
> my soundcard devices still have ACL.
> Now I don't know what else to do or what mechanism is actually setting
> these ACL...

I don't think ":=" works for TAGS. Please try systemd-218 and use:


in a 99- rule.


More information about the systemd-devel mailing list