USB webcam microphone not working
Based on the output of pacmd list-sources
, all of your microphones are suspended for being idle (which makes sense). What I have found with some USB-connected devices is that once the microphone is set to SUSPENDED
they never come back. There are generally two solutions for this problem:
- Unplug the webcam, count to five, and plug it back in.
⇢ This will cycle the USB device and generally brings all of the devices back online. - Update PulseAudio to not suspend idle audio devices.
⇢ This has generally worked well for a number of computers at work where the USB cameras cannot be physically disconnected from the computer without a sharp pair of scissors.
Modifying PulseAudio
To prevent audio devices from being suspended when idle, you will need to comment out a single line in the default.pa
file. These are the steps to follow:
-
Open Terminal (if it's not already open)
-
Open the
default.pa
file for editing asroot
:$ sudo vi /etc/pulse/default.pa
Note: Feel free to use something other than
vi
. This is more a force of habit than an implicit recommendation for which editor to use. -
Find the line that reads
load-module module-suspend-on-idle
and comment it out. This will be about 90% of the way down. Once done, the line should look like this:### Automatically suspend sinks/sources that become idle for too long # load-module module-suspend-on-idle
-
Restart PulseAudio:
$ pulseaudio -k
-
Confirm your audio devices are operational:
pacmd list-sources
Check for the USB microphone, which may be at index
0
like it is in the output you provided, and confirm the value ofstate
. It should readIDLE
. When this is being actively used by an application it will change toRUNNING
, then go back toIDLE
about 30 seconds after it is no longer in use.
Audio Confusion
One additional issue you might see is that an application may not know which microphone to use automatically and, as a result, the input selection will always be empty. To resolve this, open the PulseAudio Volume Control (pavucontrol) application and click on the "Configuration" tab. Set the output to "Analogue Stereo Output":
Why setting the output resolves an issue with input, I can only guess at. That said, this solution does work for those rare instances when the computer consistently shows no audio input device.