[pulseaudio-discuss] Pulseaudio runs as mpd user after login

Maystar at web.de Maystar at web.de
Fri Jul 22 02:00:27 PDT 2011


Btw: I've just seen that the mpd user is just in the pulse-access group  
and not in the audio group. Are these groups equivalent?

Best regards
Fabian

Am 22.07.2011, 10:43 Uhr, schrieb Colin Guthrie <gmane at colin.guthr.ie>:

> 'Twas brillig, and Maystar at web.de at 22/07/11 09:12 did gyre and gimble:
>> Hey,
>>
>> I'm running the latest kubuntu version on my machine with pulseaudio
>> 0.9.22. For log-in I use the standard kdm. Since I've installed mpd,
>> this daemon starts already while I'm booting the system. This is nice
>> because I can listen music without log in. Unfortunately mpd starts
>> pulseaudio as the user mpd and this instance is still running, if I'm
>> logged in with my normal user account. Because this process blocks my
>> sound card, all my user processes can't create any sound. So I have to
>> stop mpd or kill the pulseaudio process of mpd to get my sound back.
>> Both must be done as root after each boot. This is very inconvenient!
>> Does anyone know a way to kill mpd's pulseaudio process on login?
>
> You have probably already added the MPD user to the audio group. Unless
> your card supports hardware mixing this will mean both MPD and your user
> could try and access the card at the same time and block each other.
> Most cards do not support hardware mixing.
>
> MPD works in a way that is not really in line with standard desktop
> systems in that it wants it's own access to the sound hardware when
> there are not active users (as defined by console kit - see
> ck-list-sessions). This means that there are no user specific ACLs
> assigned to the audio hardware. This is why people add mpd user to the
> audio group. It's a bit of a hack really.
>
> There are various ways in which this _could_ be made to work nicely with
> multi-user systems, but it'll take a bit of effort to do correctly.
>
>
> But the simplest way to get things working for you is if this is
> essentially a one user system, i.e. you are pretty much the only user
> who logs in and you do not fast user switch to other users.
>
> This method is simply:
>
>  1. Add your user to the "audio" group.
>  2. Configure MPD to run as your user.
>
>
> Part 1 will break user switching as your user will always be able to
> access the sound h/w. Normally this isn't nice as it can block other
> users from accessing the h/w when they have specific rights to it (i.e.
> their session is "active" acroding to ck-list-sessions and thus they
> have a user-specific ACL on the devices)
>
> But essentially, if this works for you, it's quite a simply setup. MPD
> will spawn *your* pulseaudio daemon, and when you login, you'll connect
> to it for all your desktop audio anyway.
>
> HTHs
>
> Col
>
>


-- 
Fabian May
Martin-Luther-Straße 20
20459 Hamburg

Tel.: 040/22698322
Mobil: 0160/95656717


More information about the pulseaudio-discuss mailing list