202.1. pipewire-1.6.9
Audio and video stream router (replaces PulseAudio; carries Wayland screencast)
| Version | 1.6.9, release 3 |
| Shelf | audio-io — The sound stack: ALSA, PipeWire and WirePlumber, PulseAudio client, and portable audio I/O APIs |
| Phase | 42_graphics (Graphics Stack), 41 of 189 in build order |
| Licence | MIT AND LGPL-2.1-or-later |
| Homepage | https://pipewire.org/ |
| Build time | 5.5 SBU |
| Installed size | 15.3 MiB in 601 files |
| Recipe | ports/core/audio-io/pipewire/kpkgbuild |
About
PipeWire is the media graph every sound and every captured screen on KDOS goes through. It is the sound server, with pipewire-pulse standing in for PulseAudio and its own libjack.so.0 standing in for JACK, so PulseAudio, JACK and plain ALSA programs all land in the same graph; and it carries video, which is how a screencast reaches a recorder: KWin publishes the screen as a node, and Spectacle, OBS or a browser asks the ScreenCast portal for it. The session starts pipewire, then wireplumber, then pipewire-pulse, once per user; see Audio. Many ports depend on it, from kpipewire, plasma-pa and the portals to the browsers and the music software.
The KDOS build differs from a distribution’s in three ways. It builds no session manager of its own (WirePlumber is a separate port), it carries no systemd or X11 code and takes logind from elogind, and it names every optional feature on or off instead of leaving it to auto, because a meson feature left on auto turns itself off without a word when its library is missing, and the resulting PipeWire then lacks a codec or a module with nothing to say why. The depends line is the list of those libraries.
Sources
pipewire-1.6.9.tar.bz2(2.0 MiB)
sha2560cde58c124825bad462b32ab79f9aa286ee7b113cc73a5cda923a4365e752657
upstream: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/1.6.9/pipewire-1.6.9.tar.bz2
archive copy: sources-1/audio-io--pipewire-1.6.9.tar.bz2
Dependencies
Depends on: meson, ninja, doxygen, python3, eudev, alsa-lib, dbus, glib, libusb, readline, ffmpeg, bluez, sbc, libsndfile, fftw, libpulse, libfreeaptx, ldacbt, fdk-aac, liblc3, gstreamer, gst-plugins-base, ncurses, openssl, avahi, opus, libcamera, abseil-cpp, webrtc-audio-processing, libmysofa, libebur128, lilv, elogind.
Required by (34): ardour, audacious-plugins, baresip, blender, chromium, firefox-esr, fluidsynth, hydrogen, kamoso, kodi, kpipewire, krfb, kwin, librewolf, lmms, mpd, mpv, mumble, musescore, obs-studio, openal-soft, piper, plasma-pa, portaudio, qemu, qt6-qtmultimedia, qt6-qtwebengine, retroarch, sdl3, thunderbird, wiremix, wireplumber, xdg-desktop-portal, xdg-desktop-portal-kde.
Optional, off in KDOS
These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.
-Dvulkan=disabled, line 52: vulkan-loader (explained with the switches below)-Donnxruntime=disabled, line 63: onnxruntime (explained with the switches below)-Dx11=disabled, line 71: libX11 (explained with the switches below)-Dlibcanberra=disabled, line 73: libcanberra
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install pipewire'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/audio-io/pipewire.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/audio-io/pipewire
echo '0cde58c124825bad462b32ab79f9aa286ee7b113cc73a5cda923a4365e752657 pipewire-1.6.9.tar.bz2' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/pipewire
SRC=$SRC_ROOT/pipewire-1.6.9
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pipewire-1.6.9.tar.bz2 -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
export CFLAGS="$CFLAGS -frandom-seed=pipewire" CXXFLAGS="$CXXFLAGS -frandom-seed=pipewire"
meson setup build \
--prefix=/usr --sysconfdir=/etc --libdir=lib --libexecdir=/usr/lib \
-Dbuildtype=release \
-Db_lto=true \
-Ddocs=disabled \
-Dman=enabled \
-Dtests=disabled \
-Dexamples=disabled \
-Dffmpeg=enabled \
-Dpw-cat-ffmpeg=enabled \
-Dalsa=enabled \
-Dpipewire-alsa=enabled \
-Dcompress-offload=enabled \
-Dudev=enabled \
-Ddbus=enabled \
-Dlibusb=enabled \
-Dselinux=disabled \
-Dbluez5=enabled \
-Dbluez5-codec-aptx=enabled \
-Dbluez5-codec-ldac=enabled \
-Dbluez5-codec-aac=enabled \
-Dbluez5-codec-lc3=enabled \
-Dbluez5-codec-opus=enabled \
-Dbluez5-codec-g722=enabled \
-Dbluez5-codec-lc3plus=disabled \
-Dbluez5-codec-ldac-dec=disabled \
-Dbluez5-plc-spandsp=disabled \
-Dreadline=enabled \
-Dlibpulse=enabled \
-Dfftw=enabled \
-Dopus=enabled \
-Dgstreamer=enabled \
-Dgstreamer-device-provider=enabled \
-Djack=disabled \
-Dpipewire-jack=enabled \
-Djack-devel=true \
-Dlibjack-path=/usr/lib \
-Dpipewire-v4l2=disabled \
-Dv4l2=enabled \
-Dvulkan=disabled \
-Droc=disabled \
-Dlibcamera=enabled \
-Dlv2=enabled \
-Dsndfile=enabled \
-Dpw-cat=enabled \
-Davahi=enabled \
-Draop=enabled \
-Decho-cancel-webrtc=enabled \
-Dlibmysofa=enabled \
-Debur128=enabled \
-Donnxruntime=disabled \
-Dlibffado=disabled \
-Dlibsystemd=disabled \
-Dlogind=enabled \
-Dlogind-provider=libelogind \
-Dsystemd-system-service=disabled \
-Dsystemd-user-service=disabled \
-Dsdl2=disabled \
-Dx11=disabled \
-Dx11-xfixes=disabled \
-Dlibcanberra=disabled \
-Dflatpak=disabled \
-Dgsettings=disabled \
-Dgsettings-pulse-schema=disabled \
-Davb=enabled \
-Dsnap=disabled \
-Drlimits-install=true \
-Drlimits-match=@audio \
-Drlimits-memlock=4096 \
"-Dsession-managers=[]"
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
The switches, and why each is set:
-frandom-seed=pipewire— Fix the number GCC names each object’s link-time optimisation sections with, which is otherwise random, so an object built twice comes out the same. Each of the media and drawing libraries built with LTO adds it; see the LTO rule in Every port.-Db_lto=true— Build with link-time optimisation. PipeWire is one of the few hot libraries the tree gives LTO to, because the desktop spends much of its time in it.-Ddocs=disabled,-Dman=enabled— Build the manual pages and not the HTML API reference. The manual pages are generated with doxygen and python3, which is why those two are independs; with either missing,-Dman=enabledstops the configure step.-Dtests=disabled,-Dexamples=disabled— Build neither upstream’s tests nor its example programs.-Dffmpeg=enabled— Build the SPA plugin that decodes and encodes compressed audio with ffmpeg’s libraries.-Dpw-cat-ffmpeg=enabled— Letpw-cat,pw-playandpw-recordread and write any format ffmpeg knows, not only those libsndfile does.-Dalsa=enabled— The SPA plugin that drives sound cards through alsa-lib.-Dpipewire-alsa=enabled— The ALSA plugin that lets a plain ALSA program play into PipeWire. PipeWire installs its configuration drop-ins where alsa-lib does not look, so KDOS reaches it through/etc/alsa/conf.d/99-kdos-pipewire.conf; see Reaching the graph from a plain ALSA program on the host.-Dcompress-offload=enabled— The ALSA compress-offload sink, which hands compressed audio to a sound card’s own decoder where the hardware has one.-Dudev=enabled— Find sound cards and cameras through eudev.-Ddbus=enabled— Build the parts that talk over D-Bus: the Bluetooth plugin’s link to BlueZ, real-time scheduling through RealtimeKit, the portal module andpw-reserve’s device reservation.-Dlibusb=enabled— Link libusb into the Bluetooth plugin, which uses it for adapter quirks.-Dselinux=disabled— No SELinux integration; KDOS runs no SELinux.-Dbluez5=enabled— The Bluetooth audio plugin, over bluez, with SBC from sbc always present.-Dbluez5-codec-aptx=enabled,-Dbluez5-codec-ldac=enabled,-Dbluez5-codec-aac=enabled,-Dbluez5-codec-lc3=enabled,-Dbluez5-codec-opus=enabled,-Dbluez5-codec-g722=enabled— aptX from libfreeaptx, LDAC from ldacbt, AAC from fdk-aac, LC3 for LE Audio from liblc3, Opus from opus, and G.722. Named one by one because each isautoupstream, and a headset whose codec was quietly left out falls back to SBC.-Dbluez5-codec-lc3plus=disabled,-Dbluez5-codec-ldac-dec=disabled,-Dbluez5-plc-spandsp=disabled— The LC3plus codec, LDAC decoding and SpanDSP’s packet loss concealment. Their libraries are not in the tree.-Dreadline=enabled— Line editing inpw-cli’s interactive mode, with readline.-Dlibpulse=enabled— Buildmodule-pulse-tunnel, which sends a stream to a PulseAudio server on another machine. libpulse is the client library only; the server on this machine stayspipewire-pulse.-Dfftw=enabled— Give the filter-chain convolver fftw’s single-precision transforms, for room correction and headphone impulse responses; without it the convolver uses its bundled pffft.-Dopus=enabled— opus for the Bluetooth codec above and, through Opus’s custom modes, for the NetJack2 streaming modules.-Dgstreamer=enabled— Build the GStreamer elements,pipewiresrcandpipewiresink. The first is how anything reads a PipeWire node from a GStreamer pipeline, a screencast included. The cost is that every image with sound also carries gstreamer and gst-plugins-base, because a port is one package.-Dgstreamer-device-provider=enabled— The GStreamer device provider, which lists PipeWire’s nodes to a GStreamer application as devices.-Djack=disabled— No SPA plugin that makes PipeWire a client of a separate JACK server; there is no JACK server.-Dpipewire-jack=enabled,-Djack-devel=true,-Dlibjack-path=/usr/lib— Build PipeWire’s ownlibjack.so.0and install it, with JACK’s headers andjack.pc, in/usr/lib, so a JACK program loads it from the default search path and needs nopw-jack; see JACK programs on the host.-Dpipewire-v4l2=disabled— Nopw-v4l2shim. It is anLD_PRELOADlibrary that looks upopenat64andmmap64withdlsym; musl exports no such large-file aliases, so both lookups return NULL, the shim calls them anyway, and every process started under it crashes on its firstopen.-Dv4l2=enabled— The SPA plugin that puts a V4L2 camera on the graph, which WirePlumber’sapi.v4l2.*rules manage.-Dlibcamera=enabled— The SPA plugin for cameras driven through libcamera.-Dvulkan=disabled— No Vulkan compute source or blit filter. No graph or session configuration on KDOS loads them.-Droc=disabled— No ROC network streaming modules. roc-toolkit is not in the tree.-Dlv2=enabled— Let a filter chain host LV2 plugins through lilv.-Dsndfile=enabled,-Dpw-cat=enabled— Buildpw-cat,pw-playandpw-record, which need libsndfile, andspa-resample, which resamples a sound file with PipeWire’s own resampler. The filter chain also reads its convolver’s impulse-response files through libsndfile.-Davahi=enabled— Local-network announcement and discovery through avahi:pipewire-pulsepublishes its sinks and sources as a PulseAudio server does, the RTP session module announces its own sessions and finds its peers, and further modules find PulseAudio servers, AirPlay receivers and Snapcast servers to play to.-Draop=enabled— The RAOP sink, which plays to an AirPlay receiver; its encryption comes from openssl.-Decho-cancel-webrtc=enabled— The echo canceller for calls, built on webrtc-audio-processing.-Dlibmysofa=enabled— The filter chain’ssofaspatializer, which places a sound around a listener on headphones from a SOFA head-related transfer function file, read with libmysofa.-Debur128=enabled— The EBU R128 loudness meter and normaliser, from libebur128.-Donnxruntime=disabled— No neural-model filter node. No graph on KDOS loads one.-Dlibffado=disabled— No FireWire audio driver module. libffado is not in the tree.-Dlibsystemd=disabled,-Dsystemd-system-service=disabled,-Dsystemd-user-service=disabled— No systemd code and no unit files. KDOS has no systemd, and the user’s services start PipeWire.-Dlogind=enabled— With-Dlogind-provider=libelogind: link elogind’slibelogindinto the V4L2 plugin, which then rechecks whether it may open each camera whenever a session starts, ends or changes, instead of watching each device node with inotify. Access to a camera follows the seat’s active session, so after a user switch the camera appears in the session that now holds the seat. The provider defaults tolibsystemd, so without it the enabled feature looks for a library KDOS does not have and stops the configure.-Dsdl2=disabled— SDL 2 is used only by example video players.-Dexamples=disabledleaves out all of them butpipewire-jack’svideo-dsp-play, which is built whenever SDL 2 is found, so this switch is what keeps SDL 2 out of the build.-Dx11=disabled,-Dx11-xfixes=disabled,-Dlibcanberra=disabled— No X11 bell module and nothing else that serves an X session. The desktop is Wayland, and libcanberra feeds only that X11 bell.-Dflatpak=disabled,-Dsnap=disabled— No sandbox detection for Flatpak or Snap, neither of which KDOS uses; boxed applications reach PipeWire through the shared runtime directory.-Dgsettings=disabled,-Dgsettings-pulse-schema=disabled— No GSettings module and no GNOME schema for it.-Davb=enabled— The AVB module, which streams audio over Ethernet with IEEE 1722.-Drlimits-install=true— Install/etc/security/limits.d/25-pw-rlimits.conf, whichpam_limitsapplies to every PAM session: SDDM’s, a console login’s and the oneturnstiledopens for the user’s services, which is where PipeWire runs. It grants real-time priority 95, above PipeWire’s server and client threads at 88 and 83, and nice -19 (upstream’s defaults). Without itmodule-rtcannot promote a thread, the graph runs at nice 0, and a cycle missed under load is heard as a gap; KWin’s own real-time request reads the same limit.-Drlimits-match=@audio— Give those limits to theaudiogroup, which every KDOS user account is in. Upstream’s@pipewirenames a group that does not exist here, which would make the file match no one.-Drlimits-memlock=4096— Let a process of the group lock 4 MiB, which covers PipeWire’s locked buffer pool. The option is in kilobytes, and upstream’s default of 4194304 would let an unprivileged session pin 4 GiB."-Dsession-managers=[]"— Build no session manager as a meson subproject. Upstream’s default,['wireplumber'], builds WirePlumber from a git checkout inside this build, which an offline build cannot fetch; KDOS builds it as its own port, wireplumber.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/pipewire, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf pipewire-1.6.9-3.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/pipewire, and runs the triggers its paths call for.
Contents
Installed programs: pipewire, pipewire-aes67, pipewire-avb, pipewire-pulse, pw-cat, pw-cli, pw-config, pw-container, pw-dot, pw-dsdplay, pw-dump, pw-encplay, pw-jack, pw-link, pw-loopback, pw-metadata, pw-midi2play, pw-midi2record, pw-mididump, pw-midiplay, pw-midirecord, pw-mon, pw-play, pw-profiler, pw-record, pw-reserve, pw-sysex, pw-top, spa-acp-tool, spa-inspect, spa-json-dump, spa-monitor, spa-resample.
Installed libraries: libjack.so, libjacknet.so, libjackserver.so, libpipewire-0.3.so.
Installed directories: /usr/include/jack, /usr/include/pipewire-0.3, /usr/include/spa-0.2, /usr/lib/alsa-lib, /usr/lib/pipewire-0.3, /usr/lib/spa-0.2, /usr/share/alsa-card-profile, /usr/share/alsa/alsa.conf.d, /usr/share/licenses/pipewire, /usr/share/pipewire, /usr/share/spa-0.2.
Short descriptions
pipewire |
The PipeWire media server |
pipewire-pulse |
The PipeWire PulseAudio replacement |
pw-cat |
Play and record media with PipeWire |
pw-cli |
The PipeWire Command Line Interface |
pw-config |
Debug PipeWire Config parsing |
pw-container |
The PipeWire container utility |
pw-dot |
The PipeWire dot graph dump |
pw-dump |
The PipeWire state dumper |
pw-jack |
Use PipeWire instead of JACK |
pw-link |
The PipeWire Link Command |
pw-loopback |
PipeWire loopback client |
pw-metadata |
The PipeWire metadata |
pw-mididump |
The PipeWire MIDI dump |
pw-mon |
The PipeWire monitor |
pw-profiler |
The PipeWire profiler |
pw-reserve |
The PipeWire device reservation utility |
pw-top |
The PipeWire process viewer |
spa-acp-tool |
The PipeWire ALSA profile debugging utility |
spa-inspect |
The PipeWire SPA plugin information utility |
spa-json-dump |
SPA JSON to JSON converter |
spa-monitor |
The PipeWire SPA device debugging utility |
spa-resample |
The PipeWire resampler debugging utility |
jack.pc |
PipeWire JACK API |
jackserver.pc |
PipeWire JACK Control API |
libpipewire-0.3.pc |
PipeWire Interface |
libspa-0.2.pc |
Simple Plugin API |
Notes
Once jack.pc is installed, any port that leaves JACK support on auto-detection gets it or not according to whether it happens to build after this one. Every port that can link JACK therefore names it on or off, and a port this one depends on, such as ffmpeg, cannot have it at all. The list is in JACK programs on the host.
The daemon routes nothing by itself. Without WirePlumber running, devices are not discovered and no stream reaches a sink.