I drive my living room hifi with Plexamp Headless running on a Raspberry Pi 4 with a HiFi Berry Digi2 Pro hat. I got it all set up using this guide just over a year ago and it has been running rock solid since, with any issues easily fixed by a hard reset of the rpi by unplugging the power and plugging it back in.
A few days ago the rpi wasn’t showing up in plexamp, and it still wasn’t showing up after some hard resets. I decided to reinstall and troubleshoot that way. I got it working, but when I went to set it so it launches on startup of the pi I got a peculiar error. The unit would show up in plexamp, but when trying to play songs the album art would show up for an instant before the playback window minimized towards the bottom of the player, refusing to playback, as if nothing was playing back at all. This behavior was consistent across the mobile, desktop, and browser players when trying to drive the headless instance.
I went back and retraced my steps a few times, reinstalling the rpi os, plexamp, logging in, and every time it would have the same behavior when I went through the steps to have plexamp launch on startup of the rpi., with the exact same playback issue.
Finally I reinstalled the rpi os and stopped just before the steps to have it launch on startup. It works fine, but I have to ssh in and run this command every time I want to use it: node plexamp/js/index.js
Any idea what is happening? This is workable for now but I am eager to have my perfectly automated headless system working in full force again. I wonder if it has anything in common with what caused my rock solid system to fail for the first time in a year in the first place. I did get a new modem in case that is relevant.
Odd that it only happens when it tries to start on launch. If I ssh in and launch it everytime I want to use it it works perfectly. What service do you mean?
it looks like you’re running a full desktop session (this is expected if you installed the normal OS image … vs the Lite OS image, which is usually all you need if you’re going to run headless)
logs show a long list of audio outputs including pulseaudio (audio server that normally only runs as part of a desktop session)
there can be issues/conflicts when a system service (in this case, Plexamp) tries to access an audio device at the same time as pulseaudio … vs no issue when you log in and start Plexamp manually using the same audio device
running without the full desktop environment might help avoid the issue you’re seeing
I’m not sure if it fits your use case, just wanted to share it as an option. For me this was the best solution because I use the Hifiberry DSP add-on and wanted easy room correction.