61

When I'm speaking with my internal microphone and I connect my headset, it's not detecting the microphone on it. Thing that does not happen in Windows, also didn't happen in Ubuntu 18.04

Any suggestion to fix it?

Salram
  • 723
  • 1
    I seem to be able to detect the headset mic into "pavucontrol". I see sound captured, but the device is shown as "Headset Stereo Microphone (unplugged)". This device do not appear in the sounds parameter, but only in pavucontrol. That's a first step but I don't know how to fix from there. This answer sounds interesting: https://askubuntu.com/questions/1243768/ubuntu-20-04-lenovo-ideapad-microphone-not-working – Eric Burel Sep 16 '21 at 20:20
  • 1
    I've found a ticket in PulseAudio tracker with a similar behaviour: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/941 – Eric Burel Sep 16 '21 at 20:48
  • 2
    @EricBurel You should have started your own question and ran the bounty from there. It is hard to help if we cannot see output from your machine.. Try unplugging /replugging 10 /15 times and see if any of them give a different result. What does the command pactl list sources give? – Nate T Sep 19 '21 at 07:38
  • Ah sorry, that's because it's most probably the same bug under the hood that I encounter and some answers are just palliatives to an underlying bug. – Eric Burel Sep 20 '21 at 08:44
  • any chance that this question will be solved? I have the same problem with Asus ux501 and it looks like I'm not the only one with this problem. – Greg G Nov 09 '21 at 22:06

9 Answers9

48

So, trying various stuff I am not sure which step was effective. Ubuntu 20.0.4 using Cinnamon (no Gnome/KDE) on Dell XPS 9340:

  1. rm -rf ~/.config/pulse/
  2. Log out
  3. Log back in
  4. go to desktop settings/'sound'
  5. insert headphones
  6. Go to 'input' section
  7. Do microphone audio test on each available device

Headphones start working...

jmkite
  • 604
  • 2
    worked for me on Ubuntu 20.04 GNOME. – Gursharan Singh Aug 06 '20 at 16:11
  • 1
    I confirm, this worked on Lubuntu 20.04 – Sergio Sep 05 '20 at 13:16
  • 1
    This worked for me on Kubuntu 20.10 – jenda Nov 11 '20 at 22:13
  • 7
    This worked for me. But a safer thing to do will be to move it to another directory say you run sudo mv pulse pulse_old . Then you restart your machine. If everything works fine, you can delete that pulse_old directory. – Promise Preston Nov 20 '20 at 11:46
  • 3
    while this may work, I don't want to log out every time my microphone isn't working. – bmaupin Nov 26 '20 at 16:59
  • This didn't work for my Sennheiser BT headset. However I was never able to use its mic yet. – Eugene Gr. Philippov Dec 07 '20 at 06:05
  • For my BT headset problems, there is a bug (at some ubuntus/hardware fixed, at some not, as of Dec 7, 2020) referenced from https://askubuntu.com/questions/1265894/bluetooth-headset-problem-ubuntu-20-04-intel-nuc10i5fnh4-when-switching-to-hs#comment2164559_1265894 – Eugene Gr. Philippov Dec 07 '20 at 07:27
  • This doesn't work for me my laptop model is asuspro – Mahsa Dec 07 '20 at 08:16
  • not working for me on Ubuntu 20.10 :( $ cat /proc/asound/card*/codec* | grep Codec Codec: Realtek ALC295 Codec: Intel Icelake HDMI any hints what could I try? It is not working neither in USB live session... I've unresolved Q here https://askubuntu.com/questions/1305942/external-headset-microphone-not-working-on-ubuntu-20-10-not-even-wired-cable-h – crysman Jan 20 '21 at 12:41
  • This is not working on Ubuntu 18.04. The Sound settings is detecting my headphone but Chrome cannot. It does not allow me to use my microphone on Google Meet or any other website despite me giving it access to. – Anshuman Kumar Jan 21 '21 at 08:36
  • @bmaupin Shouldn't be necessary to log out, actually. If you rename the pulse directory, it'll be recreated when you open an app like OBS Studio. – user2225804 Feb 07 '21 at 01:29
  • 12
    pulseaudio -k && sudo alsa force-reload would also do instead of log in & log out. – Mike666 Feb 25 '21 at 13:48
  • 1
    Not working in Ubuntu 20.04 – vineeshvs Apr 28 '21 at 13:41
  • 1
    Not working for me :/ headset mic is working fine on my laptop with Ubuntu 20, but not my tower – Eric Burel Sep 08 '21 at 18:52
  • worked on msi laptop – Sarath Ak Oct 25 '21 at 03:45
  • 1
    It did not work for me on Ubuntu 20.04. – Antonio Sesto Feb 25 '22 at 06:59
30

So after having this issue with beautiful, but already annoying, 20.04, I found a solution in another post at SuperUser. In my case what helped me was:

  1. Use the following command to get the Audio Codec for your machine's model:

    cat /proc/asound/card*/codec* | grep Codec
    

    In my case I saw the following audio and video codecs:

    Codec: Realtek ALC233
    Codec: Nvidia GPU 94 HDMI/DP
    
  2. Go to www.kernel.org, look up the version of the codec, and get the full name of it. In my case, for Realtek ALC233 it's alc233-eapd.

  3. Create/update the /etc/modprobe.d/alsa-base.conf file, and add this line, replacing the model with your own:

    options snd-hda-intel model=alc233-eapd
    
  4. Reboot the machine.

Yurii S
  • 401
  • 1
    Wait, what exactly am I looking up on kernel.org? My codec is "Realtek ALC298", what am I looking for and where? – Jack M Sep 15 '20 at 13:45
  • 1
    In the case of 'Realtek ALC298', it seems that the codec would be either alc298-dell1, or alc298-dell-aio. Just do a global search on that page for 'Realtek ALC298', and you'll see. – Yurii S Sep 16 '20 at 16:18
  • Mine is ALC289, and there is no one in kernel.org with this model. I'm trying the closest one, to see if it works. will keep you updated. Thank you! – Kostanos Nov 12 '20 at 07:37
  • I really want to upvote this answer; now every time I plug in my headset I get a popup asking me to choose headphones or headset as a source, but clicking Headset doesn't actually set my input device and I still have to do it manually: https://askubuntu.com/q/1294950/18665 – bmaupin Nov 26 '20 at 16:56
  • @Kostanos there is one. It has ALC28x for your codec, look up ALC22x/23x/25x/269/27x/28x/29x. – Eugene Gr. Philippov Dec 07 '20 at 06:10
  • not working for Ubuntu 20.10 with Realtek ALC295 on ACER SPIN 5 :( – crysman Jan 20 '21 at 13:19
  • https://www.thomasventurini.com/articles/fix-missing-audio-input-device-in-ubuntu/ – sancho.s ReinstateMonicaCellio May 09 '21 at 05:40
  • 1
    You saved me :)) Thanks. – Cherik Jun 04 '21 at 14:10
  • Not working for me either with Realtek ALC233 – Eric Burel Sep 08 '21 at 18:52
  • @YuriiS This worked for me. I don't understand why this configuration needs to be added though. If the proper codec is in /proc/asound/card/codec, doesn't it mean that the kernel properly recognized the device? – AFP_555 Jun 13 '23 at 16:16
14

What fixed this for me was running pulseaudio -k in Terminal.

4

I am using Ubuntu 20.04 on my Sony Vaio VPCEH28FN with intel-hda-sound card. Output of cat /proc/asound/card*/codec* | grep Codec is Codec: Conexant CX20590 Codec: Nvidia GPU 1c HDMI/DP .

What worked for me was --

  1. I did sudo apt install alsa-tools-gui on my terminal.
  2. Then I ran the command hdajackretask on my terminal.
  3. Then selected Conexant CX20590 -- Red Mic--> Tick Override; from the dropdown select Microphone.
  4. Then selected "Install Boot override" and entered sudo password.
  5. I then restarted my pc and thankfully it worked !! My config on hdajackretask
  6. Also, I remember adding the line "options snd-hda-intel model=laptop" to the file "/etc/modprobe.d/alsa-base.conf" .
3

My laptop is ACER E5-573G-74Q5. My codec is Realtek ALC255.

I did Yurii S’s solution, but it didn’t work. Then Soundar gave me the idea of putting more than one codec in /etc/modprobe.d/alsa-base.conf, where I added the following line:

options snd-hda-intel model=alc255-acer,dell-headset-multi

Putting just one or the other didn't work, but putting both worked. Strange, but putting Dell codec on my Acer worked.

Zanna
  • 70,465
  • It worked for me too (acer swift SF 314-42), but sound from mic is pretty low quality with lots of background noise. Moreover, I cannot register and play the sound correctly on Audacity :/ – Videophysique Mar 05 '21 at 23:03
2

I have Dell Inspiron E7250 with PopOS 20.04 installed. I had same problem and it got resolved after adding following lines to /etc/modprobe.d/alsa-base.conf and rebooting.

options snd-hda-intel position fix=1
options snd-hda-intel index=0 model=dell-headset-multi,dell-e7x

Following is codec available in laptop

# cat /proc/asound/card*/codec* | grep Codec
Codec: Intel Broadwell HDMI
Codec: Realtek ALC3235
Soundar
  • 21
  • 1
    Please, @soundar, where have you found out exact model to put into alsa-base.conf? I'd like to try your solution.... I have this cat /proc/asound/card*/codec* | grep Codec Codec: Realtek ALC295 Codec: Intel Icelake HDMI - – crysman Jan 20 '21 at 13:18
  • This worked perfectly for me after trying other answers. – Steven Oct 09 '21 at 07:13
1

Install the alsa-tools-gui package:

sudo apt install alsa-tools-gui

Then run:

hdajackretask

Select the appropriate sound card up top in Select a codec, then make the Black Mic (headphone jack) override, and set to Not connected

In the lower right corner, select Install boot override.

Reboot and pray.

(Worked for me.)

Zanna
  • 70,465
advance512
  • 196
  • 5
1

This answer is to a question provided via a separate user's bounty of this question. As the question will disappear along with the bounty, I will include it, word for word, below, in hopes that it can be somewhat useful to users in the future.

On my computer, the microphone sound is correctly detected in pavucontrol, but it's marked as unplugged and not present in audio parameters. I tried this: wiki.archlinux.org/title/PulseAudio/… but Alsamixer interface is obscure. Provided answers do not fix my issue. Any hing how to progress on this? What's the respective roles of pulseaudio, pavucontrol, alsamixer?

-Eric Burel

As for the answer,

I do not believe that alsa is your problem. Alsa is a driver database (among other things) whose job it is to connect your hardware with the proper "sound card" which actually refers to, again, a driver that provides access to that hardware (the physical sound card for which the alsa "sound card" is an abstraction.) It is more or less responsible for getting your hardware properly mapped into udev. As I said, there are other features, i.e the ins / outs, etc., but these mostly facilitate the main duties listed above.

You can check pactl list cards to be sure, but I guarantee that your device is linked to a driver. Otherwise Pulseaudio would not be detecting it. This doesn't mean that it is the correct driver. You can google

<MAKE> <MODEL> Alsa driver

getting the first two from your specs, and the first few results should contain something (at least close to) official from launchpad, linux-hardware.com, etc. From there, check the link for a driver. It may be called an "audio card", "Device Driver", or similar. Once you find the recommended, check that against the results of lsmod | grep Audio. If this command gives the name of your headphones in its output then don't worry about Google. You're good.

Alternatively, when you run the command that I included in my comment, or the one from above look through the names of all the device.\* entries. Once again, if you see your device model name, you're good.

Now for pulseaudio. Since you have nowhere to post command line output, I will recommend 2 pulseaudio gui packages that will get you up and running.

The first is paprefs. This is short for Pulseaudio Preferences. This app will let you configure pa streams.

Think of a stream as a pipe, but for sound. Your mic will ideally stream audio from Alsa (Source) into the stream (Source-Input) and at the other end of the stream (Sink-Input) it will feed into its output / destination (Sink, e.g. Audacity or another audio / streaming app.)

The Four main words in parentheses above are the keywords that make up the entire pulseaudio abstraction. If you know what these are, you can configure pulseaudio from pretty much any CLI or GUI.

paprefs lets you configure streams with actions such as moving them from one sink to another, etc. In your case , (although it is hard to tell without any console output) it sounds like you may have a stream without a sink.

The other app is padevchooser. This app doesn't really help in the current situation, but it does give extra capabilities to pulseaudio. It mostly focuses on sharing streams over the internal network.

If you would rather work with the command line, you can use pacmd or pactl. Both of these use the same objects that I described above. pactl is supposed to be a front-end for pacmd, but in my experience, they are pretty much the same save for slightly different syntax and the fact that pacmd can do a few things that pactl cannot.

If you can provide a venue to post the output to pactl list cards, pactl list sources, and pactl list sink-inputs, I can walk you through the process. However, without a way to tell what the issue is, I can only give you the tools.

man pactl and man pacmd will have all of the commands you need. These commands are well named, so you will know what each does immediately. Not much reading involved.

Nate T
  • 1,524
  • @EricBurel answer added. Let me know if you have any questions. If pactl list sources has a source for your mic, then your issue is not alsa. – Nate T Sep 19 '21 at 21:09
  • Hi, thanks for the synthetic explanation. I'll trigger the bounty before it expires if there is no other answer, because a better understanding of what happens helps greatly. – Eric Burel Sep 20 '21 at 08:48
  • 1
    You can always start a chat room to use for troubleshooting. If I could see command output, I could most likely gife you exact instructions as to how to fix it. You cn run pactl list * where * represents the four terms above. run in this order: sources source-outputs sink-inputs sinks. This is the flow of the signal. Find out where it stops, where the device is first missing from output. That is why I wanted to see the output. let me know the result. – Nate T Sep 20 '21 at 12:20
  • 1
    Device is listed in sources, in sinks, but source-outputs and sink-inputs are empty. We might follow up on this link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/941 this is the issue I've opened directly in Pulse Audio ticket tracker, because there is certainly a bug somewhere (though I cannot tell yet if Pulse Audio is directly responsible or can provide a fix even if the bug is somewhere else). Right now, I've bought a 10€ jack to USB C converter from a famous fruit-named brand to bypass the issue, works perfect. – Eric Burel Sep 21 '21 at 07:08
  • At least it works now. Thanks for the link. Ill keep my eye on the issue, as I am interested in hearing the response from pa devs. Hopefully it will contain info that I can apply to helping people here. Let me know if /when you get a response, in case I miss it. – Nate T Sep 21 '21 at 11:59
0

When I came to this question (and similar other ones), the fix was rather simple:

  1. Go to the "Sound Setting"
  2. Click on the tab "Hardware"
  3. Select the Profile "Analog Stereo Duplex" (it was "Analog Stereo Output" before").

Done.

enter image description here

Martin Thoma
  • 19,277