Thanks for sharing your experience. It happened from time to time in June, but since July, it consistently happens everyday. Incredibly frustrating!I posted about this a few weeks ago, but it didn't get much traction. Yes, I have the problem on two M1 iMacs. I have 4 HPs and 1 HP Mini and all work fine Airplaying from my iPhone or iPads and all worked fine with my former iMac 27. The M1 iMac works as expected from a fresh boot but about 90% of the time after waking from sleep, the Airplay icon is grayed out and the only way to fix it is to reboot. I contacted support and got to a senior tech. He downloaded the logs and sent to engineering. After a week he got back to me but didn't have a solution. It's very frustrating because I typically listen to music when working at home and the iMac is quite enjoyable otherwise.
Two other options:I answered a similar question with a workaround on another forum: https://discussions.apple.com/thread/252720924?answerId=256169140022#256169140022
I hope it helps people here.
Thank you for posting this – I knew there had to be a scripty way to execute the AirPlayXPCHelper workaround (I can't believe we're still having to do this!). It's now few enough steps that I don't mind letting my M1 iMac sleep overnight. Since Monterey, I've found that if I let the sleep/wake/AirPlay issue actually happen (to the point where the exclamation point appears), the problem now also sends the coreaudiod process into the stratosphere and that process must be killed, too, otherwise the whole system is pretty much useless. But if I wake the system and run your fix-airplay.command before re-launching music, I'm good.I answered a similar question with a workaround on another forum: https://discussions.apple.com/thread/252720924?answerId=256169140022#256169140022
I hope it helps people here.
quit app Music
and a launch app Music
so all the workaround steps happen in one swoop (well, with a touchID authentication in the middle of it).