Audio stops working on macOS Sonoma
I've finally noticed a pattern that occurs rather frequently on macOS Sonoma. I was blaming Bluetooth issues before, but it looks like it's more about audio in general.
What happens is that at some point, all audio freezes. The hotkeys for the audio controls show "Stop" sign, like there are no audio outputs connected, the taskbar is completely unresponsive: Control Centre shows a spinning circle, the sidebar is not opening (Spotlight works, though).
If you go to the System Settings, some menu items will be unresponsive: Sound doesn't open, Bluetooth does not open, Accessibility and Siri & Spotlights all do not open.
Then, a new bug appeared that I've just started to notice recently. The screen is flashing like there's an Accessibility feature enabled that uses warning flash instead of sound. It appears just randomly, out of nowhere. Immediately after that, sound works just normally.
When this is happening, and video/audio content in the browser and wherever does not work, Tidal shows many random errors, and Firefox just completely hangs when you try to play a video on YouTube. I've tried to stop `coreaudiod` and it did restart the daemon, but nothing else happened.
The device is a very fresh M1 Max MacBook, and nothing like that was happening on Ventura. I've had audio cracks on another M1 Pro laptop, but this one didn't even have those.
P.S. This is happened just when I was writing this post, and I've disabled Bluetooth just before. Now, the Bluetooth section in the Settings is opening, but others are still unresponsive.
For reference - I have yabai and BetterSnapTool installed, which modify system behavior, but with system protection enabled. Siri is disabled. I've tried to stop a bunch of random processes when this happened, but none helped so far.
This issue constantly haunts me since I've upgraded, and it's extremely annoying.
MacBook Pro 16″, macOS 14.0