Skip to content

[Bug] Enabling **Exclusive output** and pressing play results in a "no active pipeline" #144

Description

@StrayGuru

Your setup

  • SONE version: 0.19.0
  • Install source: Flatpak (Flathub, system install)
  • Distro + version: Bazzite 44.20260608 (Fedora Atomic / immutable, bazzite-nvidia-open:stable)
  • Desktop / session: KDE Plasma 6 on Wayland
  • GPU + driver: NVIDIA GB203 (RTX 50-series), open kernel module 610.43.02 + AMD Radeon iGPU
  • Audio: PipeWire 1.6.6 / WirePlumber, USB DAC: Focusrite Scarlett Solo 4th Gen (hw:Gen, card 3)

What went wrong?

Enabling Exclusive output and pressing play results in a "no active pipeline" error and no sound. No further error detail is shown in the UI.

Root cause (diagnosed with GST_DEBUG=3): in exclusive mode SONE opens the raw ALSA device directly (hw:Gen -> /dev/snd/pcmC3D0p), but on a PipeWire system that device is already held open by PipeWire (it's the default sink). The open() fails with EBUSY (-16) and SONE retries in a tight loop (~0.7 s interval) forever, surfacing only the generic "no active pipeline" message.

There are two stacked problems:

  1. Flatpak sandbox: the default manifest grants only devices=dri and the pulseaudio socket. Raw ALSA (/dev/snd) is not reachable at all, and the GStreamer PipeWire device provider fails too (gstpipewirecore.c:109:make_core: error connect / Failed to connect — no native PipeWire socket). I had to add manually:

    flatpak override --user --device=all io.github.lullabyX.sone
    flatpak override --user --filesystem=xdg-run/pipewire-0 io.github.lullabyX.sone
    
  2. No device reservation: SONE does not implement the org.freedesktop.ReserveDevice1 D-Bus protocol (and does not use PipeWire's native exclusive access path), so it cannot ask PipeWire to release the device. Exclusive mode only works if PipeWire happens to not hold the playback PCM at that moment.

After applying both overrides and ensuring PipeWire released the device, exclusive mode works correctly — confirmed bit-transparent output at 24/96 (fuser -v /dev/snd/pcmC3D0p shows only the SONE process holding the PCM with mmap access).

What did you expect to happen?

Either:

  • SONE requests the device from PipeWire via org.freedesktop.ReserveDevice1 (or uses PipeWire's exclusive access) so exclusive mode "just works", or at minimum
  • a clear error in the UI ("audio device is busy — held by PipeWire/another app") instead of a silent infinite retry loop behind "no active pipeline".

Additionally, the Flatpak manifest should include the permissions exclusive mode needs (--device=all or at least ALSA access, plus the PipeWire socket), otherwise the feature cannot work at all for Flathub users out of the box.

How can we reproduce it?

  1. Install SONE 0.19.0 from Flathub on any PipeWire-based distro (tested: Bazzite, Plasma 6 Wayland) with default sandbox permissions.
  2. Set the USB DAC as the system default sink (so PipeWire keeps its playback PCM open).
  3. In SONE: enable Exclusive output, select the DAC, press play.
  4. Result: "no active pipeline", no sound. With GST_DEBUG=3 the EBUSY retry loop is visible.

Workaround that makes it work:

  1. flatpak override --user --device=all io.github.lullabyX.sone
  2. flatpak override --user --filesystem=xdg-run/pipewire-0 io.github.lullabyX.sone
  3. Make sure PipeWire is not holding the DAC's playback PCM (e.g. switch the default sink to another device and wait for node suspend, or wpctl set-profile <card-id> off).
  4. Exclusive playback then starts and is fully bit-transparent.

Logs

Note: original errno messages were in Polish ("Urządzenie lub zasoby zajęte" = "Device or resource busy"); translated for readability.

Log output (GST_DEBUG=3, flatpak run)
0:00:00.015881594  ERROR default gstpipewirecore.c:109:make_core: error connect: Device is disabled
0:00:00.016273974  ERROR pipewire gstpipewiredeviceprovider.c:814:gst_pipewire_device_provider_start:<pipewiredeviceprovider0> Failed to connect
0:00:00.020324490  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC0D3p' failed (-16): Device or resource busy
0:00:00.020336990  ERROR alsa gstalsadeviceprovider.c:57:add_device:<alsadeviceprovider0> Could not open device hw:0,3 for inspection!
0:00:00.035690695  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
0:00:00.035699725  ERROR alsa gstalsadeviceprovider.c:57:add_device:<alsadeviceprovider0> Could not open device hw:3,0 for inspection!
DEBUG [tauri_app_lib::audio] [list_alsa_devices] DeviceMonitor found 2 devices
DEBUG [tauri_app_lib::audio] [list_alsa_devices] found: 'GB203 High Definition Audio Controller Digital Stereo (HDMI)' -> hdmi:0
DEBUG [tauri_app_lib::audio] [list_alsa_devices] found: 'Scarlett Solo 4th Gen Headphones / Line 1-2' -> hw:Gen
DEBUG [tauri_app_lib::commands::playback] [resolve_play_uri]: track_id=422390718 — quality=Some("HI_RES_LOSSLESS"), bitDepth=Some(24), sampleRate=Some(96000), codec=Some("FLAC"), dash=true
DEBUG [tauri_app_lib::audio] [gapless-diag] SetNextTrack: effective_gapless=false (setting=true excl=true bp=false), backend_normal=false
0:00:03.658132900  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
0:00:04.311248890  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
0:00:04.965122231  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
0:00:05.630801328  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
0:00:06.284346088  WARN  alsa pcm_hw.c:1803:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC3D0p' failed (-16): Device or resource busy
(...retry loop continues indefinitely, ~0.7 s interval; card 3 = Scarlett Solo 4th Gen, pcmC3D0p = its playback PCM...)

During the failure, fuser -v /dev/snd/pcmC3D0p shows the PCM held by the PipeWire process. After the workaround it is held solely by the SONE process (mmap access) and playback is fully bit-perfect (verified at FLAC 24/96, S24_32LE -> S32LE lossless promotion, EXCLUSIVE badge shown).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions