How to fix default noise when recording from built-in microphone

Hi,
Manjaro XFCE 20.2.1

https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Enable_Echo/Noise-Cancellation

Questions:
1/ why there is no default noise recording cancellation?

2/ I followed the described procedure in the afore mentionned URL
"Under Recording the input device should show Echo-Cancel Source Stream from"
I do not see “Echo-Cancel Source Stream from”

I modified as such:

1/ Echo-cancellation is usually not needed if using headphones

Some microphones have built-in echo cancellation. Adding echo-cancelling in PulseAudio would not be necessary and could be counter-productive

Some VOIP software has built-in echo cancellation, so adding another software algorithm could also be unnecessary and counter-productive

2/ Archwiki should have been more specific about adding commands to the end of /etc/pulse/default.pa

I suspect module-echo-cancel may need other modules loaded first
(module-filter-heuristics and module-filter-apply)

your screenshot does not show the end of /etc/pulse/default.pa
the final section has partial commands for default sink and source commented out

### Make some devices default
#set-default-sink output
#set-default-source input

The sinks and sources have to be loaded before setting one to be default

If you move the section you added to the end of the file the module should load correctly

use this command to get a list of loaded modules

pactl list short modules

[EDIT - final command was incorrect]

2/ Archwiki should have been more specific about adding commands to the end of /etc/pulse/default.pa

I just added at the very top.

your screenshot does not show the end of /etc/pulse/default.pa

file too long, and upload is only for images, event .txt is not accepted

[laxfc@laxfc-tosh ~]$ pactl list short sinks
0	alsa_output.pci-0000_00_1b.0.analog-stereo	module-alsa-card.c	s16le 2ch 48000Hz	SUSPENDED
[laxfc@laxfc-tosh ~]$

I moved the added command to the very end of the file, saved it.
$ pulseaudio -k
$ pulseaudio --start
Then rerun

pactl list short sinks

nearly same result, frequency change (48kHz > 44kHz):

[laxfc@laxfc-tosh ~]$ pactl list short sinks
0	alsa_output.pci-0000_00_1b.0.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
[laxfc@laxfc-tosh ~]$

apologies, I gave you wrong command to check modules

not a problem as I know what should be there
but for future reference if you need help again, copy and paste content from terminal

On manjaro you should use this command to restart PulseAudio

systemctl --user restart pulseaudio

The command pulseaudio -k should not be used because PulseAudio will respawn without the systemd pulseaudio.service, and pulseaudio.service will fail
The respawned PulseAudio will also be missing some modules
(most users will not notice the loss of network streaming or no sound for secondary logins as very few users make use of these features)

But this is also not a big problem. A system reboot will get PulseAudio restarted and running correctly

apologies, I gave you wrong command to check modules

Which one then?

I’ve rebooted, but do no see “noise-cancellation” or “echo-cancel…”

[laxfc@laxfc-tosh ~]$ pacmd
Welcome to PulseAudio 14.0! Use “help” for usage information.

list-modules
27 module(s) loaded.
index: 0
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Automatically restore the volume/mute state of devices”
module.version = “14.0”
index: 1
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Automatically restore the volume/mute/device state of streams”
module.version = “14.0”
index: 2
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Automatically restore profile of cards”
module.version = “14.0”
index: 3
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Augment the property sets of streams with additional static information”
module.version = “14.0”
index: 4
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “David Henningsson”
module.description = “Switches ports and profiles when devices are plugged/unplugged”
module.version = “14.0”
index: 5
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Detect available audio hardware and load matching drivers”
module.version = “14.0”
index: 6
name:
argument: <device_id=“0” name=“pci-0000_00_1b.0” card_name=“alsa_card.pci-0000_00_1b.0” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties=“module-udev-detect.discovered=1”>
used: 6
load once: no
properties:
module.author = “Lennart Poettering”
module.description = “ALSA Card”
module.version = “14.0”
index: 7
name:
argument: <channels=2>
used: -1
load once: yes
properties:
module.author = “David Henningsson”
module.description = “Adds JACK sink/source ports when JACK is started”
module.version = “14.0”
index: 8
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Frédéric Dalleau, Pali Rohár”
module.description = “Policy module to make using bluetooth devices out-of-the-box easier”
module.version = “14.0”
index: 9
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “João Paulo Rechi Vita”
module.description = “Detect available Bluetooth daemon and load the corresponding discovery module”
module.version = “14.0”
index: 10
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “João Paulo Rechi Vita”
module.description = “Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers”
module.version = “14.0”
index: 11
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Tanu Kaskinen”
module.description = “D-Bus interface”
module.version = “14.0”
index: 12
name:
argument: <>
used: -1
load once: no
properties:
module.author = “Lennart Poettering”
module.description = “Native protocol (UNIX sockets)”
module.version = “14.0”
index: 13
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Sylvain Baubeau”
module.description = “GSettings Adapter”
module.version = “14.0”
index: 14
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Automatically restore the default sink and source”
module.version = “14.0”
index: 15
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Colin Guthrie”
module.description = “Garde toujours au moins une destination même si elle est vide”
module.version = “14.0”
index: 16
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Automatically set device of streams based on intended roles of devices”
module.version = “14.0”
index: 17
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “When a sink/source is idle for too long, suspend it”
module.version = “14.0”
index: 18
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Create a client for each ConsoleKit session of this user”
module.version = “14.0”
index: 19
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Create a client for each login session of this user”
module.version = “14.0”
index: 20
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Position event sounds between L and R depending on the position on screen of the widget triggering them.”
module.version = “14.0”
index: 21
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Lennart Poettering”
module.description = “Mute & cork streams with certain roles while others exist”
module.version = “14.0”
index: 22
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Colin Guthrie”
module.description = “Detect when various filters are desirable”
module.version = “14.0”
index: 23
name:
argument: <>
used: -1
load once: yes
properties:
module.author = “Colin Guthrie”
module.description = “Load filter sinks automatically when needed”
module.version = “14.0”
index: 26
name:
argument: <display=:0.0 xauthority=/home/laxfc/.Xauthority>
used: -1
load once: no
properties:
module.author = “Lennart Poettering”
module.description = “X11 credential publisher”
module.version = “14.0”
index: 27
name:
argument: <display=:0.0 xauthority=/home/laxfc/.Xauthority session_manager=local/laxfc-tosh:@/tmp/.ICE-unix/873,unix/laxfc-tosh:/tmp/.ICE-unix/873>
used: -1
load once: no
properties:
module.author = “Lennart Poettering”
module.description = “X11 session management”
module.version = “14.0”
index: 28
name:
argument: <>
used: -1
load once: no
properties:
module.author = “Lennart Poettering”
module.description = “Command line interface protocol (UNIX sockets)”
module.version = “14.0”

command was edited and corrected in previous post

pactl list short modules

you could also use

pacmd dump | grep module

The command you have used is not showing module names, but there does not appear to be a description relating to echo-cancellation

[laxfc@laxfc-tosh ~]$ pactl list short modules
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
5 module-udev-detect
6 module-alsa-card device_id=“0” name=“pci-0000_00_1b.0” card_name=“alsa_card.pci-0000_00_1b.0” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties=“module-udev-detect.discovered=1”
7 module-jackdbus-detect channels=2
8 module-bluetooth-policy
9 module-bluetooth-discover
10 module-bluez5-discover
11 module-dbus-protocol
12 module-native-protocol-unix
13 module-gsettings
14 module-default-device-restore
15 module-always-sink
16 module-intended-roles
17 module-suspend-on-idle
18 module-console-kit
19 module-systemd-login
20 module-position-event-sounds
21 module-role-cork
22 module-filter-heuristics
23 module-filter-apply
26 module-x11-publish display=:0.0 xauthority=/home/laxfc/.Xauthority
27 module-x11-xsmp display=:0.0 xauthority=/home/laxfc/.Xauthority session_manager=local/laxfc-tosh:@/tmp/.ICE-unix/873,unix/laxfc-tosh:/tmp/.ICE-unix/873
28 module-cli-protocol-unix
[laxfc@laxfc-tosh ~]$

[laxfc@laxfc-tosh ~]$ pacmd dump | grep module
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-udev-detect
load-module module-alsa-card device_id=“0” name=“pci-0000_00_1b.0” card_name=“alsa_card.pci-0000_00_1b.0” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties=“module-udev-detect.discovered=1”
load-module module-jackdbus-detect channels=2
load-module module-bluetooth-policy
load-module module-bluetooth-discover
load-module module-bluez5-discover
load-module module-dbus-protocol
load-module module-native-protocol-unix
load-module module-gsettings
load-module module-default-device-restore
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-x11-publish display=:0.0 xauthority=/home/laxfc/.Xauthority
load-module module-x11-xsmp display=:0.0 xauthority=/home/laxfc/.Xauthority session_manager=local/laxfc-tosh:@/tmp/.ICE-unix/873,unix/laxfc-tosh:/tmp/.ICE-unix/873
load-module module-cli-protocol-unix
[laxfc@laxfc-tosh ~]$

There have been pamac updates including for pulseaudio, still I do not have echo cancelation.

How can I get it???

Thanks

[laxfc@laxfc-tosh ~]$ pactl list short modules

0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
5 module-udev-detect
6 module-alsa-card device_id=“0” name=“pci-0000_00_1b.0” card_name=“alsa_card.pci-0000_00_1b.0” namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties=“module-udev-detect.discovered=1”
7 module-jackdbus-detect channels=2
8 module-bluetooth-policy
9 module-bluetooth-discover
10 module-bluez5-discover
11 module-dbus-protocol
12 module-native-protocol-unix
13 module-gsettings
14 module-default-device-restore
15 module-always-sink
16 module-intended-roles
17 module-suspend-on-idle
18 module-console-kit
19 module-systemd-login
20 module-position-event-sounds
21 module-role-cork
22 module-filter-heuristics
23 module-filter-apply
26 module-x11-publish display=:0.0 xauthority=/home/laxfc/.Xauthority
27 module-x11-xsmp display=:0.0 xauthority=/home/laxfc/.Xauthority session_manager=local/laxfc-tosh:@/tmp/.ICE-unix/918,unix/laxfc-tosh:/tmp/.ICE-unix/918
[laxfc@laxfc-tosh ~]$

[laxfc@laxfc-tosh ~]$ pulseaudio --version
pulseaudio 14.1
[laxfc@laxfc-tosh ~]$

I suggest you check if there were any error messages if system failed to load the module

systemctl --user status pulseaudio.service

one of the parameters for loading this module may not be right for your system

maybe you need to configure module to use analog gain control instead of digital
aec_args="analog_gain_control=1\ digital_gain_control=0"

or try aec_method=speex instead of webrtc

[laxfc@laxfc-tosh ~]$ systemctl status pulseaudio.service
Unit pulseaudio.service could not be found.

The issue being: I don’t know what I’m doing or should do in the present matter

maybe I ought to pamac install some pulseaudio modules

command i suggested in previous post was not correct

systemctl --user status pulseaudio.service

[laxfc@laxfc-tosh ~]$ systemctl --user status pulseaudio.service
● pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2021-01-15 15:15:22 CET; 2h 52min ago
TriggeredBy: ● pulseaudio.socket
Main PID: 1028 (pulseaudio)
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/pulseaudio.service
├─1028 /usr/bin/pulseaudio --daemonize=no --log-target=journal
└─1039 /usr/lib/pulse/gsettings-helper

jan 15 15:15:47 laxfc-tosh pulseaudio[1028]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote applicati>
jan 15 18:00:32 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:00:35 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:00:37 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:00:48 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:01:28 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:01:35 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:01:35 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:01:41 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
jan 15 18:01:42 laxfc-tosh pulseaudio[1028]: The ‘master’ module argument is deprecated and may be removed in the future, please use the ‘sink_master’ argument instead.
lines 1-19/19 (END)

I suggest you edit your /etc/pulse/default.pa file and remove the use_master_format=1 option from load-module module-echo-cancel

Then restart system and check if module is loading and error-free