Using Pipewire instead of Pulseaudio in Slackware 15
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PipeWire: A year in review & a look ahead
March 8, 2022
Code:
[...]
Last year began with busywork on the Bluetooth® front, with amazing volunteers testing and fixing things on PipeWire's
Bluetooth® plugin. Throughout the year, the plugin evolved to become perhaps one of the best - if not the best - open source
Bluetooth® audio stack implementations that I am aware of.
[...]
Then, in April, Fedora 34 became the first Linux distribution to ship PipeWire as its default audio service.
While PipeWire was there before as a video transport service to enable screen sharing on Wayland, the addition of the
audio layer by default exposed all of PipeWire's incredible capabilities to a broader audience.
[...]
In the meantime, at Collabora, we have been tirelessly working on getting WirePlumber ready to become the default
session manager for PipeWire. With the 0.4.0 release that came out in June, WirePlumber introduced all those needed
elements to achieve this goal.
[...]
In September, we also integrated audio passthrough functionality in PipeWire.
[...]
Finally, after some intense bug fixing in October, WirePlumber was made the default PipeWire session manager in
Fedora 35. It was shortly followed by other major Linux distributions that had started to use PipeWire for audio
in the meantime.
marav! When I logout of Plasma 5 in Slackware 15, drop down to runlevel 3, and then startx again I lose sound. I get it back if I reboot. I'm using wireplumber.
I use i3 as window manager (i3wm) in -current. Before the integration of wireplumber, pipewire worked well. But wireplumber depends on xdg-desktop-portal, which is not started automatically in i3. When I run KDE sound works as it should. In i3, if I start both xdg-desktop-portal and wireplumber manually once i3 is up then sounds works as before.
So, I now start both xdg-desktop-portal and wireplumber in the user's i3 config file. This works, but is there a better/neater way to do this properly?
I use i3 as window manager (i3wm). Before the integration of wireplumber, pipewire worked well. But wireplumber depends on xdg-desktop-portal, which is not started automatically in i3. When I run KDE sound works as it should. In i3, if I start both xdg-desktop-portal and wireplumber manually once i3 is up then sounds works as before.
So, I now start both xdg-desktop-portal and wireplumber in the user's i3 config file. This works, but is there a better/neater way to do this properly?
Unfortunately for you, seem like that you try to use technologies that are not available for your particular amazing i3wm.
In fact, this xdg-desktop-portal frontend relies in backends customized by (and for) desktop environments, like:
So, I believe that the best way is to ask the i3 developers to make (and maintain) a backend for XDG Desktop Portal.
OR, even simpler, just use a full featured desktop environment like is Plasma5 or GNOME4.
PS. Ironically, looks like the Wayland variant of your beloved i3 has a backend for the XDG Desktop Portal - maybe is time to use more modern technologies, like is Wayland?
PS2. The XDG Desktop Portal daemon without a backend is useless- what you do right now is just a hack.
Last edited by LuckyCyborg; 04-30-2023 at 04:18 AM.
marav! When I logout of Plasma 5 in Slackware 15, drop down to runlevel 3, and then startx again I lose sound. I get it back if I reboot. I'm using wireplumber.
When you are on runlevel 3, this is NOT a logout, but just a shutdown of Plasma5. Maybe the Wireplumbler goes nuts when it remains without connection to the graphical interface. BUT, yep. You are right. Monsieur Marav is more in measure to respond to this question.
I for one, I will suggest you to logout from your user account then log in again. This way, the daemon supervisor will be able certainly to do its job to stop the PipeWire daemons.
OR, even simpler, just use a full featured desktop environment like is Plasma5 or GNOME4.
PS. Ironically, looks like the Wayland variant of your beloved i3 has a backend for the XDG Desktop Portal - maybe is time to use more modern technologies, like is Wayland?
PS2. The XDG Desktop Portal daemon without a backend is useless- what you do right now is just a hack.
Using a full-fledged DE is out of the question. But it may be worthwhile to investigate if wayland/sway, or support for it, has matured enough to make the switch.
It may be a hack, but if it is the only way to have sound it is not useless.
When you are on runlevel 3, this is NOT a logout, but just a shutdown of Plasma5. Maybe the Wireplumbler goes nuts when it remains without connection to the graphical interface. BUT, yep. You are right. Monsieur Marav is more in measure to respond to this question.
I for one, I will suggest you to logout from your user account then log in again. This way, the daemon supervisor will be able certainly to do its job to stop the PipeWire daemons.
I noticed that sometimes (wireplumber keeps running, even after the session ends)
I just kill the process
I've seen that many other distros that now use Pipewire actually remove Pulseaudio. Is there now a way to removepkg pulseaudio in Slackware?
Well, the PulseAudio is NOT removed totally by those distributions.
How they split the packages in many sub-packages, those distros installs only the client side libraries and tools of PulseAudio.
A similar idea I have presented in the past for Slackware (and wasn't accepted or it was ignored), to split the PulseAudio server in a separate package named pulseaudio-server, which the user can NOT install at his wish. However, the client part present in the pulseaudio package is still required for being used with the PulseAudio server shipped by PipeWire.
In fact, that PipeWire do for a wide compatibility: it replaces the PulseAudio server with its own implementation of this server.
IF you really want this, I can upload (in the form of a tarball) that SlackBuild with split packages. If I remember right, it's for the version 15.0 but I guess can be modernized easily.
The pulseaudio (client) package then looks like this:
Let it be known that today was the day LuckyCyborg offered a clear, concise, and accurate response to a question. No toxicity, no bombastic claims... I had all but forgotten he was capable of such technical wisdom... Rejoice!
It's worth mentioning that you can be a Pipewire Purist if you really want to. Pipewire has it's own API that applications can use rather than rely on the libpulse compatility daemon. So if you only install applications that support this API then you can remove pulse completely. Not saying that's a good idea but it's definitely a thing...
and it was added to -current. I wonder if this means you can completely remove pulseaudio, disable the pipewire-pulse daemon and select the appropriate output plugin to use pipewire directly?
Code:
Mon May 1 20:22:43 UTC 2023
a/kernel-generic-6.1.27-x86_64-1.txz: Upgraded.
a/kernel-huge-6.1.27-x86_64-1.txz: Upgraded.
a/kernel-modules-6.1.27-x86_64-1.txz: Upgraded.
a/pciutils-3.10.0-x86_64-1.txz: Upgraded.
a/utempter-1.2.1-x86_64-1.txz: Upgraded.
d/kernel-headers-6.1.27-x86-1.txz: Upgraded.
k/kernel-source-6.1.27-noarch-1.txz: Upgraded.
l/libsoup3-3.4.2-x86_64-1.txz: Upgraded.
l/libwpg-0.3.4-x86_64-1.txz: Upgraded.
l/qca-2.3.6-x86_64-1.txz: Upgraded.
n/gnupg2-2.4.1-x86_64-1.txz: Upgraded.
n/netatalk-3.1.15-x86_64-1.txz: Upgraded.
This update fixes security issues, including a critical vulnerability that
allows remote attackers to execute arbitrary code on affected installations
of Netatalk. Authentication is not required to exploit this vulnerability.
For more information, see:
https://www.cve.org/CVERecord?id=CVE-2022-43634
https://www.cve.org/CVERecord?id=CVE-2022-45188
(* Security fix *)
xap/audacious-4.3.1-x86_64-1.txz: Upgraded.
xap/audacious-plugins-4.3.1-x86_64-1.txz: Upgraded.
xfce/thunar-4.18.6-x86_64-1.txz: Upgraded.
isolinux/initrd.img: Rebuilt.
kernels/*: Upgraded.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618
Rep:
I wanted something better also, being not a 'professional' audiophile, but close to it...my music is *extremely* important to me, and can tell when the songs are being outputted crappily or pretty darn good. (Yeah, yeah...my terminology for anything has much to be desired, heh)
I missed Alsa terribly after everyone went to the pulse audio escaped abortion. I could instantly tell the difference between my older Slackware (the last using Alsa, I don't remember the version, sorry, 14.2 maybe?) using Alsa and the later ones using Pulse. The sound was bland. I don't know any other way to explain it. Pulse just didn't know what it was doing very well.
Then I started to pay attention to this thread, in the hopes of reading that people were liking what was being offered over Pulse. So, I took the plunge last night. I read the post below:
Quote:
Originally Posted by fourtysixandtwo
These instructions are for running with KDE, there might be other steps needed for another DE.
Code:
BUILDDIR=~/builds
mkdir -p $BUILDDIR
pushd $BUILDDIR
lftp -c "mirror https://mirrors.kernel.org/slackware/slackware64-current/source/d/meson"
pushd meson
sh meson.SlackBuild
upgradepkg /tmp/meson-1.0.1-x86_64-1.txz
popd
lftp -c "mirror https://mirrors.kernel.org/slackware/slackware64-current/source/l/pipewire"
pushd pipewire
sh pipewire.SlackBuild
upgradepkg /tmp/pipewire-0.3.70-x86_64-1.txz
#I've found it best to run the disable/enable scripts afterwards, but YMMV if you've modified anything they touch.
pipewire-disable.sh
pipewire-enable.sh
#logout and log back in (after making sure no pipewire/wireplumber process are still running if started previously)
...doing everything to the 'T'. Instead of 'logging out', I just rebooted, figuring it wasn't any big deal.
When I was back in my system, I started up Audacious (my favorite player!), changed it to know it was to use Pipewire, and started up an m3u playlist of several I have.
I *INSTANTLY* could hear the difference in how Pipewire played my music compared to Pulse! I mean literally, it was almost like the difference between light and dark. Pipewire was making my music sound like it was supposed to again! Not only that, it knew how to utilize my Sound Blaster Audigy Rx correctly and my Logitech Z680 speaker setup, using either analog or digital! It also didn't make awful little bloop-like sounds when I raised or lowered the volume using the mouse wheel,like Pulse did.
All I can say is this is amazing once again and I can't thank everyone enough for bringing this thread up and discussing it and offering the ways to get it setup and working in our Slackware 15 systems. This is the reason why I really dig this place...things get done and done well and the people are (usually) pretty cool about it.
Thank you everyone and thank you to Pat for Slackware being on top once again (it always has been, but I hated where the music playing was going - downhill, not Pat's fault though). As far as I'm concerned, Pipewire needs to just be standard now in all following versions of Slackware after 15.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.