Linux Solved Airplay Error on Raspberry Pi on Arch Linux
#1
Hi All,

I've been troubleshooting a vexing issue with Airplay support on Kodi version 17 on and off for the past few weeks and finally worked out a solution and wanted to share. Basically I'm running Kodi v17 (previously various RC versions) on a Raspberry Pi 3 w/ a PiDisplay running Arch Linux. I was able to get Kodi to run without much difficulty, but AirPlay audio streaming from one of my iPhones/iPads wasn't working, at least not reliably. Every once and a while it would work, but once it was reset it generally wouldn't. My phone would see the system, but when I tried to connect the phone would bring up an error saying "Unable to Connect to <SYSTEM-NAME>". The debug logs weren't much help and I went on many wild goose chases (including a bunch of networking ones), but basically it looks like the problem was that Kodi was loading prior to Avahi and that was causing the phones to not be able to connect correctly. (I was running both as services in systemd).

To solve the issue I created a systemd drop in file to modify the default kodi.service systemd file following the instructions here. In the drop in file I added the following:
Code:
[Unit]
Wants = avahi-daemon.service
After = remote-fs.target avahi-daemon.service

[Service]
Type = idle
This has the effect of forcing the system to load Avahi first and only load Kodi once the boot up process is completed. Actually I thought just adding the Wants/After section would've sufficed, but in some instances the problem persisted and adding the Type=idle seemed to resolve the issue.

Hopefully this will save others some time. I may try to contact the Arch package maintainers for kodi-rbp to see if they'd be interested in incorporating the fix, or possibly a more elegant one with the same effect. If anyone has any questions or would like more details I'd be happy to share.

Desertskunk
Reply

Logout Mark Read Team Forum Stats Members Help
Solved Airplay Error on Raspberry Pi on Arch Linux0