Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Killerbob

macrumors 68000
Original poster
Jan 25, 2008
1,922
674
Everytime I start up Monterey the sound output changes to Display Audio. I then change it to HomePod Stereo Pair (my grouped HomePods), and it works great for that session. However, when I boot up my Mac Pro next time, it will be back to Display Audio.

My my Mac Pro I have a number of sound options; Internal Speakers, 2 x Display Audio (2 ATDs), MMAudio Device, and via AirPlay, my HomePod Stereo pair another HomePod Mini, and the TV in our living room.

Is there a way that I can set it to ALWAYS default to the HomePod Stereo Pair?
 
Typically it will use the last used audio device. I believe the problem is that they are AirPlay/Bluetooth. So when you boot up the machine, the bluetooth connection will not be established by the time macOS starts CoreAudio
A workaround would be an AppleScript that picks the correct output that runs as a launch item after user login
 
  • Like
Reactions: Killerbob
Thx Casper, for helping me out with a script that changes my sound to my HomePod pair!
 
Here goes. Paste this into the Script Editor, and save it as an Application. Run "Compile" first to clean it up from formatting errors - the bold and italics are important. There is a bunch of indents that will appear in the script, but they are removed by the editor here...

The name of my AirPlay device is "HomePod Stereo Pair" - change that to your device name.


delay 1
tell application "System Preferences" to activate
tell
application "System Events"
get properties
tell process "System Preferences"
delay 1
click menu item "Sound" of menu "View" of menu bar 1
delay 1
click radio button "Output" of tab group 1 of window "sound"
set theRows to every row of table 1 of scroll area 1 of tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
if (text field 1 of aRow exists) then
if (value of text field 1 of aRow as text) is equal to "HomePod Stereo Pair" then
set selected of aRow to true
exit repeat
end if
end if
end repeat
end tell
end
tell
tell
application "System Preferences" to quit
 
Here goes. Paste this into the Script Editor, and save it as an Application. Run "Compile" first to clean it up from formatting errors - the bold and italics are important. There is a bunch of indents that will appear in the script, but they are removed by the editor here...

The name of my AirPlay device is "HomePod Stereo Pair" - change that to your device name.


delay 1
tell application "System Preferences" to activate
tell
application "System Events"
get properties
tell process "System Preferences"
delay 1
click menu item "Sound" of menu "View" of menu bar 1
delay 1
click radio button "Output" of tab group 1 of window "sound"
set theRows to every row of table 1 of scroll area 1 of tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
if (text field 1 of aRow exists) then
if (value of text field 1 of aRow as text) is equal to "HomePod Stereo Pair" then
set selected of aRow to true
exit repeat
end if
end if
end repeat
end tell
end
tell
tell
application "System Preferences" to quit
Thank you!
 
Here goes. Paste this into the Script Editor, and save it as an Application. Run "Compile" first to clean it up from formatting errors - the bold and italics are important. There is a bunch of indents that will appear in the script, but they are removed by the editor here...

The name of my AirPlay device is "HomePod Stereo Pair" - change that to your device name.


delay 1
tell application "System Preferences" to activate
tell
application "System Events"
get properties
tell process "System Preferences"
delay 1
click menu item "Sound" of menu "View" of menu bar 1
delay 1
click radio button "Output" of tab group 1 of window "sound"
set theRows to every row of table 1 of scroll area 1 of tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
if (text field 1 of aRow exists) then
if (value of text field 1 of aRow as text) is equal to "HomePod Stereo Pair" then
set selected of aRow to true
exit repeat
end if
end if
end repeat
end tell
end
tell
tell
application "System Preferences" to quit
Thanks for this. I was having the same issue. Once I save it as application, how do I make it get executed at startup?
 
You save it as an Application, and then you add it to your Login Items in Users & Groups in System Preferences.
 
  • Like
Reactions: ivanpasic
Here goes. Paste this into the Script Editor, and save it as an Application. Run "Compile" first to clean it up from formatting errors - the bold and italics are important. There is a bunch of indents that will appear in the script, but they are removed by the editor here...

The name of my AirPlay device is "HomePod Stereo Pair" - change that to your device name.


delay 1
tell application "System Preferences" to activate
tell
application "System Events"
get properties
tell process "System Preferences"
delay 1
click menu item "Sound" of menu "View" of menu bar 1
delay 1
click radio button "Output" of tab group 1 of window "sound"
set theRows to every row of table 1 of scroll area 1 of tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
if (text field 1 of aRow exists) then
if (value of text field 1 of aRow as text) is equal to "HomePod Stereo Pair" then
set selected of aRow to true
exit repeat
end if
end if
end repeat
end tell
end
tell
tell
application "System Preferences" to quit
Killerbob! Thank you so much for this. I'm not sure if this is an issue with all the changes to System Settings or not. Are you still using this? Have you made changes to the script? Thanks again.
 
It stopped working for me, and I grew accustomed to simply switching Sound to my paired HomePods.

Thanks for reminding me, though - I'll give it another go when I get home tonight...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.