HDMI audio prevents screen saver

Is there a long German word for: "You Google a problem, and the only results are you asking about it the last time you ran into it"?

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:

  1. Gently apply the Stick of Correction to a copy of the binary:

    sudo -s
    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' \

  2. Boot in "Recovery Mode" (Cmd-R), and in "Utilities / Terminal", type:

    csrutil disable

  3. Boot in "Standalone Mode" (Cmd-S), and type:

    mount -uw /
    rm /usr/sbin/coreaudiod
    ln -s /usr/local/sbin/coreaudiod.hacked \

  4. Boot in "Recovery Mode" (Cmd-R), and in "Utilities / Terminal", undo what you did the first time:

    csrutil enable

  5. 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.

  1. Step 1 is the same as above.

  2. Create a new plist file:

    sed '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

    chmod og-w /usr/local/etc/com.apple.audio.coreaudiod.plist

  3. Kill the old coreaudiod and launch the new one:

    launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist

    launchctl load -w /usr/local/etc/com.apple.audio.coreaudiod.plist

  4. Restart iTunes, or whatever was making noise and now isn't.


Tags: , , ,

Today in Killdozer news:

Killdozer Killswitch!

However, there is good news - while Caterpillar's revenues and cash flows may be plummeting with every passing month, at least the company has a cunning plan how to recover some inventory.

According to the WSJ, Caterpillar is eager to reassure shareholders it won't get burned on equipment leased to customers in China even as the economy cools there. CAT Financial Services President Kent Adams said during a conference call on Tuesday that the company keeps tabs on the position of machinery electronically through its Product Link system.

"If a customer falls behind, we have the ability to derate the engine or turn the engine off, and we've set up a legal presence in all of the provinces of China."

In other words, any and all Chinese lessors who fall behind on their payments will suddenly find their excavator's engine shut down and no longer operable, stuck in the middle of a mine, quarry, or construction site with a paperweight weighing dozens of tons.

"We call this backhoe 'The Stuxnet'."

Tags: , , ,