[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">&lt;<a href="mailto:list@fajar.net" \
target="_blank">list@fajar.net</a>&gt;</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 \
&lt;<a href="mailto:odror7@gmail.com">odror7@gmail.com</a>&gt; wrote:<br> &gt;<br>
&gt; On Mon, May 25, 2015 at 11:06 AM, Fajar A. Nugraha &lt;<a \
href="mailto:list@fajar.net">list@fajar.net</a>&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt; On Tue, May 26, 2015 at 12:35 AM, Oz Dror &lt;<a \
href="mailto:odror7@gmail.com">odror7@gmail.com</a>&gt; wrote:<br> &gt;&gt; &gt;&gt; \
# pactl list sinks<br> &gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; A soon as I connect the lxc guest all the sinks are lost and I have \
a<br> &gt;&gt; &gt; suspended sink<br>
&gt;&gt;<br>
&gt;&gt; Your host and guest might be fighting for the same physical sound<br>
&gt;&gt; devices. My guess is you use a custom setup which allows the guest to<br>
&gt;&gt; takeover host&#39;s device (since it can run on vt8, and have devices<br>
&gt;&gt; shown on &quot;aplay -l&quot;). My test was on defaut ubuntu container,<br>
&gt;&gt; restricted by apparmor.<br>
&gt;&gt;<br>
&gt;&gt; You might be able to reconfigure alsa dan pulseaudio on the container<br>
&gt;&gt; so alsa ONLY uses pulseaudio driver, and pulseaudio ONLY uses the tcp<br>
&gt;&gt; module.<br>
&gt;<br>
&gt;<br>
&gt; Do you know how to do that.<br>
<br>
</span>Default ubuntu container on ubuntu host does that, since it can&#39;t<br>
access any host physical devices.<br>
<span class=""><br>
&gt;<br>
&gt; I commented allowing audio access in the config file<br>
&gt;   #lxc.cgroup.devices.allow = c 116:* rwm<br>
&gt; I also did not creare the devices in /dev/snd in the container.<br>
&gt; Now I can list the sinks and see all the audio cards in the container.<br>
&gt;<br>
&gt; I still cannot play anything because it is suspended. There is some<br>
&gt; improvement<br>
<br>
</span>Have you tried &quot;pactl suspend-sink&quot;? &quot;man pactl&quot; 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&#39;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