Created
January 25, 2012 15:55
-
-
Save hartsock/1676912 to your computer and use it in GitHub Desktop.
for MacBook Pro with Bluetooth sound issues...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# My MacBook Pro's bluetooth transmitter will sometimes get into an error state where it will not | |
# connect to my bluetooth headset without a reboot. This seems to happen when I walk out of range | |
# with the device on. | |
# | |
# This script stops and starts the bluetooth daemon itself effectively restarting the bluetooth | |
# services. NOTE: bluetooth must be turned off in the UI when you do this. It's clumsy but it | |
# beats rebooting. | |
# Note: edited to add a kick to the audio daemon that often gets confused if switching between sources. | |
# kill the daemons | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist | |
# give the "chips" a chance to "cool" | |
sleep 3 | |
# restart the daemons | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Okay, so I've noticed the sound daemon gets befuddled if you swap around multiple bluetooth devices for audio. So this kicker reboots both the bluetooth and audio daemons in OS X.