<div dir="ltr"><div dir="ltr">On Mon, Nov 25, 2024 at 12:57 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On So, 24.11.24 12:35, Michael Kilburn (<a href="mailto:crusader.mike@gmail.com" target="_blank">crusader.mike@gmail.com</a>) wrote:<br>
<br>
> Hi,<br>
><br>
> OS: Pop!_OS 22.04 LTS (Debian-based distro). User service (fluidsynth)<br>
> fails to start on user login:<br>
><br>
> ALSA lib seq_hw.c:466:(snd_seq_hw_open) open /dev/snd/seq failed:<br>
> Permission denied<br>
><br>
> because at that moment that device's ACL was not updated yet (to grant<br>
> access to the user being logged in).<br>
><br>
> When an active user logs in udev executes rules stored in<br>
> /lib/udev/rules.d/70-uaccess.rules (via 73-seat-late.rules) to grant that<br>
> user access to local devices (like soundcard, etc).<br>
><br>
> Is there a way to express this dependency between user service and<br>
> completion of execution of udev rules?<br>
><br>
> Or (if this is a wrong approach) -- what is the correct way to deal with<br>
> this?<br>
<br>
"uaccess" ḿeans access to devices can come and go any time, as the<br>
user switches sessions, as sessions come and go. This means programs<br>
which want access to such devices need to be written with this in<br>
mind: watch udev events, and try to reopen the devices whenever you<br>
receive an event for the relevant audio device and access is<br>
permitted. (logind will re-retrigger relevant devices whenever the fg<br>
session changes, so that the udev rules are rerun and apps are<br>
notified about the new situation via udev events)<br></blockquote><div><br></div><div>I don't see logind doing that here. It seems to only set the new ACLs directly (devnode_acl_all() in seat.c) but there are no uevents that I could see during a VT switch.</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>