Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536780 - media-sound/pulseaudio - split off media-libs/libpulse from media-sound/pulseaudio
Summary: media-sound/pulseaudio - split off media-libs/libpulse from media-sound/pulse...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Depends on:
Blocks: 744622
  Show dependency tree
Reported: 2015-01-16 15:52 UTC by Manuel Ullmann
Modified: 2022-04-29 12:47 UTC (History)
8 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Ullmann 2015-01-16 15:52:07 UTC

I´m using the proprietary oneplay-dvd to play DVDs, which installs fine with rpm. To support distributions, which use and install pulseaudio by default, they include their own versions of the necessary libraries, like liborc, libglib and whatelse they need. However these libraries have to statically link to libpulse, although they are supporting plain alsa output. So pulseaudio does not have to run, but libpulse has to be present.
I stripped down pulseaudio of anything unnecessary, so that it is now built with USE="glib orc" and nothing else. However I´m not sure, whether pulseaudio does not pull in more dependencies, than a libpulse ebuild would require.
If this would be the case, an additional media-libs/libpulse ebuild would be useful, so that I could depclean any overhead.

If you would like to test this out, you could use the trial version of oneplay-dvd. Note, that it uses Wibu´s CodeMeter as copy protection.

Reproducible: Always

Steps to Reproduce:
1. Try to execute a binary, which uses libraries statically linking to libpulse.
Actual Results:  
Error while loading shared libraries.

Expected Results:  
Clean startup.

$ emerge --info
Portage 2.2.14 (python 2.7.9-final-0, !../../var/lib/layman/distros/profiles/CLD/amd64, gcc-4.8.3, glibc-2.19-r1, 3.18.2-calculate x86_64)
System uname: Linux-3.18.2-calculate-x86_64-AMD_Turion-tm-X2_Ultra_DualCore_Mobile_ZM-84-with-gentoo-14.12.1
KiB Mem:     3788116 total,   1252484 free
KiB Swap:    4882428 total,   4882332 free
Timestamp of tree: Fri, 16 Jan 2015 08:00:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1
dev-util/ccache:          3.1.9-r4
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6-r1, 1.13.4                                                                                                              
sys-devel/binutils:       2.24-r3                                                                                                                        
sys-devel/gcc:            4.8.3                                                                                                                          
sys-devel/gcc-config:     1.7.3                                                                                                                          
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1::calculate
Repositories: gentoo distros calculate
Installed sets: @custom
CFLAGS="-O2 -march=native -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=x86-64 -pipe"
EMERGE_DEFAULT_OPTS=" --binpkg-respect-use=y --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync"
FFLAGS="-O2 -pipe"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/distros /var/lib/layman/calculate"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 amr audiofile avi berkdb bittorrent bluetooth bzip2 cairo cdda cddb cdparanoia cdr chm cli consolekit cpudetection cracklib crypt css cue cups cxx dbus djvu dri dv dvd dvdr dvdread ebook encode exif faac ffmpeg flac flash foomaticdb fortran ftp gd gdbm gif gphoto2 gpm gtk iconv id3tag ieee1394 imagemagick ios ipod ipv6 irc jabber jingle jpeg jpeg2k kde libnotify libwww logrotate lzo mad matroska mbox mikmod mmx mmxext mng modules mp3 mpeg mplayer multilib musepack ncurses networkmanager nfs nls nptl nsplugin ogg oggvorbis openal opencore-amr openexr opengl openmp oscar pam pcre pdf png policykit portaudio ppp qt3support qt4 quicktime raw rdesktop readline real samba scanner sdl semantic-desktop session smp speex spell srt sse sse2 sse3 sse4.1 sse4.2 sse4a sse5 ssl ssse3 svg tcpd tga theora tiff truetype udev unicode usb userlocales v4l v4l2 vaapi vcd vdpau vhosts vorbis wavpack webkit webp wimax win32codecs wmf wxwindows x264 xanim xcomposite xinerama xpm xv xvid xvmc yahoo zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="* ptp2" CL="builder client desktop console consolegui" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="dmraid dmsquash-live plymouth lvm mdraid nfs" ELIBC="glibc" FOO2ZJS_DEVICES="*" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 efi-32 pc" INPUT_DEVICES="keyboard mouse evdev mutouch synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en bg de es es_ES fr it pl pt pt_BR ro ru ru_RU uk" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" THEMES="CLD" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware nouveau nvidia i915 i965 r100 r200 r300 r600 radeonhd dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Note: The calculate overlay does not include media-sound/pulseaudio, so I´m filing it here.
Comment 1 Gilles Dartiguelongue gentoo-dev 2015-01-18 23:45:36 UTC
We don't generally split packages unless there is an advantage that surpasses the cost of extra maintenance.
Comment 2 Manuel Ullmann 2015-01-19 15:51:33 UTC
Well, I assume then, that it depends on how high the advantage of support for binary packages hard linking to libpulse is measured. As these binary packages are usually proprietary, thus not in the portage tree, where USE flags could change the libpulse dependency, I guess, that this advantage is not measured too high.
I wouldn´t mind a resolve as won´t fix, but still think, that this is actually a valid request.
Should there be lots of binaries (e.g. Steam games optionally supporting pulseaudio) linking to libpulse in the future, the advantage might be reconsidered. For now it would be fine by me leaving a crippled pulseaudio package installed. I just thought there might be interest in this, because the libpulse package is available in Debian and Redhat repositories and the users could use such a package for similar use cases.
Comment 3 Gilles Dartiguelongue gentoo-dev 2017-09-11 20:40:15 UTC
Binary distributions can split packages a lot more easily than we do.
Would it be satisfactory as a middle ground to provide static-libs from the pulseaudio ebuild directly ?
Comment 4 Manuel Ullmann 2017-09-12 12:47:21 UTC
That would be fine. Thanks.
Comment 5 Igor V. Kovalenko 2021-06-21 22:46:27 UTC
With upcoming 15.0 version you can build pulseaudio with "-daemon" USE flag to disable pulseaudio daemon part, have a look at pulseaudio-14.99.2_pre

Upstream issue
Upstream change (Meson build system)
Comment 6 Mart Raudsepp gentoo-dev 2021-08-03 11:45:58 UTC
That's great, but for a clean split package we also need a way to build the daemon without libpulse (making it link to an already available system-lib of libpulse if needed); not just libpulse without daemon.
Comment 7 Larry the Git Cow gentoo-dev 2021-09-24 18:16:06 UTC
The bug has been referenced in the following commit(s):

commit 9d6f88e10e942ae8e3a475e1e842ce1c423d70ec
Author:     Mart Raudsepp <>
AuthorDate: 2021-09-24 18:08:30 +0000
Commit:     Mart Raudsepp <>
CommitDate: 2021-09-24 18:15:57 +0000

    media-sound/pulseaudio: Add metapackage for pulseaudio split packages
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Mart Raudsepp <>

 media-sound/pulseaudio/pulseaudio-15.0-r100.ebuild | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

commit 26646b27529e13f7beb0c78fac339e1d78bf07d4
Author:     Mart Raudsepp <>
AuthorDate: 2021-09-24 18:07:09 +0000
Commit:     Mart Raudsepp <>
CommitDate: 2021-09-24 18:15:57 +0000

    media-sound/pulseaudio-daemon: Add split package for pulseaudio daemon
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Mart Raudsepp <>

 media-sound/pulseaudio-daemon/Manifest             |   1 +
 .../pulseaudio-daemon/files/15.0-daemon-only.patch | 277 ++++++++++++++++++
 ...pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch |  25 ++
 .../pulseaudio-daemon/files/pulseaudio.conf.d      |   6 +
 .../pulseaudio-daemon/files/pulseaudio.init.d-5    |  80 ++++++
 .../pulseaudio-daemon/files/pulseaudio.service     |  10 +
 .../pulseaudio-daemon/files/pulseaudio.tmpfiles    |   1 +
 media-sound/pulseaudio-daemon/metadata.xml         |  66 +++++
 .../pulseaudio-daemon-15.0.ebuild                  | 320 +++++++++++++++++++++
 9 files changed, 786 insertions(+)

commit dfd146a6aceb118f1d4f9751ae071f13a7624ffb
Author:     Mart Raudsepp <>
AuthorDate: 2021-09-24 18:00:27 +0000
Commit:     Mart Raudsepp <>
CommitDate: 2021-09-24 18:15:56 +0000

    media-libs/libpulse: Add split package for pulseaudio libraries
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Mart Raudsepp <>

 media-libs/libpulse/Manifest                       |   1 +
 media-libs/libpulse/files/15.0-no-aec.patch        |  45 +++++
 ...pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch |  25 +++
 media-libs/libpulse/libpulse-15.0.ebuild           | 189 +++++++++++++++++++++
 media-libs/libpulse/metadata.xml                   |  17 ++
 profiles/package.mask                              |   6 +
 6 files changed, 283 insertions(+)
Comment 8 Igor V. Kovalenko 2022-03-20 04:57:16 UTC
Now we have proper libpulse/pulseaudio-daemon split with 15.99.1 version.

Once that is unmasked, what's left to do here?
Comment 9 Niklāvs Koļesņikovs 2022-04-20 14:35:57 UTC
Now that we have a modern PipeWire version available, I think, there's only one thing that remains after media-libs/libpulse, media-sound/pulseaudio-daemon and the now meta package media-sound/pulseaudio is unmasked.

That is, preferably but not necessarily ensure that either media-video/pipewire or media-sound/pulseaudio-daemon is actually installed along with media-libs/libpulse, so that it's actually working out of the box. And for PipeWire by default media-video/pipewire would of course be the first choice of the two.

This could most obviously and least intrusively be done via >=media-sound/pulseaudio-15.99.1 by adding

|| ( media-video/pipewire[bluetooth?] >=media-sound/pulseaudio-daemon-${PV}[bluetooth?,glib?,jack?,native-headset?,ofono-headset?] )

and removing the daemon IUSE entirely or by making PipeWire required when when daemon IUSE is disabled. Or it could be turned into

daemon? ( || ( media-video/pipewire[bluetooth?] >=media-sound/pulseaudio-daemon-${PV}[bluetooth?,glib?,jack?,native-headset?,ofono-headset?] ) )

Personally I think it would be acceptable to just remove the daemon IUSE and if someone really does not want either daemon, they can use package.provided but perhaps that's too drastic, since packgae.provided is assumed to mean that it's not Gentoo supported configuration.

Finally, if someone wanted to be fancy, ofono-headset IUSE could be mapped to pulling net-misc/ofono as a dependency along media-video/pipewire but I'm not sure if a correct assumption that just because someone used oFono with PulseAudio, they still need it with PipeWire as well. And jack IUSE could be mapped to media-video/pipewire[jack-client] but it should be noted that upstream has recently declared that backend as at least feature frozen if not essentially unmaintained, so it's not currently certain if we will not end up masking that flag.
Comment 10 Igor V. Kovalenko 2022-04-20 14:53:16 UTC
(In reply to Niklāvs Koļesņikovs from comment #9)
> That is, preferably but not necessarily ensure that either
> media-video/pipewire or media-sound/pulseaudio-daemon is actually installed
> along with media-libs/libpulse, so that it's actually working out of the
> box. And for PipeWire by default media-video/pipewire would of course be the
> first choice of the two.
This is still a problem if you want audio with pulseaudio-daemon and screen capture with pipewire. Is there any way around that?
Comment 11 Andreas Sturmlechner gentoo-dev 2022-04-20 14:57:28 UTC
I don't think it is worth pursuing that option for the effort required.
Comment 12 Igor V. Kovalenko 2022-04-20 14:59:21 UTC
OK another use case I can think of is alsa-only audio with pipewire for screen capture only, can this be done?
Comment 13 Niklāvs Koļesņikovs 2022-04-20 15:13:02 UTC
pipewire-pulse supports pasuspender for situations when one really wants to run on bare ALSA but, in stark contrast to PulseAudio, PipeWire already releases devices it's not using at that moment, so just not using audio via PipeWire will allow ALSA to directly open the /dev/snd/* nodes.

On top of that one could INSTALL_MASK=/etc/alsa/conf.d/99-pipewire-default.conf and then even ALSA default will not be the PipeWire plugin (or, if pipewire-alsa IUSE is not set, then one would need to mask the PulseAudio's plugin with it's very similarly named plugin).
Comment 14 Igor V. Kovalenko 2022-04-20 16:05:33 UTC
Well no, I mean a user with strong preference for pure alsa, but with a desire to have screen capture working. This probably has nothing to do with pasuspender workflow, since the tool will not be available as well.

IIRC pipewire will still somehow interact with mixer devices even if it will not use PCMs for playback, so guess an option to disable this completely will be useful?
Comment 15 Igor V. Kovalenko 2022-04-20 16:09:02 UTC
Sorry just noticed this is wrong place to discuss audio use cases, probably this one fits
Comment 16 Niklāvs Koļesņikovs 2022-04-20 16:26:03 UTC
It might be enough to use pavucontrol or another similar tool once to put the device(s) into the Pro Audio profile which will among other things stop PipeWire from changing ALSA mixer controls. It can even be done from CLI (which I expect you'd have ask about next) though the operation is probably a bit of a ritual without the nice GUI tools.

Also I was under the impression that the particular issue was pretty much limited to /usr/bin/pipewire and /usr/bin/pulseaudio clashing with one another (which itself is not a smart or probably even supported configuration). The only type of application that I would expect to clash in a similar fashion would be a DAW and those are predominantly either JACK (pw-jack) or PulseAudio (pipewire-pulse) based. And, again, I believe using the Pro Audio profile would be sufficient to stop it from happening.
Comment 17 Larry the Git Cow gentoo-dev 2022-04-29 01:00:22 UTC
The bug has been referenced in the following commit(s):

commit d4c081daccde5db94acf5894ba2653188ad6cea0
Author:     Sam James <>
AuthorDate: 2022-04-29 00:57:06 +0000
Commit:     Sam James <>
CommitDate: 2022-04-29 00:57:06 +0000

    profiles: unmask split pulseaudio packages
    This is a move towards making it easier for users to choose
    between pulseaudio and pipewire for their audio needs.
    We now have:
    - media-sound/pulseaudio (a transitory metapackage, installs no files, just
    enforces deps with USE flags);
    - media-libs/libpulse (the pulseaudio libraries, needed by clients using
    pulseaudio's protocol to speak to pipewire, but is not the pulseaudio daemon)
    - media-sound/pulseaudio-daemon (the pulseaudio daemon, to be used instead
    of pipewire if desired)
    While these are technically RC/pre-releases (and I have a strong reluctance
    against keywording those usually), we have a good relationship
    with upstream who report they've been quiet developmentwise since these tags,
    these versions have been tested & work well, and this will help to improve
    the experience for Gentoo users in choosing which audio server they want. So,
    all in all, a win.
    Signed-off-by: Sam James <>

 profiles/package.mask | 6 ------
 1 file changed, 6 deletions(-)