I only notice PipeWire from a hot hacker news headline this morning, the top comment mentioned that it can replace PulseAudio caught my attention.
I had some struggles with PulseAudio before. The biggest one is that my USB speaker (Sony SRS-HG10) stopped working since I updated my kernel to 5.12. I have tried a lot of fixes, tweaking kernel configs, clean PulseAudio caches, etc. Finally, I gave up and wore a headphone instead.
After reading the ArchWiki page and Gentoo Wiki page about PipeWire I find it’s quite easy to replace PulseAudio with it.
- Stop PulseAudio from auto spawning.
Edit
/etc/pulse/client.conf
and un-comment lineautospawn = no
start PipeWire when X starts. It’s possible to add it to any X start script like
.xinirc
or.xprofile
, I did it in myi3/config
exec --no-startup-id pipewire
That’s it. I restarted i3, opened up a Youtube video. BOOOOOM, everything works.
Just to be sure.
ps -aux | grep pulse # make sure no PulseAudio process running
pactl info | grep "Server Name" # : Server Name: PulseAudio (on PipeWire 0.3.30)
Open pavucontrol
and switch to USB speaker, it works too, congratulations (to me)!
There is also a ticket in Gentoo bug tracker discussing how to avoid installing PulseAudio entirely. I’m looking forward to it.