How do I get PipeWire to play audio through two outputs simultaneously?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Alexander369
Posts: 2
Joined: Wed Sep 20, 2023 11:45 am

How do I get PipeWire to play audio through two outputs simultaneously?

Post by Alexander369 »

I'm running Linux Mint 21.2 64-bit.

My PC has two sets of speakers. I have an RCA TV that I'm using as a monitor, and I want to play audio from its built-in speakers. I also have a set of desktop speakers that have a volume control knob, but one of the speakers isn't working.
I want to play audio from both sets of speakers at the same time, and since one of my speaker sets has a broken speaker, I want the audio to be "mono audio" so I don't have to worry about the Left or Right audio channel being muted.

I've tried using "qpwgraph" to reroute my audio to both of my speakers. However, "qpwgraph" doesn't seem to be remembering my configuration, even after I "Save As" the configuration file. Also, even if I manually configure my audio to play through both speakers with "qpwgraph", I get this horrible desync between my two speakers creating this annoying echo effect.

From what I've read and have been told, PipeWire is supposed to be easier to use to reroute audio because all you have to do is edit .conf files in order to configure PipeWire. So, I've uninstalled PulseAudio and made sure it was replaced with PipeWire as the main sound manager. I also have PipeWire-Pulse, PipeWire-Jack, and Wireplumber installed.

Somebody recommended that I create a "virtual device" to reroute my audio through to my two speakers. They told me to follow the PipeWire GitLab Wiki. However, after following the instructions in the Wiki, PulseAudio Volume Control failed to load and my sound stopped working. Fortunately, since all the changes I made were in .conf files, I was able to undo the changes I made to those files and I got my sound back, but I still can't play audio through both of my speakers.
So, either what the Wiki is telling me isn't working, or I'm misinterpreting the Wiki's instructions. Probably the latter.

I just want to play audio from both of my speakers at the same time, and I'm having a really bad time trying to make that happen. Does anyone know where I could get some help getting my audio to work the way I want it to?

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: How do I get PipeWire to play audio through two outputs simultaneously?

Post by Impostor »

Alexander369 wrote: Wed Sep 20, 2023 2:24 pm

My PC has two sets of speakers. I have an RCA TV that I'm using as a monitor, and I want to play audio from its built-in speakers. I also have a set of desktop speakers that have a volume control knob, but one of the speakers isn't working.
I want to play audio from both sets of speakers at the same time, and since one of my speaker sets has a broken speaker, I want the audio to be "mono audio" so I don't have to worry about the Left or Right audio channel being muted.

This sounds like a good proof-of-concept for pipewire, but, if I were you I'd just get a pair of headphones :)

Alexander369
Posts: 2
Joined: Wed Sep 20, 2023 11:45 am

Re: How do I get PipeWire to play audio through two outputs simultaneously?

Post by Alexander369 »

Impostor wrote: Wed Sep 20, 2023 4:38 pm
Alexander369 wrote: Wed Sep 20, 2023 2:24 pm

My PC has two sets of speakers. I have an RCA TV that I'm using as a monitor, and I want to play audio from its built-in speakers. I also have a set of desktop speakers that have a volume control knob, but one of the speakers isn't working.
I want to play audio from both sets of speakers at the same time, and since one of my speaker sets has a broken speaker, I want the audio to be "mono audio" so I don't have to worry about the Left or Right audio channel being muted.

This sounds like a good proof-of-concept for pipewire, but, if I were you I'd just get a pair of headphones :)

I could use headphones, but A. I don't want to ware headphones. B. Using headphones is just side-stepping the problem, not actually addressing it.

User avatar
Impostor
Established Member
Posts: 1392
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 148 times
Been thanked: 366 times

Re: How do I get PipeWire to play audio through two outputs simultaneously?

Post by Impostor »

I could use headphones, but A. I don't want to ware headphones. B. Using headphones is just side-stepping the problem, not actually addressing it.

Or, A) your speaker is broken, so B) rerouting your audio to avoid it is sidestepping the actual problem, not addressing it.

But of course what is or isn't the problem is yours to determine.

User avatar
sysrqer
Established Member
Posts: 2527
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: How do I get PipeWire to play audio through two outputs simultaneously?

Post by sysrqer »

Well it sounds like you already achieved what you wanted with pipewire but you're left with two problems:

a) they are not in sync
b) the connection is not remembered

For b) I would be curious to know what version of qpwgraph you are using. I wonder if the version in mint's repo is quite old and, for some reason, the connections don't save properly because they save for me when using the latest version of it. Are sure the patchbay you saved is activated?

For a) You could check your configuration or pw-top to see if there are different settings being used but I think it's likely that it's differences on the hardware side. You could put a delay on one of the outputs to try to get them in sync but I'm not sure how successful you'll be with that.

revoxs
Established Member
Posts: 20
Joined: Sun Dec 04, 2022 11:35 am
Been thanked: 19 times

Re: How do I get PipeWire to play audio through two outputs simultaneously?

Post by revoxs »

My advice would be to always try with a live ISO first, its always good to see how far you get with a standardized fresh distro...

Linux Mint 21.2 64-bit

  • The Pipewire PPA would also be recommended for your Mint install - Pipewire is still very much in development, be sure to use the latest one

a) they are not in sync

"With PipeWire version 0.3.65, we have a native module available as well: module-combine-stream."
https://www.phoronix.com/news/PipeWire-0.3.65-Released
https://askubuntu.com/a/1460021
https://docs.pipewire.org/page_pipewire_modules.html

b) the connection is not remembered

For that, you will need a Session Manager like RaySession (also has a very nice manual), Carla, Agordejo (and thus the underlying NewSessionManager daemon, which is kind-of pushed as a new standard) or pipeswitch (simple CLI solution)

QpwGraph should also do it, but apparently, this does not always work (in the Link, there is also some advice by Rui (QpwGraph author) how to find out why it does not work by comparing the config file with Output of pw-dump ).

Post Reply