GNOME is currently my preferred DE and a while back I decided to write an extension so I could get some experience developing for a tech stack I normally wouldn’t develop for, and to create something useful for myself. It’s been a fun project with plenty of opportunity to dive deeper into GNOME and Linux as a whole.
The extension is just a simple Quick Settings button that toggles on and off a PipeWire (really PulseAudio) module to enable discovery of, and streaming audio to AirPlay enabled speakers. (You can check out the GNOME extension here, and the Github repo here, if you’re curious)
Right now, I’ve only ever tested the extension when using PipeWire, and all I support is PipeWire, but the modules and CLI tools I’m currently leveraging are all actually from PulseAudio. I believe that there’s a good chance the extension could be easily modified to allow PulseAudio users to use the extension as well.
My question’s are:
Is providing PulseAudio support even worthwhile? It seems like GNOME is more and more intertwined with PipeWire with each release.
If it would be useful, is anyone aware of any distros that provide a GNOME flavor while only using PulseAudio and not PipeWire?
I could try to spin up my own custom installation, but I’d prefer something mainstream that I don’t have to debug on my own, and can be fairly confident that if something isn’t working it’s not because I did something wrong.
Additionally, I’ll probably just run this test environment in a VM, and I’d want something that I can quickly destroy and reinstall without a lot of fuss.
If I can’t attain that, then I probably won’t be motivated to work on supporting PulseAudio. Maintaining a custom Linux install just for testing a potentially fleeting feature is not my idea of a good time.
don’t bother with pulseaudio support unless you’re bored or nostalgic
focus on pipewire - that’s where the ecosystem’s at
your time’s better spent on features real users will actually use
also - nice work on the extension - airplay toggle’s a slick idea
You’re not wrong, especially for Wayland users and current distro versions, which is why I haven’t put in the effort so far. Still, I’m pretty certain that Pulse support is about as simple as changing two lines of code and testing.
If testing can be made not difficult, then there’s almost no reason not to support it.
Any specific reason for pulse? Pipewire emulates pulse so you can develop for pulse and it will drop right in for pulse and pipewire systems? Is there something that you are doing that is an off label feature of pulseaudio that pipewire does not handle?
Nope, it should all work for both, I’m just looking for an easy way to test and validate before I enable and claim Pulse support.
Right now I validate that PipeWire is installed before activating the extension, so I need to tweak that to check for either PulseAudio or PipeWire and then the extension should just work.
In the future I may leverage PipeWire specific features, so I may wish to detect and enable/disable features depending on the users setup. If I can build the features using Pulse native modules and tools, I may.
Wayland and PipeWire have nothing to do with each other. Wayland can work with PulseAudio and X11 can work with PipeWire, they are not dependencies. And the same goes for GNOME. When GNOME requires PipeWire, it is not for audio.
The only thing Wayland related that currently requires PipeWire is screencapture/-sharing capabilites. But that is more a matter of implementation rather then actual hard requirement. PipeWire is the standard media framework/server now so it just makes sense for portals to use it. There is nothing on a technical or spec level preventing the use of another frameserver though.
I think you’re conflating PipeWire’s audio backend with PipeWire as a general purpose media server. It doesn’t make a whole lot of sense to do, but you can run PulseAudio and PipeWire in parallel for the audio part. PipeWire would still remain separate for the video server.
That’s not how entirely different APIs work lol (unless in your extension context you’re not actually interacting with PipeWire directly but all abstracted away through GNOME).
But that aside, I don’t understand why you’d want PulseAudio specifically? PipeWire provides a compatibility layer for PulseAudio based applications, and it tends to be more stable then actual PulseAudio. There is literally no downside, you can even use old PulseAudio configs.
The reality is that most applications are still using a PulseAudio backend, not a native PipeWire backend. There’s a handful of media players that do, most things don’t, and they all work on said compatibility layer. And they are available in the PipeWire audio API too, that’s the whole point of having it to be a unified server.
Yeah, correct, but I’m not using APIs to interact with PipeWire directly. The extension isn’t using the APIs, it’s using CLI tools, at this point pactl.
It is for all intents and purposes using PulseAudio to accomplish what it’s doing.
I’m simply stating that as distros move towards Wayland, and as GNOME marches forward, distros have been moving towards PipeWire for the features you mentioned.
As such, I’ve only ever tested the extension in an environment with exclusively PipeWire installed. In theory, the extension should just work with PulseAudio if I don’t intentionally stop activation when I don’t detect PipeWire.
My interest in an install with PulseAudio only is just so that I can test it in that environment and have peace of mind that it works as expected.
Right but my point is that’s not directly related. Distros could choose to continue shipping PulseAudio as the audio server, while shipping PipeWire for the portals at the same time.
In fact, many did that for many years (and some still do), because PipeWire’s PulseAudio implementation wasn’t finished and buggy. Obviously that changed in recent years so there is no reason not to just ship PipeWire only.
But anyway as I said:
But if you’re gonna do that, prepare for your audio to be fucked.
So if you want a separate install or VM, Arch or an older Debian as noted above are one way, but I believe MX Linux also still ships PulseAudio and I think so does PopOS (because they are both based on older Debian/Ubuntu versions). There are probably more out there.
But then again, as also already noted above there isn’t much reason to do it unless you just really want to support those ancient distros.
I use Gentoo with Pulseaudio and X11 Gnome 48. FWIW not a single package on my system has a dependency on PipeWire’s sound server (which I intentionally build PipeWire without). Since everything uses PipeWirePulse anyway.
I checked out MX Linux, but with only a community supported GNOME remix hosted in a random dropbox, I decided to just see how an Arch install went.
I’ve only ever manually installed 32 bit ArchLInux on old machines for kicks, so I was hoping that the archinstall script would speed up the process substantially – it does.
It was really really easy to get ArchLinux installed with both GNOME and PulseAudio. I’m glad I went through the exercise too. There are differences between PipeWire’s PulseAudio implementation and native PulseAudio’s pactl outputs.
For example, when using PipeWire, if you execute pactl load-module module-raop-discover it will consistently return the same Module ID every time you load the module during a session. PulseAudio on the other hand will always create a new unique Module ID each time you unload and load the module, even if it just iterates the ID by 1.
That said, I got the extension working with PulseAudio pretty quickly. I need to do more testing before I’d be willing to release the updated version. I can confirm the module gets enabled and disabled properly, but since I’m testing in a VM, I need to modify the network config for the VM so that it can find and discover AirPlay speakers on the main network to confirm the GNOME UI updates as expected. I also need to regression test with PipeWire.