fix: remove PipeWire socket to restore audio on many existing Linux systems - #396
fix: remove PipeWire socket to restore audio on many existing Linux systems#396fermulator wants to merge 4 commits into
Conversation
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
❌ Test build failed. Help
|
- "--filesystem=xdg-run/pipewire-0:ro", + "--filesystem=xdg-run/pipewire-0",
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
The initial attempt for socket completely failed (and is not valid) -- tested locally, and this confirms per build failure earlier https://github.com/flathub-infra/vorarbeiter/actions/runs/27923950773 -- local test results |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for x86_64 architecture. |
spotify audio worked off the test branch build ✔️ |
|
(!) WARNING: on further consideration, i don't think this actually fixes the PROBLEM introduced by #380 Next line of thinking is that the introduction of |
revert breaking change, fallback to pulseaudio (support pipewire via pipewire-pulse)
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for x86_64 architecture. |
The context that is completely missing from this PR is spotify 1.2.86.502.g8cd7fb22 required pipewire socket to play audio in default config on all systems. As for version 1.2.92.147.g5b8f9367 it seems they may changed it to make it work without pipewire socket although there are mixed user reports about that. This is all context someone need to understand this issue, those walls of text of LLM output have no relevance but add extreme noise.
So removing pipewire socket still doesn't make audio work on legacy systems in your testing? Or did you comment about different state of this PR? As I see it went back and forth on removing and re-adding pipewire socket. I would need confirmation from you and users who reported no audio on stock config that installing latest test build fixes it for them without using workaround in |
yes that comment was from the initial state of using read-write socket - it DID fix problem for my Bazzite system (but when i reverted it it started working suddenly which was odd) I CAN confirm that spotify works again without the pipewire entry at all on the manifest (and without any workarounds) using this test build with this change under what circumstances did you originally need to add pipewire explicitly? (this doesn’t make sense to me - it’s still defacto standard to support pulse audio … shouldn’t be any system that doesn’t ship with support for it) |
|
latest state of this PR is proposing to revert explicit pipewire in manifest because some legacy systems hook into it but they aren’t hooked up for audio go back to pulse audio because there are hundreds of users reporting broken spotify app after the change in May |
Spotify defaulted to pipewire output and didn't use pulseaudio fallback without passing --audio-api=pulseaudio explicitly. This wasn't first weird behavior or regression in recent months. |
OK so the app itself only output to pipewire? (and as such the container needed it for pass through?) Maybe this was an interim state? It’s working now without the pipewire line so i think we should go back to pulseaudio like every other mainstream upstream pkg |
|
Yes, app only outputted to pipewire unless pulseaudio flag was added in config. If you install spotify from official .deb archive then it would have access to all sockets on system including pipewire so flatpak should currently give exact same experience as non-flatpak. |
|
confirmed bug and working on older Mint system, no audio without redirect workaround |
Fixes #383
Problem
Commit
9b26fc9(PR #380, May 2026) added--filesystem=xdg-run/pipewire-0:roto the manifest with the rationale "Spotify uses pipewire by default now."This causes silent audio failure on systems where PipeWire is installed but not serving audio (e.g. Ubuntu 22.04). Spotify's CEF (Chromium 146) detects the PipeWire socket in the sandbox, selects PipeWire as its audio backend, and commits — there is no fallback to PulseAudio. On systems where PipeWire is not the audio server, the result is no audio with no error message.
Why removing the line is the correct fix
Spotify does not need direct PipeWire socket access. Audio playback works through
--socket=pulseaudio, which is already in the manifest:pipewire-pulse(Fedora, Bazzite, Arch withpipewire-audio, most modern desktops):pipewire-pulseintercepts PulseAudio connections and routes them through PipeWire natively. Full PipeWire audio, zero configuration.This works because
--socket=pulseaudioconnects to whatever is listening on the PulseAudio socket — whether that's actual PulseAudio or PipeWire's PulseAudio compatibility layer. No detection, no fallback logic needed.Note:
pipewire-pulseis not a dependency ofpipewireon any major distro — it's a separate optional package. Systems like Ubuntu 22.04 ship PipeWire for screen sharing (xdg-desktop-portal) but use PulseAudio for audio, with nopipewire-pulseinstalled. Exposing the PipeWire socket on these systems is what causes CEF to select the wrong audio backend.How other Flatpak apps handle this
--socket=pulseaudiopipewire-pulsexdg-run/pipewire-0(r/w)xdg-run/pipewire-0:roDiscord is the only other app that exposes the PipeWire socket, and it does so for a specific non-audio feature (screen capture in Steam Deck game mode) requested by a Discord engineer. Spotify has no equivalent use case.
Why not just drop
:ro?Initial testing on Bazzite 44 (PipeWire 1.6.6) showed no audio with
:ro, and audio worked after overriding to read-write. However, after reverting to the stock:romanifest and rebooting, audio worked again — the failure was not reproducible.This is consistent with how Unix sockets work:
connect(),send(), andrecv()bypass the filesystem mount's read-only flag. The:rorestricts file creation/deletion in the mount path, not socket communication. The initial failure was likely a transient PipeWire session issue, not caused by:roitself.The real problem is exposing the socket at all, which causes CEF to select PipeWire as the audio backend on systems where PipeWire is present but not serving audio (e.g. Ubuntu 22.04). Dropping
:rodoes not fix that.Tradeoff: compatibility over direct PipeWire
This change means CEF will use the PulseAudio API on all systems, including modern PipeWire desktops. The audio path on those systems becomes:
Instead of the direct path available when the PipeWire socket is exposed:
For a music player streaming 44.1kHz audio, the practical difference is negligible —
pipewire-pulseis a thin translation layer, not a full server. Latency, sample rates, and format negotiation all pass through fine.We favour compatibility here: silent audio failure with no error message on Ubuntu 22.04 LTS (supported until 2027) and similar systems is worse than an imperceptible extra hop on modern desktops.
When Flatpak adds
--socket=pipewiresupport, the manifest should declare both--socket=pulseaudioand--socket=pipewire— that would give CEF proper access on modern systems while still falling back gracefully. As of Flatpak 1.17.7,pipewireis not a valid socket type.Workaround (for users on current version)
This forces CEF to skip PipeWire and use PulseAudio directly. Remove after this fix is released.