I ran into an issue where my volume buttons on my mac weren't able to adjust the volume of my computer. I sought a solution and someone suggested using
sudo killall coreaudiod. Now I have no volume on my computer at all. How do I fix this?
This command will do it:
sudo launchctl stop com.apple.audio.coreaudiod && sudo launchctl start com.apple.audio.coreaudiod
Martin Strouhal's answer doesn't work for OS X/macOS ≥ 10.12.4 due to removal of
com.apple.audio.coreaudiod from system integrity protection's
RemovableServices whitelist in
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist: _ Operation not permitted while System Integrity Protection is engaged
So instead of unloading the service, we instead just restart it.
Also, the latter command (
sudo launchctl start com.apple.audio.coreaudiod) worked to restart the service after I had killed
I'm using an M1 pro. This is very frustrating so I just created an alias in my .zshrc.
alias ar="sudo pkill coreaudiod -i"
copy paste this line and it will just append+write to your .zshrc or .bashrc
echo 'alias ar="sudo pkill coreaudiod -i"' >> ~/.zshrc; source ~/.zshrc
Or if bash:
echo 'alias ar="sudo pkill coreaudiod -i"' >> ~/.bashrc; source ~/.bashrc
Sadly Still looking for a fix.
Hope this helps someone.
Happy Coding =)