Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kapitainsky

macrumors member
Dec 30, 2020
33
17
Filed bug (FB9864403). This appears to be a regression in macOS. Very similar DarkWake issue after the 10.13.4 update (which Apple finally fixed in 10.14).

In my case, iMac Pro with Apple's BT keyboard and magic mouse. Three LaCie RAIDs connected to a single Thunderbolt 3 port. The iMac will sleep its display, the RAIDs begin to sleep, but then immediately wake, then sleep, wake, etc. indefinitely.

Workaround is to do a complete system shutdown overnight rather than sleeping. Thankfully the iMac Pro cold boot is very fast (about 30 to 40 seconds).
For my workaround people using BT keyboard and mouse lose ability to wakeup their computer with these devices when BT is off.

It might be needed to keep keyboard connected with USB cable.
 

DaveXX

macrumors regular
Jul 17, 2020
222
199
I have the same problem with my MBP 16 2019.
If i turn of BT will solve the issue. But it seems its related to some of my devices.
If i let BT on and let the magic trackpad connected and turn off my logitech K860 keyboard and my MX Vertical it seems to stay in sleep.
Otherwise it will wake up after 30seconds. It is really annoying especially if you have a big external screen which will wake up as well.
 

daniel.dawson.397

macrumors newbie
Jun 12, 2015
17
17
I can confirm this issue on my 2019 13" Intel MBP with 4 TB ports, running Monterey 12.2. Current work around is to turn off my Apple Magic Keyboard and Microsoft Bluetooth mouse prior to closing the lid. Turning off bluetooth also works but is less convenient. When I ran the following from terminal it also said that Handoff and Screen Sharing were preventing sleep so I've disabled those.
Code:
pmset -g assertions
 

random-uk

macrumors member
Dec 29, 2011
56
19
The same problem here and I am only using Apple magic mouse. Turning BT off indeed works but automation is always better - would you mind to share you Hammerspoon script? I have also achieved the same using sleepwatcher - all details in the next post.
sleepwatcher looks like a very similar approach. With Hammerspoon, you have to set up a watcher:

Code:
caffeinateWatcher = hs.caffeinate.watcher.new(caffeinateCallback):start()

then look for the events:

Code:
function caffeinateCallback(eventType)
    if (eventType == hs.caffeinate.watcher.systemDidWake) then
        hs.execute("/usr/local/bin/blueutil -p 1")
    elseif (eventType == hs.caffeniate.watcher.systemWillSleep) then
        hs.execute("/usr/local/bin/blueutil -p 0")
    end
end

Hope that helps
 
  • Like
Reactions: kapitainsky

J1immyS

macrumors newbie
Mar 2, 2021
3
0
In my case it happens when on battery or on AC power - and if I have external disk connected it starts/stops every few seconds. Not acceptable. And of course when on battery it kills it quick.

Turning BT manually off before going sleep "fixes" the problem but automation is always better in case like this.

Until apple fixes it here is my workaround - it switches BT off when going sleep and back on when waking up.

Using brew install sleepwatcher and blueutil:
Code:
brew install sleepwatcher && brew install blueutil

Create .sleep and .wakeup scripts' files in your home folder:
Code:
echo "/usr/local/bin/blueutil -p 0" > ~/.sleep && echo "/usr/local/bin/blueutil -p 1" > ~/.wakeup
When on ARM mac check before where blueutil tool is (which blueutil). I think brew moved default instalations directory from /usr to /opt

Make both files excecutable:
Code:
chmod 755 ~/.sleep && chmod 755 ~/.wakeup

Restart sleepwatcher service:
Code:
brew services restart sleepwatcher

Now when your computer goes sleep BT is turned off and restored when it wakes up.


When Apple fixes this issue you can simply remove .sleep and .wakeup files and/or uninstall sleepwatcher and/or blueutil:
Code:
rm ~/.sleep && rm ~/.wakeup
brew uninstall sleepwatcher && brew uninstall blueutil

and cleanup services to get rid off any residue:
Code:
brew services cleanup
This works like a charm - thank you very much!
 

jhkuo

macrumors newbie
Aug 25, 2009
24
9
In my case it happens when on battery or on AC power - and if I have external disk connected it starts/stops every few seconds. Not acceptable. And of course when on battery it kills it quick.

Turning BT manually off before going sleep "fixes" the problem but automation is always better in case like this.

Until apple fixes it here is my workaround - it switches BT off when going sleep and back on when waking up.

Using brew install sleepwatcher and blueutil:
Code:
brew install sleepwatcher && brew install blueutil

Create .sleep and .wakeup scripts' files in your home folder:
Code:
echo "/usr/local/bin/blueutil -p 0" > ~/.sleep && echo "/usr/local/bin/blueutil -p 1" > ~/.wakeup
When on ARM mac check before where blueutil tool is (which blueutil). I think brew moved default instalations directory from /usr to /opt

Make both files excecutable:
Code:
chmod 755 ~/.sleep && chmod 755 ~/.wakeup

Restart sleepwatcher service:
Code:
brew services restart sleepwatcher

Now when your computer goes sleep BT is turned off and restored when it wakes up.


When Apple fixes this issue you can simply remove .sleep and .wakeup files and/or uninstall sleepwatcher and/or blueutil:
Code:
rm ~/.sleep && rm ~/.wakeup
brew uninstall sleepwatcher && brew uninstall blueutil

and cleanup services to get rid off any residue:
Code:
brew services cleanup

This totally works! Thanks a lot
 

DaveXX

macrumors regular
Jul 17, 2020
222
199
The lid of my MBP is always closed so this workaround is not really usable.
I tried something different. I deleted all Logitech BT devices and just let the magic trackpad connected via BT.
For the logitech devices i used the unify receiver and connected the devices with the logitech unify software.

Now it seems to work and my mbp stay in sleep mode.
 

Sheppardhazemaze

macrumors newbie
Jan 28, 2022
3
0
Right now, my mac can go to sleep without turning off bluetooth

Edit: On day later, it doesn't work anymore.
 
Last edited:

whosthis

macrumors member
Aug 21, 2008
99
44
My 2019 i9 iMac has been driving me nuts in the past.

Often, at the mornings it is warm and running (when it should be asleep). I can ping it from another computer, but I cannot login via ssh. The screen is dark, no response to any mouse or keyboard, wired or BT. Always needs a long power button press to switch it off hardly.

Also extremely annoying: When the computer should be asleep and I am on my iPad, putting in the AirPods Pro, the iMac would immediately light up and spring to live.

I tried the automation by @kapitainsky yesterday, and it worked like a charm. Thank you!
 

creativesmith

macrumors member
Sep 28, 2011
64
49
Is Apple truly flummoxed and unable to address this problem—doubtful—or are those of us complaining about BT's constant awakening of our Macs—well, are we merely perceived as a dinky percentage of overall Monterey users? Ugh! Not only should we not have to toggle BT on and off, we should not have to wait this long for Apple to announce that they are working on a fix.
 

bogdanw

macrumors 603
Mar 10, 2009
6,099
3,010
Does anyone know what is the purpose of /usr/sbin/BlueTool?
As far as I could find out, it was previously in iOS and now in Monterey, but not in other versions of macOS.
The help menu is not very helpful.
BlueTool.jpg
 

kapitainsky

macrumors member
Dec 30, 2020
33
17
Does anyone know what is the purpose of /usr/sbin/BlueTool?
As far as I could find out, it was previously in iOS and now in Monterey, but not in other versions of macOS.
The help menu is not very helpful.
View attachment 1955572

Apple stuff...

some people try to reverse engineer it on iOS:


macOS is in big part propriatey system so quite normal that not everything is shared with public.

Maybe Apple is converging BT software with iOS... as I can see on my macbook "/usr/sbin/BlueTool -R" is running all the time as a deamon.
 

kapitainsky

macrumors member
Dec 30, 2020
33
17

kapitainsky

macrumors member
Dec 30, 2020
33
17
I personally don’t care about this issue, but as a matter of principle, Mac users should not have to rely on third-party tools to perform basic functions, like turning the Bluetooth off and on again ;-)

I am afraid this is not Apple's principle... They provide you GUI:) this is unfortunate state of macOS heading into iOS direction.
 

mrcj.

macrumors newbie
Original poster
Oct 26, 2021
8
7
It's getting ridiculous. still no toggle option for "Allow Bluetooth devices to wake this computer" in 12.2.1 ?????
 
  • Like
Reactions: HeroOfTime32

narimangafurov

macrumors newbie
Dec 6, 2019
16
7
hello everyone! I have a macbook m1 pro max . there was a problem - the computer often came out of sleep mode by itself. I put beta version 12.3 and the problem seems to have been solved, but I still noticed that he sometimes comes out of sleep mode. Now I tried and turned off the Logitech MX3 mouse and the problem was solved! Apple's native bluetooth devices are working fine (I still have an apple keyboard and trackpad connected), maybe there are problems with third-party bluetooth devices?
 
  • Like
Reactions: Super Angulon

HeroOfTime32

macrumors member
Apr 7, 2012
56
74
Florida
It's getting ridiculous. still no toggle option for "Allow Bluetooth devices to wake this computer" in 12.2.1 ?????
It’s a basic option, and such a no brainer to include in the OS. I’d imagine this toggle alone would save everyone headache until the real bug was sorted out behind the scenes. Let alone the people that just want to enable this on their own accord anyways.
 

Super Angulon

macrumors newbie
Nov 1, 2012
19
27
hello everyone! I have a macbook m1 pro max . there was a problem - the computer often came out of sleep mode by itself. I put beta version 12.3 and the problem seems to have been solved, but I still noticed that he sometimes comes out of sleep mode. Now I tried and turned off the Logitech MX3 mouse and the problem was solved! Apple's native bluetooth devices are working fine (I still have an apple keyboard and trackpad connected), maybe there are problems with third-party bluetooth devices?
Me too. Turning mx3 off solved the problem.
 
  • Like
Reactions: narimangafurov

daniel.dawson.397

macrumors newbie
Jun 12, 2015
17
17
I can confirm this issue on my 2019 13" Intel MBP with 4 TB ports, running Monterey 12.2. Current work around is to turn off my Apple Magic Keyboard and Microsoft Bluetooth mouse prior to closing the lid. Turning off bluetooth also works but is less convenient. When I ran the following from terminal it also said that Handoff and Screen Sharing were preventing sleep so I've disabled those.
Code:
pmset -g assertions
The 12.2.1 update appears to have fixed the battery drain issue in my case.
 
  • Like
Reactions: HeroOfTime32

aguscarrascosa

macrumors newbie
Feb 8, 2022
1
0
In my case it happens when on battery or on AC power - and if I have external disk connected it starts/stops every few seconds. Not acceptable. And of course when on battery it kills it quick.

Turning BT manually off before going sleep "fixes" the problem but automation is always better in case like this.

Until apple fixes it here is my workaround - it switches BT off when going sleep and back on when waking up.

Using brew install sleepwatcher and blueutil:
Code:
brew install sleepwatcher && brew install blueutil

Create .sleep and .wakeup scripts' files in your home folder:
Code:
echo "/usr/local/bin/blueutil -p 0" > ~/.sleep && echo "/usr/local/bin/blueutil -p 1" > ~/.wakeup
When on ARM mac check before where blueutil tool is (which blueutil). I think brew moved default instalations directory from /usr to /opt

Make both files excecutable:
Code:
chmod 755 ~/.sleep && chmod 755 ~/.wakeup

Restart sleepwatcher service:
Code:
brew services restart sleepwatcher

Now when your computer goes sleep BT is turned off and restored when it wakes up.


When Apple fixes this issue you can simply remove .sleep and .wakeup files and/or uninstall sleepwatcher and/or blueutil:
Code:
rm ~/.sleep && rm ~/.wakeup
brew uninstall sleepwatcher && brew uninstall blueutil

and cleanup services to get rid off any residue:
Code:
brew services cleanup

This solution worked for me of disabling the bluetooth when Mac goes onto sleep.

Disabling the RemoteWakeEnabled option did not work for me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.