birdnet-go: suppress noisy startup errors

- Patch upstream entrypoint via sed so chmod on the read-only /dev/snd
  mount no longer prints "Read-only file system" lines.
- Add /etc/asound.conf overriding the JACK, OSS, dsp, and dsnoop PCM
  plugins to type "null" with hint.show off. This hides them from
  snd_device_name_hint(), so miniaudio's device enumeration no longer
  probes them at launch and the corresponding libjack/pcm_oss/pcm_dsnoop
  errors disappear.
This commit is contained in:
Claude
2026-05-26 16:23:20 +00:00
parent e3db6d28c5
commit 05cbe751d5
4 changed files with 41 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
## nightly-20260525-2 (26-05-2026)
- Suppress noisy startup logs: silence `chmod /dev/snd` errors on the read-only HA mount, and hide unavailable ALSA plugins (JACK, OSS, dsnoop) from device enumeration so libjack and pcm_oss/dsnoop probes no longer print at launch.
## nightly-20260525 (26-05-2026)
- Minor bugs fixed
## nightly-20260511-414-2 (22-05-2026)

View File

@@ -36,6 +36,13 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
COPY rootfs/ /
RUN find . -type f \( -name "*.sh" -o -name "run" -o -name "finish" \) -print -exec chmod +x {} \;
# Silence "chmod: Read-only file system" noise from upstream entrypoint:
# Home Assistant mounts /dev/snd read-only, so the chmod is a no-op and the
# stderr output is just noise. The "|| true" already absorbs the exit code.
RUN if [ -f /usr/bin/entrypoint.sh ]; then \
sed -i 's#chmod -R a+rw /dev/snd || true#chmod -R a+rw /dev/snd 2>/dev/null || true#' /usr/bin/entrypoint.sh; \
fi
# Uses /bin for compatibility purposes
# hadolint ignore=DL4005
RUN if [ ! -f /bin/sh ] && [ -f /usr/bin/sh ]; then ln -s /usr/bin/sh /bin/sh; fi && \

View File

@@ -118,4 +118,4 @@ slug: birdnet-go
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-go
usb: true
version: "nightly-20260525"
version: "nightly-20260525-2"

View File

@@ -0,0 +1,30 @@
# Home Assistant addon: birdnet-go
#
# Replace ALSA PCM plugins whose backends are not available in the addon
# container (JACK server, OSS /dev/dsp) with type "null" and hide them from
# snd_device_name_hint(). Without this, miniaudio's capture-device enumeration
# probes every PCM hint at startup, triggering noisy errors like:
# - "Cannot connect to server socket" / "jack server is not running" (libjack)
# - "ALSA lib pcm_oss.c: Cannot open device /dev/dsp"
# - "ALSA lib pcm_dsnoop.c: unable to open slave"
# BirdNET-Go itself never opens these PCMs; only the enumeration probe does.
pcm.!jack {
type null
hint.show off
}
pcm.!oss {
type null
hint.show off
}
pcm.!dsp {
type null
hint.show off
}
pcm.!dsnoop {
type null
hint.show off
}