How to set up Wireplumber to default to 5.1 Surround Sound?

Been struggling with this for about half a day. Trying to get 5.1 Surround Sound to survive a reboot. So I don't need to swtich to desktop on every boot to go from stereo to 5.1
https://wiki.archlinux.org/title/WirePlumber
This should be what I need but would need to migrate the format as it mentions and struggling with that.
https://blog.zenlinux.com/2022/08/how-to-configure-audio-device-priorities-in-pipewire-wireplumber/
ZenLinux BlogScott
Doing my part to make a ripple in the pond.
Solution
I got it working..... Basically what we were trying to do earlier. We just were not doing it correctly.

You don't need to use sudo for any of this.

pactl list

You are looking for the name and output you want to use. Change yours to whatever you need them to be. I will just list what I need to use.

Name: alsa_card.pci-0000_09_00.1
output:hdmi-surround-extra3

nano ~/.config/systemd/user/set-surround.service

[Unit]
Description=Set Sink in PipeWire (user session)

[Service]
Type=oneshot
ExecStart=sh -c "sleep 30; /usr/bin/pactl set-card-profile alsa_card.pci-0000_09_00.1 output:hdmi-surround-extra3"

[Install]
WantedBy=default.target

systemctl --user daemon-reload
systemctl --user enable set-surround.service
systemctl --user start set-surround.service

On boot it will wait 30 seconds and switch the audio sink.
Was this page helpful?