tphakala / birdnet-go

Realtime BirdNET soundscape analyzer
Other
189 stars 19 forks source link

pulseaudio: connection refused following reboot #311

Closed hoover67 closed 1 week ago

hoover67 commented 2 weeks ago

Issue Type

Description

Following a reboot, the connection to the pulseaudio daemon fails without any changes to the system (pi400) which was working fine before:

pi@pi400:~/birdnet_go$ ./birdnet-go realtime --latitude 52.11 --longitude 8.7 BirdNET-Go build date: 2024-06-09T13:25:31Z, using config file: /home/pi/.config/birdnet-go/config.yaml BirdNET GLOBAL 6K V2.4 FP32 model initialized, using 4 threads of available 4 CPUs 2024/10/30 12:45:20 Using latest range filter model System details: linux raspbian 11.10 on Raspberry Pi 400 Rev 1.1 hardware Starting analyzer in realtime mode. Threshold: 0.8, overlap: 0, sensitivity: 1, interval: 15 2024/10/30 12:45:28 Clip retention policy: usage

Available Capture Sources: 0: Discard all samples (playback) or generate zero samples (capture), null 1: Default Audio Device, default 2: Default Audio Device, sysdefault 3: Rate Converter Plugin Using Libav/FFmpeg Library, lavrate 4: Rate Converter Plugin Using Samplerate Library, samplerate 5: Rate Converter Plugin Using Speex Resampler, speexrate 6: JACK Audio Connection Kit, jack 7: Open Sound System, oss 8: PulseAudio Sound Server, pulse 9: Plugin for channel upmix (4,6,8), upmix 10: Plugin for channel downmix (stereo) with a simple spacialization, vdownmix 11: USB Audio, USB Audio, :2,0 ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

2024/10/30 12:45:29 Device init failed miniaudio: Connection refused

BirdNet PI on the same machine continues to work fine. Journalctl reports these messages regarding pulseaudio:

-- Boot 6477de7bb7424f829f49ccd8e0149c20 -- Oct 30 12:39:44 pi400 pulseaudio[1342]: Failed to find a working profile. Oct 30 12:39:44 pi400 pulseaudio[1342]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="plat> Oct 30 12:39:44 pi400 pulseaudio[1342]: Failed to find a working profile. Oct 30 12:39:44 pi400 pulseaudio[1342]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="plat> Oct 30 12:39:45 pi400 pulseaudio[1342]: ALSA woke us up to read new data from the device, but there was actually noth> Oct 30 12:39:45 pi400 pulseaudio[1342]: Most likely this is a bug in the ALSA driver 'snd_usb_audio'. Please report t> Oct 30 12:39:45 pi400 pulseaudio[1342]: We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() re

These messages were not present before the reboot of the system (after which birdnet go refused to start).

I've also tried other audio sources (default, sysdefault) but sadly to no avail.

Thanks in advance for any ideas on this...

Uwe

hoover67 commented 1 week ago

My bad... I had to re-enable the audio login session using "raspi-config". Following that, birdnet go was able to connect to pulseaudio successfully again. Sorry for the noise & wasting everyone's time. :-)

All the best,

Uwe

hoover67 commented 1 week ago

sudo raspi-config system options --> S2 audio --> 0 USB Audio (in my case)