<?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=Dekedro</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=Dekedro"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Dekedro"/>
	<updated>2026-05-03T07:51:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=22347</id>
		<title>PipeWire</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=PipeWire&amp;diff=22347"/>
		<updated>2022-10-02T10:12:46Z</updated>

		<summary type="html">&lt;p&gt;Dekedro: &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 re-log-in 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 for some of its functionality. 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&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-run-session&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-run-session -- sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For certain configurations (e.g. only audio playback and recording) D-Bus setup is not necessary.&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;
=== 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. You may need the &amp;lt;code&amp;gt;snd_seq&amp;lt;/code&amp;gt; kernel module.&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. You need to have &amp;lt;code&amp;gt;pipewire-pulse&amp;lt;/code&amp;gt; installed.&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 (pipewire-jack). Things should work with just that.&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;
== 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;
$ /usr/libexec/pipewire-launcher&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;
wireplumber:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ wpctl status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&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;
# apk add pipewire-tools&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;/usr/libexec/pipewire-launcher&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;
=== `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;
&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>Dekedro</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=20205</id>
		<title>Sway</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Sway&amp;diff=20205"/>
		<updated>2021-10-21T15:15:15Z</updated>

		<summary type="html">&lt;p&gt;Dekedro: Add instructions for picking libseat backend&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://swaywm.org Sway] is a tiling Wayland compositor. It&#039;s a drop-in replacement for the i3 window manager.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
First, install &amp;amp; configure eudev:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add eudev&lt;br /&gt;
# setup-udev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install graphics drivers appropriate to your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add mesa-dri-gallium  # gallium&lt;br /&gt;
# apk add mesa-dri-classic  # or classic&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following links contain guides for setting up the video stack.&lt;br /&gt;
&lt;br /&gt;
* [https://wiki.alpinelinux.org/wiki/Intel_Video Intel Video]&lt;br /&gt;
* [https://wiki.alpinelinux.org/wiki/Radeon_Video Radeon Video]&lt;br /&gt;
&lt;br /&gt;
Add yourself to the input and video groups:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# adduser $USER input&lt;br /&gt;
# adduser $USER video&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have to log out and back in for this to take effect. &lt;br /&gt;
&lt;br /&gt;
Install some TTF fonts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add ttf-dejavu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since sway 1.6.1 (more specifically, since wlroots 0.14), you need to set up libseat backend if you wish to run sway directly (without nesting it in another wayland compositor). To do that, choose one of the following methods:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dt&amp;gt;seatd daemon&amp;lt;/dt&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add seatd&lt;br /&gt;
# rc-update add seatd&lt;br /&gt;
# rc-service seatd start&lt;br /&gt;
# adduser $USER seat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are already logged in as a $USER, you will need to relogin.&lt;br /&gt;
&amp;lt;/dd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dt&amp;gt;seatd-launch&amp;lt;/dt&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add seatd-launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When starting sway, you will need to prefix invocation with &amp;lt;code&amp;gt;seatd-launch&amp;lt;/code&amp;gt;.  &lt;br /&gt;
Note: &amp;lt;code&amp;gt;seatd-launch&amp;lt;/code&amp;gt; is a suid binary, so it might be wise to use one of the other methods from a security perspective.&lt;br /&gt;
&amp;lt;/dd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dt&amp;gt;elogind daemon&amp;lt;/dt&amp;gt;&lt;br /&gt;
&amp;lt;dd&amp;gt;&lt;br /&gt;
TODO&lt;br /&gt;
&amp;lt;/dd&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
We can now install sway:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apk add sway sway-doc&lt;br /&gt;
# apk add                \ # Install optional dependencies:&lt;br /&gt;
    xwayland             \ # strongly reccommended for compatibility reasons&lt;br /&gt;
    alacritty            \ # default terminal emulator&lt;br /&gt;
    dmenu                \ # default application launcher&lt;br /&gt;
    swaylock             \ # lockscreen tool&lt;br /&gt;
    swayidle               # idle management (DPMS) daemon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running Sway ==&lt;br /&gt;
&lt;br /&gt;
To run sway, first set XDG_RUNTIME_DIR to a suitable location (e.g. /tmp). Install &amp;amp; configure elogind to skip this step. Then run sway from the Linux console:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ XDG_RUNTIME_DIR=/tmp sway&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(if you run sway with seatd-launch, you will need to use &amp;lt;code&amp;gt;$ XDG_RUNTIME_DIR=/tmp seatd-launch sway&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
See the [https://wiki.alpinelinux.org/wiki/Wayland Wayland] page for a permanent configuration&lt;br /&gt;
&lt;br /&gt;
== Configuration and Usage ==&lt;br /&gt;
&lt;br /&gt;
An example config is provided at &amp;lt;code&amp;gt;/etc/sway/config&amp;lt;/code&amp;gt;. Copy it to &amp;lt;code&amp;gt;~/.config/sway/config&amp;lt;/code&amp;gt; and read through it to learn the default keybindings.&lt;br /&gt;
&lt;br /&gt;
For additional information, start at &amp;lt;code&amp;gt;man 5 sway&amp;lt;/code&amp;gt; and read the [https://github.com/swaywm/sway/wiki upstream FAQ].&lt;br /&gt;
&lt;br /&gt;
[[Category:Desktop]]&lt;/div&gt;</summary>
		<author><name>Dekedro</name></author>
	</entry>
</feed>