52

When I plug my (HDMI) display into my laptop, the sound output switches to it. I can switch it back, but is there any way to stop this automatic switch?

(I've found many people complaining, but no answers. A script which reversibly disabled HMDI audio would be acceptable.)

3 Answers 3

28

I have multiple devices I connect to my mac and for some they had the same issue.


The work around (or actual fix) is to open 'Audio MIDI setup' in your Applications>Utility and:

  • Click + in the lower left corner.
  • Click Create Aggregate Device
  • Turn off/on the inputs/outputs sound based on needs.

Screenshot of Audio MIDI Setup

11
  • 3
    Awesome! Thanks a bunch. Only problem is the sound keys and system audio slider don't work: prntscr.com/feufup . What ways have you found of adjusting volume? I have quicksilver and Karabiner so perhaps I could map some key or keystroke sequence to a script which controls the volume?
    – tog22
    Jun 1, 2017 at 22:05
  • 4
    Needing to open the MIDI app just to change volume is crazy. Oct 8, 2018 at 17:18
  • 9
    I don't understand how this is the correct answer. You create an aggregate for multiple sound devices and then what? For me if I connect via Airplay to my AppleTV it still tries to use the speakers connected on that monitor. Mar 7, 2019 at 20:47
  • 1
    i loose the ability to adjust volume when i do this (similar to the HDMI out), so it's not workable for me unfortunately. Aggregate devices are super useful in the studio too.
    – Tomachi
    Apr 23, 2019 at 13:04
  • 2
    It seems that simply opening the MIDI app, right-clicking on "Built-in Output" and setting "Use this device for sound output" was sufficient. No need to create an aggregate device
    – Noel
    Sep 18, 2019 at 15:43
7

I made an app for this. It allows you to pin input/output so it cannot be changed for every particular set of connected devices.

3
  • 1
    Welcome to Ask Different, and thanks for your contribution. Your duplicate answers have been flagged, so I've taken a look. It's good you've disclosed your affiliation with the app, but please be careful with how often you promote it. If users see no other contributions except for ones promoting your software, you may run into problems. All the best.
    – Monomeeth
    Oct 21, 2019 at 23:33
  • Thanks, I'll check it out!
    – tog22
    Oct 27, 2019 at 20:44
  • 1
    This app works beautifully, and the idea is simple targets the pain point. The accepted answer above didn't work for me. Jan 29, 2021 at 16:54
7

You just need to specify a preferred audio device once and the Mac system will remember your choice and won't switch the next time.

  1. Open System Preferences -> Sound.
  2. Opt-in "Show Volume in menu bar", you will see a sound icon on the status bar.
  3. Connect to your monitor if not.
  4. Click on the icon and choose a preferred output device.
  5. Disconnect monitor and retry, you will see the system remembered your choice.

Select Output Device

5
  • This seems to work. No idea why selecting from this menu behaves differently from selecting in system preferences, but I'll take it!
    – kotoole
    May 22, 2020 at 14:11
  • It doesn't work on Mojave. When reconnecting an external device macOS will see just that device for few seconds, stop the audio from the External Headphones (that disappears for those few seconds); then External Headphones appear again and the audio is restored. Yes, the systems remembers to re-select, but it actually switches around devices before doing so, leading to audio disappearing, switching on external device, and finally coming back to the pre-selected device. – Yes, I already tried either via System Preferences and via the Volume Icon as shown above. Jul 13, 2020 at 12:28
  • Doesn't work in Catalina, at least not when also using Boom (haven't tried without). Nov 9, 2020 at 11:48
  • I'm trying to figure out how (or whether it's possible) to have the MacBook use only my wireless headset for input/output when the headset is turned on, and use only my MacBook for (input/)output otherwise. My MacBook sometimes switches to my external HDMI-connected monitors for audio, but those monitors don't have speakers. Does your solution work for this case?
    – V2Blast
    Nov 5, 2021 at 22:43
  • I have been using a Mac with three monitors for over a year now. Can confirm this doesn't work. I want audio output to only come from the central monitor. Seems simple right? It's not. Eventually something will cause the monitor that audio comes from to seemingly randomly change. I have not been able to resolve this. Apr 23 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .