<?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=Sirfredrick</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=Sirfredrick"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Sirfredrick"/>
	<updated>2026-05-03T04:15:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=22078</id>
		<title>PipeWire</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=22078"/>
		<updated>2022-07-12T20:38:30Z</updated>

		<summary type="html">&lt;p&gt;Sirfredrick: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
=== Audio Group ===&lt;br /&gt;
&lt;br /&gt;
When elogind is not available, the user has to be added to the &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; group. The user must log in for this to take effect.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# addgroup &amp;lt;user&amp;gt; audio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== D-Bus ===&lt;br /&gt;
&lt;br /&gt;
PipeWire requires a running [https://www.freedesktop.org/wiki/Software/dbus/ D-Bus] session. If you use a full desktop environment this will probably be started automatically, but with minimal window managers it must be done manually.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add dbus dbus-openrc dbus-x11&lt;br /&gt;
# rc-service dbus start&lt;br /&gt;
# rc-update add dbus default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then use &amp;lt;code&amp;gt;dbus-launch&amp;lt;/code&amp;gt; whenever you start an X or Wayland session. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ dbus-launch --exit-with-session sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XDG_RUNTIME_DIR ===&lt;br /&gt;
&lt;br /&gt;
If you are not using a Desktop Manager, ensure that your &amp;lt;code&amp;gt;XDG_RUNTIME_DIR&amp;lt;/code&amp;gt; is set to a user-writable location. By default for pulseaudio this is {{Path|/run/user/1000/}} or {{Path|/tmp}}. If this is not set, pipewire will create a directory in your home folder instead, called &amp;lt;code&amp;gt;~/pulse&amp;lt;/code&amp;gt;, 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;
== Installation and configuration ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pipewire wireplumber&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|Using [https://gitlab.freedesktop.org/pipewire/wireplumber WirePlumber] rather than the pipewire-media-session (which comes with pipewire) is [https://gitlab.freedesktop.org/pipewire/media-session/-/blob/master/README.md recommended] but not required.}}&lt;br /&gt;
&lt;br /&gt;
Create a custom configuration file in {{Path|/etc/pipewire/pipewire.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /etc/pipewire&lt;br /&gt;
# cp /usr/share/pipewire/pipewire.conf /etc/pipewire/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following line to the &amp;lt;code&amp;gt;context.exec&amp;lt;/code&amp;gt; section at the bottom of {{Path|/etc/pipewire/pipewire.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ path = &amp;quot;wireplumber&amp;quot;  args = &amp;quot;&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable the &amp;lt;code&amp;gt;snd_seq&amp;lt;/code&amp;gt; kernel module for ALSA support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modprobe snd_seq&lt;br /&gt;
# echo snd_seq &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Realtime scheduling ===&lt;br /&gt;
&lt;br /&gt;
For realtime scheduling, it is recommended to use rtkit,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add rtkit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then add your user to the `rtkit` group.&lt;br /&gt;
&lt;br /&gt;
Alternatively, ensure your user has the right ulimit permissions. You generally need (limits.conf format):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@audio - memlock 256&lt;br /&gt;
@audio - nice -11&lt;br /&gt;
@audio - rtprio 88&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows a member of the audio group to have the right permissions for PipeWire to use realtime scheduling without rtkit.&lt;br /&gt;
&lt;br /&gt;
=== ALSA ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pipewire-alsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ALSA support works out of the box if you have the pipewire-alsa package&lt;br /&gt;
&lt;br /&gt;
=== PulseAudio ===&lt;br /&gt;
&lt;br /&gt;
PipeWire can run a [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio] daemon which should allow all existing PulseAudio applications to be used with the PipeWire backend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pipewire-pulse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the following line in {{Path|/etc/pipewire/pipewire.conf}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{ path = &amp;quot;/usr/bin/pipewire&amp;quot; args = &amp;quot;-c pipewire-pulse.conf&amp;quot; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should be automatically enabled.&lt;br /&gt;
&lt;br /&gt;
=== JACK ===&lt;br /&gt;
&lt;br /&gt;
If you will be using PipeWire for [https://jackaudio.org/ JACK] applications install the required package and make system wide links to the PipeWire replacement JACK libraries (I have not had success using &amp;lt;code&amp;gt;pw-jack&amp;lt;/code&amp;gt;). You will not need to start a JACK server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pipewire-jack&lt;br /&gt;
# ln -sf /usr/lib/pipewire-0.3/jack/libjackserver.so.0 /usr/lib/libjackserver.so.0&lt;br /&gt;
# ln -sf /usr/lib/pipewire-0.3/jack/libjacknet.so.0 /usr/lib/libjacknet.so.0&lt;br /&gt;
# ln -sf /usr/lib/pipewire-0.3/jack/libjack.so.0 /usr/lib/libjack.so.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|These symlinks might be overwritten during updates.}}&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 headset ===&lt;br /&gt;
&lt;br /&gt;
Requires &amp;lt;code&amp;gt;pipewire-spa-bluez&amp;lt;/code&amp;gt; package in addition to &amp;lt;code&amp;gt;pipewire-pulse&amp;lt;/code&amp;gt; daemon to be installed.&lt;br /&gt;
&lt;br /&gt;
=== Automatic bluetooth profile selection ===&lt;br /&gt;
&lt;br /&gt;
To automatically switch between HSP/HFP and A2DP profiles when an input stream is detected, set the bluez5.autoswitch-profile property to true:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/pipewire/media-session.d/bluez-monitor.conf&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
rules = [&lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
        actions = {&lt;br /&gt;
            update-props = {&lt;br /&gt;
                ...&lt;br /&gt;
                bluez5.autoswitch-profile = true&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&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&lt;br /&gt;
&lt;br /&gt;
== Usage ==&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;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ pipewire&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| PipeWire doesn&#039;t auto-start a session manager anymore. &lt;br /&gt;
In 3.14 and earlier, the PipeWire default config was edited in packaging to auto-start pipewire-media-session as the default session manager. Since we now have wireplumber available as an alternative session manager, this has been changed in favor of a launch wrapper for pipewire at /usr/libexec/pipewire-launcher. When executed, this will launch pipewire, pipewire-media-session or wireplumber, and pipewire-pulse, depending on what modules are available. If you were launching /usr/bin/pipewire and the session manager manually before, please use the new launcher wrapper instead. WirePlumber can now also be used as a proper alternative for pipewire-media-session.}}&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;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pipewire-tools&lt;br /&gt;
$ pw-cat -p --list-targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| pw-cat doesn&#039;t have --list-targets option anymore.&lt;br /&gt;
The version of pipewire used in Alpine 3.16 and later has the --list-targets option removed. You should now use &#039;&#039;&#039;pw-cli list-objects&#039;&#039;&#039; or &#039;&#039;&#039;wpctl status&#039;&#039;&#039; (if you use wireplumber).}}&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] (e.g. flac, opus, ogg, wav).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ pw-cat -p test.flac&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a microphone test audio recording is working.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ 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;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test PulseAudio clients using a media player (most use PulseAudio) and if you use JACK test that too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add jack-example-clients&lt;br /&gt;
$ jack_simple_client&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should hear a sustained beep.&lt;br /&gt;
&lt;br /&gt;
If you are happy everything is working, make PipeWire start automatically when your X or Wayland session starts. For example, you could add the &amp;lt;code&amp;gt;pipewire&amp;lt;/code&amp;gt; command to &amp;lt;code&amp;gt;~/.xinitrc&amp;lt;/code&amp;gt; or your window manager&#039;s config file.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== `pw-cat -p --list-targets` shows no targets ===&lt;br /&gt;
&lt;br /&gt;
First, check whether ALSA knows about your sound card:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
aplay -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uname -r&lt;br /&gt;
cat /proc/asound/card0/codec* | grep Codec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quick Configuration ==&lt;br /&gt;
&lt;br /&gt;
You might want to use pavucontrol to have a simple GUI app for controlling sound, outputs, etc, in which case:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add pavucontrol&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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>Sirfredrick</name></author>
	</entry>
</feed>