Macbook si sveglia in modo imprevisto quando il coperchio rimane chiuso (alimentazione scollegata)

3

Il mio ambiente

  • MacBook Pro (Retina, 13-inch, Mid 2014) e OS: 10.13.6 .

  • pmset:

    $ pmset -g
    System-wide power settings:
    Currently in use:
     standbydelay         10800
     standby              1
     halfdim              1
     hibernatefile        /var/vm/sleepimage
     powernap             0
     gpuswitch            2
     disksleep            10
     sleep                1
     autopoweroffdelay    28800
     hibernatemode        3
     autopoweroff         1
     ttyskeepawake        1
     displaysleep         2
     acwake               0
     lidwake              0
  • Alimentazione scollegata. Quindi su Batteria.

  • UI Energy Saver:

  • Ilmioscript:
$catsleep-detector.shwhiletrue;doecho'date'" -------- not sleep yet"
    tput bel
    sleep 2s
done

Il problema

  • Scollega il cavo di alimentazione

  • Esegui lo script nel terminale: sleep-detector.sh

  • Chiudi il coperchio. Mettilo nel backbag. Lascia l'ufficio, guida e vai a casa.

  • Dopo aver finito la mia cena. Apri il coperchio e controlla l'output dello script:

$ sleep-detector.sh 
Wed Nov 28 21:20:23 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:25 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:27 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:29 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:31 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:33 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:35 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:37 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:39 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:41 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:43 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:45 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:47 CST 2018  -------- not sleep yet
Wed Nov 28 21:20:49 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:08 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:10 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:10 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:12 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:14 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:16 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:18 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:20 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:22 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:24 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:26 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:28 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:30 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:32 CST 2018  -------- not sleep yet
Wed Nov 28 21:21:34 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:06 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:08 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:10 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:12 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:14 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:16 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:18 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:20 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:22 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:24 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:26 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:29 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:31 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:33 CST 2018  -------- not sleep yet
Wed Nov 28 22:17:35 CST 2018  -------- not sleep yet
Wed Nov 28 23:20:32 CST 2018  -------- not sleep yet
Wed Nov 28 23:20:34 CST 2018  -------- not sleep yet
Wed Nov 28 23:20:36 CST 2018  -------- not sleep yet
  • Ho scoperto che la cosa strana è accaduta durante il tempo da 22:17:06 a 22:17:35 . Questo è molto pazzo.

  • Poi ho controllato il mio log show . Ha qualcosa come:

2018-11-28 22:17:06.766319+0800 0x74       Default     0x0                  0      0    kernel: PMRD: System Wake
2018-11-28 22:17:06.766358+0800 0x36749    Default     0x0                  0      0    kernel: IOConsoleUsers: gIOScreenLockState 3, hs 0, bs 0, now 1543414626, sm 0xe0000300
2018-11-28 22:17:06.767272+0800 0x74       Default     0x0                  0      0    kernel: (AppleCameraInterface) AppleCamIn::systemWakeCall - messageType = 0xE0000340
2018-11-28 22:17:06.767291+0800 0x36760    Default     0x0                  0      0    kernel: (AppleCameraInterface) AppleCamIn::wakeEventHandlerThread
2018-11-28 22:17:06.767525+0800 0x36749    Default     0x0                  0      0    kernel: (IOBluetoothHostControllerTransport) **** [IOBluetoothHostControllerTransport][powerStateWillChangeTo] -- SleepType is kIOPMSleepTypeDeepIdle -- this = 0x2800 ****
2018-11-28 22:17:06.767775+0800 0x3589b    Default     0x0                  337    0    CommCenter: [com.apple.CommCenter:sysobs] #I On WiFi: true On Cellular: false
2018-11-28 22:17:06.767805+0800 0x36749    Default     0x0                  0      0    kernel: (AppleCredentialManager) AppleCredentialManager: powerStateDidChangeToGated: SYSTEM IS AWAKE.
2018-11-28 22:17:06.767826+0800 0x36742    Default     0x0                  0      0    kernel: (AppleCredentialManager) AppleCredentialManager: handleEventGated: called, eventID = 4.
2018-11-28 22:17:06.768095+0800 0x3674b    Default     0x0                  0      0    kernel: (AppleSmartBatteryManager) SmartBattery: handleSystemSleepWake(0) = 0
2018-11-28 22:17:06.768302+0800 0x36764    Default     0x0                  0      0    kernel: (AppleSMC) Previous sleep cause: 5
2018-11-28 22:17:06.769652+0800 0x253      Activity    0x2aadb              53     0    configd: (CoreFoundation) Loading Preferences From System CFPrefsD For Search List
2018-11-28 22:17:06.769798+0800 0x36707    Activity    0x2aadc              53     0    configd: processing network kernel events
2018-11-28 22:17:06.770942+0800 0x36707    Activity    0x2aadd              53     0    configd: processing network kernel events
2018-11-28 22:17:06.771451+0800 0x36707    Activity    0x2aade              53     0    configd: processing network kernel events
2018-11-28 22:17:06.773454+0800 0x0        Timesync    0x0                  0      0    === system wallclock time adjusted
2018-11-28 22:17:06.774564+0800 0x365a2    Default     0x0                  440    0    icdd: (ICALogging) [com.apple.imagecapture:icdd] #ICDebug - 51:{ICWiredBrowser.m} (USB terminate)
2018-11-28 22:17:06.774585+0800 0x365a2    Default     0x0                  440    0    icdd: (ICALogging) [com.apple.imagecapture:icdd] #ICDebug - 344:{ICWiredBrowser.m} (--> USB Terminate)
2018-11-28 22:17:06.774622+0800 0x1e7      Default     0x0                  54     0    powerd: [powerd:sleepWake] Continue to use current inactivity window from 'Wed Nov 28 22:16:46 2018' to 'Thu Nov 29 10:01:46 2018'
2018-11-28 22:17:06.774732+0800 0x365a2    Default     0x0                  440    0    icdd: (ICALogging) [com.apple.imagecapture:icdd] #ICDebug - 371:{ICWiredBrowser.m} (0 USB Descriptions Managed)
2018-11-28 22:17:06.774741+0800 0x365a2    Default     0x0                  440    0    icdd: (ICALogging) [com.apple.imagecapture:icdd] #ICDebug - 373:{ICWiredBrowser.m} (, kNotificationPower
2018-11-28 22:17:06.778296+0800 0x36713    Default     0x0                  83     0    locationd: [com.apple.locationd.Legacy:Generic] WIFI_LOC: reset
2018-11-28 22:17:06.778365+0800 0x1e7      Default     0x0                  0      0    kernel: (AppleSmartBatteryManager) Starting poll type 2
2018-11-28 22:17:06.778367+0800 0x1e7      Default     0x0                  0      0    kernel: (AppleSmartBatteryManager) Restarting poll type 2
2018-11-28 22:17:06.778529+0800 0x3675c    Default     0x0                  41     0    UserEventAgent: (com.apple.cts) [com.apple.xpc.activity:calendarinterval] Running StartCalendarInterval: com.apple.newsyslog.268435461
2018-11-28 22:17:06.778559+0800 0x1f8      Default     0x0                  77     0    apsd: power management notification 0x8019
2018-11-28 22:17:06.778577+0800 0x36713    Default     0x0                  83     0    locationd: [com.apple.locationd.Core:Core] {"msg":"#Awareness Wifi power state changed", "powered":0}
2018-11-28 22:17:06.778580+0800 0x1f8      Default     0x0                  77     0    apsd: : prepareForWakingIntoDarkWake
2018-11-28 22:17:06.779018+0800 0x253      Default     0x0                  53     0    configd: (IPConfiguration) [com.apple.IPConfiguration:Server] en0 link INACTIVE
2018-11-28 22:17:06.779206+0800 0x253      Default     0x0                  53     0    configd: (IPConfiguration) [com.apple.IPConfiguration:Server] en0: no SSID
2018-11-28 22:17:06.779411+0800 0x3653f    Default     0x0                  82     0    securityd: [com.apple.securityd:powerwatch] powerstates
2018-11-28 22:17:06.779412+0800 0x3653f    Default     0x0                  82     0    securityd: [com.apple.securityd:powerwatch] disk
2018-11-28 22:17:06.779413+0800 0x3653f    Default     0x0                  82     0    securityd: [com.apple.securityd:powerwatch] net
2018-11-28 22:17:06.779414+0800 0x3653f    Default     0x0                  82     0    securityd: [com.apple.securityd:powerwatch] enter DarkWake
2018-11-28 22:17:06.779445+0800 0x3678d    Activity    0x2aa8a              76     0    opendirectoryd: Internal request
2018-11-28 22:17:06.779485+0800 0x205      Default     0x0                  78     0    timed: [com.apple.timed:data] cmd,PmCallback,msg,0x19
2018-11-28 22:17:06.779502+0800 0x3678d    Activity    0x2aa8b              76     0    opendirectoryd: Internal request
2018-11-28 22:17:06.779533+0800 0x3678d    Activity    0x2aa8c              76     0    opendirectoryd: Internal request
2018-11-28 22:17:06.779565+0800 0x205      Activity    0x10427              78     0    timed: (CoreFoundation) Loading Preferences From System CFPrefsD For Search List
2018-11-28 22:17:06.779647+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] -> Powering to On State.
2018-11-28 22:17:06.779653+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager]     Capabilities:
2018-11-28 22:17:06.779657+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] disk
2018-11-28 22:17:06.779660+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] net
2018-11-28 22:17:06.779662+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager]
2018-11-28 22:17:06.779694+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] -> Powering to On State.
2018-11-28 22:17:06.779697+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager]     Capabilities:
2018-11-28 22:17:06.779700+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] disk
2018-11-28 22:17:06.779702+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager] net
2018-11-28 22:17:06.779704+0800 0x206      Default     0x0                  97     7    bluetoothd: (IOBluetooth) [com.apple.bluetooth:CBXPCManager]
2018-11-28 22:17:06.779749+0800 0x205      Activity    0x10428              78     0    timed: (CoreFoundation) Loading Preferences From User CFPrefsD For Search List

Quanto sopra è solo una parte del registro. Se qualcuno vuole vedere tutto, posso incollarlo su pastebin.

[Modificato]

Grazie a @@ Ashley per dirmi il comando pmset -g log , questa è la parte interessante di questo comando di registro:

2018-11-28 22:17:06 +0800 Kernel Client Acks    Delays to Sleep notifications: [powerd is slow(17835 ms)] [AppleThunderboltNHIType2 driver is slow(msg: WillChangeState to 2)(364 ms)] [RP03 driver is slow(msg: SetState to 0)(1277 ms)]           
2018-11-28 22:17:06 +0800 Assertions            PID 168(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008a26 [System: DeclUser kDisp]          
2018-11-28 22:17:07 +0800 Assertions            PID 168(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd00008a26 [System: PrevIdle DeclUser kDisp]          
2018-11-28 22:17:07 +0800 DarkWake              DarkWake from Deep Idle [CDN] due to EC.SleepTimer/SleepTimer: Using BATT (Charge:100%) 0 secs    
2018-11-28 22:17:07 +0800 HibernateStats        hibmode=3 standbydelay=10800                                                          16            
2018-11-28 22:17:07 +0800 Sleep                 Entering Sleep state due to 'Clamshell Sleep': Using Batt (Charge:100%) 3805 secs 
2018-11-28 22:17:35 +0800 PM Client Acks        Delays to Sleep notifications: [AirPort configd plug-in is slow(691 ms)] [com.apple.apsd timed out(28010 ms)]           

L'output di ioreg -l | grep IOPlatformFeatureDefaults :

$ ioreg -l | grep IOPlatformFeatureDefaults
    | | |   "IOPlatformFeatureDefaults" = {"DNDWhileDisplaySleeps"=Yes,"TCPKeepAliveDuringSleep"=No,"NotificationWake"=No}

Ho fatto tutto ciò che posso fare per evitare che il sistema si svegli da solo. Ho disabilitato wake for wiki access e ho disabilitato power nap completamente. Questo è solo PAZZO !!! Il sistema non dovrebbe mai mai essere sveglio quando il coperchio rimane chiuso e io sono in viaggio. Questo è solo molto pericoloso e pericoloso per me. Ho lottato contro lo stupido MacOS per due giorni e non capisco come farlo rimanere solo quando è il sonno e quando il coperchio è chiuso.

PS:

Per coloro che sono interessanti, i seguenti link sono quelli che ho trovato su Google finora, ma nessuno conferma che ci sia ancora una soluzione in High Sierra:

link1 , link2 , link3 , link4 , link5 , link6 , link7

    
posta sgon00 28.11.2018 - 16:49
fonte

1 risposta

1

Deseleziona System Pref, Bluetooth Advanced Consenti ai dispositivi Bluetooth di riattivare il computer!

    
risposta data 28.11.2018 - 17:45
fonte

Leggi altre domande sui tag