[MacBook Air] How to disable OSX's auto switching of volume when using Headphone Jack

Joined
Oct 28, 2010
Messages
11
Reaction score
0
Points
1
Hi all,

I'm writing this as I've now become deaf thanks to Apples 'ingenious' ( :Angry: ) auto switching volume levels.

Scenario:
1. I use my laptop at full speaker when listening to Spotify. I increase the volume to 100%.

2. I then use my 2.1 system and plug it in. OSX then turns the volume down to 20% (as per my previous headphone settings). I then turn it up again to 100%.

3. I then take the 2.1 system out from the jack, and it's on 100% as per 'scenario step' 1.

4. I plug in my headphones, and turn the volume down, there's a severe (3 seconds?) delay in the Mac noticing I've plugged it in, and it boosts it up to 100% again as per 'scenario step' 2.

So basically, I almost blew my AKG headphones and my brain. This has happened several times before.

I know it's a 'user fault' as this is how it's designed to be. But I've googled relentlessly and not found anything that states you can disable this incredibly horrible feature.

Does anyone know how to disable it totally so I just have one global volume control regardless of if it's playing through the speakers or through the jack?

Thanks! :)
- SineTwo
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
The computer has no method of differentiating between a 2.1 speaker system and headphones plugged into the same jack. None whatsoever. No computer would. It's all line-level output. Period. It'd be far more sensible to set the volume to your liking while the headphones are plugged in, then manage the volume for the speakers with volume controls on the speakers themselves, if they have them (most do).


One possible recourse here is to get a USB Audio Interface and use that for the headphones. One example of these devices is iMic. You may be able to use that in conjunction with the freebie SoundSource to set the volume levels independently for the USB device and for the internal sound card, though I can't swear to it. I used to have an iMic, but have long since sold it off so I can't verify this.
 
Joined
Jan 8, 2012
Messages
3
Reaction score
0
Points
1
The computer has no method of differentiating between a 2.1 speaker system and headphones plugged into the same jack. None whatsoever. No computer would. It's all line-level output. Period. .....

Thank you for your answer.

The thing is, we are not looking for a way to make the macbook differentiate between 2.1s and headphones. Instead, we simply want the macbook to stop adjusting the volume and simply have a global volume setting that is used for all speakers (internally and externally). This way the volume can be lowered before plugging in the headphones.

Hopefully the delay when plugging in a device will disappear then as well.

Does anyone know if this feature is software or hardware based? I think they are the same in windows (after asking a friend), but in Ubuntu for instance? (I myself have not been able to install ubuntu on this computer, for some reason).
 
OP
S
Joined
Oct 28, 2010
Messages
11
Reaction score
0
Points
1
Yep, what he said ;)

We're by no means looking at differentiating between 2.1 and headphones, but when you plug sometihng in and hold DOWN on the volume buttons, it lowers the volume but 3 seconds later it could be on 100% as per the previous volume setting and you end up blowing your ears off.

An external USB soundcard isn't really a good solution? It'll eliminate the use of the internal speakers. I'm certain this could be a straight forward OS patch/hack if it does exist.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Thank you for your answer.

The thing is, we are not looking for a way to make the macbook differentiate between 2.1s and headphones. Instead, we simply want the macbook to stop adjusting the volume and simply have a global volume setting that is used for all speakers (internally and externally). This way the volume can be lowered before plugging in the headphones.

Hopefully the delay when plugging in a device will disappear then as well.

It took me a bit of time and reading around to figure out what you are asking. For clarity here to anyone reading, OS X does maintain separate volume levels for the internal speakers and for headphones/2.1 speakers that are plugged into the headphone jack. If you plug in headphones, OS X will remember what the volume level was when using the internal speakers and automatically restore it when you unplug the headphones. And vice versa. This is all stored in the PRAM.

What you are looking to do is have a "default" volume that is lower than what may have been used and auto-remembered before you plugged the headphones in. Or perhaps better said... stop OS X from storing the last-used volume level when plugging/unplugging headphones. I've done some extensive Googling to find a way to force the OS to auto-drop the volume level, and unfortunately there is really no documentation or ready-made solutions for this. Luckily for you, I'm extremely stubborn and refuse to admit defeat. Here is a solution I have worked out:

First, run AppleScript Editor and make a new script with this exact entry:
Code:
[B]set volume 1[/B]
Press the Compile button in the toolbar, then save the script to:
yourhomefolder/Library/Scripts

Next, download a freebie named Breakaway. This runs as a menubar extra. Launch it, access its preferences, then click on Plugins in the toolbar. Uncheck the iTunes plugin and put a checkmark next to AppleScript Plugin and create a new trigger. Drag the script you made earlier to the box on the right under Run script, then put check marks next to the desired options. Once done, make sure you have a checkmark on your trigger so it is active, just like this screenshot:

Breakaway.jpg

Once done, any time you plug or unplug your headphones, the volume will drop to "1". You can modify this to something higher, or 0 for mute if you like. There is a fraction of a second of a delay in the volume adjusting, but it's virtually unnoticeable and easily the best solution available. You can also consider using the iTunes plugin. What it does is pause iTunes when headphones are unplugged. However, my tip is valid across any app with audio.
 
Joined
Jan 8, 2012
Messages
3
Reaction score
0
Points
1
It took me a bit of time and reading around to figure out what you are asking. For clarity here to anyone reading, OS X does maintain separate volume levels for the internal speakers and for headphones/2.1 speakers that are plugged into the headphone jack. If you plug in headphones, OS X will remember what the volume level was when using the internal speakers and automatically restore it when you unplug the headphones. And vice versa. This is all stored in the PRAM.

...

Thank you so much for this guide! A reboot was required for me and then it worked. Hope this thread will be easy to find for the next person.

I can add to the discussion that this seems to be an OS X feature, it does not happen in Ubuntu.

Again, thank you!

Adam
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top