Cannot Turn Bluetooth Off

Discussion in 'macOS' started by headhog70, Nov 22, 2016.

  1. headhog70 macrumors newbie

    Joined:
    Oct 14, 2013
    Location:
    Dayton, OH
    #1
    I cannot turn off Bluetooth on my iMac, 27-inch, Late 2013, Version 10.12.1.

    I click on the Bluetooth icon in the menu bar and then click Turn Bluetooth Off. I then get this error message: You cannot control your computer if you turn Bluetooth off at this time.

    I have no Bluetooth devices connected. System Report for Bluetooth does not show any connected devices.

    Using Bluetooth Debug I have Reset the Bluetooth Module, Factory Reset all connected Apple devices, and Removed all devices.

    I cannot turn off Bluetooth in Safe Mode.

    I did SMC and PRAM Resets.

    I reloaded the operating system.

    Apple Care says next step is taking computer in for repair.

    Is there anything else I should try before taking the iMac to Apple store?
     
  2. rshrugged macrumors 6502a

    Joined:
    Oct 11, 2015
    #2
  3. headhog70 thread starter macrumors newbie

    Joined:
    Oct 14, 2013
    Location:
    Dayton, OH
    #3
    Thanks for your reply. I always use a wired keyboard and mouse. Also deleted BT plist. Problem is still there.
     
  4. rshrugged macrumors 6502a

    Joined:
    Oct 11, 2015
    #4
    You're welcome. Good luck.
     
  5. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #5
    Have you tried this also?
    Code:
    sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState -bool NO && sudo pkill -HUP blued
     
  6. headhog70 thread starter macrumors newbie

    Joined:
    Oct 14, 2013
    Location:
    Dayton, OH
    #6
    I have not tried anything with com.apple.Bluetooth.plist. This is beyond my skill level. I am hesitant to try something that I don't completely understand or cannot undo. In my previous post I said I deleted BT plist. What I did was rename com.apple.BluetoothFileExchange.plist to BluetoothFileExchangeOLD.plist. This was obviously just trying anything at that point.
    Could you briefly say what the sudo defaults write does and how to undo it if necessary?
    Thanks for your help.
     
  7. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #7
    BluetoothFileExchange.plist is something else entirely.

    In short, it changes the configuration for the Bluetooth process and tells it to re-check its configuration and quit/start if appropriate.

    sudo is a command that executes the command thereafter as another user, in this case as the root user (because the
    com.apple.Bluetooth.plist file is owned by root). defaults is a system command that modifies .plist files directly, without having to use a text editor. What it does is change (‘write’) the key ‘ControllerPowerState’ within it to the boolean value false (’NO’). By default, this value is set to true (‘YES’). ControllerPowerState is the key that determines whether the Bluetooth process should be running, if it is set to false, then the Bluetooth process will not run. The ‘&&’ connects this command to the next command. pkill is another system command with which you can terminate running processes, much like quitting via the menu bar or the Dock. ‘-HUP’ is a signal that tells the process to ‘hang up’ and re-evaluate its configuration (in this case the Bluetooth.plist file). blued is the name of the Bluetooth process (Bluetooth daemon).

    When you disable Bluetooth in System Preferences, then the system modifies this key as well. With Terminal you can do that directly without having to deal with this weird error in System Preferences.

    You can verify the current state of ‘ControllerPowerState’ with this command. This will just read the information from the file.
    Code:
    defaults read /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState
    When it returns a 1 it is set to true (default), a 0 when it is false. False is what you want.

    To reverse it, you can just enable Bluetooth in System Preferences or use the reverse of the first command I gave you:
    Code:
    sudo defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState -bool YES && sudo pkill -HUP blued
    
     
  8. headhog70 thread starter macrumors newbie

    Joined:
    Oct 14, 2013
    Location:
    Dayton, OH
    #8
    I was once the chief engineer for a couple of aircraft. My technical staff rarely gave such accurate and succinct replies such as yours. Thank You.

    It of course worked (after entering my password).

    This problem was not that critical. I just do not like errors that seem relatively harmless. Sometimes a harmless annoyance brings down an aircraft.
     
  9. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #9
    Thanks for the compliment. :)
     

Share This Page