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?

5
  • 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: askubuntu.com/questions/1243768/…
    – Eric Burel
    Sep 16, 2021 at 20:20
  • 1
    I've found a ticket in PulseAudio tracker with a similar behaviour: gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/941
    – Eric Burel
    Sep 16, 2021 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, 2021 at 7: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, 2021 at 8: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 9, 2021 at 22:06

9 Answers 9

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...

16
  • 2
    worked for me on Ubuntu 20.04 GNOME. Aug 6, 2020 at 16:11
  • 1
    I confirm, this worked on Lubuntu 20.04
    – Sergio
    Sep 5, 2020 at 13:16
  • 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. Nov 20, 2020 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, 2020 at 16:59
  • 12
    pulseaudio -k && sudo alsa force-reload would also do instead of log in & log out.
    – Mike666
    Feb 25, 2021 at 13:48
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.

10
  • 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, 2020 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, 2020 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, 2020 at 7: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: askubuntu.com/q/1294950/18665
    – bmaupin
    Nov 26, 2020 at 16:56
  • 1
    You saved me :)) Thanks.
    – Cherik
    Jun 4, 2021 at 14:10
13

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

2
  • The same, on Zorin OS (based on ubuntu 20.4)
    – Dinari
    Oct 14, 2021 at 5:24
  • After this command, it started to showing new audio profile HSP/HFP against headset, i choose it instead of high fidelity playback (A2DP Sink)
    – Anand Jose
    Oct 26, 2021 at 5:02
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" .
2
  • worked for me, thanks a lot! Oct 12, 2021 at 17:32
  • Worked for me, thanks a lot! But I had to check "Show unconnected pins" first, and try all of them one by one. Additionally, have found similar instructions on YouTube - youtube.com/watch?v=yx33W-c4Cmg Jul 3, 2022 at 18:43
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.

1
  • 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 :/ Mar 5, 2021 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
2
  • 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, 2021 at 13:18
  • This worked perfectly for me after trying other answers.
    – Steven
    Oct 9, 2021 at 7: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.)

2
  • nope, broke the audio, too.
    – 111
    Aug 17, 2021 at 18:59
  • Thank you! this works. Mar 28, 2022 at 7:07
1
+50

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.

5
  • @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, 2021 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, 2021 at 8: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, 2021 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: 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, 2021 at 7: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, 2021 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

1
  • 3
    that's not how the sound preferences in Ubuntu 20.04 look Apr 11, 2021 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .