Contribute
Register

Sleep issues

Status
Not open for further replies.
Joined
Mar 8, 2017
Messages
758
Motherboard
Dell XPS 9700 4K (OpenCore)
CPU
i7-10875H
Graphics
UHD 630, 3840x2400
Mobile Phone
  1. Android
I had a look at sleep again today, I think I now know where the problem of the occurring wake lies. Attached my pmlog, as far as I can tell, this is the issue:

Code:
2020-06-18 18:36:58 +0200 Wake Requests           [*process=mDNSResponder request=Maintenance deltaSecs=7200 wakeAt=2020-06-18 20:36:58] [process=powerd request=TCPKATurnOff deltaSecs=43255 wakeAt=2020-06-19 06:37:53] [process=powerd request=UserWake deltaSecs=285001 wakeAt=2020-06-22 01:47:00 info="com.apple.alarm.user-visible-Weekly Usage Report,425"]

I turned off WiFi and sleep worked, tested it for half an hour, didn't wake up. Any ideas how to go about fixing this? Googling just told me that it's actually not an mDNS problem, which I find hard to believe...
 

Attachments

  • pmlog.txt
    5.9 KB · Views: 62
I had a look at sleep again today, I think I now know where the problem of the occurring wake lies. Attached my pmlog, as far as I can tell, this is the issue:

Code:
2020-06-18 18:36:58 +0200 Wake Requests           [*process=mDNSResponder request=Maintenance deltaSecs=7200 wakeAt=2020-06-18 20:36:58] [process=powerd request=TCPKATurnOff deltaSecs=43255 wakeAt=2020-06-19 06:37:53] [process=powerd request=UserWake deltaSecs=285001 wakeAt=2020-06-22 01:47:00 info="com.apple.alarm.user-visible-Weekly Usage Report,425"]

I turned off WiFi and sleep worked, tested it for half an hour, didn't wake up. Any ideas how to go about fixing this? Googling just told me that it's actually not an mDNS problem, which I find hard to believe...
Do you have power nap enabled? MaintenanceWake sounds like it.

Other things to try:
sudo pmset -a tcpkeepalive 0
disable bluetooth wake
 
@takki

I tried setting tcpkeepalive to 0, this did at least begin sleep but resumed back after like 5 seconds. Here's the log again, this mDNS thingy still perists.

Code:
Sleep/Wakes since boot at 2020-06-19 22:10:57 +0200 :0   Dark Wake Count in this sleep cycle:0

Time stamp                Domain                  Message                                                                        Duration      Delay     
==========                ======                  =======                                                                        ========      =====     
UUID: 42929F40-F1D5-40E7-8BD8-D6C226CBE878
2020-06-19 22:12:24 +0200 Sleep                   Entering Sleep state due to 'Software Sleep pid=195':TCPKeepAlive=active Using AC (Charge:0%) 14 secs   
2020-06-19 22:12:29 +0200 Wake Requests           [*process=mDNSResponder request=Maintenance deltaSecs=7200 wakeAt=2020-06-20 00:12:29] [process=powerd request=TCPKATurnOff deltaSecs=43255 wakeAt=2020-06-20 10:13:24] [process=powerd request=UserWake deltaSecs=185671 wakeAt=2020-06-22 01:47:00 info="com.apple.alarm.user-visible-Weekly Usage Report,425"]           
2020-06-19 22:12:29 +0200 PM Client Acks          Delays to Sleep notifications: [com.apple.apsd is slow(3034 ms)] [mDNSResponder is slow(5040 ms)]           
2020-06-19 22:12:36 +0200 Kernel Client Acks      Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(1481 ms)] [AppleHDADriver driver is slow(msg: SetState to 0)(1309 ms)] [powerd is slow(5045 ms)] [IONVMeController driver is slow(msg: SetState to 0)(811 ms)]           
2020-06-19 22:12:36 +0200 Assertions              PID 245(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008213 [System: PrevIdle DeclUser IntPrevDisp kDisp]         
2020-06-19 22:12:36 +0200 Assertions              PID 245(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008213 [System: PrevIdle DeclUser IntPrevDisp kDisp]         
2020-06-19 22:12:36 +0200 Assertions              Kernel Idle sleep preventers: IODisplayWrangler         
2020-06-19 22:12:36 +0200 Notification            Display is turned on                                                                     
2020-06-19 22:12:38 +0200 Wake                    Wake from Normal Sleep [CDNVA] : due to XDCI CNVW/UserActivity Assertion Using AC (Charge:0%)           
2020-06-19 22:12:38 +0200 WakeDetails             DriverReason:XHC - DriverDetails:                                         
2020-06-19 22:12:38 +0200 HibernateStats          hibmode=3 standbydelaylow=10800 standbydelayhigh=0                                       5             
2020-06-19 22:12:38 +0200 WakeTime                WakeTime: 657.398 sec                                                                   
2020-06-19 22:12:38 +0200 Kernel Client Acks      Delays to Wake notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 2)(567 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(1976 ms)]           
2020-06-19 22:12:42 +0200 Assertions              PID 195(loginwindow) Created UserIsActive "Loginwindow User Activity" 00:00:00  id:0x0x90000824a [System: PrevIdle DeclUser IntPrevDisp IPushSrvc kCPU kDisp]         
2020-06-19 22:12:42 +0200 Assertions              PID 195(loginwindow) Released UserIsActive "Loginwindow User Activity" 00:00:00  id:0x0x90000824a [System: PrevIdle DeclUser IntPrevDisp IPushSrvc kCPU kDisp]         

Total Sleep/Wakes since boot at 2020-06-19 22:10:57 +0200 :1

2020-06-19 22:12:46 +0200 : Showing all currently held IOKit power assertions
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 171(hidd): [0x000000210009808b] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:10000065b name:AppleUserHIDEventSe product:Karabiner VirtualHI eventType:3" 
    Timeout will fire in 300 secs Action=TimeoutActionRelease
   pid 222(coreaudiod): [0x0000007000018050] 00:00:10 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1F,3,0,1,2:0.context.preventuseridlesleep" 
    Created for PID: 287.
   pid 351(mds_stores): [0x00000062000b81f6] 00:00:28 BackgroundTask named: "com.apple.metadata.mds_stores.power" 
   pid 116(powerd): [0x0000001400108003] 00:01:11 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff" 
    Timeout will fire in 228 secs Action=TimeoutActionTurnOff
No kernel assertions.
Idle sleep preventers: IODisplayWrangler

My current settings:
Code:
System-wide power settings:
Currently in use:
 standby              1
 womp                 0
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 proximitywake        0
 powernap             0
 gpuswitch            2
 networkoversleep     0
 disksleep            0
 standbydelayhigh     86400
 sleep                5 (sleep prevented by sharingd, coreaudiod)
 hibernatemode        3
 ttyskeepawake        1
 displaysleep         5
 tcpkeepalive         0
 highstandbythreshold 50
 standbydelaylow      10800

Bluetooth wake seems to be proximitywake, right? That is disabled.
 
@takki

I tried setting tcpkeepalive to 0, this did at least begin sleep but resumed back after like 5 seconds. Here's the log again, this mDNS thingy still perists.

Code:
Sleep/Wakes since boot at 2020-06-19 22:10:57 +0200 :0   Dark Wake Count in this sleep cycle:0

Time stamp                Domain                  Message                                                                        Duration      Delay    
==========                ======                  =======                                                                        ========      =====    
UUID: 42929F40-F1D5-40E7-8BD8-D6C226CBE878
2020-06-19 22:12:24 +0200 Sleep                   Entering Sleep state due to 'Software Sleep pid=195':TCPKeepAlive=active Using AC (Charge:0%) 14 secs  
2020-06-19 22:12:29 +0200 Wake Requests           [*process=mDNSResponder request=Maintenance deltaSecs=7200 wakeAt=2020-06-20 00:12:29] [process=powerd request=TCPKATurnOff deltaSecs=43255 wakeAt=2020-06-20 10:13:24] [process=powerd request=UserWake deltaSecs=185671 wakeAt=2020-06-22 01:47:00 info="com.apple.alarm.user-visible-Weekly Usage Report,425"]          
2020-06-19 22:12:29 +0200 PM Client Acks          Delays to Sleep notifications: [com.apple.apsd is slow(3034 ms)] [mDNSResponder is slow(5040 ms)]          
2020-06-19 22:12:36 +0200 Kernel Client Acks      Delays to Sleep notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 1)(1481 ms)] [AppleHDADriver driver is slow(msg: SetState to 0)(1309 ms)] [powerd is slow(5045 ms)] [IONVMeController driver is slow(msg: SetState to 0)(811 ms)]          
2020-06-19 22:12:36 +0200 Assertions              PID 245(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008213 [System: PrevIdle DeclUser IntPrevDisp kDisp]        
2020-06-19 22:12:36 +0200 Assertions              PID 245(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008213 [System: PrevIdle DeclUser IntPrevDisp kDisp]        
2020-06-19 22:12:36 +0200 Assertions              Kernel Idle sleep preventers: IODisplayWrangler        
2020-06-19 22:12:36 +0200 Notification            Display is turned on                                                                    
2020-06-19 22:12:38 +0200 Wake                    Wake from Normal Sleep [CDNVA] : due to XDCI CNVW/UserActivity Assertion Using AC (Charge:0%)          
2020-06-19 22:12:38 +0200 WakeDetails             DriverReason:XHC - DriverDetails:                                        
2020-06-19 22:12:38 +0200 HibernateStats          hibmode=3 standbydelaylow=10800 standbydelayhigh=0                                       5            
2020-06-19 22:12:38 +0200 WakeTime                WakeTime: 657.398 sec                                                                  
2020-06-19 22:12:38 +0200 Kernel Client Acks      Delays to Wake notifications: [AppleIntelFramebuffer driver is slow(msg: SetState to 2)(567 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(1976 ms)]          
2020-06-19 22:12:42 +0200 Assertions              PID 195(loginwindow) Created UserIsActive "Loginwindow User Activity" 00:00:00  id:0x0x90000824a [System: PrevIdle DeclUser IntPrevDisp IPushSrvc kCPU kDisp]        
2020-06-19 22:12:42 +0200 Assertions              PID 195(loginwindow) Released UserIsActive "Loginwindow User Activity" 00:00:00  id:0x0x90000824a [System: PrevIdle DeclUser IntPrevDisp IPushSrvc kCPU kDisp]        

Total Sleep/Wakes since boot at 2020-06-19 22:10:57 +0200 :1

2020-06-19 22:12:46 +0200 : Showing all currently held IOKit power assertions
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 171(hidd): [0x000000210009808b] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:10000065b name:AppleUserHIDEventSe product:Karabiner VirtualHI eventType:3"
    Timeout will fire in 300 secs Action=TimeoutActionRelease
   pid 222(coreaudiod): [0x0000007000018050] 00:00:10 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1F,3,0,1,2:0.context.preventuseridlesleep"
    Created for PID: 287.
   pid 351(mds_stores): [0x00000062000b81f6] 00:00:28 BackgroundTask named: "com.apple.metadata.mds_stores.power"
   pid 116(powerd): [0x0000001400108003] 00:01:11 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff"
    Timeout will fire in 228 secs Action=TimeoutActionTurnOff
No kernel assertions.
Idle sleep preventers: IODisplayWrangler

My current settings:
Code:
System-wide power settings:
Currently in use:
standby              1
womp                 0
halfdim              1
hibernatefile        /var/vm/sleepimage
proximitywake        0
powernap             0
gpuswitch            2
networkoversleep     0
disksleep            0
standbydelayhigh     86400
sleep                5 (sleep prevented by sharingd, coreaudiod)
hibernatemode        3
ttyskeepawake        1
displaysleep         5
tcpkeepalive         0
highstandbythreshold 50
standbydelaylow      10800

Bluetooth wake seems to be proximitywake, right? That is disabled.
have you tried running these commands:
Code:
sudo pmset -a standby 0
sudo pmset -a autopoweroff 0
sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage
and rebooting?
 
@Feartech @BlvckBytes

I don't think deleting the sleepimage is necessary, as hibernatemode 0 already disables hibernation. As far as I understand sleepimage is only used for hibernation so that and possibly autopoweroff 0 should already do it without modifying system files (although I don't use autopoweroff 0 and I have no issues).

At the top of your pmset log it still says "TCPKeepAlive=active" so you might want to reboot and try again.

Make sure you have Power Nap disabled:
Energy Saver -> Enable Power Nap -> Untick

Wake for Bluetooth devices can be found here:
Bluetooth -> Advanced -> Allow Bluetooth devices to wake

Also worth checking:

Energy Saver -> Prevent computer from sleep automaticaly: Disable
Energy Saver -> Put hard disks to sleep when possible: Enable
Energy Saver -> Wake for network access: Untick

You can check for wake reasons here as well:
Code:
log show --style syslog | fgrep "Wake reason"
 
@Feartech @BlvckBytes

I don't think deleting the sleepimage is necessary, as hibernatemode 0 already disables hibernation. As far as I understand sleepimage is only used for hibernation so that and possibly autopoweroff 0 should already do it without modifying system files (although I don't use autopoweroff 0 and I have no issues).

At the top of your pmset log it still says "TCPKeepAlive=active" so you might want to reboot and try again.

Make sure you have Power Nap disabled:
Energy Saver -> Enable Power Nap -> Untick

Wake for Bluetooth devices can be found here:
Bluetooth -> Advanced -> Allow Bluetooth devices to wake

Also worth checking:

Energy Saver -> Prevent computer from sleep automaticaly: Disable
Energy Saver -> Put hard disks to sleep when possible: Enable
Energy Saver -> Wake for network access: Untick

You can check for wake reasons here as well:
Code:
log show --style syslog | fgrep "Wake reason"
 
Gotcha, I didn't know updates could reset that setting (hasn't for me so far, fingers crossed). Still though, personally I prefer changing it back if it becomes a problem, but to each their own :)
 
@Feartech @takki

Executed everything except the sleepimage thing (btw, that path is non existent, so no image there), because I couldn't mkdir - operation not permitted. I'm somehow not able to turn off SIP, got the following csr-conf:

Screenshot 2020-06-19 at 23.58.58.png


But the FS protection still seems to be present, also "Verifying App X..." often launches. I'd like to just turn it off, what am I missing here on my bitmask?

Still, wake after around 5 seconds. I disabled bluetooth wake (which was still on, LOL), the remaining settings matched yours, takki. This is the log show output:

Code:
blvckbytes@MacBook-Pro-2 ~ % log show --style syslog --last 2h | fgrep "Wake reason"
2020-06-19 22:12:09.321772+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-19 22:12:31.500988+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 22:12:31.500990+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 23:54:22.256311+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-19 23:54:44.175292+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 23:54:44.175294+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-20 00:01:08.527104+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-20 00:01:30.051726+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-20 00:01:30.051727+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW

I'm wondering what XDCI CNVW is...
 
@Feartech @takki

Executed everything except the sleepimage thing (btw, that path is non existent, so no image there), because I couldn't mkdir - operation not permitted. I'm somehow not able to turn off SIP, got the following csr-conf:

View attachment 477123

But the FS protection still seems to be present, also "Verifying App X..." often launches. I'd like to just turn it off, what am I missing here on my bitmask?

Still, wake after around 5 seconds. I disabled bluetooth wake (which was still on, LOL), the remaining settings matched yours, takki. This is the log show output:

Code:
blvckbytes@MacBook-Pro-2 ~ % log show --style syslog --last 2h | fgrep "Wake reason"
2020-06-19 22:12:09.321772+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-19 22:12:31.500988+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 22:12:31.500990+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 23:54:22.256311+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-19 23:54:44.175292+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-19 23:54:44.175294+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-20 00:01:08.527104+0200  localhost powerd[116]: [powerd:sleepWake] Wake reason: "<private>"  identity: "<private>"
2020-06-20 00:01:30.051726+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW
2020-06-20 00:01:30.051727+0200  localhost kernel[0]: (AppleACPIPlatform) AppleACPIPlatformPower Wake reason: XDCI CNVW

I'm wondering what XDCI CNVW is...
you could try running these first:
Code:
sudo spctl --master-disable
sudo mount -uw /
sudo killall Finder

then try:
Code:
sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage

also makes sure you have setup your usb ports correctly:

and also test with no other usb devices plugged in, just to test
 
@Feartech

Still not permitted :/

Code:
blvckbytes@MacBook-Pro-2 Desktop % sudo spctl --master-disable
blvckbytes@MacBook-Pro-2 Desktop % sudo mount -uw /
mount_apfs: volume could not be mounted: Operation not permitted
mount: / failed with 77

Also: My USB-Ports are setup properly, nothing is plugged in during tests - same results.
 
Status
Not open for further replies.
Back
Top