wslg icon indicating copy to clipboard operation
wslg copied to clipboard

use Pipewire instead of PA

Open sr229 opened this issue 4 years ago • 14 comments

Is your feature request related to a problem? Please describe. This is a little related to MIDI and JACK support but it can live as it's own issue.

Describe the solution you'd like Currently, the team considered PulseAudio, which is fine by itself, however, if you factor in Flatpaks in someone's WSL setup or JACK support, PA wouldn't really be a good system for this. Hence, Pipewire should be installed instead since it handles both use cases for PA and JACK.

Describe alternatives you've considered A custom CBL-Mariner Distro would have done the job but I don't know how well it'll work since I believe the current implementation relies on PA but it should work.

sr229 avatar Jun 14 '21 14:06 sr229

Fedora enabled Wayland and Pipewire by default. There is a great chance that Ubuntu 22.04 will come with both enabled by default. It's about time to switch to the modern desktop technologies.

@sr229 A better title for this would be: "Enable/Use Pipewire by default".

Zingam avatar Jun 15 '21 19:06 Zingam

This would be nice to run JACK programs through pipewire.

Aerocatia avatar Nov 22 '21 15:11 Aerocatia

What would be the command to replace pulseaudio with pipewire in this file? https://github.com/microsoft/wslg/blob/main/WSLGd/main.cpp

Biswa96 avatar Nov 22 '21 15:11 Biswa96

Pipewire would need the RDP sink/source implemented for it to work.

Aerocatia avatar Nov 23 '21 14:11 Aerocatia

Do we have any way allready to make Pipewire or Jack work in WSLg?

capoei avatar Mar 04 '22 17:03 capoei

Is it possible to setup pipewire's pulse audio tunnel https://docs.pipewire.org/page_module_pulse_tunnel.html? Seems promising, if the existing WSL solution is using pulse as server on windows side? Anyone tried?

Seems as Ubuntu 22.10 will get pipewire by default, so it is probably time to have a solution here :)

robberos avatar May 31 '22 05:05 robberos

Is there any update on this?

i2 avatar Mar 04 '23 23:03 i2

One would also be able to use PipeWire for obtaining the camera contents (and being able to do so across several apps at once, at that!) and grab the screen contents for screensharing too. PipeWire isn't just audio.

orowith2os avatar Sep 24 '23 04:09 orowith2os

One would also be able to use PipeWire for obtaining the camera contents (and being able to do so across several apps at once, at that!) and grab the screen contents for screensharing too. PipeWire isn't just audio.

When I historically made this issue, the main focus was for PA/JACK. I wasn't aware PW supported most multimedia interfaces, which is a nice thing to know.

sr229 avatar Sep 25 '23 00:09 sr229

Is it possible to setup pipewire's pulse audio tunnel https://docs.pipewire.org/page_module_pulse_tunnel.html? Seems promising, if the existing WSL solution is using pulse as server on windows side? Anyone tried?

Seems as Ubuntu 22.10 will get pipewire by default, so it is probably time to have a solution here :)

We'll have to implement some support in the system distro as well (the Linux system in charge of forwarding graphical requests to RDP in WSL), so someone either:

  • Adds support by adding PW in the system distro, removing PA and measure the impact of such changes on some legacy PA-reliant programs

  • Have two versions of the WSLg system distro side by side to measure behavior.

sr229 avatar Sep 25 '23 01:09 sr229

Adds support by adding PW in the system distro, removing PA and measure the impact of such changes on some legacy PA-reliant programs

Not an issue. PipeWire provides pipewire-pulse, pipewire-jack, and pipewire-alsa. I believe it also provides an LD_PRELOAD for v4l2 applications.

orowith2os avatar Sep 25 '23 03:09 orowith2os

Worth noting that PipeWire has released version 1.0.0

To copy from their release notes:

"PipeWire represents the next evolution of audio handling for Linux, taking the best of both pro-audio (JACK) and desktop audio servers (PulseAudio) and linking them into a single, seamless, powerful new system." - Paul Davis, JACK and Ardour author

"PipeWire is a worthy successor to PulseAudio, providing a feature set closer to how modern audio hardware works, and with a security model with today's application concepts in mind. Version 1.0 marks a major milestone in completing the adoption of PipeWire in the standard set of Linux subsystems. Congratulations to the team!" - Lennart Poettering, Pulseaudio and systemd author

jthoward64 avatar Nov 27 '23 06:11 jthoward64

Any plans on this? :P

Beryesa avatar Aug 20 '24 04:08 Beryesa

PipeWire 1.4 is released, what are the WSLg roadmap to move to PipeWire?

ohault avatar Mar 06 '25 14:03 ohault