r/voidlinux • u/redj12 • Mar 31 '26
Pipewire for new commer
Hello,
Just reinstalled Void in order to test it well and move to it from openSuse.
Everything works fine except pipewire. I am on KDE.
I followed the docs : https://docs.voidlinux.org/config/media/pipewire.html
sudo xbps-install -S pipewire wireplumber alsa-utils plasma-pa
For Pipewire :
$ : "${XDG_CONFIG_HOME:=${HOME}/.config}"
$ mkdir -p "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d"
$ ln -s /usr/share/examples/wireplumber/10-wireplumber.conf "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d/"
Pulse Audio interface :
$ : "${XDG_CONFIG_HOME:=${HOME}/.config}"
$ mkdir -p "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d"
$ ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf "${XDG_CONFIG_HOME}/pipewire/pipewire.conf.d/"Pipewire do not start on boot so there is no sound.
However I created sound.sh file with "piprewire &" in it. The file is executed automatically with kde.
Everything works now but it seems very dirty to me. Is this a good way to do that ? I am not used to configure pipewire as it was already installed on my previous distro.
Thank you for your help.
6
u/OptimalMain Mar 31 '26
Having KDE autostart the file on login is totally fine.
3
u/TheShredder9 Mar 31 '26
It's perfectly fine to have your DE/WM autostart handle things!
I had issues on Alpine where (my only explanation) i had a super slow wifi card on my laptop and it would always fail to connect because the interface was DOWN according to
ip awhen DHCP was supposed to get an IP, and once it fails it doesn't try again. So i used thelocalOpenRC service to run the command needed to bring the interface UP, start wpa-supplicant to get my network, and only then get an IP with DHCP, and i ditched thenetworkingservice entirely.It was dirty, but a perfectly valid way to do it since no other way was working.
2
u/lukeflo-void Mar 31 '26
If I'm right, its not only good practice but even necessary since pipewire needs a running dbus session. And because runit can't handle deps (dbus -> pipewire), autostarting it with the DE/WM is the way to go.
I do autostart it with a custom desktop entry from the autostart dir as well for niri WM
2
u/Error_7- Mar 31 '26
i used kde's autostart in its settings. worked perfectly
2
u/TechEnjoyer44 Apr 01 '26
Using your DE's autostart feature is fine.
I use a user service and the content of
~/service/pipewire/runis justexport XDG_RUNTIME_DIR=/run/user/$(id -u) pipewire 2>&1Probably overkill but this way I can switch DE and I don't have to do it again, and I wanted all my "user services" in the same place.
1
u/orahcio Mar 31 '26
If you want to manage pipewire as a user service, you need to use turnstile (see user services section on void manual). There is an example of runit pipewire service on /usr/share/examples/sv/pipewire. But the idea was very good, to use KDE autostart to manage pipewire
1
u/Nurtyll Apr 01 '26
As the others said, autostarting Pipewire with kde autostart is perfectly fine! This recommondation is also in the official docs:
See here: https://docs.voidlinux.org/config/media/pipewire.html#launching-automatically
1
u/bankroll5441 Apr 01 '26
I start pipewire in KDE pretty much the same way. KDE runs a script with just
pipewirein it when I log in. Never had any issues. On my Niri laptops it's set up the same way, the WM starts it for me. Nothing wrong or dirty about it1
u/MinguaDinja Apr 01 '26
There is a easier way to configure everything, just follow the command lines:
# sudo xbps-install -S pipewire wireplumber libspa-bluetooth# sudo mkdir -p /etc/pipewire/pipewire.conf.d# sudo ln -s /usr/share/examples/wireplumber/10-wireplumber.conf /etc/pipewire/pipewire.conf.d/# mkdir -p /etc/pipewire/pipewire.conf.d# sudo ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf /etc/pipewire/pipewire.conf.d/Following this everything just works fine for me and if pulse-audio interface doesnt appear, just put a start script on the interface you have.
1
u/C0rn3j Apr 03 '26
Why not use the systemd user unit?