Version 11 (modified by 12 months ago) ( diff ) | ,
---|
Pipewire
Handy link (thanks archetech on #lfs-support): https://wiki.gentoo.org/wiki/PipeWire
It has some indications for SysV (OpenRC startup).
Wireplumber
Currently Pipewire is only used as a build dependency in the book. To make it really useful, we need to install a session manager. Wireplumber is the recommended session manager.
Wireplumber can be downloaded at https://gitlab.freedesktop.org/pipewire/wireplumber/-/releases.
Required: Glib and Pipewire
Recommended: Lua
Optional dependencies: doxygen, lxml, and gobject-introspection (needed for g-i data), sphinx, and breathe (external, docs)
meson setup --prefix=/usr --buildtype=release -Dsystem-lua=true ninja ninja test sudo ninja install
With Wireplumber we can run Pipewire daemon with:
- On systemd:
sudo systemctl --global enable pipewire sudo systemctl --global enable wireplumber systemctl --user start pipewire systemctl --user start wireplumber
- On SysV (solution by Douglas Reno, adapted from Alpine linux):
As root:cat >/usr/bin/pipewire-launcher.sh <<EOF #!/bin/sh exec /usr/bin/pipewire & sleep 1 exec /usr/bin/wireplumber & EOF chmod +x /usr/bin/pipewire-launcher.sh cat >/etc/xdg/autostart/pipewire.desktop <<EOF [Desktop Entry] Version=1.0 Name=Pipewire Comment=Starts the Pipewire daemons Exec=/usr/bin/pipewire-launcher.sh Terminal=false Type=Application EOF
then restart the graphical session.
The screen recorder built in GNOME shell should work now.
Replace Pulseaudio
With Wireplumber, Pipewire can function as a drop-in replacement of Pulseaudio:
- On systemd:
sudo systemctl --global enable pipewire-pulse.socket sudo systemctl --global disable pulseaudio
- On Sysv: add to
/usr/bin/pipewire-launcher.sh
(after pipewire and before wireplumber):exec /usr/bin/pipewire -c pipewire-pulse.conf & sleep 1
then move away the file /etc/xdg/autostart/puleaudio.desktop, and change autospawn to "no" in /etc/pulse/client.conf (uncomment it, of course).
Then logout and login again.
Use Pipewire for ALSA-based applications
If Pipewire is running, it will occupy the sound card device and an ALSA-based application cannot use the card at the same time. To work around the issue, tell alsa-lib to use a virtual device provided by Pipewire:
sudo install -vdm755 /etc/alsa/conf.d sudo ln -sfvr /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d
Bluetooth LDAC support
Install ldacBT before building Pipewire. The link to ldacBT is available on the book page. Installation process of ldacBT:
mkdir build; cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr make # no test suite available sudo make install
Libcamera support
GNOME Snapshot (a replacement for Cheese) needs a functional pipewire daemon (i. e. requiring wireplumber) built with libcamera.
libcamera dependencies are listed at https://libcamera.org/getting-started.html. Everything required or recommended is in BLFS, except a Python module named ply.
Install ply (https://files.pythonhosted.org/packages/source/p/ply/ply-3.11.tar.gz):
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD sudo pip3 install --no-index --find-links=dist --no-cache-dir --no-user ply
There is no website for libcamera release tarballs. Clone the git repository and checkout the latest release tag:
git clone https://git.libcamera.org/libcamera/libcamera.git git checkout v0.1.0
Now install it:
mkdir build cd build meson setup --prefix=/usr --buildtype=release --wrap-mode=nodownload -Dwerror=false ninja sudo ninja install
Then (re)build pipewire and libcamera should be automatically detected and enabled.