Bug#622989: pulseaudio: autospawn is evil

Felipe Sateler fsateler at debian.org
Thu May 19 16:02:59 UTC 2016


On 19 May 2016 at 11:54, Scott Leggett <scott at sl.id.au> wrote:
> On Fri, 18 Apr 2014 18:14:35 -0300 Felipe Sateler <fsateler at debian.org> wrote:
>> Control: tags -1 wontfix
>>
>> Hi Joss, waynr,
>>
>> On Sat, Apr 16, 2011 at 02:24:06PM +0200, Josselin Mouette wrote:
>> >
>> > ...
>> >
>> > The fix is simple: change the default client.conf to set autospawn=no.
>>
>> Unfortunately this doesn't seem very viable. If the pulseaudio daemon
>> stops for any reason (a bug?), then the daemon will not be restarted,
>> leaving the user with a possibly broken audio system.
>>
>> Unless we have a way to ensure that the daemon will be restarted if it
>> crashes, then I don't see how disabling autospawn actually improves
>> things.
>
> It seems that the pulseaudio package 7+ includes a systemd user unit. I
> installed the package from backports, disabled XDG autostart, and
> enabled the systemd service:
>
>   $ ln -s /dev/null ~/.config/autostart/pulseaudio.desktop

This is not necessary. What you need to do is disable autospawn in the
config file (/etc/pulse/client.conf)

>   $ systemctl --user enable pulseaudio
>
> Logging out and back in again spawned the service as expected.
>
> By doing this we could disable autospawn by default and rely on systemd
> to handle the pulseaudio service.
>
> Any thoughts on this solution?

Yes, I think this is the solution. However, there are a few kinks to work out:

1. The default should be to disable autospawn in this case, as
otherwise there could be a race between the systemd-started and
autospawned daemon.
2. However, that default should be smart. If we boot with sysvinit
there will be no support for systemd user services.
3. We do not have (yet) support for user units in dh-systemd. (we
actually would need to use --global, so that it is enabled for all
users).

1 and 2 should be solved in a way that is acceptable upstream so that
we do not need to carry a patch.

-- 

Saludos,
Felipe Sateler



More information about the pkg-pulseaudio-devel mailing list