Disable the hassio_audio container

I have high CPU usage on my Pi4 due to hassio_audio.
I am running squeezelite on the same machine so I need the sound output. This was fixed by adding the docker container “fix” that has been suggested several times. However, there is a process which takes up almost 1 core all the time doing nothing useful:
pulseaudio --system -vvv --disallow-exit --exit-idle-time=-1 --disable-shm

This is run by the supervisor, but cannot figure out where the configuration for that is. Maybe I could rewrite the command to something less harmful (such as ls).

Even if I force remove the container it keeps coming back. Not sure how to edit something in docker without messing stuff up.

EDIT: went the nuclear option and edited the pulseaudio init scripts in /var/lib/docker/overlay2 . This was a fresh install of a Pi4 and it showed issues out of the box.

Can you help me out with this? I f I edit /var/lib/docker/overlay2 it make new file…

I tried this:

sleep 60 && docker image rm --force homeassistant/armv7-hassio-audio:17 > /dev/null 2>&1 &

And its fixes my issues

1 Like

I’m afraid I cannot provide instructions on how to edit the overlay since:

  • it’s random on every system
  • it should not be edited
    I basically did a search in that directory for all the /etc/ files and found 2-3 files which did some pulse thing, commented out the command.
    Your second option works but it still wastes CPU since the docker container will still run, then get killed, then restarted, etc.

I spent hours trying to disable pulseaudio. I don’t want HA to manage my soundcard. I’m running HA under a debian system (supervised install). And I just want my sound card to be managed by debian and gnome normally. (though I know HA developers will probably tell me it’s not recommended… I’m using a single pc as media player and HA)

The fix of removing the docker image is not working : HA is simply re-downloading or creating the image again I think.

I ended up with this ugly fix in root user crontab. ugly but working so far:

# m h  dom mon dow   command
* * * * * sleep 5 && pgrep pulseaudio && docker stop hassio_audio

I’m sleeping 5s just as a cron good practice because other crons may run at the same time.

And I preferred to run pgrep instead of docker ps, in order to check if the container is started, because I want the command to be as light as possible (run every minute).