How to Play a Power Charging Sound Effect in Mac OS X When a MacBook is Plugged in (Like iOS)
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
- Disconnect the Mac from the MagSafe power source
- Open the Terminal app, found in /Applications/Utilities/
- 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):
- Hit Return
- Re-connect the MacBook power supply to hear the chime
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &
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 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.
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.
Thank you
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.
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!
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.
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.
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.
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…
As Jeremy has asked (^^^), can this be modified to play when the charger is disconnected?
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.
I got it to work, but the power chime sound is barely audible even with my volume up all the way.
yes same is there any way to make it louder
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?
It only came into effect with el capitan when the macbook was released with s=usb-c charging. Please update.
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
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.
Can it play a song while charging?
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
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
Cool! I love these clever little tricks!
Me too, I am enjoying this. I suspect Apple will include this in OS X 10.11 as the default for all Mac laptops.
Not yet. The beta does not have the sound effect, Maybe it’ll be there in the final release.
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
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.
This is the greatest thing I’ve seen all week. All macs should do this by default
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.
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.
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.
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.
That should be pretty easy too, replace “connect_power.aif” with your AIFF of choice and make sure permissions are set properly. Probably best to backup the app before modifying contents, though.
wher is the connect _power.aif location ?
Look at the instructions in the article for how to play the sound directly.
/System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif
Just did that with the labsaber sound after reading yur comment, it sounds awesome haha
Got it from here: http://theforce.net/fanfilms/postproduction/soundfx/saberfx_fergo.asp
and used file ‘sw4-lightsabre’
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?
Are you on 10.10.3?
I getting the same response…….I’m also running Yosemite on a 2011 Late model MacBook Pro
Works fine here on Yosemite 10.10.3 (beta). Though I did used sudo to ensure there were no write permission issues.
You must have OS X 10.10.3 or newer to have PowerChime
Running 10.10.3 13″ Air com.apple.PowerChime: command not found
Works immediately with this defaults command to enable the power sound effect when a cable connects:
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true
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.
Put the MacBook to sleep and then try again to see the visual indicator as well as hear the auditory chime play.
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
Hey is there anyway to play another custom sound, or is the code pulling from the computer?