0

[The answer to this has been accepted as a thank-you to the person who put so much effort into helping with the debugging. Do not search it looking for clear answers, there are none. I brought the headset back to the store, and it just worked. Like magic. I still don't know why. I went back because we concluded that the problem -might- not be ubuntu at all. We were at the point of challenging -all- our assumptions.]

There are many suggested solutions to this on many pages. I have been trying many of them. so far, no dice. ..ask me what you need to know..

I am using a head-set with attached microphone.

[Edit:]

Further exploration has shown that the "solutions" I have tried have made the problem dramatically worse. I now have no sound on the computer at all. I expect solving this problem will require querying the computer for it's state, re-installing critical programs, etc.

This is: Ubuntu 20.04.6 LTS, Dell Latitude e7450.

Ok, I've re-installed pulseaudio, have sound back. good.

..This is web-skype, by the way, not sure if that makes any difference..

pavucontrol seems to recognize the headset microphone.. pulsemixer does not seem to.

enter image description here

enter image description here

enter image description here

The first method here does not seem to work. Speeking louder seems to make little difference. The second method also records nothing. The output of the third message is as follows:

(base) eriadar@eriadar-Latitude-E7440:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC3226 Analog [ALC3226 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
(base) eriadar@eriadar-Latitude-E7440:~$ arecord -d 5 test-mic.wav       && aplay test-mic.wav && rm test-mic.wav
Recording WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Playing WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

It appears that no audio has been recorded.

..I have now updated and upgraded my system. ..It's interesting that in pavucontrol, it appears to be recording, but when I speak louder, it doesn't respond to that.

Tried the accepted answer here, no dice. Tried pulseaudio -k, no change.

I have tried to implement this answer, but it isn't clear, to me, how to use kernel.org.

[Further edits:]

Output of parec: (that was entertaining, and a little nerve-wracking, along with a series of audio blips)

enter image description here

"Haven't you said the mic was working after pulseaudio reinstallation?"

I'm not clear on this. -Something- is happening, the indicator goes up and down, the way it would for back-ground ambient sound, but when I speak, or speak loudly, it does not respond the way one would expect.

"unless you messed with some files already, which is a big no-no (anything outside /home, /etc and /usr/local is distro territory and should never be modified manually)"

I've messed with /home/.config/pulse, that's it, in terms of going into the file structure in a file-manager and modifying it. And those files seem to all be there again. As for the tom-foolery I may have done with the command-line, I won't risk my reputation with that. I -probably- didn't do anything that came with warnings all over it.

(base) eriadar@eriadar-Latitude-E7440:~$ sudo debsums --all -- changed | tee debsums-changed.log
/usr/share/applications/chromium-browser.desktop
/etc/gnome/defaults.list
/usr/share/applications/org.gnome.Evince.desktop
/usr/share/applications/org.gnome.FileRoller.desktop
/usr/share/applications/org.gnome.gedit.desktop
/usr/share/applications/org.gnome.Terminal.desktop
/usr/share/applications/org.gnome.Nautilus.desktop
/etc/vsftpd.conf

I don't personally see anything audio related in there.

[Third(?) Edits:]

"The mess in your terminal is caused by parec sending the data to stdout if no file name is provided. Also one must run it as parecord apparently so it can automatically convert to the specified file type:"

..I feel I could have figured this out. ..it's a measure of how tired I was that I didn't try.

Tried this: parecord mic-capture.wav, it recorded static. I moved the files around basically as you suggested. Not it doesn't record anything at all, even once the files are put back. One fresh cookie got over-written, that might be the problem.

^C(base) eriadar@eriadar-Latitude-E7440:~$ pulseaudio -k
(base) eriadar@eriadar-Latitude-E7440:~$ pactl exit
(base) eriadar@eriadar-Latitude-E7440:~$ echo quit | pacmd
Unknown command: quit
(base) eriadar@eriadar-Latitude-E7440:~$ parecord mic-capture.wav

Audio file still empty.

(base) eriadar@eriadar-Latitude-E7440:~$ sudo debsums --all --changed | tee debsums-changed.log
/usr/share/applications/chromium-browser.desktop
/etc/gnome/defaults.list
/usr/share/applications/org.gnome.Evince.desktop
/usr/share/applications/org.gnome.FileRoller.desktop
/usr/share/applications/org.gnome.gedit.desktop
/usr/share/applications/org.gnome.Terminal.desktop
/usr/share/applications/org.gnome.Nautilus.desktop
/etc/vsftpd.conf
(base) eriadar@eriadar-Latitude-E7440:~$ 

[Further edits..]

Yes, definitely empty. enter image description here

pactl list sources

Is much more interesting, and much longer. Will include it as several screen-shots (notice the deliberate overlap in the second two:

pactl output 1 pactl output 2 pactl output 3

So, apparently, -something- -does- actually see the headphone mike.. so we're getting somewhere..

(base) eriadar@eriadar-Latitude-E7440:~$ pactl get-default-source
No valid command specified.
(base) eriadar@eriadar-Latitude-E7440:~$ 

..oops.. ..feeling -some- motivation to track down what the correct command is..

[edited by @PeeWee]: (I think, for the time being it might be best if I edit your question in place, see my last comment below my answer)

That command does work in Ubuntu 24.04, so there might not be an equivalent in 20.04. I believe pacmd supports more commands but has different syntax IIRC; it does support interactive mode though, by running it without arguments you can "explore". [/edit]

juggler
  • 117

1 Answers1

1

Check pulseaudio configuration (pavucontrol, pulsemixer) would be my first suggestion. The profile for your device should be set to something with "Duplex" (as in simultaneous playback and recording) in its name, e.g. "Analog Stereo Duplex".

Also Chromium is a snap and the confinement might be too strict, snap connect chromium:audio-record comes to mind.

But unless you go into more details as to what you have actually tried with what result, there is not much anybody can do to help you. If you reply to this that you have tried my suggestions already that's entirely on you.

EDIT (to address recent changes in OP): The screenshots of pulsemixer and pavucontrol do show the same state, it is just that pulsemixer deems it sufficient to only name the active device ("Builtin Analog Stereo") which is the default source (note the '*' in front of the name). Also the level meters of pavucontrol and Sound Settings do suggest that there is an actual input signal, possibly your breathing into the mic; try speaking into the mic and watch the bar move (i.e. Sound Settings>Input>"Headset Microphone Built-in Audio": the bars below show the current recording signal level).

So the recording in your test is the problem. Try using parec which is the Pulseaudio analogue of arecord. One should never use alsa tools when pulseaudio is running, because the latter might have an exclusive lock on the device or redirect the stream so it does not go where one would expect.

But, before I go on and on, to clarify: Haven't you said the mic was working after pulseaudio reinstallation? Because if so, your further testing might only lead down the wrong path again. Take the win. ;-) I also speak from experience when I tell you that sometimes it is better to let it lie for a while and come back with a fresh head. You wouldn't believe the levels of frustration I went through only to later find out I was my own biggest obstacle, obscuring the forest behind the trees so to speak.

EDIT2: About that kernel.org procedure: that should not be necessary, unless you messed with some files already, which is a big no-no (anything outside /home, /etc and /usr/local is distro territory and should never be modified manually). But then the correct way of fixing this would be to use debsums:

$ sudo apt install debsums
$ sudo debsums --all --changed | tee debsums-changed.log

And if it finds some differences in the checksums of files which are not for the user to change just reinstall the corresponding package:

$ sudo apt reinstall <broken-package> ...

One word of caution debsum --all also checks if config files are different form the vendor versions which is not technically an error, so don't just reintall because you have changed some config in /etc, but do check if it ever so remotely related to audio. If you then want to reinstall the original version you need to move the config file out of the way, otherwise apt will not overwrite it (all other files outside /etc, i.e. in /usr/bin are fair game for apt though, so DO NOT delete any files outside of /etc; just run reinstall and double check with debsums).

EDIT3:

Output of parec: (that was entertaining, and a little nerve-wracking, along with a series of audio blips)

The mess in your terminal is caused by parec sending the data to stdout if no file name is provided. Also one must run it as parecord apparently so it can automatically convert to the specified file type:

parecord mic-capture.wav

That should give you a valid WAV formatted audio file that you can play back. Sorry for the inconvenience, but I rarely use these tools myself; do check parecord(1) manual page.

I've messed with /home/.config/pulse, that's it, in terms of going into the file structure in a file-manager and modifying it. And those files seem to all be there again.

You might want to move that out of the way temporarily to see if those settings are responsible, i.e.:

mv ~/.config/pulse{,.bak}

Also need to "restart" (stop rather) pulseaudio; it should reactivate automatically when a program tries to communicate with it:

pulseaudio -k
pactl exit
echo quit | pacmd

I think one of the above should be the correct command to that end; I am running 24.04 and am using pipewire, so there is no easy way for me to test this and it's been a while since I last needed those, sorry.

sudo debsums --all -- changed | tee debsums-changed.log

There seems to be an important typo here; it's '--changed', no space because it's an option and important in this context, so as to only show packages that have actual differences to the vendor version. " Tried this: parecord mic-capture.wav, it recorded static. I moved the files around basically as you suggested. Not it doesn't record anything at all, even once the files are put back. One fresh cookie got over-written, that might be the problem.

(base) eriadar@eriadar-Latitude-E7440:~$ pulseaudio -k
(base) eriadar@eriadar-Latitude-E7440:~$ pactl exit
(base) eriadar@eriadar-Latitude-E7440:~$ echo quit | pacmd
Unknown command: quit

Audiofile still empty. "

Is it really empty or does it contain static? There's a difference. It is also important that any change to ~/.config/pulse is followed by a restart of pulseaudio (pactl exit), otherwise you are working in a stale state. You should also check the default source again.

pactl list sources
pactl get-default-source