[lxc-users] lxc guest cannot play sound using pulseaudio. tcp module is loaded with permission.

Oz Dror odror7 at gmail.com
Sun May 24 16:57:30 UTC 2015


Hi I have been trying unsuccessfully to use pulseaudio with lxc.

host: Ubuntu 15.04, with nvidia cuda (runs X11 gnome 3.14) on vt7

lxc guest: Archlinux with nvidia cuda driver (runs X11 gnome 3.16) on vt8

pulseaudio is running in the host (192.168.x.x)

the lxc guest connects to the host as follows (done in .xinitrc):

pactl load-module module-native-protocol-tcp auth-ip-acl="192.168.0.3"

export PULSE_SERVER=192.168.x.x:4713

in the server I have  the following in /etc/pulse/default.pa

load-module module-native-protocol-tcp

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24
auth-anonymous=1

aplay -l | grep card: (in the guest and host):

card 0: PCH [HDA Intel PCH], device 0: 92HD89E2 Analog [92HD89E2 Analog]

card 0: PCH [HDA Intel PCH], device 1: 92HD89E2 Digital [92HD89E2 Digital]

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]

When I play in the lxc guest I get the following

mplayer /usr/share/sounds/alsa/Front_Right.wav:

MPlayer SVN-r37379 (C) 2000-2015 MPlayer Team

210 audio & 441 video codecs

do_connect: could not connect to socket

connect: No such file or directory

Failed to open LIRC support. You will not be able to use your remote
control.

Playing /usr/share/sounds/alsa/Front_Right.wav.

libavformat version 56.25.101 (internal)

Audio only file format detected.

Load subtitles in /usr/share/sounds/alsa/

==========================================================================

Opening audio decoder: [pcm] Uncompressed PCM audio decoder

AUDIO: 48000 Hz, 1 ch, s16le, 768.0 kbit/100.00% (ratio: 96000->96000)

Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

==========================================================================

AO: [pulse] 48000Hz 1ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:   0.0 (unknown) of 1.0 (01.0) ??,?%

Audio device got stuck!

A:   0.0 (unknown) of 1.0 (01.0) ??,?%

Audio device got stuck!

A:   0.0 (unknown) of 1.0 (01.0) ??,?%

Audio device got stuck!

A:   0.0 (unknown) of 1.0 (01.0) ??,?%

…

Clearly there is some communication/permission issue that I do not fully
understand.

Any help will be appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150524/9ec7aeb9/attachment.html>


More information about the lxc-users mailing list