Apple - Mute volume of macbook on sleep

  1. Download SleepWatcher (free, source code included).

  2. Install it using the instructions included in the download.

  3. Have your 'sleep' script call osascript (AppleScript)

    /usr/bin/osascript -e 'set volume with output muted'

Now your Mac will be muted anytime your computer goes to sleep.

If you want to make extra sure that it is muted when it wakes from sleep, add

/usr/bin/osascript -e 'set volume with output muted'

to your 'wake' script as well.


The app Auto Mute automatically mute the volume on sleep. And it's free.

You can download it from: https://auto-mute.com/files/auto-mute.dmg

Settings of Auto Mute