Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection failure at startup #24

Open
wsw70 opened this issue May 6, 2019 · 9 comments
Open

Connection failure at startup #24

wsw70 opened this issue May 6, 2019 · 9 comments

Comments

@wsw70
Copy link

wsw70 commented May 6, 2019

Starting a fresh image systematically yields the following non-blocking error (Kodi starts correctly)

---> starting Kodi with command: kodi-standalone
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
@mviereck
Copy link

mviereck commented May 6, 2019

pa points to pulseaudio. If you have pulseaudio running on host, you can use option --pulseaudio instead of --alsa.
If it does not work with --xorg, try without it within an X session.

I am not sure if both lines are related to pulseaudio.

@maps2002
Copy link

maps2002 commented Jan 5, 2020

Hi,
I also have these same "connection" errors.
I don't have pulseaudio running. Tried it with --alsa, but I am always getting these messages.

The result that I have right now, is that Kodi in the container does not have sound.

What should / can I try to solve this?

Thank you

@ehough
Copy link
Owner

ehough commented Jan 5, 2020

@maps2002 in your Kodi audio device settings, do you see a list of devices and have you tried all of them? Kodi works just fine without PulseAudio, so you should be able to use --alsa ...

@maps2002
Copy link

maps2002 commented Jan 5, 2020

Hi @ehough ,

You are right. I was trying to get the audio thru HDMI, but if I change to the Audio (3,5mm) out, I can get sound on the headphones.

For my setup, sound thru HDMI is what I need, but it is strange because on the Ubuntu Desktop Live CD that I am using to test, I can get sound on HDMI and Audio out.
On the hard disk installed Ubuntu from the same Live CD, HDMI sound does not work.

Are you aware if it can be "driver" related, or PulseAudio / Alsa related?

Appreciate the help.

@mviereck
Copy link

mviereck commented Jan 5, 2020

Maybe you need to specify which ALSA device should be used. From x11docker --help:

     --alsa [=CARDNAME]   Sound with ALSA. You can define a desired sound card
                          with CARDNAME. List of available sound cards: aplay -l

@maps2002
Copy link

maps2002 commented Jan 5, 2020

Thanks.
Didn't work at the first try, with what I assume to be the HDMI sound card.

aplay -l
**** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0

Command line to start kodi container now includes ALSA with:
--alsa="HDMI 0"

Will try to debug it (test and try), in other ways.

Thank you

@mviereck
Copy link

mviereck commented Jan 5, 2020

You can format the output with three backticks (without backslash):

\ ```
 code
\ ```
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I have two different cards and can choose the HDMI output:

$ LC_ALL=C aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC3227 Analog [ALC3227 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I can use --alsa=0 or --alsa=1. That sets environment variable ALSA_CARD=0 (or =1) in container.
Your output shows only one card 0 and I am not sure how to proceed.

Can you run speaker-test on host ? Maybe only the host needs to be configured right. If speaker-test on host uses HDMI, the container might do that, too.

@maps2002
Copy link

maps2002 commented Jan 5, 2020

Thanks for the help.

Tried a handful of variations to choose the sound card / device, but without success.
Will google/read additional info to better understand how ALSA works, and try to get the HDMI output to work on the container.

Appreciate the guidance.

@eine
Copy link

eine commented Jan 5, 2020

You can format the output with three backticks (without backslash):

\ ```
 code
\ ``

Just FYTK, you can use three tildes (~) instead of backticks, when you need to write nested code blocks (see https://www.markdownguide.org/extended-syntax/#fenced-code-blocks):

code
```
code
```
code
~~~
code
~~~

Hint: quote this message to see the source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants