65

On new Macbook Pro, Power Chime runs. Whenever I delete from core services it comes right back. It makes a sound when plugging in your power cord even when the volume is at 0%.

The solution I have now to disable this annoying sound is an AppleScript application that runs on login to kill the process via terminal. Is there a better way?

7 Answers7

95

The solution is to set ChimeOnNoHardware to true instead of setting ChimeOnAllHardware to false (note, No instead of All):

defaults write com.apple.PowerChime ChimeOnNoHardware -bool true
killall PowerChime
Allan
  • 101,432
10

Here's another solution since the others provided don't seem to be working for you. You can create an empty AIFF file to replace the default chime. The chime audio is located here:

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

I created an empty AIFF file using Adobe Audition. With SIP disabled, I backed up the original chime and replaced it with my new audio file:

sudo mv /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif_bak
sudo mv ~/Desktop/null.aif /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

Be sure to fix the permissions on the file:

sudo chown root:wheel /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif
sudo chmod 644 /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif

No more audio when connecting your power source.

DanMcQ
  • 312
  • 1
  • 5
  • 2
    Thanks a million this worked like a charm! I copied the AIF to the desktop, opened the file, muted it and then saved it. Disabled SIP and replaced it (I didn't use Terminal I just dragged and dropped), then ran those two permissions line commands and BOOM! No more power chime. – Disco Danny Feb 03 '18 at 01:56
  • 1
    This stopped working after updating to OS 10.13.6! I looked at the AIF file and it is silent, so I have NO IDEA how it found that horrible sound again! Now I'm back to square one. – Disco Danny Nov 07 '18 at 04:30
  • Ditto @DiscoDanny. – Philip Jul 26 '19 at 12:50
  • Doesn't work with lid closed on Mojave. – minipif Aug 01 '19 at 03:19
2

I'm using this simple tool on all MacBooks after 2015 to quickly switch PowerChime

https://git.io/nochime — runs through curl without installation, performs the desired job, nothing to add here.

  • 4
    Running a script directly from the internet (without verifying it's content first) has some risks though. Would recommend to at least install it locally and run it from there. – nohillside Jul 16 '21 at 13:54
  • 1
    @nohillside good point, I agree that local installation option for the precautious would be nice to have. Though anyway, it's open-source and easily readable. The exact address that is curled is also easy to check: git.io/powerchime. – Art Ginzburg Jul 16 '21 at 14:11
1

In case anyone wants my AppleScript I'm using to stop this:

tell application "System Events"
    delay 3
    set ProcessList to name of every process
    if "PowerChime" is in ProcessList then
        set ThePID to unix id of process "PowerChime"
        do shell script "kill -KILL " & ThePID
    end if
end tell

But really looking for another way. Any help is appreciated. Thanks.

1

None of the previous solutions worked for me. Here's how I permanently disabled the chime on a 2017 MacBook Pro running Catalina (10.15.6):

Disable System Integrity Protection (SIP)

  1. Shut down your computer.
  2. Hold down Command-R and press the power button. Keep holding them down until the Apple logo appears.
  3. Wait for OS X to boot into the OS X Utilities window.
  4. Choose Utilities > Terminal.
  5. Enter csrutil disable.
  6. Enter reboot (or otherwise reboot the computer).

[Source]

Delete the sound file

Upon rebooting, open a terminal, and do the following:

  1. Enter csrutil status to ensure you have disabled SIP. You should see:
System Integrity Protection status: disabled.
  1. Enter sudo rm /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif
  2. If prompted, confirm the operation.
  3. If you get an error that includes Read-only file system, enter sudo mount -uw /. This remounts the file system as read-write. Go back to step 2.

Reenable SIP

  1. Shut down your computer.
  2. Hold down Command-R and press the power button. Keep holding them down until the Apple logo appears.
  3. Wait for OS X to boot into the OS X Utilities window.
  4. Choose Utilities > Terminal.
  5. Enter csrutil enable.
  6. Enter reboot (or otherwise reboot the computer).
  7. After rebooting, verify that SIP is reenabled with the terminal command csrutil status.
  • 2
    I appreciate this and tried it after seeing a similar suggestion posted elsewhere, but, to my amazement, the damn thing still chimed even though I thought I had deleted the sound of the chime (including following the disable-delete-reenable scheme). Touché, Apple... – Philip Aug 15 '20 at 23:48
  • @Philip Have you checked if /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif still exists? – Ellen Spertus Aug 16 '20 at 17:52
  • 2
    I'm in the same boat as Philip - did the whole dance:

    ~$ afplay /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif Error: AudioFileOpen failed ('wht?')

    It still chimes. v10.15.6 (19G2021) / MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)

    – tjmcewan Sep 14 '20 at 12:35
  • @tjmcewan That's weird. How about ls /System/Library/CoreServices/PowerChime.app/Contents/Resources/connect_power.aif? – Ellen Spertus Sep 15 '20 at 17:57
  • Yah, sorry I wasn't clear, that file no longer exists. Looks like that file is no longer the source of the sound. The sound even plays when the machine is off & before I've unlocked the Filevault encryption. – tjmcewan Sep 17 '20 at 11:50
  • @tjmcewan Any other sound files in that directory? I'd delete those. – Ellen Spertus Sep 17 '20 at 13:53
  • @tjmcewan What do you mean by "the sound even plays when the machine is off"? Do you mean when the display is off or when the machine is sleeping? I had that problem too. – Ellen Spertus Sep 17 '20 at 13:53
  • No other sound files. :) I mean I literally shut down the machine. To be super clear: Apple menu > Shut Down... > Shut Down, wait 10 seconds or so until backlight is clearly off, close the lid, plug in the cable. Chime plays. :) – tjmcewan Sep 19 '20 at 09:32
0

Tested on MacBook Air - MacOS High Sierra

Open Terminal and

sudo nvram SystemAudioVolume=%00

You’ll be asked to enter your password.

nohillside
  • 100,768
Patrick
  • 70
  • 6
  • 4
    What does it do? Turn off all sound on a laptop? We do not want all to be OFF – Joe Jan 14 '20 at 16:32
0

On Mojave you can do the following:

ps -eaf | grep Chime
  502 17070     1   0 10:48AM ??         0:00.24 /System/Library/CoreServices/PowerChime.app/Contents/MacOS/PowerChime
  502 17740 16102   0 10:50AM ttys002    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox Chime

Find the pid of the powerchime app in this case is 17070

then do a:

kill -9 17070

It'll start back up at startup but def kills the process while you're working.