0

Problem: Red light won't go away; keeps shining out of 3.5mm port after reboot.

Troubleshooting: Muted it on alsamixer; light successfully turns off from via alsamixer.

Tested: ran sudo alsactl store after muting (turning off) light via alsamixer.

On "Startup Applications" I added a profile that would run the command alsactl restore on startup.

Results: Light still on after reboot and login.

If, after rebooting/logging in with the light on, I run sudo alsactl restore it kills the light.

Can't figure out why it's not working on startup though.

Ski
  • 31

2 Answers2

1

I would like to share with you how I solved this with a permanent solution without scripts. This way we can also get rid of the ugly pop sound when pulseaudio starts.

I use Apple MacBook 7,1 Mid 2010, White Unibody.

The reason why the red light lights up on every pulseaudio start is that there is automatic detection of hardware defined in /etc/pulse/default.pa

The usual default.pa example here: https://gist.github.com/95406ea115dc3a0a561f8242e2ae00f4

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

When these modules are being loaded it automatically detects your hardware and also initializes it. While the hardware is being initialized then SPDI/F output is turned on so red light is glowing even if you previously toggled mute using alsamixser off. When SPDI/F are toggled again on then there is also the ugly pop sound effect.

To avoid this behavior I decided to define my hardware manually. I don't wan't use automatic hardware detection modules. I disabled them by commenting whole block:

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

Now, I need to define my audio hardware - output sink and input source. I have used module-alsa-sink and module-alsa-source. I also need to know which HW ID's my audio sources have. On my machine there is only one integrated audio card with both input/output which has id hw:0,0. It can be different on your machine.

This is how I load outpit sink and input source modules:

### Load audio drivers statically
load-module module-alsa-sink device=hw:0,0
load-module module-alsa-source device=hw:0,0
#load-module module-null-sink
#load-module module-pipe-sink

It's important to reload pulseaudio then. You can use: pulseaudio --vv --kill and then again start it with pulseaudio --vv --start

No we will have available both our audio input/output, the jack isn't glowing with the red and the pop sound on startup is gone. All changes made in alsamixer will always persist too.

But, with this simple configurations we can't now use SPDI/F as regular output. What if decide to play sound through it?

I can even define the SPDI/F output too. The SPDI/F has hw0,1 ID on machine. If I would like to use it again. I will add this line to my configuration:

### Load audio drivers statically
load-module module-alsa-sink device=hw:0,0
load-module module-alsa-sink device=hw:0,1
load-module module-alsa-source device=hw:0,0
#load-module module-null-sink
#load-module module-pipe-sink

With this configuration we can easily disable and enable it in alsamixer. And the configuration will persist.

Here is sample of my configuration I use: https://gist.github.com/7a11adf0edc49d55a60be071ca307784

Actually, I don't own any other kind of sound system so I'm not able to test it with it. If you are using 2.1 or 4.1 sound system the output will be probably played only as stereo and you will need add more configurations in order to get it properly work. The same problem could be with HDMI outpout, I can't test it.

ylwghst
  • 51
0

A different solution for turning off the red light, found here, worked for me (MacBook Pro, 8.1, Ubuntu 16.04), but did not work for another user.