[lxc-users] LXC with pulseaudio

Sean McNamara smcnam at gmail.com
Thu Jul 23 18:45:00 UTC 2015


On Thu, Jul 23, 2015 at 1:36 PM, Matlink <matlink at matlink.fr> wrote:

> Hi,
> I've got pulseaudio working with an app ran in an LXC container (based
> on this https://www.stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/).
> However, since I run this app in container, pulseaudio seems to be
> locked by this app, and any other app than tries to output sound with
> pulseaudio becomes stuck.
> Is there any conf for pulseaudio to stop apps to lock the socket ?
>


The problem is almost assuredly not that pulseaudio itself locks up when
having multiple clients connect. The likely problem is that your underlying
sound card does not support hardware mixing, and thus only one ALSA client
can connect to it at any given time. This is actually a hardware limitation
that transcends all concepts of virtual machine, container, etc. and can
only be resolved by a hypothetical (non-existent) in-kernel software mixer.
Until/unless such a thing exists, you must only have one PulseAudio daemon
running on your system and accessing the sound card directly, at any given
time.

Lacking that, though, it is definitely possible to use PulseAudio on
multiple containers. Unfortunately, to do this, you will need to
*partially* break guest isolation, by allowing guests to connect over TCP
to the PulseAudio server on the host. So each of your LXC guests will have
no PulseAudio server, only a PulseAudio client configuration file to make
it talk to the "main" (only) PulseAudio server.

The process of setting up remote PulseAudio is not unique to LXC and is
therefore a bit off-topic for this list. On the PA Wiki you'll find plenty
of information about how to do this, along with several diverse options.
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/

-Sean




>
> --
> Matlink - Sysadmin matlink.fr
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150723/a0ac0204/attachment.html>


More information about the lxc-users mailing list