Skip to content

Instantly share code, notes, and snippets.

@felipecsl
Last active March 2, 2026 20:24
Show Gist options
  • Select an option

  • Save felipecsl/5177790 to your computer and use it in GitHub Desktop.

Select an option

Save felipecsl/5177790 to your computer and use it in GitHub Desktop.
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@uhurusurfa

Copy link
Copy Markdown

Tried many solutions and the only one that works for me to get headphones to work again when only internal speakers seems to be "recognised" is:

  1. Close laptop lid
  2. Plug in external headset
  3. Open laptop and sign in again when it wakes

Restarting core audio does not seem to clear something that gets OSX confused but bizarrely the above sequence does work.

@buraga-dmitrii

Copy link
Copy Markdown

Tried many solutions and the only one that works for me to get headphones to work again when only internal speakers seems to be "recognised" is:

  1. Close laptop lid
  2. Plug in external headset
  3. Open laptop and sign in again when it wakes

Restarting core audio does not seem to clear something that gets OSX confused but bizarrely the above sequence does work.

Thank you very much. It's worked for me

@gianpaj

gianpaj commented Mar 6, 2020

Copy link
Copy Markdown
sudo killall coreaudiod

Did the job on macOS Catalina (10.15) on a MacBook Pro 2017.

The speaker icon 🔈 on the Menu bar on the top right reappear.
Also, the pid (process id) will have changed in the output of:

ps -ax | grep '[c]oreaudiod'

@taylor

taylor commented Oct 30, 2020

Copy link
Copy Markdown

or do sudo killall coreaudiod

This works great for me in Catalina 10.15.6. I did not have to restart Chrome.

@iMonZ

iMonZ commented Jan 10, 2021

Copy link
Copy Markdown

kill: illegal process id: ps awk: syntax error at source line 1 context is {print >>> $1} <<<
awk: bailing out at source line 1

@mastef

mastef commented Feb 16, 2021

Copy link
Copy Markdown

sudo launchctl stop com.apple.audio.coreaudiod && sudo launchctl start com.apple.audio.coreaudiod seems to be the better solution

@luckman212

luckman212 commented Feb 24, 2021

Copy link
Copy Markdown

or, using the newer launchctl syntax:

sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod

@eduuuardo

Copy link
Copy Markdown

Thanks!

@emalihin

emalihin commented Mar 4, 2021

Copy link
Copy Markdown

or, using the newer launchctl syntax:

sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod

thanks, this fixes big sur 11.2.2 daily issues with audio breaking and becoming glitchy

@ianthetechie

Copy link
Copy Markdown

or, using the newer launchctl syntax:

sudo launchctl kickstart -kp system/com.apple.audio.coreaudiod

thanks, this fixes big sur 11.2.2 daily issues with audio breaking and becoming glitchy

Same for me! I'm not really sure what's going on, but the Big Sur issues have been SUPER annoying.

@webbp

webbp commented Apr 21, 2021

Copy link
Copy Markdown

@felipecsl please update your gist to
sudo killall coreaudiod
as recommended by @fred-revel.
it seems like many people refer to this gist, and this command is much easier to remember

@jp-nullpod

Copy link
Copy Markdown

sudo launchctl stop com.apple.audio.coreaudiod

that worked for me

@whimsyniche

Copy link
Copy Markdown

Just what I was looking for!

@chamatt

chamatt commented Oct 27, 2021

Copy link
Copy Markdown

This happens to me all the time because I spilled some wine on my mac. It gets tiring having to type sudo pkill coreaudiod all the time and then my password, so I created a packaged mac app version of it. If anyone is interested: https://github.com/chamatt/restart-coreaudiod

@davidblurton

Copy link
Copy Markdown

I created a shortcut to run this command in the Shortcuts app. You can add it to the menu bar or quick actions in Finder.
image

@justinkahrs

Copy link
Copy Markdown

This works perfectly for anybody wondering how to get their bluetooth headphones sounding good again. I really wish I didn't have to run this every time, but it's certainly better than restarting...

@joaodarocha

Copy link
Copy Markdown

This worked for my SteelSeries Arctis 7 that are wireless with a receiver (not BlueTooth).

Thanks 👏

@stefanhinker

Copy link
Copy Markdown

I recently had issues with no sound coming from a Sonos One SL when trying to connect with AirPlay from Monterey 12.3.1.
The above did not (reliably) solve this.
I've had reasonable success by including AirPlayXPCHelper in the list of things to kill (and therefore restart).
So the rescue line is now:

sudo killall coreaudiod AirPlayXPCHelper

@mmontag

mmontag commented May 3, 2022

Copy link
Copy Markdown

Does anyone know how to trigger a "software headphone jack event" similar to seating/unseating a cable in a Macbook's built-in headphone jack? Sometimes this unfreezes audio for me, but it's not always convenient to reach the jack/don't always have headphones handy.

@TYZY89

TYZY89 commented Aug 19, 2022

Copy link
Copy Markdown

Thanks, it's useful!

@JTBabelberg

Copy link
Copy Markdown

After losing my core audio completely (corauaudid didn't even start with the system), I tried all the tricks in the (Internet-)Book to solve this problem. Multiple re-starts with different buttons pressed and all the code lines that are recommended in the terminal. All that didn't work.

Even the Apple support could help me. There idea was: reset the whole system (with timemaschiine) (what probably wouldn't had helped..as I know now) OR Start from scratch and reinstall everything.

But the solution was way easier.
There was a driver in the /System/Library/Extensions/ that was left there after the deinstallation of a program I wanted to check out. In this case Voicemod.
After deleting VoicemodAudioDevice.driver the Audio Problem was solved the core driver was back everything was fine again. After a Restart!

So if you test a software and after that something doesn't work anymore, take a deep look into the system and find every file that came along with it and delete it. (I know...)

Additional I would like to point out that I use macOs 10.14 (what still works with 32-bit plugins...so i can not upgrade easily) the App Voicemod wanted an macOs 10.15 upwards, which it shows with the first start after the installation. I think that is the reason for all the trouble.

I hope I could help some desperate people with the same problem.

@itachi47

Copy link
Copy Markdown

I was loosing the audio but this happened after upgrading from Catalina, so I moved to Catalina tested around for 2 months and did not faced any issue, but as soon as I upgraded to the latest version of mac OS, started facing the same issue again.

@wblondel

Copy link
Copy Markdown

Had to use this after installing Microsoft Teams. I couldn't change the volume anymore.

@luckman212

luckman212 commented Feb 24, 2024

Copy link
Copy Markdown

Sadly no longer working on Sonoma 14.4:

Could not kickstart service "com.apple.audio.coreaudiod": 1: Operation not permitted

update 4/24/24: Apple says "Nope, that's the way we want it." 👎

@crunk1

crunk1 commented Apr 16, 2024

Copy link
Copy Markdown

Following. I'm seeing the same as @luckman212. I'm stuck trying to uninstall blackhole-2ch.

@skowalak

skowalak commented Apr 17, 2024

Copy link
Copy Markdown

@luckman212 , @crunk1
There is a reference in the macOS Release Notes about this, seems like it is no longer possible to kickstart coreaudiod.

https://developer.apple.com/documentation/macos-release-notes/macos-14_4-release-notes#Core-Audio

If you are unable to uninstall blackhole-2ch because the uninstall_postflight fails you could try changing the postflight command in the following file <homebrew prefix>/Caskroom/blackhole-2ch/.metadata/<version>/<timestamp>/Casks/blackhole-2ch.rb to use a different command or no command at all. Since version 0.6.0 the new behavior is reflected in blackhole-2ch homebrew package.

@aokie

aokie commented Apr 23, 2024

Copy link
Copy Markdown

👍

@ishar19

ishar19 commented Jul 29, 2024

Copy link
Copy Markdown
sudo killall coreaudiod

Worked for me, in M2 PRO 14", pc could sense the jack but audio was not coming, got fixed after the command

@etc

etc commented Aug 27, 2024

Copy link
Copy Markdown

sudo killall coreaudiod AirPlayXPCHelper

Thank you so much @stefanhinker this is—finally—what fixed the issue for me.

@z3rodarkbeing

Copy link
Copy Markdown

I used to have it saved in my notes. I’m glad I found it here.

sudo killall coreaudiod

Worked perfectly. This issue is so annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment