How to Play a Power Charging Sound Effect in Mac OS X When a MacBook is Plugged in (Like iOS)

Apr 15, 2015 - 46 Comments

Play a chime sound effect when MacBook Pro is charging

When you connect a power source to an iPhone, iPad, iPod touch, or MacBook, a familiar charging chime sound will trigger from the device, indicating that a cable is attached and the device is getting power. If you like hearing that auditory confirmation that a device is getting power, you can add the exact same audio playback feature to any MacBook Pro or MacBook Air by turning to the command line of MacOS and Mac OS X. You’ll even get an onscreen visual cue on the Mac indicating where the battery charge is, which looks straight out of iOS as well.


Enabling the power chime sound effect on a Mac is pretty easy. Because the power indicator is dependent on a battery, this almost certainly requires a MacBook Pro or MacBook Air to function as intended. You won’t need to do this on the MacBook line because it makes the sound by default (though you can turn it off on that machine if you want to, more on that in a minute). This also requires Mac OS X Yosemite (10.10.3 or later) as the PowerChime.app does not appear to exist in prior releases of Mac system software.

Enable Playing a Power Chime Sound Effect on a MacBook Pro & MacBook Air

  1. Disconnect the Mac from the MagSafe power source
  2. Open the Terminal app, found in /Applications/Utilities/
  3. Enter the following command syntax, be sure there are no breaks as you’ll want to fit the entire sequence onto a single line (no it doesn’t matter if it wraps):
  4. defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &

  5. Hit Return
  6. Re-connect the MacBook power supply to hear the chime

This will enable the feature through the defaults command string and simultaneously launch the PowerChime application, the latter tiny app must be running in order for the power chime sound effect to trigger.

Now you just have to disconnect your MagSafe (or USB-C) power connector from the Mac, wait a second or two, then reconnect it. You’ll hear the familiar power connected / charging sound effect from your iPhone and iPad devices. If you keep an eye on the battery and energy use menu of Mac OS X and you’ll see the sound triggers at the exact same time as the charging bolt appears on the battery menu item.

The charging indicator in Mac menu bar of Mac OS X

The brief video below walks through entering the syntax into the Terminal app and then disconnecting and re-connecting a MagSafe adapter to trigger the power sound effect. This may be helpful if you’re confused, or you just want to see what it does rather than try it yourself:

Note the battery charging indicator will only display onscreen if there is less than 100% power available with the Mac battery and the Mac is either in sleep mode or the screen is locked. The sound effect will even trigger if the MacBook is sleeping too, though that aspect appears limited to newer hardware with the ability to use PowerNap.

You can also trigger the sound effect manually, maybe you like the way it sounds or you’re just curious what we’re talking about here. Use the following command to play the power chime sound effect:

afplay /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

Disable the Chime Sound Effect on Power Cable Connect in Mac OS X

You can also turn off the power chime sound effect when you connect a power cable to a Mac by issuing a different defaults command string within the Mac OS X Terminal:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime

This will disable the sound effect when connecting a power cable on the MacBook Air, MacBook Pro, and yes, it will also disable the power chime sound effect on the MacBook line as well.

Many new MacBook owners have noticed this little feature, but the source of the audio was uncovered by @zwaldowski, who reports that some Macs will even have a vibrating trackpad with this feature enabled (a new Retina MacBook Pro does not offer that aspect). Be sure to follow @osxdaily too, and let us know if you decide to keep the power sound effect around on your Mac.

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks

46 Comments

» Comments RSS Feed

  1. James Brae says:

    The Powerchime is a very IRRITATING sound on my new MacBook Pro 16 Inch 2019.

    The problem is that when I attach a USB-C device that frequently uses significant power (such as to an ethernet cord or a writing/reading from an SD card), the battery gets drained to 98% and recharged to 100% repeatedly. Each time it hits 100%, the powerchime rings.

    This is an irritating sound when it repeatedly chimes – particularly when you want a quiet environment such as when you are recording a video.

    So I prefer to turn this Powerchim app off. However, whenever you plug in the MacBook Pro, the Powerchime app is turned on again even if you turn if off manually in the terminal.

    So I wish there was a more permanent way to turn it off rather than repeatedly manually turning it off.

  2. Amirmasoud Azizi says:

    Thank you

  3. Levi says:

    How could I get a sound to play when unplugging my macbook? It’d be incredibly helpful to know if it’s accidentally come out.

  4. Disco Danny says:

    I hate to hear the STUPID iphone chime upon a plug in of the MBP. This:

    defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime

    Works great, UNTIL a reboot. Then the chime is back and I have to do this again.
    Anyone have any methods to make this permanent? I’m a “script dummy” but I can follow instructions!

  5. Sultan says:

    Hi,

    Because this is close to what I am looking for. I’d like to play a Sound when fully charged, so I can disconnect the cable the minute Battery is full. Any ideas or tricks?

    Looking forward to hear some news
    best
    S.

  6. abdullah says:

    is there a way to play a sound when you unplug your mac. i know this isn’t possible on iphones or ipads either but the magsafe comes of easily and i dont even know until my battery is almost dead. help me.

  7. IntrusDave says:

    Looking at the strings in the PowerChime app, it looks like it can make the newer Trackpad vibrate too. I haven’t been able to figure out how yet.

  8. Dirk says:

    Hi,
    use a MBP 2011 with OSX 10.8.5 (Mountain Lion).
    I do NOT want to go further (neither 10.9 nor 10.10) for the moment after all the problems with the following OSX…

    Because there are problems with charging (often magsafe plugged in but no charging) this simple and important chime of charging would be very good for me – how to get my chime under OSX 10.8.5??

    Please help me…

  9. James says:

    As Jeremy has asked (^^^), can this be modified to play when the charger is disconnected?

  10. Jeremy says:

    Is there a way to make this happen on power disconnection also? With my MBP’s MagSafe connector, it gets knocked out easily and I often do not notice until the power is significantly drained.

  11. Icebox says:

    I got it to work, but the power chime sound is barely audible even with my volume up all the way.

  12. Icebox says:

    It didn’t work for me. I followed the instructions exactly. I’m on OS X 10.10.3 and on a MacBook Pro 2012. What gives?

  13. Jeff Brown says:

    Hey Apple, you know what’d be far more useful?

    If it’d play this sound played but inverted, whenever when it gets unplugged instead. I’ve received many-a “low battery” alert when I thought my MBP was actually plugged in but I had somehow inadvertently unplugged it.

    I know when I plug in my Mac—that almost never happens by accident. But sometimes I don’t know when I unplug it. #UX #FTFY

  14. Patrick McMahon says:

    FWIW, the app is basically determining when the battery is charging as opposed to draining. When it’s the former, the application calls the “/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif” file.

  15. inhba says:

    Can it play a song while charging?

  16. This didn’t work. I got this message “The file /System/Library/CoreServices/PowerChime.app does not exist.”
    I Googled PowerChime.spp without success.

    Any clues as to where I can get the PowerChime app?
    Thanks,
    Paul

    • Wynn says:

      Update to OS X 10.10.3, and you have to have a MacBook laptop, Pro, Air, whatever. If you don’t have OS X 10.10.3 you will not have PowerChime.app

  17. Thomas Symon says:

    Cool! I love these clever little tricks!

    • Expi Miya says:

      Me too, I am enjoying this. I suspect Apple will include this in OS X 10.11 as the default for all Mac laptops.

  18. mike says:

    does not work for me did exactly what you said where is this little app you refer to?
    I get no sound or on screen battery, MB Air 2014 10.10.2

    • Wynn says:

      Works fine on MacBook Air, using it.

      But, you did not do what the directions said because it specifically says this requires OS X 10.10.3 or later. The sound is not there without it.

  19. Wharf Xanadu says:

    This is the greatest thing I’ve seen all week. All macs should do this by default

    • coconut says:

      They will from now, because the new Macbook with USB. Like on iOS devices, charging does not have that light indicator that magsafe does so its kinda necessary.

  20. Cindy says:

    Does this persist across a restart, i.e., does PowerChime.app open on startup by default? It looks like you’ve simply started it here, rather than restarting it.

    • Expi Miya says:

      Persistence across reboot is possible by placing PowerChime.app into the Login Items of the active user account on OS X.

      I am not sure that is necessary though, maybe I am lucky but my MacBook rebooted and the power connection sound has always been there.

  21. Awesome, just did it on my MacBook Pro. All we need now is a way to hack the AIFF file so it can be something like a lightsabre powering up.

  22. Jay says:

    I’m getting ‘file does not exist. I have never heard the chime.😢

    I’m running Yosemite on a year old Macbook Pro. Is it just me?

  23. David says:

    This is a really cool find, I enabled it on my MacBook Air and it works great. And yes it works on the locked screens of OS X too.

    • Paul says:

      Put the MacBook to sleep and then try again to see the visual indicator as well as hear the auditory chime play.

      • ilias says:

        should the battery stay on the screen for as long as it is charging?
        it shows up for a second and then screen turns off again.
        if i click i get the login menu

    • Inventive Dude says:

      Hey is there anyway to play another custom sound, or is the code pulling from the computer?

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site