<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Leg</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Leg"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Leg"/>
	<updated>2026-05-06T17:02:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=26605</id>
		<title>PipeWire</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=26605"/>
		<updated>2024-03-14T22:30:26Z</updated>

		<summary type="html">&lt;p&gt;Leg: /* XFCE Audio Mixer Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
{{Draft|The instructions below have not been thoroughly tested and may break things.}}&lt;br /&gt;
&lt;br /&gt;
[https://pipewire.org/ PipeWire] is a multimedia processing engine that aims to improve audio and video handling on Linux.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
=== Device access ===&lt;br /&gt;
&lt;br /&gt;
PipeWire needs proper permissions to access devices. If you do not use [[Elogind|elogind]], your user should be in &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; (to access audio devices) and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; (to access webcam devices) groups:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# addgroup &amp;lt;user&amp;gt; audio&lt;br /&gt;
# addgroup &amp;lt;user&amp;gt; video&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Warning|Membership of the &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; group will also grant unrestricted access to video devices, which is often a security issue. See issue {{issue|15409}} for further details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See [https://wiki.archlinux.org/title/Users_and_groups#Pre-systemd_groups pre-systemd groups] for more info.&lt;br /&gt;
Make sure to re-login for these changes to take effect.&lt;br /&gt;
&lt;br /&gt;
=== D-Bus ===&lt;br /&gt;
&lt;br /&gt;
PipeWire optionally requires a running [[D-Bus]] system and/or session bus for some of its functionality.&lt;br /&gt;
&lt;br /&gt;
For certain configurations (e.g. only audio playback and recording) D-Bus setup is not necessary. Edit [[#Disable_D-Bus_support|configuration files]] to disable D-Bus support.&lt;br /&gt;
&lt;br /&gt;
If you start session-wide dbus instance, make sure to start PipeWire in that same session.&lt;br /&gt;
&lt;br /&gt;
=== Environment ===&lt;br /&gt;
&lt;br /&gt;
Ensure that [[XDG_RUNTIME_DIR]] is configured correctly. If this is not set, pipewire will create a directory in your home folder instead, called {{Path|~/pulse}}, and on attempting to run Pavucontrol or pactl, you will get the following error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ pactl list&lt;br /&gt;
Connection failure: Connection refused&lt;br /&gt;
pa_context_connect() failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Under [[Sway]], in order for &amp;lt;code&amp;gt;xdg-desktop-portal-wlr&amp;lt;/code&amp;gt; to work it may also be necessary to set &amp;lt;code&amp;gt;XDG_CURRENT_DESKTOP&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XDG_SESSION_DESKTOP&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;sway&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the {{Pkg|pipewire}} package.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add pipewire}}&lt;br /&gt;
&lt;br /&gt;
=== Session Manager ===&lt;br /&gt;
&lt;br /&gt;
PipeWire delegates plumbing work to session manager. There is only one option: &#039;&#039;&#039;[https://gitlab.freedesktop.org/pipewire/wireplumber WirePlumber]&#039;&#039;&#039;. It has modular design and supports Lua plugins. &#039;&#039;&#039;This is the default pipewire session manager.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add wireplumber}}&lt;br /&gt;
&lt;br /&gt;
=== PulseAudio compatibility ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-pulse}} package, which provides a daemon so PulseAudio applications could use PipeWire as backend.&lt;br /&gt;
&lt;br /&gt;
=== JACK compatibility ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-jack}} package, which provides ABI-compatible libraries for JACK applications.&lt;br /&gt;
&lt;br /&gt;
=== ALSA support ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-alsa}} package.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
PipeWire and WirePlumber store their default configuration in {{Path|/usr/share/pipewire}} and {{Path|/usr/share/wireplumber}} respectively. If you want to edit the configuration, you need to move it to {{Path|/etc}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# cp -a /usr/share/pipewire /etc&lt;br /&gt;
# cp -a /usr/share/wireplumber /etc&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Disable D-Bus support ===&lt;br /&gt;
&lt;br /&gt;
Edit the following configuration parameters:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/pipewire/pipewire.conf|&amp;lt;nowiki&amp;gt;context.properties = {&lt;br /&gt;
    ... &lt;br /&gt;
    support.dbus = false&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/wireplumber.conf|&amp;lt;nowiki&amp;gt;context.properties = {&lt;br /&gt;
    ... &lt;br /&gt;
    support.dbus = false&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua|&amp;lt;nowiki&amp;gt;bluez_monitor.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;with-logind&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/main.lua.d/50-alsa-config.lua|&amp;lt;nowiki&amp;gt;alsa_monitor.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;alsa.reserve&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/main.lua.d/50-default-access-config.lua|&amp;lt;nowiki&amp;gt;default_access.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;enable-flatpak-portal&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Realtime scheduling ===&lt;br /&gt;
&lt;br /&gt;
For realtime scheduling, it is recommended to use {{Pkg|rtkit}}. Add your user to the &amp;lt;code&amp;gt;rtkit&amp;lt;/code&amp;gt; group.&lt;br /&gt;
&lt;br /&gt;
Alternatively, ensure your user has the right ulimit permissions. Since pipewire 0.3.66, you can add yourself to the &amp;lt;code&amp;gt;pipewire&amp;lt;/code&amp;gt; group. You generally need (e.g. in {{Path|/etc/security/limits.conf}}):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@pipewire - memlock 4194304&lt;br /&gt;
@pipewire - nice -19&lt;br /&gt;
@pipewire - rtprio 95&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows a member of the pipewire group to have the right permissions for PipeWire to use realtime scheduling without rtkit. This same snippet comes with pipewire since 0.3.66, so if you have a [[PAM]] login session and add yourself to the pipewire group, you don&#039;t have to do anything else.&lt;br /&gt;
&lt;br /&gt;
Note that the above limits.conf will only work if your session is using [[PAM]].&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
Video should work out-of-the-box with v4l2 devices (e.g. a lot of webcams) and [https://gstreamer.freedesktop.org/ GStreamer] applications.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth audio ===&lt;br /&gt;
&lt;br /&gt;
* Enable PulseAudio support as described above&lt;br /&gt;
* Install bluetooth service packages: &amp;lt;code&amp;gt;bluez bluez-openrc pipewire-spa-bluez&amp;lt;/code&amp;gt;&lt;br /&gt;
* Optional: install GUI manager for bluetooth &amp;lt;code&amp;gt;blueman&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable and start bluetooth service: &amp;lt;code&amp;gt;rc-update add bluetooth; rc-service bluetooth start&amp;lt;/code&amp;gt;&lt;br /&gt;
* Restart PipeWire&lt;br /&gt;
* Use commandline program  &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; or GUI program &amp;lt;code&amp;gt;blueman-manager&amp;lt;/code&amp;gt; to scan and pair bluetooth audio devices.&lt;br /&gt;
* Use pavucontrol to adjust volume and manually select high definition bluetooth codecs.&lt;br /&gt;
&lt;br /&gt;
=== Screen sharing on Wayland ===&lt;br /&gt;
&lt;br /&gt;
You will need the right [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] backend for your desktop environment. Screen sharing is known to work on:&lt;br /&gt;
* GNOME with &amp;lt;code&amp;gt;xdg-desktop-portal-gtk&amp;lt;/code&amp;gt;&lt;br /&gt;
* KDE Plasma with &amp;lt;code&amp;gt;xdg-desktop-portal-kde&amp;lt;/code&amp;gt; and Firefox&lt;br /&gt;
* Sway with &amp;lt;code&amp;gt;xdg-desktop-portal-wlr&amp;lt;/code&amp;gt; and Firefox, see [[Sway]] for details&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
&lt;br /&gt;
{{Tip|You can also use &amp;lt;code&amp;gt;superd&amp;lt;/code&amp;gt; to manage &amp;lt;code&amp;gt;pipewire&amp;lt;/code&amp;gt; and its related services.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;pipewire-launcher&amp;lt;/code&amp;gt; script is provided by Alpine Linux, not by upstream. Please report issues to Alpine Linux maintainers first.}}&lt;br /&gt;
&lt;br /&gt;
Start the PipeWire media server. You&#039;ll probably get quite a few errors but just ignore them for now.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ /usr/libexec/pipewire-launcher}}&lt;br /&gt;
&lt;br /&gt;
A D-Bus session service must be running unless dbus support is disabled.&lt;br /&gt;
&lt;br /&gt;
=== Auto launching ===&lt;br /&gt;
You can add {{Path|/usr/libexec/pipewire-launcher}} to your {{Path|~/.xinitrc}}.&lt;br /&gt;
&lt;br /&gt;
If you do not use GUI by default and have D-Bus enabled in configuration, add the following stanza to your shell configuration file:&lt;br /&gt;
{{Cmd|export $(dbus-launch)&lt;br /&gt;
/usr/libexec/pipewire-launcher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
In a different terminal window check the default output device. I don&#039;t yet know how this default can be changed for all applications, so you&#039;d better hope it&#039;s right!&lt;br /&gt;
&lt;br /&gt;
=== WirePlumber ===&lt;br /&gt;
{{Cmd|$ wpctl status}}&lt;br /&gt;
&lt;br /&gt;
=== pw-cat playback ===&lt;br /&gt;
&lt;br /&gt;
Test sound is working using an audio file in a format supported by [http://www.mega-nerd.com/libsndfile/ libsndfile]{{insecure url|Server refuses HTTPS connections}} (e.g. flac, opus, ogg, wav). Use &amp;lt;code&amp;gt;pw-cat&amp;lt;/code&amp;gt; utility from {{Pkg|pipewire-tools}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ pw-cat -p test.flac&lt;br /&gt;
$ pw-play /usr/share/sounds/alsa/Front_Center.wav&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pw-cat recording ===&lt;br /&gt;
&lt;br /&gt;
If you have a microphone test audio recording is working.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ pw-cat -r --list-targets&lt;br /&gt;
$ pw-cat -r recording.flac&lt;br /&gt;
(Speak for a while then stop it with Ctrl+c)&lt;br /&gt;
$ pw-cat -p recording.flac&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== PulseAudio ===&lt;br /&gt;
&lt;br /&gt;
Test PulseAudio clients using a media player, as most use PulseAudio.&lt;br /&gt;
&lt;br /&gt;
=== JACK ===&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;jack_simple_client&amp;lt;/code&amp;gt; from {{Pkg|jack-simple-clients}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ jack_simple_client}}&lt;br /&gt;
&lt;br /&gt;
You should hear a sustained beep.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== `wpctl status` shows no targets ===&lt;br /&gt;
&lt;br /&gt;
First, check whether ALSA knows about your sound card:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|aplay -l}}&lt;br /&gt;
&lt;br /&gt;
If sound devices are found, the issue is with your pipewire configuration.  Consider double-checking the instructions above.&lt;br /&gt;
&lt;br /&gt;
Otherwise, your sound card may not be supported in the version of the Linux Kernel you&#039;re running.  You should search online for fixes relating to your current kernel version and the codec of your sound card.  You can find each of these with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|uname -r&lt;br /&gt;
cat /proc/asound/card0/codec* | grep Codec}}&lt;br /&gt;
&lt;br /&gt;
=== Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY ===&lt;br /&gt;
This means D-Bus session bus is not started and GUI is not active (i.e. you are in a tty). Use &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt; as outlined [[#Running|above]]. Alternatively, [[#D-Bus|disable D-Bus support]].&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth connect failed: br-connection-profile-unavailable === &lt;br /&gt;
&lt;br /&gt;
Ensure that a [[#Session_Manager|Session Manager]] is running.&lt;br /&gt;
&lt;br /&gt;
=== Play/Pause buttons not working on bluetooth headphones ===&lt;br /&gt;
&lt;br /&gt;
Check {{Path|/var/log/messages}}. If you see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bluetoothd[3463]: profiles/audio/avctp.c:uinput_create() Can&#039;t open input device: No such file or directory (2)&lt;br /&gt;
bluetoothd[3463]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for WH-1000XM5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bluez is trying to register the headphones buttons as an input devices, but &amp;lt;code&amp;gt;uinput&amp;lt;/code&amp;gt; is not loaded. Try &amp;lt;code&amp;gt;modprobe uinput&amp;lt;/code&amp;gt;. If this works, see [[Architecture#Module_Loading]] for instructions on how to make sure this module is loaded automatically on each startup.&lt;br /&gt;
&lt;br /&gt;
== Quick Configuration ==&lt;br /&gt;
&lt;br /&gt;
You might want to use {{Pkg|pavucontrol}} or {{Pkg|pavucontrol-qt}} to have a simple GUI app for controlling sound, outputs, etc.&lt;br /&gt;
&lt;br /&gt;
== PipeWire Graph Qt GUI Interface ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|qpwgraph}}&#039;&#039;&#039; is a graph manager dedicated to PipeWire.&lt;br /&gt;
&lt;br /&gt;
== XFCE Audio Mixer Plugin  ==&lt;br /&gt;
&lt;br /&gt;
to help the XFCE audio mixer plugin find the volume to control:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|doas apk add gst-plugin-pipewire}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.freedesktop.org/pipewire/pipewire PipeWire source repository]&lt;br /&gt;
* [https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/home PipeWire Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/PipeWire PipeWire on the ArchWiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Pipewire PipeWire on the Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Multimedia]]&lt;br /&gt;
[[Category:Sound]]&lt;/div&gt;</summary>
		<author><name>Leg</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=26604</id>
		<title>PipeWire</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=26604"/>
		<updated>2024-03-14T22:29:22Z</updated>

		<summary type="html">&lt;p&gt;Leg: Add instructions for XFCE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
{{Draft|The instructions below have not been thoroughly tested and may break things.}}&lt;br /&gt;
&lt;br /&gt;
[https://pipewire.org/ PipeWire] is a multimedia processing engine that aims to improve audio and video handling on Linux.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
=== Device access ===&lt;br /&gt;
&lt;br /&gt;
PipeWire needs proper permissions to access devices. If you do not use [[Elogind|elogind]], your user should be in &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; (to access audio devices) and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; (to access webcam devices) groups:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# addgroup &amp;lt;user&amp;gt; audio&lt;br /&gt;
# addgroup &amp;lt;user&amp;gt; video&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Warning|Membership of the &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt; group will also grant unrestricted access to video devices, which is often a security issue. See issue {{issue|15409}} for further details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
See [https://wiki.archlinux.org/title/Users_and_groups#Pre-systemd_groups pre-systemd groups] for more info.&lt;br /&gt;
Make sure to re-login for these changes to take effect.&lt;br /&gt;
&lt;br /&gt;
=== D-Bus ===&lt;br /&gt;
&lt;br /&gt;
PipeWire optionally requires a running [[D-Bus]] system and/or session bus for some of its functionality.&lt;br /&gt;
&lt;br /&gt;
For certain configurations (e.g. only audio playback and recording) D-Bus setup is not necessary. Edit [[#Disable_D-Bus_support|configuration files]] to disable D-Bus support.&lt;br /&gt;
&lt;br /&gt;
If you start session-wide dbus instance, make sure to start PipeWire in that same session.&lt;br /&gt;
&lt;br /&gt;
=== Environment ===&lt;br /&gt;
&lt;br /&gt;
Ensure that [[XDG_RUNTIME_DIR]] is configured correctly. If this is not set, pipewire will create a directory in your home folder instead, called {{Path|~/pulse}}, and on attempting to run Pavucontrol or pactl, you will get the following error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ pactl list&lt;br /&gt;
Connection failure: Connection refused&lt;br /&gt;
pa_context_connect() failed: Connection refused&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Under [[Sway]], in order for &amp;lt;code&amp;gt;xdg-desktop-portal-wlr&amp;lt;/code&amp;gt; to work it may also be necessary to set &amp;lt;code&amp;gt;XDG_CURRENT_DESKTOP&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;XDG_SESSION_DESKTOP&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;sway&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install the {{Pkg|pipewire}} package.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add pipewire}}&lt;br /&gt;
&lt;br /&gt;
=== Session Manager ===&lt;br /&gt;
&lt;br /&gt;
PipeWire delegates plumbing work to session manager. There is only one option: &#039;&#039;&#039;[https://gitlab.freedesktop.org/pipewire/wireplumber WirePlumber]&#039;&#039;&#039;. It has modular design and supports Lua plugins. &#039;&#039;&#039;This is the default pipewire session manager.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add wireplumber}}&lt;br /&gt;
&lt;br /&gt;
=== PulseAudio compatibility ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-pulse}} package, which provides a daemon so PulseAudio applications could use PipeWire as backend.&lt;br /&gt;
&lt;br /&gt;
=== JACK compatibility ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-jack}} package, which provides ABI-compatible libraries for JACK applications.&lt;br /&gt;
&lt;br /&gt;
=== ALSA support ===&lt;br /&gt;
&lt;br /&gt;
Install {{Pkg|pipewire-alsa}} package.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
PipeWire and WirePlumber store their default configuration in {{Path|/usr/share/pipewire}} and {{Path|/usr/share/wireplumber}} respectively. If you want to edit the configuration, you need to move it to {{Path|/etc}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# cp -a /usr/share/pipewire /etc&lt;br /&gt;
# cp -a /usr/share/wireplumber /etc&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Disable D-Bus support ===&lt;br /&gt;
&lt;br /&gt;
Edit the following configuration parameters:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/pipewire/pipewire.conf|&amp;lt;nowiki&amp;gt;context.properties = {&lt;br /&gt;
    ... &lt;br /&gt;
    support.dbus = false&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/wireplumber.conf|&amp;lt;nowiki&amp;gt;context.properties = {&lt;br /&gt;
    ... &lt;br /&gt;
    support.dbus = false&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua|&amp;lt;nowiki&amp;gt;bluez_monitor.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;with-logind&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/main.lua.d/50-alsa-config.lua|&amp;lt;nowiki&amp;gt;alsa_monitor.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;alsa.reserve&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/wireplumber/main.lua.d/50-default-access-config.lua|&amp;lt;nowiki&amp;gt;default_access.properties = {&lt;br /&gt;
  ...&lt;br /&gt;
  [&amp;quot;enable-flatpak-portal&amp;quot;] = false,&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Realtime scheduling ===&lt;br /&gt;
&lt;br /&gt;
For realtime scheduling, it is recommended to use {{Pkg|rtkit}}. Add your user to the &amp;lt;code&amp;gt;rtkit&amp;lt;/code&amp;gt; group.&lt;br /&gt;
&lt;br /&gt;
Alternatively, ensure your user has the right ulimit permissions. Since pipewire 0.3.66, you can add yourself to the &amp;lt;code&amp;gt;pipewire&amp;lt;/code&amp;gt; group. You generally need (e.g. in {{Path|/etc/security/limits.conf}}):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@pipewire - memlock 4194304&lt;br /&gt;
@pipewire - nice -19&lt;br /&gt;
@pipewire - rtprio 95&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows a member of the pipewire group to have the right permissions for PipeWire to use realtime scheduling without rtkit. This same snippet comes with pipewire since 0.3.66, so if you have a [[PAM]] login session and add yourself to the pipewire group, you don&#039;t have to do anything else.&lt;br /&gt;
&lt;br /&gt;
Note that the above limits.conf will only work if your session is using [[PAM]].&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
&lt;br /&gt;
Video should work out-of-the-box with v4l2 devices (e.g. a lot of webcams) and [https://gstreamer.freedesktop.org/ GStreamer] applications.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth audio ===&lt;br /&gt;
&lt;br /&gt;
* Enable PulseAudio support as described above&lt;br /&gt;
* Install bluetooth service packages: &amp;lt;code&amp;gt;bluez bluez-openrc pipewire-spa-bluez&amp;lt;/code&amp;gt;&lt;br /&gt;
* Optional: install GUI manager for bluetooth &amp;lt;code&amp;gt;blueman&amp;lt;/code&amp;gt;&lt;br /&gt;
* Enable and start bluetooth service: &amp;lt;code&amp;gt;rc-update add bluetooth; rc-service bluetooth start&amp;lt;/code&amp;gt;&lt;br /&gt;
* Restart PipeWire&lt;br /&gt;
* Use commandline program  &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt; or GUI program &amp;lt;code&amp;gt;blueman-manager&amp;lt;/code&amp;gt; to scan and pair bluetooth audio devices.&lt;br /&gt;
* Use pavucontrol to adjust volume and manually select high definition bluetooth codecs.&lt;br /&gt;
&lt;br /&gt;
=== Screen sharing on Wayland ===&lt;br /&gt;
&lt;br /&gt;
You will need the right [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] backend for your desktop environment. Screen sharing is known to work on:&lt;br /&gt;
* GNOME with &amp;lt;code&amp;gt;xdg-desktop-portal-gtk&amp;lt;/code&amp;gt;&lt;br /&gt;
* KDE Plasma with &amp;lt;code&amp;gt;xdg-desktop-portal-kde&amp;lt;/code&amp;gt; and Firefox&lt;br /&gt;
* Sway with &amp;lt;code&amp;gt;xdg-desktop-portal-wlr&amp;lt;/code&amp;gt; and Firefox, see [[Sway]] for details&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
&lt;br /&gt;
{{Tip|You can also use &amp;lt;code&amp;gt;superd&amp;lt;/code&amp;gt; to manage &amp;lt;code&amp;gt;pipewire&amp;lt;/code&amp;gt; and its related services.}}&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;pipewire-launcher&amp;lt;/code&amp;gt; script is provided by Alpine Linux, not by upstream. Please report issues to Alpine Linux maintainers first.}}&lt;br /&gt;
&lt;br /&gt;
Start the PipeWire media server. You&#039;ll probably get quite a few errors but just ignore them for now.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ /usr/libexec/pipewire-launcher}}&lt;br /&gt;
&lt;br /&gt;
A D-Bus session service must be running unless dbus support is disabled.&lt;br /&gt;
&lt;br /&gt;
=== Auto launching ===&lt;br /&gt;
You can add {{Path|/usr/libexec/pipewire-launcher}} to your {{Path|~/.xinitrc}}.&lt;br /&gt;
&lt;br /&gt;
If you do not use GUI by default and have D-Bus enabled in configuration, add the following stanza to your shell configuration file:&lt;br /&gt;
{{Cmd|export $(dbus-launch)&lt;br /&gt;
/usr/libexec/pipewire-launcher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
In a different terminal window check the default output device. I don&#039;t yet know how this default can be changed for all applications, so you&#039;d better hope it&#039;s right!&lt;br /&gt;
&lt;br /&gt;
=== WirePlumber ===&lt;br /&gt;
{{Cmd|$ wpctl status}}&lt;br /&gt;
&lt;br /&gt;
=== pw-cat playback ===&lt;br /&gt;
&lt;br /&gt;
Test sound is working using an audio file in a format supported by [http://www.mega-nerd.com/libsndfile/ libsndfile]{{insecure url|Server refuses HTTPS connections}} (e.g. flac, opus, ogg, wav). Use &amp;lt;code&amp;gt;pw-cat&amp;lt;/code&amp;gt; utility from {{Pkg|pipewire-tools}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ pw-cat -p test.flac&lt;br /&gt;
$ pw-play /usr/share/sounds/alsa/Front_Center.wav&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pw-cat recording ===&lt;br /&gt;
&lt;br /&gt;
If you have a microphone test audio recording is working.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ pw-cat -r --list-targets&lt;br /&gt;
$ pw-cat -r recording.flac&lt;br /&gt;
(Speak for a while then stop it with Ctrl+c)&lt;br /&gt;
$ pw-cat -p recording.flac&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== PulseAudio ===&lt;br /&gt;
&lt;br /&gt;
Test PulseAudio clients using a media player, as most use PulseAudio.&lt;br /&gt;
&lt;br /&gt;
=== JACK ===&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;jack_simple_client&amp;lt;/code&amp;gt; from {{Pkg|jack-simple-clients}}:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|$ jack_simple_client}}&lt;br /&gt;
&lt;br /&gt;
You should hear a sustained beep.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== `wpctl status` shows no targets ===&lt;br /&gt;
&lt;br /&gt;
First, check whether ALSA knows about your sound card:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|aplay -l}}&lt;br /&gt;
&lt;br /&gt;
If sound devices are found, the issue is with your pipewire configuration.  Consider double-checking the instructions above.&lt;br /&gt;
&lt;br /&gt;
Otherwise, your sound card may not be supported in the version of the Linux Kernel you&#039;re running.  You should search online for fixes relating to your current kernel version and the codec of your sound card.  You can find each of these with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|uname -r&lt;br /&gt;
cat /proc/asound/card0/codec* | grep Codec}}&lt;br /&gt;
&lt;br /&gt;
=== Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY ===&lt;br /&gt;
This means D-Bus session bus is not started and GUI is not active (i.e. you are in a tty). Use &amp;lt;code&amp;gt;dbus-run-session&amp;lt;/code&amp;gt; as outlined [[#Running|above]]. Alternatively, [[#D-Bus|disable D-Bus support]].&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth connect failed: br-connection-profile-unavailable === &lt;br /&gt;
&lt;br /&gt;
Ensure that a [[#Session_Manager|Session Manager]] is running.&lt;br /&gt;
&lt;br /&gt;
=== Play/Pause buttons not working on bluetooth headphones ===&lt;br /&gt;
&lt;br /&gt;
Check {{Path|/var/log/messages}}. If you see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bluetoothd[3463]: profiles/audio/avctp.c:uinput_create() Can&#039;t open input device: No such file or directory (2)&lt;br /&gt;
bluetoothd[3463]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for WH-1000XM5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bluez is trying to register the headphones buttons as an input devices, but &amp;lt;code&amp;gt;uinput&amp;lt;/code&amp;gt; is not loaded. Try &amp;lt;code&amp;gt;modprobe uinput&amp;lt;/code&amp;gt;. If this works, see [[Architecture#Module_Loading]] for instructions on how to make sure this module is loaded automatically on each startup.&lt;br /&gt;
&lt;br /&gt;
== Quick Configuration ==&lt;br /&gt;
&lt;br /&gt;
You might want to use {{Pkg|pavucontrol}} or {{Pkg|pavucontrol-qt}} to have a simple GUI app for controlling sound, outputs, etc.&lt;br /&gt;
&lt;br /&gt;
== PipeWire Graph Qt GUI Interface ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{{Pkg|qpwgraph}}&#039;&#039;&#039; is a graph manager dedicated to PipeWire.&lt;br /&gt;
&lt;br /&gt;
== XFCE Audio Mixer Plugin  ==&lt;br /&gt;
&lt;br /&gt;
to help the XFCE audio mixer plugin find the volume to control:&lt;br /&gt;
&lt;br /&gt;
doas apk add gst-plugin-pipewire&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [https://gitlab.freedesktop.org/pipewire/pipewire PipeWire source repository]&lt;br /&gt;
* [https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/home PipeWire Wiki]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/PipeWire PipeWire on the ArchWiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Pipewire PipeWire on the Gentoo Wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;br /&gt;
[[Category:Multimedia]]&lt;br /&gt;
[[Category:Sound]]&lt;/div&gt;</summary>
		<author><name>Leg</name></author>
	</entry>
</feed>