[lxc-users] lxc guest cannot play sound using pulseaudio. tcp module is loaded with permission.
Oz Dror
odror7 at gmail.com
Wed May 27 15:45:53 UTC 2015
I tried it. I was not able to remove the suspension. I also found out that
the the group id for audio in the container is different then the one in
the host (this is a privileged container).
Is there a way to map a single group id from the container to the host.
May be that is the issue.
On Mon, May 25, 2015 at 11:13 PM, Fajar A. Nugraha <list at fajar.net> wrote:
> On Tue, May 26, 2015 at 1:59 AM, Oz Dror <odror7 at gmail.com> wrote:
> >
> > On Mon, May 25, 2015 at 11:06 AM, Fajar A. Nugraha <list at fajar.net>
> wrote:
> >>
> >> On Tue, May 26, 2015 at 12:35 AM, Oz Dror <odror7 at gmail.com> wrote:
> >> >> # pactl list sinks
> >> >
> >> >
> >> > A soon as I connect the lxc guest all the sinks are lost and I have a
> >> > suspended sink
> >>
> >> Your host and guest might be fighting for the same physical sound
> >> devices. My guess is you use a custom setup which allows the guest to
> >> takeover host's device (since it can run on vt8, and have devices
> >> shown on "aplay -l"). My test was on defaut ubuntu container,
> >> restricted by apparmor.
> >>
> >> You might be able to reconfigure alsa dan pulseaudio on the container
> >> so alsa ONLY uses pulseaudio driver, and pulseaudio ONLY uses the tcp
> >> module.
> >
> >
> > Do you know how to do that.
>
> Default ubuntu container on ubuntu host does that, since it can't
> access any host physical devices.
>
> >
> > I commented allowing audio access in the config file
> > #lxc.cgroup.devices.allow = c 116:* rwm
> > I also did not creare the devices in /dev/snd in the container.
> > Now I can list the sinks and see all the audio cards in the container.
> >
> > I still cannot play anything because it is suspended. There is some
> > improvement
>
> Have you tried "pactl suspend-sink"? "man pactl" for details
> Have you tried restarting both host and container? On some of my
> tests, the listening port on the host ended up dead. Reloading the
> module fixed the issue for me (restarting should do the same, as well
> as clearing any intermittent problems)
>
> If that still doesn't work, you should probably ask in pulseaudio
> list/forum.
>
> --
> Fajar
> _______________________________________________
> 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/20150527/3cd31ba2/attachment-0001.html>
More information about the lxc-users
mailing list