Fedora Linux Support Community & Resources Center
  #1  
Old 10th April 2012, 06:13 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxfirefox
Red Light in Headphone Jack - Macbook Pro 5,1

I have a Macbook Pro 5,1 and I cannot get the red light in the headphone jack to permanently turn off. If I run alsamixer and mute "S/PDIF", the light will turn off. Upon rebooting (or even just logging out to gdm and back in), the light will come back on. I've run "alsactl store" and put "alsactl restore" in my /etc/rc.d/rc.local file. Any other suggestions?
Reply With Quote
  #2  
Old 10th April 2012, 07:14 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Here is what I do:

1) Change the permissions on the asound.state file to be read/writable by all users.
Code:
# chmod 0666 /var/lib/alsa/asound.state
2) Add myself (regular user paul) to the audio group.
Code:
# usermod -a -G audio paul
Assuming you're running F15/16, you should not need to add the "alsactl restore" command to the rc.local file because there are now systemd services that do that, theoretically:
Code:
BASH:~/-> sudo systemctl status alsa-store.service alsa-restore.service
alsa-store.service - Store Sound Card State
	  Loaded: loaded (/lib/systemd/system/alsa-store.service; static)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/alsa-store.service

alsa-restore.service - Restore Sound Card State
	  Loaded: loaded (/lib/systemd/system/alsa-restore.service; static)
	  Active: inactive (dead) since Tue, 10 Apr 2012 12:24:20 -0400; 1h 26min ago
	 Process: 959 ExecStart=/sbin/alsactl restore (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/alsa-restore.service
These two services should be enabled by default. This (mostly) works for me to retain audio settings on reboots. However, on my laptop where I boot to runlevel 3, my headphone volume is sometimes at 100% at bootup. To keep from breaking my eardrums before listening to audio from the laptop, I run a script that sets volume levels on 3 channels using the amixer command, just to be on the safe side.

If after doing all of the above and you still have the red LED light on problem after boot, I'd suggest adding a "amixer" command to mute your S/PDIF channel to the rc.local file instead of the "alsactl restore" command.

Last edited by PabloTwo; 10th April 2012 at 07:23 PM.
Reply With Quote
  #3  
Old 10th April 2012, 08:34 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxfirefox
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Sadly, that did not work. When I ran 'amixer controls' to see what command I should add to rc.local, S/PDIF does not appear. In alsamixer, I have 13 or 14 controls, but here is the output of 'amixer controls'.

Code:
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
Reply With Quote
  #4  
Old 10th April 2012, 09:15 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

That's curious. Do you have more than 1 audio "card"? On my desktop computer, where the HDMI port on my Nvidia video card is counted as an audio card:
Code:
BASH:~/-> cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xfa200000 irq 48
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfa080000 irq 17
You can specify the card to query with the amixer command:
Code:
amixer -c0 controls
On my desktop system, where [PCH] is the onboard audio chipset:
Code:
BASH:~/-> amixer -c0 controls
numid=39,iface=CARD,name='Front Headphone Jack'
numid=41,iface=CARD,name='Front Mic Jack'
numid=42,iface=CARD,name='Line Jack'
numid=37,iface=CARD,name='Line Out CLFE Jack'
numid=35,iface=CARD,name='Line Out Front Jack'
numid=38,iface=CARD,name='Line Out Side Jack'
numid=36,iface=CARD,name='Line Out Surround Jack'
numid=40,iface=CARD,name='Rear Mic Jack'
numid=34,iface=MIXER,name='Master Playback Switch'
numid=33,iface=MIXER,name='Master Playback Volume'
numid=12,iface=MIXER,name='Headphone Playback Switch'
numid=11,iface=MIXER,name='Headphone Playback Volume'
numid=43,iface=MIXER,name='PCM Playback Volume'
numid=21,iface=MIXER,name='Front Mic Boost Volume'
numid=16,iface=MIXER,name='Front Mic Playback Switch'
numid=15,iface=MIXER,name='Front Mic Playback Volume'
numid=2,iface=MIXER,name='Front Playback Switch'
numid=1,iface=MIXER,name='Front Playback Volume'
numid=4,iface=MIXER,name='Surround Playback Switch'
numid=3,iface=MIXER,name='Surround Playback Volume'
numid=7,iface=MIXER,name='Center Playback Switch'
numid=5,iface=MIXER,name='Center Playback Volume'
numid=8,iface=MIXER,name='LFE Playback Switch'
numid=6,iface=MIXER,name='LFE Playback Volume'
numid=18,iface=MIXER,name='Line Playback Switch'
numid=17,iface=MIXER,name='Line Playback Volume'
numid=22,iface=MIXER,name='Capture Switch'
numid=23,iface=MIXER,name='Capture Switch',index=1
numid=24,iface=MIXER,name='Capture Volume'
numid=25,iface=MIXER,name='Capture Volume',index=1
numid=32,iface=MIXER,name='IEC958 Default PCM Playback Switch'
numid=28,iface=MIXER,name='IEC958 Playback Con Mask'
numid=29,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=30,iface=MIXER,name='IEC958 Playback Default'
numid=31,iface=MIXER,name='IEC958 Playback Switch'
numid=19,iface=MIXER,name='Auto-Mute Mode'
numid=26,iface=MIXER,name='Input Source'
numid=27,iface=MIXER,name='Input Source',index=1
numid=20,iface=MIXER,name='Rear Mic Boost Volume'
numid=14,iface=MIXER,name='Rear Mic Playback Switch'
numid=13,iface=MIXER,name='Rear Mic Playback Volume'
numid=10,iface=MIXER,name='Side Playback Switch'
numid=9,iface=MIXER,name='Side Playback Volume'
I'm not really sure, but I think the "IEC958" items relate to my S/PDIF port. Maybe someone more in the know can shed some light on that.

Edit: In alsamixer, I see "S/PDIF" and "S/PDIE D", both are toggled "ON". Using amixer to query "numid=31" and "numid=32", both "switches", they are toggled "ON", reinforcing my suspicion that those are my S/PDIF port "switches"
Code:
BASH:~/-> amixer -c0 cget numid=31
numid=31,iface=MIXER,name='IEC958 Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
BASH:~/-> amixer -c0 cget numid=32
numid=32,iface=MIXER,name='IEC958 Default PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on

Last edited by PabloTwo; 11th April 2012 at 12:37 AM.
Reply With Quote
  #5  
Old 10th April 2012, 09:29 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

That still didn't work. Here's my output for the commands you gave, as well as my rc.local file.

cat /proc/asound/cards
Code:
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xdf480000 irq 21
Running 'amixer -c0 controls' instead of 'amixer controls' did make a difference.

Code:
numid=35,iface=MIXER,name='Master Playback Switch'
numid=34,iface=MIXER,name='Master Playback Volume'
numid=8,iface=MIXER,name='Headphone Playback Switch'
numid=7,iface=MIXER,name='Headphone Playback Volume'
numid=36,iface=MIXER,name='PCM Playback Volume'
numid=2,iface=MIXER,name='Front Playback Switch'
numid=1,iface=MIXER,name='Front Playback Volume'
numid=4,iface=MIXER,name='Surround Playback Switch'
numid=3,iface=MIXER,name='Surround Playback Volume'
numid=6,iface=MIXER,name='LFE Playback Switch'
numid=5,iface=MIXER,name='LFE Playback Volume'
numid=13,iface=MIXER,name='Line Boost Volume'
numid=10,iface=MIXER,name='Line Playback Switch'
numid=9,iface=MIXER,name='Line Playback Volume'
numid=14,iface=MIXER,name='Mic Boost Volume'
numid=12,iface=MIXER,name='Mic Playback Switch'
numid=11,iface=MIXER,name='Mic Playback Volume'
numid=16,iface=MIXER,name='Capture Switch'
numid=17,iface=MIXER,name='Capture Switch',index=1
numid=18,iface=MIXER,name='Capture Switch',index=2
numid=19,iface=MIXER,name='Capture Volume'
numid=20,iface=MIXER,name='Capture Volume',index=1
numid=21,iface=MIXER,name='Capture Volume',index=2
numid=29,iface=MIXER,name='IEC958 Default PCM Playback Switch'
numid=25,iface=MIXER,name='IEC958 Playback Con Mask'
numid=26,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=27,iface=MIXER,name='IEC958 Playback Default'
numid=28,iface=MIXER,name='IEC958 Playback Switch'
numid=31,iface=MIXER,name='IEC958 Capture Default'
numid=30,iface=MIXER,name='IEC958 Capture Switch'
numid=33,iface=MIXER,name='Beep Playback Switch'
numid=32,iface=MIXER,name='Beep Playback Volume'
numid=15,iface=MIXER,name='Channel Mode'
numid=22,iface=MIXER,name='Input Source'
numid=23,iface=MIXER,name='Input Source',index=1
numid=24,iface=MIXER,name='Input Source',index=2
Running 'amixer -c0 cset numid=28 mute' turns off the red light.

My rc.local looks like this

Code:
#!/bin/bash
/home/ryan/Admin/jsz-mbpfand-9c365c9/jsz-mbpfand-9c365c9 & (a fan speed script)
echo '8' > '/sys/class/backlight/apple_backlight/brightness' (setting the screen brightness)
amixer -c0 cset numid=28 mute
Both the fan script and the screen brightness work, so I know there's nothing wrong with my rc.local file itself. But, as soon as I logged in, even with the amixer line in rc.local, the red light came on.
Reply With Quote
  #6  
Old 10th April 2012, 09:30 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

I just confirmed that myself by doing:
Code:
BASH:~/-> amixer -c0 cset numid=31 off
numid=31,iface=MIXER,name='IEC958 Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
then looking at alsamixer and finding "S/PDIF" toggled to OFF (MM).

I wonder if youe audio card still isn't initialized or something at the time the rc.local script(s) run?

Last edited by PabloTwo; 10th April 2012 at 09:35 PM.
Reply With Quote
  #7  
Old 10th April 2012, 09:36 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

We must have different models because my red light goes off and S/PDIF is toggled as off in alsamixer after I run 'amixer -c0 cset numid=28 mute'. It's still puzzling why it turns back on after I log in, even with 'amixer -c0 cset numid=28 mute' in rc.local.

Edit:
In fact, I can run that command and simply log out to gdm and the light will come back on.

---------- Post added at 04:36 PM ---------- Previous post was at 04:32 PM ----------

I also tried 'amixer -c0 cset numid=28 off' instead of 'amixer -c0 cset numid=28 mute' and there was no difference.
Reply With Quote
  #8  
Old 10th April 2012, 09:37 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Also, make sure you have ended the "amixer" line with a carriage return.
Reply With Quote
  #9  
Old 10th April 2012, 09:40 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

That didn't make a difference either. I just ran 'amixer -c0 cset numid=28 off &', the light went off, I logged out to gdm, and the light came back on. I ran it as both root and normal user.

To make this even weirder, if I mute my main speakers or change their audio levels, they are correctly restored on boot and login/logout.

Last edited by hank863; 10th April 2012 at 09:42 PM.
Reply With Quote
  #10  
Old 10th April 2012, 09:48 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Have you tried, after setting the "numid=28" to off, giving the "aslactl store" command and then logging out/in and/or rebooting?
Reply With Quote
  #11  
Old 10th April 2012, 09:52 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Yeah, I did. That didn't work either, though :/
Reply With Quote
  #12  
Old 10th April 2012, 09:57 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

Quote:
To make this even weirder, if I mute my main speakers or change their audio levels, they are correctly restored on boot and login/logout.
That would infer, to me, that the alsa-restore.service bit is working.... at least in part. One would think the mixer settings would be an "all or nothing" deal when saving to the asound.state file, but that doesn't seem to be the case in reality. Sort of like my headphone volume level on the laptop machine... sometimes it's set to where I left it on boot up, sometimes not, while other major controls seem to "play fair".

---------- Post added at 04:57 PM ---------- Previous post was at 04:53 PM ----------

My other suggestion would be to put the "alsamixer -c0 numid=28 off" line into a bash script, say, call it "die-led" and put that somewhere, then add an "autostart" item to your session log-in, that item just being a call to your "die-led" script. Should work then OK.
Reply With Quote
  #13  
Old 10th April 2012, 09:59 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxsafari
Re: Red Light in Headphone Jack - Macbook Pro 5,1

I guess so. That's unfortunate. This problem is not specific to Fedora. I do remember being able to fix it about a year ago, but maybe an update caused the problems we are seeing now.

Thank you very much for your time and effort!

---------- Post added at 04:59 PM ---------- Previous post was at 04:57 PM ----------

I'll try your last suggestion in a bit and report back.
Reply With Quote
  #14  
Old 10th April 2012, 10:00 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,189
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

See my last suggestion.... posted same time as your last post.
Reply With Quote
  #15  
Old 10th April 2012, 10:42 PM
hank863 Offline
Registered User
 
Join Date: Aug 2008
Posts: 17
linuxchrome
Re: Red Light in Headphone Jack - Macbook Pro 5,1

That worked for when I'm logged in. I can live with the red light on boot and whenever I log out to gdm. Thanks for the suggestion and all of your help
Reply With Quote
Reply

Tags
headphone, jack, light, macbook, pro, red

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound will not come out of headphone jack stopmakingsense Using Fedora 0 1st December 2010 06:41 AM
Macbook 1st gen headphone jack not working imsangha Hardware & Laptops 1 8th March 2010 07:03 AM
Red Light from Headphone Jack on MacBook Pro binarygem Hardware & Laptops 0 24th July 2007 02:46 AM
headphone jack problems bluelava Hardware & Laptops 2 20th July 2007 03:36 AM
Headphone jack turned off??? chiefreborn Hardware & Laptops 2 15th June 2005 12:38 AM


Current GMT-time: 18:24 (Tuesday, 21-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Oullins Instagram Photos - Oguta Photos - Mitrovice Travel Photos on Instagram