How to get the microphone working in Google+ Huddle, GoogleTalk Video Chat & Epiphany on Ubuntu 11.04 (Natty Narwhal)

If you want to skip the back story and go straight to the howto section, click here.

One would think that this would be a relatively simple task, or that logic could be used to resolve it.  Since that is not really the case, I figured I should probably document the necessary steps to prevent future hairpulling (by myself or by others in similar circumstances).  Bear in mind I love LINUX, but the primary reason I don't recommend it to just anyone is precisely due to the seemingly minor, idiotic things that should just work (and will work perfectly fine on other operating systems without any effort on the part of the computer owner) yet require hours of research and tweaking in order to accomplish.  The Oatmeal has pretty much hit the nail on the head with their cartoon "How to fix any computer" (especially the "How to fix a LINUX computer" section) .

So me being me, upon installing Ubuntu Natty Narwhal on my new laptop purchased earlier this year, the Acer Aspire Ethos 8943G I expected the majority of everything to work out of the box.  To be fair, most things did.  Wireless connectivity, check.  CAT5 network connectivity, check.  Sound, check.  Volume control mapped to physical volume wheel, check.  Keyboard hotkeys controlling brightness, etc., check.  And so on.

So shortly thereafter I had a session with friends via GoogleTalk, and attempted to use the video chat functionality as supported by the Epiphany instant message client, nobody could hear me, which was rather frustrating for everyone involved.  After an hour of tweaking the microphone using the built-in PulseAudio audio settings tool, and I finally gave up and booted to Windows 7 (I had set up a dual boot system with the apparently accurate premonition that everything might not work out of the box in Natty) and suffered with the knowledge that I had just switched to Windows due to a LINUX issue.  As I recently mentioned to a friend, it's not that Microsoft's Windows 7 is so utterly terrible; in fact it's probably one of the best releases of the Windows operating system designed by Microsoft to date.  It's the years spent fixing crap on other people's Windows computers due to poor security design and various weird issues that just doesn't make a whole lot of sense that has driven me to a LINUX system as my preferred operating system.  So running into a Windows-like issue in LINUX, resulting in my turning to Windows as a solution (however temporarily) was causing me to break out in hives.

So as things got busy I forgot about this issue, and needing to use GoogleTalk as a video conference in LINUX was not actually a big issue, and then I decided I wanted to do a presentation that recorded my entire desktop only to find that the same audio recording issue was still present.  In fact in my quest to fix the mic problem in GoogleTalk I had inadvertently broken the mic elsewhere, and couldn't for the life of me figure out how to fix it.  Sadly, I again turned to Windows in order to handle the desktop recording of my video session.  This was getting ridiculous.

Periodically I'd get a bug up my arse and spend an hour or two researching and trying to follow advice from other members in the community.  I'd manage to get something working, like Ubuntu's built in sound recorder program, but then I'd try GoogleTalk and it would fail again.  Then I joined Google+ and noticed the Huddle program, offering up to 10 users in simultaneous video chat, and figured as soon as I had some free time I really needed to give it a shot.  The problem, as I saw it, was that I had tried so many different ways to get the damn microphone working that I had lost track of all of the various changes I had made, and consequently unravelling the mess was going to take longer than just starting from scratch.

I also had a spare 60GB solid state drive that I had acquired from work (yay perks!) that was lying around unused.  I had originally intended to put it into a new server for this site, but since the motherboard does not support SATA and I'm not about to spend the $500 or so that I anticipate on a new server build, I opted to use it on the new laptop instead, especially because this particular laptop has an unused secondary hard drive bay.  A bit of searching online for a drive caddy proved fruitless, until I mentioned it in passing to my awesome wife who managed to find a vendor carrying them in the first forum she delved into on the subject.  So that has been ordered and should arrive sometime next week, which means I will be able to take the 500GB hard drive that came with this laptop and use it as storage for photos, music and video in the secondary drive bay.

With all this in mind, I opted to check out the new Ubuntu 11.10 Oneiric Ocelot on the 60GB SSD (9 second boot!), which is still in Alpha (and therefore certain things, such as the sound recorder program, were broken).  Based on the system being rendered unbootable upon installing ATI's proprietary video drivers for the laptop's Radeon HD 5850 graphics card, with my impression that either a) it's an alpha issue or b) lightdm just doesn't play well with 3d accelleration, I opted to give the last Ubuntu LTS release (10.04) a try with the result of a non-functioning CAT5 network connection, and a ridiculously convoluted series of steps necessary to get it working based on my research.  Consequently I started again with a clean install of Ubuntu 11.04 Natty (10 second boot!), which made it to the point of setting up World of Warcraft in Wine, upon which the system crashed and became unbootable with a kernel panic error during startup.  This I deemed unrepairable after a bit of research yeilded only one other sufferer of the same error who opted to reinstall LINUX rather than try to fix the problem.  Therefore I too reinstalled Ubuntu 11.04, opting to not set up a Swap partition due to the laptop having 4GB of system memory, and an additional 2GB of dedicated video memory besides.  With my friend Andy's advice I also enabled Trim for the solid state drive, and all has been well with the installation ever since.  

Now it was time to approach the hurdle of fixing the microphone problem (I'm switching to howto mode for this next part).

1) First, you will want to open the sound recorder (Click logo, type sound and press enter, or click Applications > Sound & Video > Sound Recorder) for testing purposes.  Go ahead and test the record functionality of the sound recorder.  If it works - great, move on to step three.  If not, go to the next step.

2) Next, open a terminal session (if you are using Ubuntu Unity, you can click the Ubuntu logo at the top-left corner of the screen, then type "terminal" and press enter; if you are using Ubuntu Classic, click Applications > Accessories > Terminal to open it).  Once open, type "alsamixer" at the prompt to open the mixer control panel, which should look like this:

I recommend enlarging the terminal window and pressing the F5 key so that all of the available devices can be viewed.  Now in my case, I have an internal microphone, but alsamixer detects it as CAPTURE, not MIC (I assume MIC is reserved for a microphone plugged into the microphone jack on the side of the laptop).  I was not aware of this at first so I originally unmuted MIC, which interfered with CAPTURE.  You may or may not have a device listed under CAPTURE depending on your laptop configuration, but if your laptop has Intel HDA sound controllers, there's a good chance you do.  It is also important to note that these laptops appear to have dual internal microphones for stereo sound recording, which appears to be the primary factor in causing problems, but we'll get to that momentarily.

Use the left and right arrow keys to select the device you believe is your microphone and raise the volume to 100 by pressing the up arrow key.  Press the 'm' key to unmute your device, or to mute unwanted devices, and you will see either MM for muted or 00 for unmuted.  To avoid garbage noise interference, lower Mic Boost to 0 volume using the down arrow key if it is not there already.  Also arrow over to Input Source and use the up and down arrow keys to select the appropriate one (in my case Internal Mic).

As you make these changes you will find that it is a very good idea to keep testing with Sound Recorder to determine if and when the microphone is working correctly.  Once you are satisfied with your changes you can quit out of alsamixer by pressing the Esc key.  If you would like to save your current alsamixer configuration type "sudo alsactl store 0" into the terminal, and these settings will be loaded automatically the next time you boot your computer.

If you have no intention of using Google+ Huddle, Google Talk video chat or Skype, you may stop here because all other microphone related programs such as Sound Recorder, Desktop Recorder, etc. should now work as expected.  Otherwise, proceed.

3) Now that sound recorder is working as expected, the next step is to configure GoogleTalk's chat plugin so that it does not change your audio settings automatically (thus destroying your attempts to get it working correctly in the first place).  You should already have the plugin installed (if you don't, simply sign into Google+ and click the green "Start a Hangout" button; you will then be prompted to download and install the necessary plugin - note that there will either be no activity or steady activity in the microphone indicator; this means you will need to run alsamixer again in order to reconfigure your microphone settings because they have already been changed by the plugin - remember to close the Hangout before you do).

In the terminal window, backup and open the GoogleTalk plugin config file by typing the following:

cd ~/.config/google-googletalkplugin

cp options options.bak

gedit options #alternatively nano options

Next, change the first line in the file that looks like this:

audio-flags=3

To this:

audio-flags=1

Save the file and close the editor.  You will also need to either log out and back in again, or else restart your system so these changes go into effect.  In short, this setting will disable GoogleTalk's auto-adjust feature that in our case is interfering with our microphone settings.

4) The final necessary step requires the PulseAudio Volume Control.  You can either search for it and install it using the Synaptic Package Manager, or you can use the terminal to install it by typing:

sudo apt-get install pavucontrol

Once installed, open the PulseAudio Volume Control (in Ubuntu Classic select Applications > Sound & Video > PulseAudio Volume Control) and select the input tab.  Click once on the padlock to allow the left and right channels of the microphone to be adjusted separately.  Leave one channel at max (100%), and slide the other channel to its minimum (0%).  Close the PulseAudio Volume Control utility.

If you open alsamixer again by typing "alsamixer" in the terminal, when you press F5 and arrow over to your input device, you will notice that instead of a series of thick blocks indicating your microphone volume level, you will see a skinny line instead.  This should confirm that only one of the microphone inputs is set to record, and the other is still set to 0 volume.  Press the Esc key and type the following to make these changes persist on every boot:

Note: If you have more than one sound card it may not be 0

sudo alsactl store 0

Now open the Google+ Huddle window again, and you should see the microphone indicator is showing activity (provided there is sound in your environment to cause it).  If there is not, you may also need to click Settings and change "Default Device" to "Internal Audio Analog Stereo", then click Save before this functionality works for you.

If you need additional assistance feel free to shoot me a message via the Feedback page.  Feel free to critique me in the comments as well.

Comments

Thanks!!

Thanks.
This fixed my issue with no sound in G+ hangouts!!

Dude, you can't know how this

Dude, you can't know how this post help !
I've been angry for months due to this issue.
THX.

Mat's picture

You are very welcome

Glad to be of service - it drove me nuts for a few months also.  That's why I figured I should probably document this.

THANK YOU! IT ReALLY HELPED!

THANK YOU!
IT ReALLY HELPED!

Mat's picture

:)

You are very welcome. A working mic is a happy LINUX user!