How to Restart Bluetooth on Your Mac

Bluetooth issues on macOS can be frustrating. Whether you’re experiencing connection problems with your wireless headphones, mouse, keyboard, or other Bluetooth devices, restarting the Bluetooth service can often resolve these issues. This article will guide you through different methods to restart Bluetooth on your Mac, ensuring a stable and reliable connection.

There are several ways to restart Bluetooth on macOS, ranging from simply toggling it off and on in the system settings to using command-line tools for a deeper restart of the Bluetooth daemon. The method you choose might depend on the specific problem you’re facing and your comfort level with using the Terminal.

One important detail to note is the name of the Bluetooth daemon. Prior to macOS 10.11 El Capitan, the daemon was named blued. From El Capitan onwards, it was changed to bluetoothd. Keep this distinction in mind if you are using command-line methods, especially on older macOS versions.

Let’s explore the command-line approaches first, as they offer a more thorough restart of the Bluetooth service.

For macOS versions before El Capitan and in environments where System Integrity Protection (SIP) is disabled, you can try unloading and then reloading the Bluetooth daemon’s plist file. This method attempts to restart the daemon by manipulating its launch configuration.

$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist

alt: macOS Bluetooth Preferences window showing options to turn Bluetooth on or off and connect to devices

However, due to System Integrity Protection (SIP) enabled by default in macOS El Capitan and later, unloading and reloading the plist might not be effective. In SIP-enabled environments, a more reliable approach is to directly stop and then start the Bluetooth daemon using launchctl. This method works across different macOS versions, simply adjusting the daemon name as needed.

$ sudo launchctl stop com.apple.bluetoothd
$ sudo launchctl start com.apple.bluetoothd

or, for older macOS versions:

$ sudo launchctl stop com.apple.blued
$ sudo launchctl start com.apple.blued

These commands directly instruct launchctl to stop and restart the Bluetooth daemon, ensuring a clean restart of the service. This is often more effective in resolving persistent Bluetooth issues compared to simply toggling Bluetooth on and off through the graphical user interface.

If your goal is just to toggle the Bluetooth status (on or off) without a full daemon restart, you can use the defaults write command along with signaling the Bluetooth daemon to reload its settings. This approach can be quicker for simply enabling or disabling Bluetooth.

To turn Bluetooth on:

$ sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 1

To turn Bluetooth off:

$ sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0

After changing the ControllerPowerState, you need to signal the Bluetooth daemon to reload its configuration. You can do this using killall -HUP or pkill -HUP if you have proctools installed.

$ sudo killall -HUP bluetoothd

or for older macOS versions:

$ sudo killall -HUP blued

It’s worth mentioning tools like Blueutil, which are available for managing Bluetooth via the command line. However, Blueutil relies on private APIs of the IOBluetooth.framework. This means its functionality might be broken or unreliable in future macOS updates as Apple may change or remove these private APIs without notice. Therefore, while Blueutil can be convenient, relying on officially supported methods like launchctl and defaults write is generally more robust and future-proof for restarting Bluetooth on your Mac.

In conclusion, restarting Bluetooth on your Mac can be achieved through various methods. For a full restart of the Bluetooth daemon, using launchctl stop and start is recommended, especially on macOS El Capitan and later. If you only need to toggle Bluetooth on or off, defaults write and signaling the daemon is a quicker alternative. Choose the method that best suits your needs and macOS version to keep your Bluetooth connections running smoothly.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *