[prev in list] [next in list] [prev in thread] [next in thread]
List: lxc-users
Subject: Re: [lxc-users] lxc guest cannot play sound using pulseaudio. tcp module is loaded with permission.
From: Oz Dror <odror7 () gmail ! com>
Date: 2015-05-27 15:45:53
Message-ID: CACgxnq+A_Qu8K1JXLkgawv67dtFYQd0GYLA5fU7VO9dXecAwkQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@fajar.net> wrote:
> On Tue, May 26, 2015 at 1:59 AM, Oz Dror <odror7@gmail.com> wrote:
> >
> > On Mon, May 25, 2015 at 11:06 AM, Fajar A. Nugraha <list@fajar.net>
> wrote:
> >>
> >> On Tue, May 26, 2015 at 12:35 AM, Oz Dror <odror7@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@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
[Attachment #5 (text/html)]
<div dir="ltr">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).<div>Is there a way to map a single group id \
from the container to the host. May be that is the issue.</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, May 25, 2015 at 11:13 PM, \
Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" \
target="_blank">list@fajar.net</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On Tue, May 26, 2015 at 1:59 AM, Oz Dror \
<<a href="mailto:odror7@gmail.com">odror7@gmail.com</a>> wrote:<br> ><br>
> On Mon, May 25, 2015 at 11:06 AM, Fajar A. Nugraha <<a \
href="mailto:list@fajar.net">list@fajar.net</a>> wrote:<br> >><br>
>> On Tue, May 26, 2015 at 12:35 AM, Oz Dror <<a \
href="mailto:odror7@gmail.com">odror7@gmail.com</a>> wrote:<br> >> >> \
# pactl list sinks<br> >> ><br>
>> ><br>
>> > A soon as I connect the lxc guest all the sinks are lost and I have \
a<br> >> > suspended sink<br>
>><br>
>> Your host and guest might be fighting for the same physical sound<br>
>> devices. My guess is you use a custom setup which allows the guest to<br>
>> takeover host's device (since it can run on vt8, and have devices<br>
>> shown on "aplay -l"). My test was on defaut ubuntu container,<br>
>> restricted by apparmor.<br>
>><br>
>> You might be able to reconfigure alsa dan pulseaudio on the container<br>
>> so alsa ONLY uses pulseaudio driver, and pulseaudio ONLY uses the tcp<br>
>> module.<br>
><br>
><br>
> Do you know how to do that.<br>
<br>
</span>Default ubuntu container on ubuntu host does that, since it can't<br>
access any host physical devices.<br>
<span class=""><br>
><br>
> I commented allowing audio access in the config file<br>
> #lxc.cgroup.devices.allow = c 116:* rwm<br>
> I also did not creare the devices in /dev/snd in the container.<br>
> Now I can list the sinks and see all the audio cards in the container.<br>
><br>
> I still cannot play anything because it is suspended. There is some<br>
> improvement<br>
<br>
</span>Have you tried "pactl suspend-sink"? "man pactl" for \
details<br> Have you tried restarting both host and container? On some of my<br>
tests, the listening port on the host ended up dead. Reloading the<br>
module fixed the issue for me (restarting should do the same, as well<br>
as clearing any intermittent problems)<br>
<br>
If that still doesn't work, you should probably ask in pulseaudio list/forum.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Fajar<br>
</font></span><div class="HOEnZb"><div \
class="h5">_______________________________________________<br> lxc-users mailing \
list<br> <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" \
target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></div></div></blockquote></div><br></div>
[Attachment #6 (text/plain)]
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic