I'm use the an applescript found in this site (not the german), and the Sleepwatcher app.
If your sound not work after wakeup, but mute on, then off fix this, this method will automate this for you.
1. Install sleepwatcher both packages.
2. It's need to be enabled the Enable access for assistive devices in the Universal access part of the System preferencies.
3. Download and unpack my attached files.
sound.zip 1.59KB 118 downloads
This files are invisible, so you will need an app to copy them to the root of your home folder. Pathfinder or Midnight commander do the job. Or you can use terminal to copy with the cp command. Unfortunately the os always made a folder to the unpacked files, this because need them copy. Maybe somebody can a simplest solution (installer package?).
Maybe you can use this metod, for other problems. The sleepwatcher can run boot or sleep scripts too, so there are many possibilites.
tell application "System Preferences" set current pane to pane "com.apple.preference.sound" end tell tell application "System Events" tell process "System Preferences" click checkbox "Mute" of first group of window "Sound" end tell end tell tell application "System Events" tell process "System Preferences" click checkbox "Mute" of first group of window "Sound" end tell end tell tell application "System Preferences" to quitIt's quit after mute on and off.
Test with the script editor, if work. I'm save mine to my home folder and name it .soundscript.scpt .
Then install sleepwatcher both packages. This app use a file called .wakeup. This file is'nt exist after install sleepwatcher, its need to be created, and set its chmod to executable. This is in the root of your home folder.
The readme of sleepwatcher describe how, but i'm attach mine. The . (dot) in the front of the files name means it'll be invisible.
osascript .soundscript.scptIf you use script that not in the root of the home folder it need to be write in its path.
The osascript command can run a script file from terminal.
Don't forget to be enabled the Enable access for assistive devices.