21

I use my 2019 MacBook Pro with a Magic Keyboard via Bluetooth. When the MBP is in sleep mode, I can wake it up by pressing a key on the keyboard.

I would like to change it so key presses on the Magic Keyboard are ignored. I still want it to wake up easily otherwise - if possible by pressing any key on the integrated MBP keyboard, or by some other simple means (i.e. by a quick press on the on/off button).

I do not wish to turn off the Magic Keyboard, to disable Bluetooth or to disconnect the device in the Bluetooth settings.

Is there a way to achieve this? I checked the settings, and found no option to disallow a specific device to influence sleep mode...

1

4 Answers 4

28

It looks like Apple have removed the Allow Bluetooth devices to wake this computer option in MacOS Monterey (12.2.1) for some reason.

The solution from this post on MacRumors solved the issue for me on my M1 MacBook:

brew install sleepwatcher blueutil
echo "$(which blueutil) -p 0" > ~/.sleep
echo "$(which blueutil) -p 1" > ~/.wakeup
chmod 755 ~/.sleep ~/.wakeup
brew services restart sleepwatcher

If you don't have brew, the installation instructions can be found at https://brew.sh

12
  • This did not work for me on my 2018 Macbook pro running Monterey 12.2.1
    – teradyl
    Commented Mar 18, 2022 at 13:52
  • The code given is different from the source. Line 2 and 3 suppose to be: echo "/usr/local/bin/blueutil -p 0" > ~/.sleep && echo "/usr/local/bin/blueutil -p 1" > ~/.wakeup
    – neobie
    Commented Mar 20, 2022 at 3:04
  • 1
    As that MacRumors forum post says, the location that brew installs to is different on M1/ARM Macs. My solution uses the new install location. The best thing to do is run which blueutil and find out where it has been installed on your system.
    – FusionFox
    Commented Mar 21, 2022 at 12:54
  • 2
    I've updated my answer to just use the which command inline to make this answer more universal
    – FusionFox
    Commented Mar 21, 2022 at 13:11
  • The previously accepted answer from @pmagwood does not seem to work in Monterey anymore - this one does now.
    – AnoE
    Commented Apr 26, 2022 at 7:40
11

Yes, you can achieve this through the Bluetooth settings. See this article for guidance: OSXDaily - Try Preventing the Bluetooth Wake Ability if Your Mac is Randomly Waking from Sleep

In summary:

  1.  Menu --> System Preferences --> Bluetooth
  2. Click the Advanced button (lower right corner)
  3. Uncheck the "Allow Bluetooth devices to wake this computer" option

If the option is not there, it may be related to a bug (feature?) with Monterey. Try setting the preference using terminal:

defaults -currentHost write com.apple.Bluetooth RemoteWakeEnabled 0

8
  • 6
    I do not have this option. If I click "Advanced" (in my German version: "Weitere Optionen..."), I only get to choose whether I want to start the Bluetooth Assistant if no device is available during startup (exactly the two options in the screenshot in that article), and the third option does not show at all for me...
    – AnoE
    Commented Dec 3, 2021 at 7:50
  • I think you are encountering a bug in the macos. I don't see it explicitly in your question but your tag makes me assume you are running Monterey. Can you confirm? As far as apple is concerned in their documentation, the option should be there: link Others have the same issue after upgrading link link
    – pmagwood
    Commented Dec 4, 2021 at 19:54
  • 1
    On a macos 10.13.6 system I was successfully able to edit this checkbox using the terminal. Please try the following to see if it affects the remote wake preference on your system: defaults -currentHost write com.apple.Bluetooth RemoteWakeEnabled 0 . (You can verify the setting was written by executing defaults -currentHost read com.apple.Bluetooth). You can always re-enable the preference by changing the 0 to a 1 in the above code
    – pmagwood
    Commented Dec 4, 2021 at 20:11
  • awesome, thanks! And yes, this is indeed on Monterey.
    – AnoE
    Commented Dec 6, 2021 at 9:52
  • This doesn't seem to work. Open my Airpod Pro still wake my Macbook pro all the time.
    – Louis Yang
    Commented Jan 26, 2022 at 6:58
3

I discovered this simple free mac app that turns off bluetooth when the mac goes to sleep (and turns it back on when it wakes)

https://github.com/odlp/bluesnooze/

Works like a charm!

1
  • In MacOS 12.5.1, this does not work. The application does successfully disable Bluetooth, but the Mac wakes back up anyway and the application does not re-enable Bluetooth.
    – Pointy
    Commented Oct 3, 2022 at 15:04
2

For Logitech-Options users:

Try either removing the permissions in System Preferences > Security & Privacy > Privacy > Input Monitoring > Logitech Options Daemons

or

Try installing "Logi Options+" instead of "Logitech-Options".

1
  • Try installing "Logi Options+" instead of "Logitech-Options". Not quite ! "Logi Options+" barely supports older model. This requiring both if you switch between different places with different peripherals.
    – bric3
    Commented Dec 19, 2022 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .