x11docker: Pulseaudio 12 not working anymore

I don’t know if this issue is related to x11docker, but maybe someone has some hints for me to solve it.

After an upgrade of different packages inclusive pulseaudio and nvidia driver (arch linux), pulseaudio has stopped working with Docker. Downgrading of pulseaudio has no effect. For example vlc error message is vlcpulse audio output error: PulseAudio server connection failure: Timeout. It’s not connection refused! See logs

vlc_docker.log

If I install vlc on host system, it can connect to pulseaudio via socket and sound is working. See logs

vlc_host.log

Pulseaudio native is mounted to the container but I don’t know why it can not connect anymore. Any hints appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 29 (29 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for reporting! It is fixed now.

Do you have made any changes in master for pulseaudio since version 5.2?

I did a great code change putting the long linear code flow into functions() and creating a short main() routine that gives an easier overview of x11docker code flow. Accidently I’ve deleted a pulseaudio check during this operation that changes auto mode into tcp or socket.

Nothing special in the logs.

I got this in terminal without the logs: 😉

x11docker WARNING: Unknown pulseaudio mode: auto
  Allowed are --pulseaudio=socket or --pulseaudio=tcp
  Fallback: disabling option --pulseaudio

Quite awesome, --pulseaudio=tcp works like a charm for vlc and pavucontrol. 🎉 I don’t find a symlink.

ls -l $XDG_RUNTIME_DIR/pulse
total 4
srwxrwxrwx 1 skeil users 0  9. Aug 20:22 dbus-socket
srw-rw-rw- 1 skeil users 0  9. Aug 20:21 native
-rw------- 1 skeil users 5  9. Aug 20:21 pid

Maybe it has to do with this new dbus socket. Sharing it with --sharedir /run/user/1000/pulse/dbus-socket is worth a test.

If I run --sharedir /run/user/1000/pulse/dbus-socket without --pulseaudio vlc said this time vlcpulse audio output error: PulseAudio server connection failure: Connection refused. So it’s no timeout.

[000055a5fe1b51c0] main audio output debug: looking for audio output module matching "any": 6 candidates
[000055a5fe1b51c0] vlcpulse audio output debug: using library version 12.2.0
[000055a5fe1b51c0] vlcpulse audio output debug:  (compiled with version 12.2.0, protocol 32)
[000055a5fe1b51c0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[000055a5fe1b51c0] alsa audio output debug: Available ALSA PCM devices:
[000055a5fe1b51c0] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null)
[000055a5fe1b51c0] alsa audio output debug: PulseAudio Sound Server (pulse)
[000055a5fe1b51c0] alsa audio output debug: Default ALSA Output (currently PulseAudio Sound Server) (default)
[000055a5fe1b51c0] main audio output debug: using audio output module "alsa"
[000055a5fe0f6f90] main playlist debug: keeping audio output

Works with shared socket as well as over TCP.

And this Dockerfile does not work for you via socket?

FROM base/archlinux:2018.08.01
RUN pacman -Syu --noconfirm pulseaudio pulseaudio-alsa pavucontrol
CMD ["pavucontrol"]

Is there anything that I can do to help to bring pulseaudio socket back to work? Or maybe we wait a month or so and see if it works with new updates again? This depends on your ideas how to debug. 😉 In the meantime I can live with tcp.

Thank you very much for your effort. I highly appreciate it.