Microphone not working: remapping source to mono is not permanent

I have a Lenovo Ideapad 330 running Ubuntu 20.10 and the microphone doesn't work.

In my research, I've found that it's very common to have mono microphone not working because the two channels are activated. So I've just deactivated the right channel on Pavucontrol and it worked like a charm. Until the microphone auto adjusts the volume. When it happens, the right channel is activated again and set to the auto adjusted level.

I've already tried some solutions to deactivate microphone auto adjusment volume (which didn't work for me), but I'm looking for keeping auto adjustment activated while the right channel is deactivated. Is it possible?

Edit:

Because of suggestions, I tried to make input source mono, instead of stereo, like in this answer. The answer suggests to use the module-remap-source command to remap one of the stereo channels to a new mono source:

M=$(pacmd list-sources | grep -P "name:.*alsa.*input" | tail -n 1 | perl -pe 's/.*<//g;s/>.*//g')
pacmd load-module module-remap-source source_name=mono master=$M master_channel_map=front-left channel_map=mono

It works, but it's temporary. In an ArchLinux troubleshooting wiki, I've found that I need to add the lines

load-module module-remap-source source_name=record_mono master=INPUT_NAME master_channel_map=front-left channel_map=mono
set-default-source record_mono

to the file /etc/pulse/default.pa, in order to make the remap permanent and also make the source default. I restart PulseAudio and it works.

The problem comes when I restart my computer: it doesn't work automatically. I have to manually restart PulseAudio to changes take effect. Well, I could put a command in crontab to make PulseAudio restart after reboot, but it seems not to be a robust idea. At this point, I'm stuck in the same problem described in this question. Both of us did a remap to make microphone mono, but it's not permanent.

4

2 Answers

You can use the pactl command in ~/.profile and just execute the remapping commands:

pactl load-module module-remap-source source_name=record_mono master=INPUT_NAME master_channel_map=front-left channel_map=mono
pactl set-default-source record_mono

If pulseaudio restarts at a later time then the string in default.pa will be loaded.

It's seems a good workaround is to add pulseaudio -k to ~/.profile, so it's executed every time I login, as said in this answer.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like