Because that happens to me a lot.
Anyway, MacOS 10.11 still has the ridiculous bug that if your system audio output is set to HDMI, and iTunes is playing, then the screen saver will never activate and your screen will never lock. I fixed this once before, but the procedure has gotten more complicated because now certain system files can't be modified even by root. So now the new recipe is:
- Gently apply the Stick of Correction to a copy of the binary:
mkdir -p /usr/local/sbin
cp -p /usr/sbin/coreaudiod \
perl -pi \
-e 's/N(oDisplaySleepAssertion)/_$1/g;' \
-e 's/P(reventUserIdleDisplaySleep)/_$1/g;' \
codesign -vfs 'Your Name' \
- Boot in "Recovery Mode" (Cmd-R), and in "Utilities / Terminal", type:
- Boot in "Standalone Mode" (Cmd-S), and type:
mount -uw /
ln -s /usr/local/sbin/coreaudiod.hacked \
- Boot in "Recovery Mode" (Cmd-R), and in "Utilities / Terminal", undo what you did the first time:
- Third reboot, and you're done. EASY.
Update: It turns out that upgrading to 10.11.2 blows away that coreaudiod symlink. Since I don't want to have to reboot three times every time I do a point-release update of the OS, here's a way to fix coreaudiod that does not necessitate rebooting.
- Step 1 is the same as above.
- Create a new plist file:
's@/usr/sbin/coreaudiod @/usr/local/sbin/coreaudiod.hacked@g' < /System/Library/LaunchDaemons/ com.apple.audio.coreaudiod.plist > /usr/local/etc/ com.apple.audio.coreaudiod.plist
- Kill the old coreaudiod and launch the new one:
launchctl load -w
- Restart iTunes, or whatever was making noise and now isn't.