- This topic has 58 replies, 16 voices, and was last updated Aug 15-9:11 am by male.
May 9, 2021 at 10:23 pm #59060MemberXecure
I have been experimenting a bit with pipewire, and I can say it is the perfect replacement for pulseaudio. I have no experience with JACK, so I will only explain how it works managing my audio on my system.
PipeWire is a server and user space API to deal with multimedia pipelines. It will be very important for Wayland server (streaming audio/video between applications and screen sharing), but it is still very useful for us xorg users.
Currently in antiX-bullseye-a2 (testing, future antiX 21), it is good enough to manage input/output audio for all my devices on my laptop. I have it set up mainly to replace pulseaudio (not installed on my system). It doesn’t require systemd and, though a service could be created for it, it is NOT needed. I have it installed with a bluetooth module, and I am able to stream audio to my bluetooth headphones (a bit jumpy, but good enough for me), use pavucontrol to manage the volume and switch between audio input/output, play audio in firefox (without apulse!!) and all this using less CPU % compared to pulseaudio (still uses more than just pure ALSA, but negligible in my experience). It also has a good audio level compared to when I am using pulseaudio and similar to pure ALSA (but this may depend on the device, and may only be my experience).
Official Debian Instructions here: https://wiki.debian.org/PipeWire
Summary of what I have done on my system:
1. Install pipewire with audio client libraries (optional, for replacing pulseaudio, jack and handling alsa requests) and bluetooth modules (optional, for bluetooth audio streaming).
sudo apt install pipewire pipewire-audio-client-libraries libspa-0.2-bluetooth
1.2 (Optional) I installed pavucontrol (without pulseaudio) to manage volume control and device switching. I prefer this to alsamixer and Sound Card Chooser. For what I use it, it is good enough.
2. I add pipewire to the startup commands so it launches with the system. I edit ~/.desktop-session/startup and add it close to the beginning:
# Startup pipewire to manage my audio pipewire &
3.(Optional) Prepare it to replace pulseaudio. I follow the Debian wiki instructions and create a file for pipewire:
sudo touch /etc/pipewire/media-session.d/with-pulseaudio
and also add another startup command to ~/.desktop-session/startup
# Replace pulseaudio functionality with pipewire pipewire-pulse &
4. (Optional) Also pipe all programs that would use alsa to use pipewire instead (makes it consistent with pulseaudio volume and lets me control all system audio with pavucontrol interface and same audio commands). I follow the Debian instructions and create the files:
sudo touch /etc/pipewire/media-session.d/with-alsa sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/
5. (Optional) Let pipewire manage JACK. I have followed the Debian wiki instructions but I have never used JACK for anything before. I discovered qjackctl recently in a forum post and just wanted to see what it was. Maybe I will use this in the future, so I set it up anyway.
sudo touch /etc/pipewire/media-session.d/with-jack sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/ sudo ldconfig
Here is a screenshot of qjackctl of how the audio is set up right now on my system (using bluetooth headset that includes microphone to listen to youtube on firefox, with pavucontrol open to manage volume and input/output devices):
Not everything is sunshine. There are shadows (at least for me).
A. Volumeicon is useless after setting all this up. The volume slider barely moves sometimes (it seems blocked by something), and others slightly moving it increases the volume to almost 100% (almost making me deaf). I have disabled it from startup, but I could use it for launching pavucontrol by changing the mixer command.
B. Default hotkeys/key-bindings for increasing/decreasing audio (using amixer command) doesn’t work properly. Sometimes it just blocks the audio in one channel and others volume goes too loud or too low, or gets stuck in mute. I have replaced them to use pulseaudio commands instead:
pactl set-sink-volume @DEFAULT_SINK@ -5% pactl set-sink-volume @DEFAULT_SINK@ +5%
C. It doesn’t remember volume levels at all from one session to the next (not a real problem compared to normal ALSA behavior, but it is worse compared to normal pulseaudio).
D. Related to B. Alsamixer doesn’t seem to match volume values with pulseaudio. They seem to work in different scales and show 0 when the other shows >0%, and jumps of 10% in one may be a 30% volume jump in the other.
E. Though long use of Bluetooth headphones has improved (no sudden disconnects after 5 minutes without audio output), I get more stuttering and distortions (sometimes), but it could be related to my bluetooth card or headset (always had some problems, so I am OK with current experience).
So, this is my experience so far. Have you tested this out yourself? What was your experience?May 9, 2021 at 11:37 pm #59068Anonymous::
no firsthand experience, I’ve occasionally clicked reddit topics to read “from-the-trenches” reports by users:
HackerNews search, sorted by date:
pipewire debian package bugtracker: https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=pipewire;dist=unstable
pipewire project bugtracker: https://gitlab.freedesktop.org/pipewire/pipewire/-/issuesMay 10, 2021 at 7:41 am #59085MemberXecure::
Hopefully we can get more people to test this on their machines (with HDMI output and even older machines), and may be able to recommend using pipewire instead of apulse (or set it as the default on a respin).
The big problem with pipewire is that it gets outdated pretty quickly. It seems the developers release a new version every 15 days, so on a stable environment it might get old (we all know how Debian prioritizes stability above everything else). I hope that before bullseye gets released they can squeeze in a newer version from experimental. Worse case scenario is building my own .deb from experimental if needed, as I have done for connman.
Anyway, I am interested in seeing how it goes for other antiX users.
June 22, 2021 at 10:12 pm #62187Membercalciumsodium::
- This reply was modified 1 year, 7 months ago by Xecure.
I was able to test pipewire using antiX-bullseye-b1-sysvinit on an HP Compaq 6200 microtower using a displayport-to-hdmi connection to our family TV.
Before this test, I was able to get great sound using pulseaudio and pavucontrol. Pavucontrol was used to initially set the configuration for the HDMI/displayport output. This will be used for comparison with pipewire.
I repeated all 5 steps that you listed that you did in setting up pipewire. I was able to successfully install pipewire, and I was able to get good video and sound through the displayport-to-hdmi connection.
How is the sound quality of pulseaudio vs pipewire?
There is a slight variation/difference in sound quality between the two systems. I have to say that the sound quality with pulseaudio is better than with pipewire.
I wanted to get a second opinion about this, so I did the following test. I played the same youtube video to my wife and asked her which sounded better. I told her I was trying out two different sound systems, didn’t tell her which was which, and asked her to pick which sound system produced a better sound and why. She also picked the pulseaudio sound system. In her evaluation, at low sound volume, both sounded the same. But when the volume was turned up, the sound from pulseaudio was more crisp. Whereas, with pipewire, the sound was more muffled and less crisp at high volumes.
So, these are the opinions of two people.
I wanted to report this test.
Thanks.June 23, 2021 at 8:05 am #62192MemberModdIt::
xcecure wrote: The big problem with pipewire is that it gets outdated pretty quickly.
See that as not the important point, sound quality is audibly degraded against pulse/apulse
on same system, well tried and tested Gigabyte board i5, Intel HD Audio to Teufel active stereo.
Using pulse/ apulse has never given me much bother (years of usage) so will stay with it.June 24, 2021 at 11:07 am #62243MemberXecure::
So, these are the opinions of two people.
I wanted to report this test.
Thanks, calciumsodium. This is what I wanted to hear. Real life experience. For now, pulseaudio still seems to have better quality, even if it uses a bit more resources and lags a bit.
For bluetooth headphones the quality of sound is better with pipewire, but probably for speakers it will still need to improve a lot.
Thanks for testing. Maybe in antiX 23 we can recommend people to install pipewire instead of pulseaudio when experiencing audio problems that cannot be solved with ALSA.
Using pulse/ apulse has never given me much bother (years of usage) so will stay with it.
I am not suggesting for everyone to replace it, but asking for other people’s experience.
ALSA is still the best option (but to get best results, depending on your device, you will need to configure it further, which is not that easy). Pulseaudio brings a lot of latency (for professionals, JACK is the better option). pipewire aims to replace all of them (thou still speaking to the ALSA server, as that is what talks directly with kernel and hardware), being able to interface as pulseaudio with a similar latency to JACK.
You can read a bit about each of them here and why they exist: https://www.reddit.com/r/linux/comments/coi4dt/a_complete_guide_of_and_debunking_of_audio_on/June 24, 2021 at 1:05 pm #62246MemberJing-Jo::
I would like to thank everyone participating on this topic.
It’s going to be extremely useful to me in the near future.
ThanksOctober 18, 2021 at 6:38 pm #69122Memberbunkbail::
@Xecure I tested this on latest antix beta, it seems not to be using pipewire.
LANG=C pactl info | grep '^Server Name' Server Name: pulseaudioOctober 19, 2021 at 11:44 am #69195MemberXecure::
$ env-info | grep "OS:" OS: antiX-21-runit Grup Yorum $ LANG=C pactl info | grep '^Server Name' Server Name: PulseAudio (on PipeWire 0.3.19)
You need to remove pulseudio or not let it auto-start for pipewire to take over.October 19, 2021 at 12:16 pm #69196MemberModdIt::
I have played a lot with audio on Linux, some persons I know power a studio with it too.
I listen semi seriously with Koss Portapro headphones or a Teufel Sub with sattelites, the Portapro
looks funky but sound quality is pretty exceptional for a cheap device.
To really have a sound comparison I can and did on several occasions activate an Audigy Pro Soundcard
then hook in to an Alchemist Class A amp driving big KEF floorstanding speakers set away from walls and
I will not be giving up alsa anytime soon as the present alternatives do not convince me sound wise.
I can use A B setup on two identical computers, difference is immediately audible.
I do appreciate that Bluetooth support with alsa is a pain and that fact is bother for some.
OT, My daughter is always searching for her in ear separate bluetooth phones, I think she bought
about 5 sets in two years, I bought some replacement foam ear pads once in about 10 years.
Bluetooth too expensive for me :-).
I do not see the point in Jack for home usage as latency is more of an issue when mixing and channels
get out of synch..
October 19, 2021 at 1:20 pm #69203MemberXecure::
- This reply was modified 1 year, 1 month ago by ModdIt.
Now that I understand a bit more how packaging and services works, I will try again to build bluez-alsa for antiX. I couldn’t figure out how to make it work without systemd and how to create a init service for it, but maybe now I will be able to overcome this challenge.October 30, 2021 at 2:37 am #69771Memberstevesr0::
Hi all (especially Xecure <g>),
I have just installed Pipewire (v3.39 from the testing/unstable/Sid repositories).
I only have Alsa installed, so I just need to set up files to tell Alsa to send work to Pipewire.
Unfortunately, with the new version of pipewire, the /etc/pipewire files no longer exist. Instead there is a /usr/share/pipewire directory. But there is no media-session.d directory to use to make the file /usr/share/pipewire/media-session.d/with-alsa.
So (as a permanent noobie), I am uncertain how to proceed to test the install. Since Pulseaudio isn’t installed, there is no pactl command to check that the pipewire server is active.
Appreciate suggestions for testing if anything is working (and how to tell ALSA to send stuff to Pipewire).
Thanks in advance.
stevesr0October 30, 2021 at 6:48 am #69777Memberblur13::
I’ve only had negative experiences with PipeWire. On my Arch install it was pulled in when updating PulseEffects, which went from pulse to pipe after version 5 (as I recall). The problem with that was that it broke my music player, cmus. So I reverted to a 4.x version of PulseEffects and pulseaudio. That issue has since been fixed, on the pipewire end of things. But for me at least, I’ll hold off from updating to pipewire untill all the development issues have been adressed, and the release is “stable.”October 30, 2021 at 1:00 pm #69789MemberXecure::
For pactl, you can install pulseaudio-utils (no need to install pulseaudio). It will add the pactl commands (though I don’t know if this is still needed, maybe amixer now works perfectly with pipewire).
I haven’t updated the pipewire version on my system yet, but based on this commit, the configuration folder was moved from /etc/pipewire to /usr/share/pipewire.
The examples are still in usr/share/doc/pipewire/examples/alsa.conf.d, so the second command should still work.
Make sure that creating the with-alsa file in /usr/share/puipewire works OK. I am not sure if this is still needed, and maybe it just works out of the box once you start pipewire and pipewire-media-session.October 30, 2021 at 5:43 pm #69807Memberstevesr0::
Apparently, I installed something fairly new (27 October) and the documentation seems to be not properly revised.
(1) Turns out that media-session no longer exists in 3.39. Wireplumber is its replacement. I looked at the pipewire instructions for editing the /usr/share/pipewire/pipewire.conf file, but they don’t make great sense to me.
(2) I have not found a simple set of instructions for LAUNCHING either wireplumber OR pipewire. To see if it was working without any of the suggested file editing, I tried “pw-play /usr/shares/sounds/alsa/Noise.wav. I got an error message that HOST is down.
Next, I tried launching pipewire from a terminal. This seemed to launch (the command line changed from “$” to “_”. So I opened a second terminal and again attempted to play the wav file. No sound and a message about “suspended” appeared.
Finally, I tried launching BOTH wireplumber and pipewire and playing the wav file. This worked (yay!!)
With this raving success achieved in spite of complete ignorance, I have decided to take the weekend off from further efforts, unless folks on this forum suggest ways to move forward.
(I will however check out the examples on the pipewire-tests package.)
P.S. If I figure out how to do so, I will notify the Pipewire team that the instructions for 3.39 are outdated and confusing to a noobie <g>.
- You must be logged in to reply to this topic.