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.)


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

  • 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 '17 at 22:05
  • 4
    Needing to open the MIDI app just to change volume is crazy. Oct 8 '18 at 17:18
  • 7
    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 '19 at 20:47
  • 1
    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 '19 at 15:43
  • 1
    I wish I had googled this a long time ago, thanks!
    – powerj1984
    Feb 23 '20 at 20:08

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.

  • 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 '19 at 23:33
  • Thanks, I'll check it out!
    – tog22
    Oct 27 '19 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 at 16:54

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

  • 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 '20 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 '20 at 12:28
  • Doesn't work in Catalina, at least not when also using Boom (haven't tried without). Nov 9 '20 at 11:48

You must log in to answer this question.

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