PipeWire: Difference between revisions

From Alpine Linux
m (→‎Running: Fix typo in the command)
m (added clarification by adding word server)
 
(40 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Draft|The instructions below have not been thoroughly tested and may break things.}}
{{TOC right}}


[https://pipewire.org/ PipeWire] is a multimedia processing engine that aims to improve audio and video handling on Linux.
[https://pipewire.org/ PipeWire] is a multimedia processing engine that aims to improve audio and video handling on Linux. Pipewire can act as a replacement for both [[PulseAudio]] and [[ALSA]] servers.


== Prerequisites ==
== Prerequisites ==
Line 7: Line 7:
=== Device access ===
=== Device access ===


PipeWire needs proper permissions to access devices. If you do not use [[Elogind|elogind]], your user should be in <code>audio</code> and <code>video</code> groups:
PipeWire needs proper permissions to access devices. If you do not use [[Elogind|elogind]], your user should be in <code>audio</code> (to access audio devices) and <code>video</code> (to access webcam devices) groups:


<pre>
{{Cmd|<nowiki># addgroup <user> audio
# addgroup <user> audio
# addgroup <user> video</nowiki>}}
# addgroup <user> video
 
</pre>
{{Warning|Membership of the <code>video</code> group will also grant unrestricted access to video devices, which is often a security issue. See issue {{issue|15409}} for further details.
}}


See [https://wiki.archlinux.org/title/Users_and_groups#Pre-systemd_groups pre-systemd groups] for more info.
Make sure to re-login for these changes to take effect.
Make sure to re-login for these changes to take effect.


=== D-Bus ===
=== D-Bus ===


PipeWire optionally requires a running [[D-Bus]] system and/or session bus for some of its functionality.
PipeWire requires a running [[D-Bus]] system and/or session bus for most of its functionality. If you start session-wide dbus instance, make sure to start PipeWire in that same session.
 
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.


=== XDG_RUNTIME_DIR ===
=== Environment ===


If you are not using a Desktop Manager, ensure that your <code>XDG_RUNTIME_DIR</code> 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 <code>~/pulse</code>, and on attempting to run Pavucontrol or pactl, you will get the following error:
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:


<pre>
<pre>
Line 31: Line 31:
pa_context_connect() failed: Connection refused
pa_context_connect() failed: Connection refused
</pre>
</pre>
Under [[Sway]], in order for <code>xdg-desktop-portal-wlr</code> to work it may also be necessary to set <code>XDG_CURRENT_DESKTOP</code> and <code>XDG_SESSION_DESKTOP</code> to <code>sway</code>


== Installation ==
== Installation ==


Install the {{Pkg|pipewire}} package.
Install the following {{Pkg|pipewire}}, {{Pkg|wireplumber}} a session manager and {{Pkg|pipewire-pulse}}, so Pulseaudio applications could use PipeWire as backend. By doing this, PipeWire acts as an audio server, similar to PulseAudio server.  


=== Session Manager ===
{{Cmd|# apk add pipewire}}
PipeWire delegates plumbing work to session manager. There are two options available:
{{Cmd|# apk add wireplumber}}
* '''[https://gitlab.freedesktop.org/pipewire/wireplumber WirePlumber]'''. It has modular design and supports Lua plugins. '''This is the recommended session manager. If you do not know which session manager you need, use WirePlumber.'''<br/>Package: {{Pkg|wireplumber}}
{{Cmd|# apk add pipewire-pulse}}
* '''[https://gitlab.freedesktop.org/pipewire/media-session pipewire-media-session]'''. It is much more simpler and covers only basic use cases. It was used for testing purposes. Now it does not make much sense since WirePlumber is available.<br/>Package: {{Pkg|pipewire-media-session}}


{{Note|This page assumes that you are using WirePlumber.}}
{{Pkg|pipewire-pulse}} package by itself will install the above {{Pkg|pipewire}} package and {{Pkg|wireplumber}} automatically.


=== PulseAudio compatibility ===
=== JACK compatibility ===
Install {{Pkg|pipewire-pulse}} package, which provides a daemon so PulseAudio applications could use PipeWire as backend.
Since Pipewire aims to replace JACK Install {{Pkg|pipewire-jack}} package, so it provides ABI-compatible libraries for JACK applications.


=== JACK compatibility ===
{{Cmd|# apk add pipewire-jack}}
Install {{Pkg|pipewire-jack}} package, which provides ABI-compatible libraries for JACK applications.


=== ALSA support ===
=== ALSA support ===
Install {{Pkg|pipewire-alsa}} package.
Install {{Pkg|pipewire-alsa}} package.
{{Cmd|# apk add pipewire-alsa}}
=== GUI Tools ===
You might want to use {{Pkg|pavucontrol}} or {{Pkg|pavucontrol-qt}} to have a simple GUI app for controlling sound, outputs, etc.
'''{{Pkg|qpwgraph}}''' is a graph manager dedicated to PipeWire with Qt GUI Interface.
Install XFCE Audio Mixer Plugin to help control volume:
{{Cmd|doas apk add {{pkg|gst-plugin-pipewire|arch=}}}}


== Configuration ==
== Configuration ==
PipeWire and WirePlumber store their default configuration in <code>/usr/share/pipewire</code> and <code>/usr/share/wireplumber</code> respectively. If you want to edit the configuration, you need to move it to <code>/etc</code>:


<pre>
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}}:
# cp -a /usr/share/pipewire /etc
# cp -a /usr/share/wireplumber /etc
</pre>


=== Disable D-Bus support ===
{{Cmd|<nowiki># cp -a /usr/share/pipewire /etc
Edit the following configuration parameters:
# cp -a /usr/share/wireplumber /etc</nowiki>}}


''/etc/pipewire/pipewire.conf''
=== pipewire-launcher ===
<pre>
context.properties = {
    ...
    support.dbus = false
}
</pre>


''/etc/wireplumber/wireplumber.conf''
{{Tip|You can also use <code>superd</code> to manage <code>pipewire</code> and its related services.}}
<pre>
context.properties = {
    ...
    support.dbus = false
}
</pre>


''/etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua''
{{Note|<code>pipewire-launcher</code> script is provided by Alpine Linux, not by upstream. Please report issues to Alpine Linux maintainers first.}}
<pre>
bluez_monitor.properties = {
  ...
  ["with-logind"] = false,
}
</pre>


''/etc/wireplumber/main.lua.d/50-alsa-config.lua''
Start the PipeWire media server. You'll probably get quite a few errors but just ignore them for now.
<pre>
alsa_monitor.properties = {
  ...
  ["alsa.reserve"] = false,
}
</pre>


''/etc/wireplumber/main.lua.d/50-default-access-config.lua''
{{Cmd|$ /usr/libexec/pipewire-launcher}}
<pre>
default_access.properties = {
  ...
  ["enable-flatpak-portal"] = false,
}
</pre>
=== Realtime scheduling ===


For realtime scheduling, it is recommended to use {{Pkg|rtkit}}. Add your user to the <code>rtkit</code> group.
A D-Bus session service must be running unless dbus support is disabled.


Alternatively, ensure your user has the right ulimit permissions. You generally need (limits.conf format):
If .xinitrc is used, add {{Path|/usr/libexec/pipewire-launcher}} to your {{Path|~/.xinitrc}}.


<pre>
If you do not use GUI by default and have D-Bus enabled in configuration, add the following stanza to your shell configuration file:
@audio - memlock 256
{{Cmd|export $(dbus-launch)
@audio - nice -11
/usr/libexec/pipewire-launcher
@audio - rtprio 88
}}
</pre>


This allows a member of the audio group to have the right permissions for PipeWire to use realtime scheduling without rtkit.
=== Screen sharing on Wayland ===


=== Video ===
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:
 
* GNOME with <code>xdg-desktop-portal-gtk</code>
Video should work out-of-the-box with v4l2 devices (e.g. a lot of webcams) and [https://gstreamer.freedesktop.org/ GStreamer] applications.
* KDE Plasma with <code>xdg-desktop-portal-kde</code> and Firefox
* Sway with <code>xdg-desktop-portal-wlr</code> and Firefox, see [[Sway]] for details


=== Bluetooth audio ===
=== Bluetooth audio ===
 
{{Main|Bluetooth}}
* Enable PulseAudio support as described above
* Enable PulseAudio support as described above
* Install bluetooth service packages: <code>bluez bluez-openrc pipewire-spa-bluez</code>
* Install bluetooth service packages: <code>bluez bluez-openrc pipewire-spa-bluez</code>
Line 130: Line 108:
* Use pavucontrol to adjust volume and manually select high definition bluetooth codecs.
* Use pavucontrol to adjust volume and manually select high definition bluetooth codecs.


=== Screen sharing on Wayland ===
=== Video ===


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:
Video should work out-of-the-box with v4l2 devices (e.g. a lot of webcams) and [https://gstreamer.freedesktop.org/ GStreamer] applications.
* GNOME with <code>xdg-desktop-portal-gtk</code>
* KDE Plasma with <code>xdg-desktop-portal-kde</code> and Firefox
* Sway with <code>xdg-desktop-portal-wlr</code> and Firefox, see [[Sway]] for details


== Running ==
=== Realtime scheduling ===


{{Note|<code>pipewire-launcher</code> script is provided by Alpine Linux, not by upstream. Please report issues to Alpine Linux maintainers first.}}
For realtime scheduling, it is recommended to use {{Pkg|rtkit}}. Add your user to the <code>rtkit</code> group.


Start the PipeWire media server. You'll probably get quite a few errors but just ignore them for now.
Alternatively, ensure your user has the right ulimit permissions. Since pipewire 0.3.66, you can add yourself to the <code>pipewire</code> group. You generally need (e.g. in {{Path|/etc/security/limits.conf}}):


<pre>
<pre>
$ /usr/libexec/pipewire-launcher
@pipewire - memlock 4194304
@pipewire - nice -19
@pipewire - rtprio 95
</pre>
</pre>


If you do not have D-Bus session bus running (e.g. you are in tty or you are using minimalistic DE or window manager which does not launch D-Bus session) and you did not disable D-Bus in PipeWire configuration, use <code>dbus-launch</code>:
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't have to do anything else.
 
Note that the above limits.conf will only work if your session is using [[PAM]].
 
=== Disable D-Bus support ===
 
{{Warning|This section is no longer supported since Alpine 3.19 as Using lua for configuration files is no longer supported in version 0.5.}}
 
For certain configurations (e.g. only audio playback and recording) D-Bus setup is not necessary and it can be disabled as follows.
 
Edit the following configuration parameters:
 
{{Cat|/etc/pipewire/pipewire.conf|<nowiki>context.properties = {
    ...
    support.dbus = false
}</nowiki>}}
 
 
{{Cat|/etc/wireplumber/wireplumber.conf|<nowiki>context.properties = {
    ...
    support.dbus = false
}</nowiki>}}
 
 
{{Cat|/etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua|<nowiki>bluez_monitor.properties = {
  ...
  ["with-logind"] = false,
}</nowiki>}}


<pre>
$ dbus-launch /usr/libexec/pipewire-launcher
</pre>


{{Note| PipeWire doesn't auto-start a session manager anymore.  
{{Cat|/etc/wireplumber/main.lua.d/50-alsa-config.lua|<nowiki>alsa_monitor.properties = {
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.}}
  ...
  ["alsa.reserve"] = false,
}</nowiki>}}


=== Auto launching ===
You can add <code>/usr/libexec/pipewire-launcher</code> to your <code>.xinitrc</code>.


If you do not use GUI by default and have D-Bus enabled in configuration, add the following stanza to your shell configuration file:
{{Cat|/etc/wireplumber/main.lua.d/50-default-access-config.lua|<nowiki>default_access.properties = {
<pre>
  ...
export $(dbus-launch)
  ["enable-flatpak-portal"] = false,
/usr/libexec/pipewire-launcher
}</nowiki>}}
</pre>


== Testing ==
== Testing ==
Line 170: Line 170:


=== WirePlumber ===
=== WirePlumber ===
<pre>
{{Cmd|$ wpctl status}}
$ wpctl status
</pre>


=== pw-cat playback ===
=== pw-cat playback ===


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). Use <code>pw-cat</code> utility from {{Pkg|pipewire-tools}}:
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 <code>pw-cat</code> utility from {{Pkg|pipewire-tools}}:


<pre>
{{Cmd|$ pw-cat -p test.flac
$ pw-cat -p test.flac
$ pw-play /usr/share/sounds/alsa/Front_Center.wav
</pre>
}}


=== pw-cat recording ===
=== pw-cat recording ===
If you have a microphone test audio recording is working.
If you have a microphone test audio recording is working.


<pre>
{{Cmd|$ pw-cat -r --list-targets
$ pw-cat -r --list-targets
$ pw-cat -r recording.flac
$ pw-cat -r recording.flac
(Speak for a while then stop it with Ctrl+c)
(Speak for a while then stop it with Ctrl+c)
$ pw-cat -p recording.flac
$ pw-cat -p recording.flac
</pre>
}}


=== PulseAudio ===
=== PulseAudio ===
Test PulseAudio clients using a media player, as most use PulseAudio.
Test PulseAudio clients using a media player, as most use PulseAudio.


=== JACK ===
=== JACK ===
Use <code>jack_simple_client</code> from {{Pkg|jack-simple-clients}}:
Use <code>jack_simple_client</code> from {{Pkg|jack-simple-clients}}:


<pre>
{{Cmd|$ jack_simple_client}}
$ jack_simple_client
</pre>


You should hear a sustained beep.
You should hear a sustained beep.
Line 210: Line 208:
First, check whether ALSA knows about your sound card:
First, check whether ALSA knows about your sound card:


<pre>
{{Cmd|aplay -l}}
aplay -l
</pre>


If sound devices are found, the issue is with your pipewire configuration.  Consider double-checking the instructions above.
If sound devices are found, the issue is with your pipewire configuration.  Consider double-checking the instructions above.


Otherwise, your sound card may not be supported in the version of the Linux Kernel you'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:
Otherwise, your sound card may not be supported in the version of the Linux Kernel you'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:
{{Cmd|uname -r
cat /proc/asound/card0/codec* | grep Codec}}
Modern devices might require {{Pkg|sof-firmware}}, which is the case if you get <code>sof firmware file is missing</code> errors in dmesg.
=== Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY ===
This means D-Bus session bus is not started and GUI is not active (i.e. you are in a tty). Use <code>dbus-run-session</code> as outlined [[#Running|above]]. Alternatively, [[#D-Bus|disable D-Bus support]].
=== Bluetooth connect failed: br-connection-profile-unavailable ===
Ensure that [[#WirePlumber|Session Manager]] is running.
=== Play/Pause buttons not working on bluetooth headphones ===
Check {{Path|/var/log/messages}}. If you see something like this:


<pre>
<pre>
uname -r
bluetoothd[3463]: profiles/audio/avctp.c:uinput_create() Can't open input device: No such file or directory (2)
cat /proc/asound/card0/codec* | grep Codec
bluetoothd[3463]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for WH-1000XM5
</pre>
</pre>


=== Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY ===
Then bluez is trying to register the headphones buttons as an input devices, but <code>uinput</code> is not loaded. Try <code>modprobe uinput</code>. If this works, see [[Architecture#Module_Loading]] for instructions on how to make sure this module is loaded automatically on each startup.
This means D-Bus session bus is not started and GUI is not active (i.e. you are in a tty). Use <code>dbus-launch</code> as outlined [[#Running|above]]. Alternatively, [[#D-Bus|disable D-Bus support]].
 
== Quick Configuration ==


You might want to use {{Pkg|pavucontrol}} to have a simple GUI app for controlling sound, outputs, etc.


== See Also ==
== See Also ==

Latest revision as of 05:26, 29 September 2024

PipeWire is a multimedia processing engine that aims to improve audio and video handling on Linux. Pipewire can act as a replacement for both PulseAudio and ALSA servers.

Prerequisites

Device access

PipeWire needs proper permissions to access devices. If you do not use elogind, your user should be in audio (to access audio devices) and video (to access webcam devices) groups:

# addgroup <user> audio # addgroup <user> video

Warning: Membership of the video group will also grant unrestricted access to video devices, which is often a security issue. See issue #15409 for further details.


See pre-systemd groups for more info. Make sure to re-login for these changes to take effect.

D-Bus

PipeWire requires a running D-Bus system and/or session bus for most of its functionality. If you start session-wide dbus instance, make sure to start PipeWire in that same session.

Environment

Ensure that XDG_RUNTIME_DIR is configured correctly. If this is not set, pipewire will create a directory in your home folder instead, called ~/pulse, and on attempting to run Pavucontrol or pactl, you will get the following error:

$ pactl list
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Under Sway, in order for xdg-desktop-portal-wlr to work it may also be necessary to set XDG_CURRENT_DESKTOP and XDG_SESSION_DESKTOP to sway

Installation

Install the following pipewire, wireplumber a session manager and pipewire-pulse, so Pulseaudio applications could use PipeWire as backend. By doing this, PipeWire acts as an audio server, similar to PulseAudio server.

# apk add pipewire

# apk add wireplumber

# apk add pipewire-pulse

pipewire-pulse package by itself will install the above pipewire package and wireplumber automatically.

JACK compatibility

Since Pipewire aims to replace JACK Install pipewire-jack package, so it provides ABI-compatible libraries for JACK applications.

# apk add pipewire-jack

ALSA support

Install pipewire-alsa package.

# apk add pipewire-alsa

GUI Tools

You might want to use pavucontrol or pavucontrol-qt to have a simple GUI app for controlling sound, outputs, etc.

qpwgraph is a graph manager dedicated to PipeWire with Qt GUI Interface.

Install XFCE Audio Mixer Plugin to help control volume:

doas apk add gst-plugin-pipewire

Configuration

PipeWire and WirePlumber store their default configuration in /usr/share/pipewire and /usr/share/wireplumber respectively. If you want to edit the configuration, you need to move it to /etc:

# cp -a /usr/share/pipewire /etc # cp -a /usr/share/wireplumber /etc

pipewire-launcher

Tip: You can also use superd to manage pipewire and its related services.
Note: pipewire-launcher script is provided by Alpine Linux, not by upstream. Please report issues to Alpine Linux maintainers first.

Start the PipeWire media server. You'll probably get quite a few errors but just ignore them for now.

$ /usr/libexec/pipewire-launcher

A D-Bus session service must be running unless dbus support is disabled.

If .xinitrc is used, add /usr/libexec/pipewire-launcher to your ~/.xinitrc.

If you do not use GUI by default and have D-Bus enabled in configuration, add the following stanza to your shell configuration file:

export $(dbus-launch) /usr/libexec/pipewire-launcher

Screen sharing on Wayland

You will need the right xdg-desktop-portal backend for your desktop environment. Screen sharing is known to work on:

  • GNOME with xdg-desktop-portal-gtk
  • KDE Plasma with xdg-desktop-portal-kde and Firefox
  • Sway with xdg-desktop-portal-wlr and Firefox, see Sway for details

Bluetooth audio

  • Enable PulseAudio support as described above
  • Install bluetooth service packages: bluez bluez-openrc pipewire-spa-bluez
  • Optional: install GUI manager for bluetooth blueman
  • Enable and start bluetooth service: rc-update add bluetooth; rc-service bluetooth start
  • Restart PipeWire
  • Use commandline program bluetoothctl or GUI program blueman-manager to scan and pair bluetooth audio devices.
  • Use pavucontrol to adjust volume and manually select high definition bluetooth codecs.

Video

Video should work out-of-the-box with v4l2 devices (e.g. a lot of webcams) and GStreamer applications.

Realtime scheduling

For realtime scheduling, it is recommended to use rtkit. Add your user to the rtkit group.

Alternatively, ensure your user has the right ulimit permissions. Since pipewire 0.3.66, you can add yourself to the pipewire group. You generally need (e.g. in /etc/security/limits.conf):

@pipewire - memlock 4194304
@pipewire - nice -19
@pipewire - rtprio 95

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't have to do anything else.

Note that the above limits.conf will only work if your session is using PAM.

Disable D-Bus support

Warning: This section is no longer supported since Alpine 3.19 as Using lua for configuration files is no longer supported in version 0.5.


For certain configurations (e.g. only audio playback and recording) D-Bus setup is not necessary and it can be disabled as follows.

Edit the following configuration parameters:

Contents of /etc/pipewire/pipewire.conf

context.properties = { ... support.dbus = false }


Contents of /etc/wireplumber/wireplumber.conf

context.properties = { ... support.dbus = false }


Contents of /etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua

bluez_monitor.properties = { ... ["with-logind"] = false, }


Contents of /etc/wireplumber/main.lua.d/50-alsa-config.lua

alsa_monitor.properties = { ... ["alsa.reserve"] = false, }


Contents of /etc/wireplumber/main.lua.d/50-default-access-config.lua

default_access.properties = { ... ["enable-flatpak-portal"] = false, }

Testing

In a different terminal window check the default output device. I don't yet know how this default can be changed for all applications, so you'd better hope it's right!

WirePlumber

$ wpctl status

pw-cat playback

Test sound is working using an audio file in a format supported by libsndfile 🔓 (e.g. flac, opus, ogg, wav). Use pw-cat utility from pipewire-tools:

$ pw-cat -p test.flac $ pw-play /usr/share/sounds/alsa/Front_Center.wav

pw-cat recording

If you have a microphone test audio recording is working.

$ pw-cat -r --list-targets $ pw-cat -r recording.flac (Speak for a while then stop it with Ctrl+c) $ pw-cat -p recording.flac

PulseAudio

Test PulseAudio clients using a media player, as most use PulseAudio.

JACK

Use jack_simple_client from jack-simple-clients:

$ jack_simple_client

You should hear a sustained beep.

Troubleshooting

`wpctl status` shows no targets

First, check whether ALSA knows about your sound card:

aplay -l

If sound devices are found, the issue is with your pipewire configuration. Consider double-checking the instructions above.

Otherwise, your sound card may not be supported in the version of the Linux Kernel you'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:

uname -r cat /proc/asound/card0/codec*

Modern devices might require sof-firmware, which is the case if you get sof firmware file is missing errors in dmesg.

Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY

This means D-Bus session bus is not started and GUI is not active (i.e. you are in a tty). Use dbus-run-session as outlined above. Alternatively, disable D-Bus support.

Bluetooth connect failed: br-connection-profile-unavailable

Ensure that Session Manager is running.

Play/Pause buttons not working on bluetooth headphones

Check /var/log/messages. If you see something like this:

bluetoothd[3463]: profiles/audio/avctp.c:uinput_create() Can't open input device: No such file or directory (2)
bluetoothd[3463]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for WH-1000XM5

Then bluez is trying to register the headphones buttons as an input devices, but uinput is not loaded. Try modprobe uinput. If this works, see Architecture#Module_Loading for instructions on how to make sure this module is loaded automatically on each startup.


See Also