# Plexamp \[headless\] locks audio device with XRUN status

**URL:** <https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527>\
**Category:** Plex Labs\
**Tags:** plexamp\
**Created:** [August 22, 2022, 5:58pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527 "2022-08-22T17:58:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vtr1000](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@vtr1000](https://forums.plex.tv/u/vtr1000)\
**Post date:** [August 22, 2022, 5:58pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/1 "2022-08-22T17:58:33Z")

</div>

I’m running Plexamp headless on two different systems: a Raspberry Pi running Manjaro using ALSA directly with a BossDac Hat, and a Ryzen desktop running Ubuntu using PulseAudio and a USB DAC. On both I get an issue that’s made Plexamp an unsustainable streaming solution: **it does not release the audio device after playback or disconnecting**. The only way to release the audio device so that something else can be played is to stop the plexamp service. The Pi running ALSA directly offers more information beyond a ‘running’ or ‘closed’ device status:

```auto
cat /proc/asound/card0/pcm0p/sub0/status 
state: XRUN

```

This is the reported state of the sound device when playback has finished on the Pi. On the desktop, the status will simply remain at ‘running’. Obviously this means that I cannot use plexamp as a background service on my Desktop, or stream from Spotify or DLNA on the Pi with such an issue.

Note: The appimage version does not have this issue on Desktop.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [August 22, 2022, 6:56pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/2 "2022-08-22T18:56:51Z")

</div>

This should be fixed in the next release.

You can try the latest headless beta at [https://plexamp.plex.tv/headless/Plexamp-Linux-headless-v4.3.1-beta.7.tar.bz2](https://plexamp.plex.tv/headless/Plexamp-Linux-headless-v4.3.1-beta.7.tar.bz2) if you’d like to confirm.

---

<div class="post-metadata">

**Author:** ![vtr1000](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@vtr1000](https://forums.plex.tv/u/vtr1000)\
**Post date:** [August 22, 2022, 10:41pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/3 "2022-08-22T22:41:22Z")

</div>

Thanks for the quick reply.

Tested on my Pi and I can confirm that the beta resolves the issue. The DAC is released after 14-15 seconds. Any chance of making that more like 4-5 seconds? 😉

I also noted that my other annoyance appears to be solved, that being the play/pause remote control. 🙂

Off topic, but seeing as I have your attention; is there any technical or legal reason that Plexamp can’t play to a UPnP media renderer such as [upmpdcli](https://www.lesbonscomptes.com/upmpdcli/) (as used by the likes of Volumino)?

Thanks again. It’s great to see some Linux love!

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [August 22, 2022, 11:08pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/4 "2022-08-22T23:08:49Z")

</div>

> [@vtr1000](#):
>
> Any chance of making that more like 4-5 seconds?

Sorry, trying to draw a balance between casual pausing and a longer pause, given that with some hardware, starting/stopping audio h/w can have audibles associated with it.

> [@vtr1000](#):
>
> Off topic, but seeing as I have your attention; is there any technical or legal reason that Plexamp can’t play to a UPnP media renderer

Only because UPnP sucks, and we’d prefer to focus on a home solution around headless Plexamp 😅

---

<div class="post-metadata">

**Author:** ![vtr1000](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@vtr1000](https://forums.plex.tv/u/vtr1000)\
**Post date:** [August 22, 2022, 11:18pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/5 "2022-08-22T23:18:46Z")

</div>

> [@elan](#):
>
> Sorry, trying to draw a balance between casual pausing and a longer pause, given that with some hardware, starting/stopping audio h/w can have audibles associated with it.

Any chance of a user configurable parameter there then? 😉

> [@elan](#):
>
> Only because UPnP sucks, and we’d prefer to focus on a home solution around headless Plexamp

Fair enough. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [November 20, 2022, 11:19pm UTC](https://forums.plex.tv/t/plexamp-headless-locks-audio-device-with-xrun-status/805527/6 "2022-11-20T23:19:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
