Help needed writing How To | Replace Pulseaudio with Pipewire for EndeavorOS

Hi Fellow Arch Fans,

Like many of you I am straddling the fence as I work my way from the Manjaro distribution back to my first Arch love of Antergos (Now even fresher as Endeavor OS). Like one of my mentors @jonathon I like to write documentation to help people get it right the first time. Poor Jonathan and @dalto often provided feedback about Optimus and Nvidia and various questions which built my understanding of how the architecture worked.

That being said and wanting to play my experience forward I drafted the below HOWTO Replace Pulseaudio with Pipewire, knowing it has Manjaro elements. I would like to get the communities help in making it EndeavorOS focused.

FYI, I have tested this setup on a Thinkpad T450:

  • Laptop LCD and 1 external monitors
  • Audio being sent to built in speakers, through HDMI, Analogue headphones, Bluetooth headphones
  • Steam Native
  • Pulseeffects
  • MPV Video Player
  • Tizonia audio streaming from terminal.

Installing Pipewire on Arch Linux

(1) Uninstall pulseaudio:

sudo pacman -R pipewire-pulse
sudo pacman -R pulseaudio

If the previous not works then:

sudo pacman -Rdd pulseaudio pulseaudio-alsa pulseaudio-bluetooth pulseaudio-ctl pulseaudio-equalizer pulseaudio-jack pulseaudio-lirc pulseaudio-rtp pulseaudio-zeroconf pulseaudio-equalizer-ladspa

Note:

  • I removed pipewire-pulse because it was already installed on the system from a previous update when I was only using pulseaudio.

(2) Install pipewire

sudo pacman -S pipewire pipewire-pulse

(3) ** Optional ** Install Pulseeffects.

sudo pacman -S gst-plugin-pipewire pulseeffects

(4) WebRTC screen sharing

Most browsers used to rely on X11 for capturing the desktop (or individual applications) when using WebRTC (e.g. on Google Hangouts). On Wayland, the sharing mechanism is handled differently for security reasons. PipeWire enables sharing content under Wayland with fine-grained access controls.

This requires xdg-desktop-portal and one of its backends to be installed. The available backends are:

-xdg-desktop-portal-gtk for GNOME
-xdg-desktop-portal-kde for KDE

sudo pacman -S xdg-desktop-portal xdg-desktop-portal-gtk

(5) Reboot your operating system.

(6) Check if Pipewire can translate sound for Pulse Audio applications:

Run “pactl info” from terminal.

Example of the output:

Server String: /run/user/1000/pulse/native
Library Protocol Version: 34
Server Protocol Version: 34
Is Local: yes
Client Index: 156
Tile Size: 65472
User Name: rsruser
Host Name: sol
Server Name: PulseAudio (on PipeWire 0.3.22)
Server Version: 14.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: 1cad:8cc2

Packages to install:

pipewire
gst-plugin-pipewire
pipewire-pulse
pipewire-alsa
pipewire-jack
pulseeffects

Source:

https://wiki.archlinux.org/index.php/PipeWire

https://archlinux.org/packages/community/x86_64/pulseeffects/

6 Likes

It’s dead easy in Arch:

sudo pacman -S pipewire pipewire-pulse --needed

That’s it. All conflicting Pulseaudio packages will be removed.

7 Likes

Thanks Jonathon. I made changes to my HowTO.

To be honest I am getting this impression that the expectation is I should normally just run sudo pacman -S pipewire pipewire-pulse, then the package manager will detect the conflict and remove pulseaudio before the install? From scouring the forms it seems the ‘pipewire-pulse’ package being installed with pulseaudio caused people grief in switching.

pipewire-pulse provides and conflicts pulseaudio so there isn’t any issue with having them both installed - because that’s impossible. :wink:

I imagine issues were more along the lines that applications didn’t work well with pipewire-pulse (e.g. pulseeffects before 5.0.0) or Bluetooth support is still a bit clunky (e.g. speakers default to HFP instead of A2DP so it’s connected but there’s no audio, easily fixed by switching the profile via pavucontrol).

Or, Manjaro ended up blocking normal package manager operations via their metapackage.

Thank you. This whole pipewire has messed up my sound system MaJoLy since I got the warning that pulseaudio was in conflict and I uninstalled it. I read some posts here about changing out audio-pro, I think from Jonathan, but that didn’t work for me. I will use this guide and see if I can straighten my mess out, or …I will be a mess. :grimacing: :sob: :tired_face: :hear_no_evil:

You know it is early adopters like you who end up making life easier for people like me. So thanks for that :slight_smile:

1 Like

This worked really well, I think my sound system is fixed. The only issue that remained for me was sound when playing Youtube videos using Firefox. Some videos played with sound, some did not. I did some research and it seems Firefox is very dependent on Pulse. One way I got around this, and recommended by a user, was to install ‘apulse’ which is in AUR. This I believe fixed my sound issue with Firefox.

Is Arch planning on replacing Pulse with pipewire? I had it on KDE and everthing was fine until an update caused it to have a whole bunch of duplicate audio devices listed. Now i only have one as i am back to what ever it installs on an new installation.

Screenshot_20210304_134103

1 Like

Isn’t up to the DE too? The guys making Pipewire are part of the GNOME project so that would probably the first DE to adopt it…

Definitely some Manjaro strangeness (e.g. installing manjaro-pipewire does not install all the pipewire packages). I want to really only be updating every 3 months but that is not the Arch way.

As I have been testing today I was able to duplicate with my bluetooth headphones going to HFP for quality. So will be nice to see how things are in September.

2 Likes

This seems to be sorted now. My headset defaulted to using A2DP.

1 Like

13 posts were split to a new topic: No sound devices found after switching to pipewire

@Feakster @csteinforth

Hi Everyone,

This topic was about writing a document to help people switch from Pulse Audio to Pipewire.

My suggestion is we have Keithy create a separate Post to troubleshoot his setup.

If there is an outcome of the investigation which should go into the HOW TO: then post your comment here and then I will consider revising (include a link to your Post here as the source of the information.

1 Like

I figure I would share that Pulseaudio Volume (pavucontrol) in Gnome actually lets me set by Bluetooth headphones to use the aptX low latency high quality audio codec. This is something I cannot do in Gnome Bluetooth\Audio Settings yet.

1 Like

it might actually be a separate problem; Bluetooth headphones in Gnome has always been a damn mess for me.
Which is why I Chose to use Blueman instead of Blueberry in Xfce and Cinnamon; blueman just works better with headphones specifically for me.

4 Likes

Question: what audo mixer package should I install? I run pipewire just fine, but Xfce still has pavucontrol set as default audio mixer and I have no other installed, it seems.

1 Like

Does pavucontrol still work?

1 Like

Turns out that

sudo pacman -S pipewire pipewire-pulse --needed

also removed pavucontrol since it is not a dependency for pipewire-pulse but a dependency for pulseaudo.

All I had to do was to reinstall it since it “thinks” pipewire-pulse IS pulseaudio (the dependency check in pacman literally says this: “Optional dependency: pulseaudo [installed]” even tho it is not, but pipewire-pulse is.

SO another thing to add to the instructions maybe? At least for Xfce users @kagetora13 ?

Exactly what I was going to tell you. :+1:

1 Like

Well now I can set my headphones as default audio device again :wink: