Output audio through multiple ports using pipewire

Is there any way to output audio through multiple ports using pipewire?

I have a laptop with a speaker and a headphone jack port, and when I connect my headphone, speaker becomes unavailable in KDE audio settings (although I can select it and it works fine, most of the times) but there is no option to output to both ports

Also I have Carla installed but it only shows one output device in patchbay.

Built-in Audio Analog Stereo
playback_FL
playback_FR

Here are my hardware/software details:

OS: Manjaro Linux x86_64 
Host: ASUS TUF Gaming F15 FX506HM_FX506HM 1.0 
Kernel: 5.15.38-1-MANJARO 
Resolution: 1920x1080 
DE: Plasma 5.24.5 
WM: KWin 
CPU: 11th Gen Intel i5-11400H (12)
GPU: NVIDIA GeForce RTX 3060 Mobile / Max-Q 
GPU: Intel TigerLake-H GT1 [UHD Graphics] 

Thanks in advance.
And thanks to the Manjaro team for this awesome distro.

Absolutely, you can use Helvum to visually wire inputs and outputs.

2 Likes

Thanks for your reply.
I actually installed Halvum and as it seems the problem persists, only one playback device (ALC256 Analog).
The other ports are for monitor and capture.
I don’t think it is a hardware problem as it’s doable on Windows with some configuration.
I wish I could send a screenshot here as it would explain things better.

Maybe a bug report to the pipewire team??

Just to be sure we know all the audio devices, drivers and if pipewire’s sound server is currently being used, you could give inxi --audio a run and paste what you see here.

While headphone is plugged in and active:

Audio:
  Device-1: Intel Tiger Lake-H HD Audio driver: snd_hda_intel
  Device-2: NVIDIA driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.15.38-1-MANJARO running: yes
  Sound Server-2: PipeWire v: 0.3.51 running: yes

Edit: Actually the output is the same regardless of if the headphone is connected/active or not.

Thanks for doing that, just figured we’d make sure. :slight_smile:

Have you tried switching from pipewire-media-session to wireplumber?

I have tried, But no result.

My thoughts at the moment is this is a driver…I don’t wanna say issue, but possibly a shortcoming. Maybe try the lastest kernel, 5.17. Can always jump right back to 5.15 if anything goes awry. I could be barking up the wrong tree.

Updated the kernel and ran the inxi --audio command:

Audio:
  Device-1: Intel Tiger Lake-H HD Audio driver: snd_hda_intel
  Device-2: NVIDIA driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.17.6-1-MANJARO running: yes
  Sound Server-2: PipeWire v: 0.3.51 running: yes

No luck unfortunately.

Just had my trust rank increase to 1 and now I can send screenshots.

Here is what’s happening inside Helvum:


Patchbay inside Carla also shows the same.

This is what I meant by KDE audio setting showing my speaker as unavailable:

You can try monitoring pipewire when you plug in your headphones to see if an error or someting indicating maybe KDE decides to destroy the sink for the speakers for some reason?

journalctl --user -u pipewire --user -u wireplumber --user -u pipewire-pulse -f

I’m a bit stumped here, so I am hoping logs will shed some light.

it’s very common that the speaker and the headphones are interlocked. this means onces the headphone-jack is connected the speaker is disconnected and vice versa to prevent too much load and a shortcut while the plug-in of the headphone-jack. this is usually a mechanical or a electronic relay. in this case it is absolutely impossible to use both outputs at the same time. solution is to use a different output as a s-pdif output or a hdmi-audio signal as second output that you drive through an external amplifier.

1 Like

Sorry to inform you but this didn’t work either

May 20 12:01:43 manjaro systemd[830]: Started PipeWire Multimedia Service.
May 20 12:01:43 manjaro systemd[830]: Started Multimedia Service Session Manager.
May 20 12:01:43 manjaro systemd[830]: Started PipeWire PulseAudio.
May 20 12:01:43 manjaro pipewire-pulse[1204]: 536870912
May 20 12:01:43 manjaro wireplumber[1197]: Failed to set scheduler settings: Operation not permitted
May 20 12:01:44 manjaro wireplumber[1197]: <WpSiAudioAdapter:0x556f1fadc0e0> Object activation aborted: proxy destroyed
May 20 12:01:44 manjaro wireplumber[1197]: <WpSiAudioAdapter:0x556f1fadc0e0> failed to activate item: Object activation aborted: proxy destroyed

Tried disconnecting and connecting the headphone… and changing the audio ports in the settings.

However I spotted a strange behavior with glava, whenever I switch to speaker while the headphone is connected, the program doesn’t detect the output
However when I disconnect it (and it automatically switches to speaker) it works fine.

On windows I tried and it’s actually possible. I could use both outputs at the same time as I tested it.
However I couldn’t use Stereo Mix to actually output one audio to both devices… but I could play different things on each one of my output devices.

Also… this isn’t my only issue with audio system in pipewire. When I switch between ports Clementine music player stops working. You can see that glava stops working too, they disconnect automatically: