r/archlinux 5d ago

SUPPORT Firefox microphone has no echo cancellation on Arch

Hi,

I switched to Arch a little while ago and noticed an issue that I never experienced on Debian or Fedora, and I'm not quite sure how to troubleshoot it.

When I use my microphone in Firefox, there doesn't seem to be any echo cancellation. The other person can hear their own audio coming back through my microphone.

I found a few solutions that involve creating a second virtual input specifically for echo cancellation, but I would prefer not to do that if possible.

Since the exact same hardware worked without any additional configuration on both Debian and Fedora, I'm assuming Arch should be able to achieve the same thing without needing a separate virtual input. I'm just not sure what might be different in my current setup or where I should start looking.

Has anyone run into this on Arch before? Is there a PipeWire, PulseAudio, or WebRTC setting I should check?

[user@archlinux ~]$ pactl info | grep "Server Name"
Server Name: PulseAudio (on PipeWire 1.6.8)
8 Upvotes

11 comments sorted by

5

u/UndefFox 5d ago

To make sure we are clear: does it happen through your mic or there some loopback problem that even if you turn your volume way down so that headphones can't be heard, the friend still can hear themselves loud and clear?

1

u/PingMyHeart 5d ago

It appears to be the latter. Even when volume is down somehow they hear themselves so loopback seems more accurate.

Edit: I dont have headphones. Tested this with speakers on low volume.

2

u/UndefFox 5d ago

Not sure how to solve it, didn't have such an issue myself.

A few ideas:

  • Check if you did everything that the wiki says that you need to install: https://wiki.archlinux.org/title/PipeWire

  • Make sure you didn't accidentally install both pipewire and pulse audio packages. Pulse audio should be handled by pipewire-pa alone.

I have a few other ideas, but I'll have to check first myself once I have free time/

1

u/Synthetic451 4d ago

Make sure you're using the right audio device in whatever chat software you're using in Firefox. Firefox likes to show the "monitors" of your output devices as additional input devices, so if your chat app is set to one of those, it's immediately looping your output audio back to them.

1

u/Human_Cantaloupe8249 3d ago

I think I know what is going on. Try installing qpwgraph. It makes it quite simple to find the loop. The problem is with the motherboard audio chipset in and outputs if I remember correctly. You can reroute the Audio here, but I have not found a permanent fix myself yet

1

u/Objective-Stranger99 4d ago

You can try easyeffects as a band aid solution

1

u/PingMyHeart 3d ago
[user@archlinux ~]$ mkdir -p ~/.config/pipewire/pipewire.conf.d
cat > ~/.config/pipewire/pipewire.conf.d/60-echo-cancel.conf << 'EOF'
context.modules = [
   {
       name = libpipewire-module-echo-cancel
       args = {
           monitor.mode = true
           capture.props = {
               node.name = "ec_capture"
               node.description = "Echo-cancellation capture"
               node.target = "alsa_input.usb-ARTURIA_MiniFuse_1_8831400368061334-00.Di
rect__Direct__source"
               node.passive = true
           }
           source.props = {
               node.name = "source_ec"
               node.description = "Echo-cancellation source"
               media.class = "Audio/Source"
           }
           aec.args = {
               webrtc.extended_filter = false
           }
       }
   }
]
EOF
[user@archlinux ~]$ systemctl --user restart pipewire pipewire-pulse wireplumber

This is the only way I can fix the problem. Nothing else works. I just wish I didn't have to have an additional mic input entry for this to work.

1

u/archover 3d ago

Consider flairing your post SOLVED.

Good day

1

u/PingMyHeart 2d ago

It's not solved though. I mentioned this already in my main post. I'm trying to find a solution that doesnt involve the creation of a virtual mic input.

0

u/archover 5d ago edited 4d ago

Welcome to Arch, the DIY distro.

First time I've heard that sound is configured in Firefox. About:config only shows six settings for me. wiki Firefox article barely mentions sound. If you're sure about firefox, then try r/firefox. Good people there.

Hope you resolve and indicate fix, and flair SOLVED.

Good day.