Friday, October 29, 2010

Mac book red light audio jack problem on Linux

When I upgraded my Macbook (2,1) to Ubunut 10.10 last week, I realized after a while that it wouldn't play any audio through the audio jack. The built-in speakers were working well, but as soon as I plugged in the headphone the built-in speakers would go off (as expected) and the headphone would be quiet too.

Then I got little concerned when I saw the red glow coming out of the audio jack. This macbook is now 4 years old, so I assumed the red light means some malfunction. But after I searched around, I found it was a known issue. The red light wasn't any indicator, but optical audio output. Many mac forums had discussions on this topic. Most of them fixed it by sticking a pin or toothpick into the jack, juggling around a little or shorting some internal probes. They reported that this eventually turns the light off and audio out was switched back to traditional wired output. I tried the same, but no luck. In retrospect, those all posts were with Mac OSX installed. So in their case, the optical audio output was probably turned on in hardware and had no way to turn off in software. Whatever the case, their solution didn't work on my Ubuntu installation.

I figured that, the optical audio output was not turned on in hardware, because when I rebooted the laptop in Mac OSX the red light used to go off and headphones worked. So now it remained to find some software tweak to fix the problem. Eventually I found this thread on ubuntu forums. Following two commands fixed the problem.

# Turns off the optical audio out
amixer set IEC958 off

# Turns on the headphone speakers
amixer set Speaker,1 on

# In case you want to tweak built-in speakers
amixer set Speaker,0 on

If your system is different than mine, it will help to run amixer without any options and see the list of audio channels and their states it prints out.

Hope this trick helps someone.

Ads:

16 comments:

Anonymous said...

Thanks!

Unknown said...

Thank you very much. My situation mirrors (-ed) yours. Very clear writing and friendly instructions.

Anonymous said...

Thanks! This issue has been around since I purchased mine 4 years ago. I finally decided to fix the issue and this worked right away.

gHost said...
This comment has been removed by the author.
gHost said...

Thank you very much for your instructions. This saved me a lot of headache. I hope those who are considering the toothpick/q-tip/paper-clip solution see this first.

Unknown said...

Awesome thanks!

Anonymous said...

Thanks!! worked perfectly :-)

Anonymous said...

Consider someone helped! Thanks very much :)

guy keulemans said...

This is for linux? Is there anyway to use this fix in Max os x?

delaserna444 said...

Awesome!
Thank's a lot for the tip.
Nothing else Google spit out worked bar this.

Note:
when I first tried to enter the commands it didn't work and said that Speaker is not a known identifier, so I ran amixer to look for the right identifier there I copy-pasted the values 'Speaker',0 and 'Speaker',1 and used it instead of what stood in the instructions and it worked! Just in case someone has the same problem.

J P said...

Thanks a lot.
Just saw this issue on my ubuntu 12.04 / macbook and got it fixed in minutes :)

J P said...

Thanks a lot.
Just saw this issue on my macbook / ubuntu 12.04, and got it fixed in minutes :)

J P said...

Thanks a lot.

Unknown said...

Helped me much. The CLI is the same as muting the SPDIF in the mixer

Anonymous said...

Thank you very much! That solved it!

Anonymous said...

worked (: thanks a lot !!