0

It's insane that in 2016 we still have to do with this, but since upgrading to El Capitan, previous solutions don't seem to work for me anymore. This is what I've tried.

silence.sh

sudo nvram SystemAudioVolume="%00" # does nothing
osascript -e 'set volume with output muted'
echo "run at $(date)" >> /var/log/silence_log.txt

1. LogoutHook

This is what worked on Yosemite

sudo defaults write com.apple.loginwindow LogoutHook /path/to/silence.sh

but ceased to work on my almost fresh El Capitan install

2. LaunchAgent

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>Silence</string>
    <key>ProgramArguments</key>
    <array>
        <string>/path/to/silence.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

But running launchctl load silence_sysvol.plist doesn't write anything to the log, so the script doesn't seem to run and I haven't figured out how to have it always be loaded and run at logout.

I read that launchd will send SIGTERM to the agents on logout, so would something like this be a way to go?

#!/usr/bin/env bash

function silence()
{
   sudo nvram SystemAudioVolume="%00" # not working
   osascript -e 'set volume with output muted'
   echo "run at $(date)" >> /var/log/silence_log.txt
}

trap silence SIGTERM
silence

3. nobootsound

Tried this, didn't work.

  • There are quite a few scenarios where having an always audible startup sound will simplify support, so I'm not surprised that Apple doesn't consider a way to switch it off to be important. – nohillside Jul 18 '16 at 14:34
  • @patrix I don't doubt it's useful for diagnostics, what I don't understand is why apple decided it must be (loudly) audible instead of visible or more subtle. Some kind of LED or something would be much better. Like this, they make their laptops unusable in quiet environments like a library. At least I find it greatly irritating, but maybe I'm just sensitive. – oarfish Jul 18 '16 at 15:31
  • Out of curiosity: how often are you typically rebooting that simply holding the "mute" key is not sufficient? – Asmus Jul 19 '16 at 6:45
  • @Asmus I shut down about every other day and I'm not able to remember muting manually each time. – oarfish Jul 19 '16 at 7:30
0

After a (few) restart(s), method 1 is back to working. Beats me.

-3

I found this article that will help: http://www.techradar.com/us/how-to/computing/apple/how-to-mute-or-enable-the-mac-startup-sound-1308461

Reply if it works.

  • Oh yeah I forgot to mention nobootsound; that doesn't do anything either. – oarfish Jul 18 '16 at 14:17
  • 1
    Welcome to Ask Different. We like answers to be more than just a single line. Ideally, you want to explain why your answer is *right." It also helps to provide links, citations, and/or screen shots. Please review our help section How to Answer on writing good answers to questions – Allan Jul 18 '16 at 14:20
  • 1
    One-line answers are never enough, and a primarily link-based solution is bad because if the link stops working (i.e. techradar takes down that article) then your answer means nothing at all. – owlswipe Jul 18 '16 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .