disable pulseaudio with systemd
Many know that
pulseaudio --kill does not always work. Sometimes, the solution is to add
autospawn=no to the
client.conf in the system's or user's configuration. Recently, I found that SystemD adds another layer of WTF, and would like to share how I solved it.
Search for this file in pacman's list of packages
pacman -F pulseaudio.service
The files belong to pulseaudio
extra/pulseaudio 15.0-4 [installed: 16.1-1]
See if there are more files related to pulseaudio
There are 3 annoying files
ls -l /usr/lib/systemd/user/pulse*
One would expect that disabling the services would remedy the situation... comes in SystemD WTF (it won't).
This /should/ disable pulseaudio for the user
systemctl --user disable pulseaudio.socket pulseaudio.service pulseaudio-x11.service
After reboot, pulseaudio keeps starting (mostly because of SystemD's
sound.target; I care not). Therefore, a workaround is to rename the freaking services (each upgrade to
pulseaudio will need to be ammended):
Rename SystemD's files
for i in ls /usr/lib/systemd/user/pulse*; do mv "$i" "$i".bak; done
Better alternatives are appreciated.