Score:6

How to achieve (automated) simultaneous outputs with Pipewire?

ls flag

I'd like to have my system automatically output to all available sound devices (preferably using a sink in Pulseaudio Volume Control). This was possible when using Pulseaudio alone.

Is it possible with Pipewire? If yes, how would you achieve this?
Is it possible to set this up to be available automatically?

vn flag
I believe you need to [create a combined sink](https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Virtual-devices#create-a-combined-sinksource). Also, you might be interested on [EasyEffects](https://github.com/wwmm/easyeffects)
Score:4
ls flag

I finally found the answer after reporting a bug and getting a response to my question. The solution is so amazingly simple:

Run:

pactl load-module module-combine-sink

And you get the same functionality with PipeWire.

If I'm understanding these instructions correctly, you can make this permanent by copying /usr/share/pipewire/pipewire-pulse.conf to ~/.config/pipewire/pipewire-pulse.conf and adding:

context.exec = [
    { path = "pactl"  args = "module-switch-on-connect" }
]

Then saving the file. Alternatively, you can add the first command to your startup applications.

Victor avatar
in flag
I'm doing `pactl load-module module-combine-sink` and it shows up in the output devices and the levels flicker up and down indicating there's audio piped through, but sound does not come through both outputs.
Score:1
jp flag

With PipeWire version 0.3.65, we have a native module available as well: module-combine-stream.

For the simultaneous output configuration, you'll want to use something like the following in pipewire.conf, adapted from the example in the documentation:

context.modules = [
{   name = libpipewire-module-combine-stream
    args = {
        combine.mode = sink
        node.name = "my_combined_sink"
        node.description = "My Combined Sink"
        combine.props = {
            audio.position = [ FL FR ]
        }
        stream.rules = [
            {
                matches = [
                    {
                        media.class = "Audio/Sink"
                    }
                ]
                actions = {
                    create-stream = {
                    }
                }
            }
        ]
    }
}
]

If you only want to combine specific sinks, you can of course add more entries to the matches array and specify node.name instead of matching all sinks.

If you don't know their names already, you can get all available sink names via pw-link -o.

RolandiXor avatar
ls flag
Thank you for this answer, I'll update mine to reference this one after I've tested it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.