OPHoperHPO / hassio-addons

:heavy_plus_sign: Docker add-ons for Hass.io
Apache License 2.0
40 stars 12 forks source link

Error when starting module #3

Open dimovnike opened 3 years ago

dimovnike commented 3 years ago

Hello, I get this error when starting the module:

400 Client Error for http+docker://localhost/v1.38/containers/e5995588e5c493324bca0da8cf11cf170c3c61aa776e720834c70ec1009e1318/start: Bad Request ("OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/dev/init\": stat /dev/init: no such file or directory": unknown")

dimovnike commented 3 years ago

As a temporary workaround, running this fixes the sound:

docker exec -ti hassio_audio pactl load-module module-suspend-on-idle

domolys commented 3 years ago

Looks like the audio container changed recently:

$ docker exec -ti hassio_audio pactl load-module module-suspend-on-idle Connection failure: Connection refused pa_context_connect() failed: Connection refused

corgan2222 commented 3 years ago

Any chance to get an update?

jan-gerard commented 3 years ago

Finally solved the issue by applying: https://community.home-assistant.io/t/solved-hassio-audio-is-in-boot-loop-and-spams-my-syslog-with-errors/282538/93

fleXible commented 2 years ago

I needed a different pulseaudio config, because it messes with my non-audio bluetooth devices. After lots of trial and error I settled for this solution injecting a shell-script into the hassio-audio s6 startup:


#!/bin/sh

# disable bluetooth module
sed -i -E 's|(load.+bluetooth-discover)|#\1|' /usr/share/tempio/system.pa

# enable suspend-on-idle
grep -q -F "module-suspend-on-idle" /usr/share/tempio/system.pa || \
  echo "load-module module-suspend-on-idle" >> /usr/share/tempio/system.pa

Save this shellscript under /usr/share/hassio/share/s6-scripts/01_fix_pulseaudio.sh and mount it into /etc/cont-init.d/ in your hassio-audio container. It's easily done with Portainer.

The script changes the template, used by hassio_audio to create /etc/pulse/system.pa. The filename makes sure to execute before that.