iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💡

Causes and Solutions for Mac Waking Up From Sleep Unexpectedly

に公開

Putting a Mac to sleep offers more benefits than shutting it down, so for daily use, I often "turn off the power" by putting it to sleep.
There seem to be several advantages:

  • You can immediately return to the state before sleep and resume work.
  • Since it uses an SSD, physical wear is minimal, making the benefits of shutting down negligible.
  • Power consumption in sleep mode is sufficiently low (about 4.54 yen per month for M1) *1.
  • iCloud syncing and Time Machine backups are automatically executed even during sleep.
  • The Safe Sleep feature saves the state of open apps and documents *2.
  1. *1 Calculated at 0.18W per hour, based on Japanese household electricity rates of 35 yen/kWh.
  2. *2 What is safe sleep on your Mac? - Apple Support

However, for some reason, the Mac would wake up from sleep in less than a minute.
Since I had "Require password after sleep or screen saver begins" set to "immediately" in "Security & Privacy," there was no security risk, but the screen would turn on repeatedly in the middle of the night, and devices connected to the Mac would be powered on.

The Cause was a Bluetooth Mouse

To get straight to the point, the "MX ERGO" connected via Bluetooth was the cause. This seems to be a phenomenon frequently seen among users of Logitech (Logicool) mice.
Since the MX ERGO has an Easy-Switch button to toggle between paired devices, I solved it by switching to a second pairing slot that wasn't registered to anything (though it is a bit of a hassle).

Other Solutions

I referred to this article, and it seems there is also a method using an app called "FluTooth."

How to investigate and solve the cause of automatic wake-up on Mac mini (M2) | Blog Hack

FluTooth is available for free on Gumroad. While similar solutions using scripts have been proposed, they have the drawback that the keyboard and mouse cannot be used immediately after waking up, so it's not a fundamental solution. MacBook users should be cautious.

As mentioned in that article, it might not be a perfect solution, but using "FluTooth" could be an option if you cannot easily disconnect the device from your Mac.

Checking the Logs

You can check the logs by running the following command in the terminal after the Mac has woken up from sleep.

sudo pmset -g log

The initial Display is turned off indicates that the display went dark, so sleep mode was active.
In the fourth log entry, Bluetooth LE HID Activity appeared. When I asked ChatGPT, it suggested that this might be the cause.

It indicates that there was activity from a Bluetooth device. This suggests that a Bluetooth keyboard, mouse, or other HID (Human Interface Device) detected some input, which may have triggered the wake from sleep.

Time stamp                Domain              	Message                                                                        	Duration  	Delay
==========                ======              	=======                                                                        	========  	=====
UUID: xxxxxxxx-xxxxxxxxx-xxxx-xxxxxxxxxxxxxxxxxxxx
2024-01-06 02:52:16 +0900 Notification        	Display is turned off
...

2024-01-06 02:52:16 +0900 Assertions          	PID xxx(bluetoothd) Summary UserIsActive "Bluetooth LE HID Activity" 00:12:14  id:xxxxxxxxxxxx [System: PrevIdle DeclUser SRPrevSleep IPushSrvc kCPU kDisp]

Fortunately (?), the only device I had connected via Bluetooth was the mouse, so by disconnecting it from the Mac, I was able to resolve the issue of it waking up from sleep.

Discussion