zhuyaliang/user-admin

Do not add user to audio group in MATE User Manager

Closed this issue · 4 comments

Hi, I experienced a very strange issue with audio sometimes not working after switching user sessions and it turns out this was due to the user being in the audio group as described by Pipewire developers: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2107#note_1462133

If I'm understanding correctly, users should, in general, not be added to the audio group?

From the perspective of PipeWire/PulseAudio. Yes

Can you please ensure that when a new user is created in MATE User Manager, that the user is not added to the audio group? I just tested by creating a standard user and it was added to the audio group.

For context PipeWire and PulseAudio by design will not let go of opened audio devices for as long as the corresponding /dev/snd/* node remains openable to it. Because a user having an audio group means that it's always openable, PulseAudio will never let go of a device it has opened while PipeWire will only do that if there's no open streams for that device for longer than its suspend timeout (defaults to 5 seconds but can be disabled by setting to 0).

This of course only affects people using fast user switching as well as presents a potential race condition during quick tty user change as might happen when logging in via gdm (which has audio support).

Here is the problem. User added to audio group
group config
I will remove this group audio

Thanks!

The problem has been fixed. Thank you for your feedback
6ee50e70