Make the sound icon visible in the menu bar (at the bottom of the Sound system preferences window), then hold Alt ⌥ and click it to view all possible outputs. Sometimes the actual Output window in system preferences doesn’t actually display all available options.
Same problem with Sierra and a Dell P2715Q, here. It seems like a display with no audio shouldn’t trigger this, but ¯\_(ツ)_/¯
With the display connected and no headphones, I used the Sound preferences to change the output to Internal Speakers. Now, at least for this user, the MacBook understands that I never want the sound output routed to DisplayPort.
I suppose you could turn the sound off on your monitor using the buttons. You could also just use a connector like vga or dvi to get rid of sound output.
Plug an AUX cable into the monitors audio output without the other end of the cable plugged into anything. You have to leave it dangling there at all times but it will solve this problem.
This is also solved the related problem of my bluetooth headphones staying connected but no longer playing audio every time I connected to my monitor.
Unloading the com.apple.driver.AppleGFXHDA kext caused the displayport audio drivers to be removed immediately.
sudo kextunload -b com.apple.driver.AppleGFXHDA
You will need to persist this across reboots.
macOS 10.15.1 with 2018 MacBook Air
I just found an App that might fix this problem. I was having the same issue with my Dell P2715 monitor when using video conference apps like Skype and Zoom.
The name of the app is “Audio Profile Manager” by Septimal Mind Limited, only $3.99 but these are things Apple should have solved it by including such function as an option…
Even though I have never chosen to hear the awful sound output on my AOC monitor, macOS stubbornly switches at full volume each time I plug in the monitor. Here you can see I am trying to disable it by creating an aggregate device, but after doing this I end up with no volume controls and at 100% volume. So I can’t say this works, and consider hacking my HDMI cable open.
I havn’t had a Mac for quite a while now, but I’m pretty sure you can’t.
I think somehow it must be possible to deactivate the proper kernel device that’s responsible for sound over HDMI/DisplayPort but it’s hard to say how easy this can be accomplished, how that will corrupt functionality or how easy it will be to reverse.
Someone should confirm this but I think you could get a cheap usb sound card, which would allow you to completely ignore the internal soundcard, thus only showing you devices connected to the usb card. Or maybe a software solution, something like AudioMate for example could do the trick.
UPDATE: NOT WORKING. SEE COMMENT BELOW
But I would suggest you do the following: It’s kind of a strange solution but it’ll work and pretty much everyone has the know-how to do it.
- Take a look at the pin assignments of DisplayPort
- Get yourself a spare DisplayPort cable
- Cut it in the middle and solder all the pins back together, avoiding
the pins connecting audio. (These should be pin 15-17)
- Use the cable to connect your display
Pin 1 ML_Lane 0 (p) Lane 0 (positive) Pin 2 GND Ground Pin 3 ML_Lane 0 (n) Lane 0 (negative) Pin 4 ML_Lane 1 (p) Lane 1 (positive) Pin 5 GND Ground Pin 6 ML_Lane 1 (n) Lane 1 (negative) Pin 7 ML_Lane 2 (p) Lane 2 (positive) Pin 8 GND Ground Pin 9 ML_Lane 2 (n) Lane 2 (negative) Pin 10 ML_Lane 3 (p) Lane 3 (positive) Pin 11 GND Ground Pin 12 ML_Lane 3 (n) Lane 3 (negative) Pin 13 CONFIG1 connected to Ground1) Pin 14 CONFIG2 connected to Ground1) Pin 15 AUX CH (p) Auxiliary Channel (positive) Pin 16 GND Ground Pin 17 AUX CH (n) Auxiliary Channel (negative) Pin 18 Hot Plug Hot Plug Detect Pin 19 Return Return for Power Pin 20 DP_PWR Power for connector (3.3 V 500 mA)