You are not logged in.
Hello,
I have a very simple script that sets up some virtual audio devices so that I can play sound (from syrinscape) and mix in my microphone to use as a send for running tabletop games over video chat.
Yesterday, it just stopped working out of the blue -- I've checked and read what feels like every post in the first few pages of the google search results for pulseaudio loopback problems, and nobody seems to be having this issue.
When I
pactl load-module module-loopback
in the terminal, it just hangs for a long time, and then eventually dies with a timeout error.
$ time pactl load-module module-loopback
Failure: Timeout
real 0m30.035s
user 0m0.000s
sys 0m0.003s
Here's the script:
#!/usr/bin/env bash
MICROPHONE='alsa_input.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo'
SPEAKERS='alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo'
# Everything but the mic goes in here
pactl load-module module-null-sink sink_name='virtual0' sink_properties=device.description='mix:receive'
# Microphone goes in here
pactl load-module module-null-sink sink_name='virtual1' sink_properties=device.description='mix:receive+mic'
pactl load-module module-loopback source=${MICROPHONE} sink=virtual1
# So does everything connected to mix:receive
pactl load-module module-loopback source=virtual0.monitor sink=virtual1
# Monitor for everything but the mic
pactl load-module module-null-sink sink_name='virtual2' sink_properties=device.description='mix:send-mic'
pactl load-module module-loopback source=virtual0.monitor sink=virtual2
pactl load-module module-loopback source=virtual2.monitor sink=${SPEAKERS}
# The real output
pactl load-module module-null-sink sink_name='virtual3' sink_properties=device.description='mix:send'
pactl load-module module-loopback source=virtual1.monitor sink=virtual3
I feel like I'm going crazy, according to the docs this is exactly what needs to be done to set up this kind of audio mix, and it *used* to work perfectly! Can anyone shed any light on this? Does this script work for you?
I am using pipewire and pipewire-pulse and have been for some time
$ pacman -Q pipewire pipewire-pulse
pipewire 1:0.3.24-1
pipewire-pulse 1:0.3.24-1
I have not touched anything in /etc/pipewire, and there are no pacnew files there to be merged. It just... stopped working q_q
Offline
Quick update: it's pipewire. Loopback is utterly broken in pipewire, and it has been broken in different ways for the last six or seven minor version releases. I found multiple bug reports on the pipewire gitlab.
The last working version of pipewire seems to be 0.3.18
Unfortunately, gnome now depends on a broken version of pipewire, so I would need to downgrade dozens and dozens of packages manually to restore things to a working order. I guess I shouldn't have updated ANYTHING when I had sound working ;_;
Here's hoping the pipewire folks fix this in the near future!
Offline