Running Volumio 3.546 (and at least one previous version) with an Apple TV tvOS 17.1 results in broken AirPlay connection.
How to reproduce
Select Volumio as playback device from Apple TV. Directly after starting the playback, the connection will reset (i.e. Volumio is deselected as playback device).
Details
SSHing on volumio shows that the shairport-sync process was killed with 11/SEGV. Last lines in journalctl were
Nov 01 16:29:22 volumio shairport-sync[3735]: ALSA lib /home/pi/volumio-alsa-plugin/src/pcm_volumioswitch.c:143:(_snd_pcm_volumioswitch_open_target_pcm) PCM Volumio ALSA Switch Plugin failed to open the switcher target pcm volumioLocalPlayback
Nov 01 16:29:22 volumio systemd[1]: shairport-sync.service: Main process exited, code=killed, status=11/SEGV
Nov 01 16:29:22 volumio volumio[833]: info: Airplay started streaming, receiving metadatas
Nov 01 16:29:22 volumio volumio[833]: info: CorePlayQueue::getTrack 0
Nov 01 16:29:22 volumio volumio[833]: info: CoreCommandRouter::volumioStop
Nov 01 16:29:22 volumio volumio[833]: info: CoreStateMachine::stop
Nov 01 16:29:22 volumio volumio[833]: info: CoreStateMachine::setConsumeUpdateService undefined
Nov 01 16:29:22 volumio systemd[1]: shairport-sync.service: Failed with result ‘signal’.
Nov 01 16:29:22 volumio volumio[833]: info: sendMpdCommand stop took 47 milliseconds
Workaround
The SEGV error does not occur during all connection attempts. Once the connection is established successfully it will remain working for at least one hour. To simplify this retry procedure I have set the shairport-sync process to restart after failure.
- Edit
/lib/systemd/system/shairport-sync.service
- Add restart directive (see below)
[Service]
ExecStart=/usr/bin/shairport-sync --configfile=/tmp/shairport-sync.conf
User=shairport-sync
Group=shairport-sync
Restart=on-failure
RestartSec=2s