Simulator causes MacBook Pro M1 Pro to wake from sleep every minute

Originator:arkadiusz.holko
Number:rdar://FB9745180 Date Originated:Nov 7, 2021
Status:Open Resolved:
Product:Simulator/Xcode Product Version:13.1
Classification: Reproducible:
 
Please describe the issue:
I recently got a new MacBook Pro M1 Pro 14-inch. I connected it to an external display (initially through a Thunderbolt hub but I also tried connecting it directly) and noticed that after putting my Mac to sleep, it wakes up the external display for a fraction of a second roughly once per minute.

I went looking for the cause of it and ran the following command after putting macOS to sleep when Simulator is open:

pmset -g log | grep -i "wake from"

And got:

2021-11-07 16:41:16 +0100 Wake                	DarkWake to FullWake from Deep Idle [CDNVA] : due to HID Activity Using AC (Charge:100%)           
2021-11-07 16:43:34 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:44:23 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:45:11 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:46:03 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:46:56 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:47:48 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:48:41 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   
2021-11-07 16:49:33 +0100 DarkWake            	DarkWake from Deep Idle [CDN] : due to SMC.OutboxNotEmpty smc.70070000 wifibt bluetooth-pcie/ Using AC (Charge:100%) 45 secs   

Times of those dark wakes match the times when my external display waked up. Then I confirmed that the same happens when no Thunderbolt device is connected to my MacBook Pro (it was only connected to power).

I checked if disabling additional wake reasons would help by running:
sudo pmset -a tcpkeepalive 0
sudo pmset -a powernap 0
sudo pmset -a ttyskeepawake 0

But MacBook Pro continues to wake up from sleep roughly each minute. It doesn’t do this when I quit the Simulator before putting it to sleep. In that case it wakes up only roughly once per hour which makes more sense (I assume it does some maintenance due to PowerNap).

I’m attaching the following files:
- sysdiagnose_2021.11.07_16-50-35+0100_839_macOS_MacBookPro18-3_21A559 - it was taken after I put my Mac to sleep for ~5 minutes; Simulator was open before sleep started 
- sysdiagnose_2021.11.07_17-06-51+0100_548_macOS_MacBookPro18-3_21A559 - it was taken after Mac slept for ~10 minutes; I quit Simulator before putting Mac to sleep;
- pmset_log.txt - logs from `pmset -g log` in the period when Mac should be sleeping;

This didn’t happen on my previous Intel MacBook Pro, so assume it’s somehow related to the new SoC or changes in macOS Monterey.


Please list the steps you took to reproduce the issue:
1. Run macOS Monterey 12.0.1 on a new MacBook Pro 14" with M1 Pro chip.
2. Open Xcode 13.1.
3. Open Simulator by right clicking on Xcode icon in the dock and choosing Open Developer Tools > Simulator.
4. Click on Apple icon in menu bar, click Sleep.
5. Wait for a few minutes.
6. Wake up macOS.
7. Run pmset -g log | grep -i "wake from" from the terminal and see that macOS kept waking up roughly once per minute.


What did you expect to happen?
I expect my Mac to not wake up each minute when Simulator is open before I put my Mac to sleep.


What actually happened?
Mac either keeps waking up roughly every minute or doesn't sleep at all (I'm not sure from just looking at logs).

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!