Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744622 - media-video/pipewire: replace pulseaudio
Summary: media-video/pipewire: replace pulseaudio
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 16 votes (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 750014 (view as bug list)
Depends on: 775386
Blocks:
  Show dependency tree
 
Reported: 2020-09-25 11:49 UTC by Fpemud
Modified: 2021-04-11 10:32 UTC (History)
25 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fpemud 2020-09-25 11:49:23 UTC
This is the next step naturally since the libraries for pulseaudio emulation is installed by the the latest version of the ebuild.
maybe there would be a new virual/pulseaudio package?


Reproducible: Always
Comment 1 Jonas Stein gentoo-dev 2020-09-27 19:43:55 UTC
I do not understand your report. Please explain it in proper English. We can help via IRC.
Comment 2 Fpemud 2020-09-28 09:42:37 UTC
PipeWire can be a drop-in replacement for pulseaudio:
https://wiki.archlinux.org/index.php/PipeWire#Drop-in_replacement_for_PulseAudio/Jack_(Experimental)

In pipewire-0.3.10.ebuild:
 if use pulseaudio; then
   elog "Please note that even though the libraries for PulseAudio emulation have"
   elog "been installed, this ebuild is not yet wired up to replace PulseAudio."
   elog
 fi

So I think the next step should be actually replace pulseaudio with pipewire.
Maybe a new "virual/pulseaudio" should be created and make all pulseaudio dependencies depend on this package instead.
Comment 3 Ionen Wolkens 2020-09-30 02:17:45 UTC
In the event that a virtual/pulseaudio was created, apulse[sdk] may also be worth remembering as a candidate for it.

With USE=sdk it even provide headers so packages can seamlessly build without pulseaudio installed at all (and apulse wrapper is never needed), firefox notably support this:
>DEPEND="${CDEPEND}
>    pulseaudio? (
>        || (
>            media-sound/pulseaudio
>            >=media-sound/apulse-0.1.12-r4[sdk]
>        )
>    )
pipewire would need to deal with the headers issue as well if don't want to depend on pulseaudio (or maybe pulseaudio could have a USE=headers-only?)

That aside, both pipewire and apulse do raise compatibility concerns and may not be suitable for every packages.
Comment 4 Ionen Wolkens 2020-09-30 02:34:48 UTC
Another option could be to have a eselect-pulseaudio so can coexist with pulseaudio proper and have the selected libraries used.
Comment 5 mercuriete 2020-10-18 20:52:05 UTC
I am not sure if you can do something systemwise...
but if you do this:

LD_PRELOAD=/usr/lib64/pipewire-0.3/pulse/libpulse.so.0 pactl info

the command returns:

Server String: pipewire-0


So you can try by yourself to replace LD_PRELOAD systemwise but I didn't try it.

another solution is to do a soft link from:

/usr/lib64/libpulse.so  ->  /usr/lib64/pipewire-0.3/pulse/libpulse.so.0

but I didnt try it neither.


Right now I am trying to start a steam game with pipewire but I couldnt do it.

I hope somewhere in the future we can replace pulse entirely. :)
Comment 6 mercuriete 2020-10-18 21:02:53 UTC
I just found out... pipewire is not compiled for 32 bits so 32 bits application probably wont work.

I will open a new bug.
Comment 7 Andreas Sturmlechner gentoo-dev 2020-10-18 21:10:02 UTC
multilib support really is of secondary priority while $summary wasn't even started yet.
Comment 8 Andreas Sturmlechner gentoo-dev 2020-10-18 21:28:22 UTC
*** Bug 750014 has been marked as a duplicate of this bug. ***
Comment 9 mercuriete 2020-10-19 18:46:59 UTC
ok, if the 750014 if a duplicated of this bug...

then I want to remember that not only is a replacement for pulseaudio but for jack as well.

in fact... pipewire as jack replacement is very interesting because pipewire does the bridge between alsa midi and a jack client without any bridge and it does a pulseaudio to jack sink without any further configuration.

thanks for your work, is amazing :)
Comment 10 Aidan Harris 2020-11-25 21:18:22 UTC
This will be pretty easy with the next version (0.3.16) of PipeWire which deprecates the libpulse drop-in library and instead ships its own pulseaudio daemon replacement. Now you just need to run pipewire-pulse and everything wanting to use pulseaudio will "just work" (`pactl info` shows "Server Name: PulseAudio (on PipeWire 0.3.16)").

I did run into a slight issue though, software likes to auto-spawn pulseaudio if it's not running (e.g before pipewire-pulse has started). I solved this by removing the executable bit from /usr/bin/pulseaudio which is an ugly hack but works for now. I think media-sound/pulseaudio could use a "client" and "server" useflag ("client" controlling the installation of tools like `pactl` and "server" controlling the installation of the pulseaudio server).
Comment 11 Ionen Wolkens 2020-11-26 23:08:29 UTC
Haven't tried but believe you can change (in client.conf):
    daemon-binary = /usr/bin/pulseaudio
So that it'll just spawn the one you want.

That aside, if they deprecate the library I guess my previous idea to all-in-one eselect runtime libraries with apulse+pirewire won't be usable.
Comment 12 Adrian Bassett 2020-12-13 14:06:29 UTC
(In reply to Aidan Harris from comment #10)

> I did run into a slight issue though, software likes to auto-spawn
> pulseaudio if it's not running (e.g before pipewire-pulse has started).
> pulseaudio server).

Edit /etc/pulse/client.conf:

; autospawn = yes
autospawn = no # for pipewire
Comment 13 Leho Kraav (:macmaN @lkraav) 2021-02-12 12:48:49 UTC
How is this decision going to be made, one way or another - who makes the call?
Comment 14 Sam James archtester gentoo-dev Security 2021-03-22 23:52:34 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #13)
> How is this decision going to be made, one way or another - who makes the
> call?

It's about letting it replace rather than killing pulseaudio. People will have the choice.
Comment 15 Niklāvs Koļesņikovs 2021-03-23 09:16:26 UTC
Unless something has recently changed, I do not believe the upstream is planning on replacing libpulse.so et al any time soon (i.e. the original libraries and headers will be with us for a considerable while). Meanwhile pipewire-pulse works reasonably well on systemd, when using using the pipewire-pulse.socket. And on OpenRC the replacement daemon should work reasonably well, too, so long as one avoids running any PulseAudio applications before pipewire and pipewire-pulse have started. On OpenRC disabling PulseAudio autospawning is optional but probably a good idea.

In other words, it's about as replaceable right now as it will be. There's, of course, a bit more Gentoo could do to make it easier and just slightly more reliable (just slightly), and people are working on it. But it won't be quick.

Please note the word reasonably well for both systemd and OpenRC - PipeWire is still at version 0.3 after all, and pipewire-pulse was not upstream's first choice for providing PulseAudio support, but it's the only one we've got for the foreseeable future.
Comment 16 Eternal Sorrow 2021-03-23 10:04:56 UTC
The only thing that can be done right now in my opinion is add USE flag to build pulseaudio as libpulse only, without pulseaudio daemon.
Comment 17 Perfect Gentleman 2021-03-23 10:09:57 UTC
(In reply to Eternal Sorrow from comment #16)
> The only thing that can be done right now in my opinion is add USE flag to
> build pulseaudio as libpulse only, without pulseaudio daemon.

That would be good idea.
I've been using pipewire as pulseaudio replacement on KDE-OpenRC since 0.3.16. With every release it's getting better and better. I've modified ebuild to build pipewire against elogind, but I'm not sure if it works properly.