Contribute
Register

4540s won't stay asleep

Status
Not open for further replies.
Joined
Jan 8, 2015
Messages
87
Motherboard
Gigabyte Z390 Aorus Pro-F12d
CPU
i9-9900K
Graphics
Radeon VII
Mac
  1. MacBook Air
  2. Mac Pro
Mobile Phone
  1. Android
Hi,

I just recently completed a clover install of Yosemite on my 4540s. Everything seems to work except sleep. For short periods, sleep works fine. But for longer sleeps, it eventually wakes up on its own, and then stays awake.

When this happens, I see this in the pmset log:
Code:
[FONT=Menlo]2015-01-15 12:00:52 -0500 Kernel Client Acks    Delays to Sleep notifications: [AppleAHCIDiskQueueManager driver is slow(msg: SetState to 0)(693 ms)][/FONT]
[FONT=Menlo]2015-01-15 12:01:02 -0500 DarkWake              DarkWake [CDN] due to RTC/Maintenance: Using AC (Charge:100%)                   46 secs[/FONT]
[FONT=Menlo]2015-01-15 12:01:02 -0500 Kernel Client Acks    Delays to Wake notifications: [ApplePS2Controller driver is slow(msg: SetState to 2)(1242 ms)] [PRT0 driver is slow(msg: SetState to 2)(2801 ms)] [IOSCSIPeripheralDeviceType05 driver is slow(msg: SetState to 4)(3096 ms)] [BroadcomBluetoothHostControllerUSBTransport driver is slow(msg: SetState to 2)(10008 ms)][/FONT]
[FONT=Menlo]2015-01-15 12:01:02 -0500 Assertions            PID 27(powerd) Created InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:00  id:0xd0000097f [System: BGTask SRPrevSleep kCPU][/FONT]
[FONT=Menlo]2015-01-15 12:01:13 -0500 Assertions            PID 27(powerd) TimedOut BackgroundTask "Powerd - Wait for client BackgroundTask assertions" 00:00:11  id:0xb0000097e [System: BGTask SRPrevSleep kCPU][/FONT]
[FONT=Menlo]2015-01-15 12:01:13 -0500                       Summary- [System: SRPrevSleep kCPU] Using AC[/FONT]
[FONT=Menlo]2015-01-15 12:01:48 -0500 Notification          Display is turned on
[/FONT]
[FONT=Menlo]2015-01-15 12:01:48 -0500 Assertions            PID 27(powerd) TimedOut InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:46  id:0xd0000097f [System: SRPrevSleep kCPU][/FONT]
[FONT=Menlo]2015-01-15 12:01:48 -0500                       Summary- [System: No Assertions] Using AC[/FONT]
[FONT=Menlo]2015-01-15 12:01:48 -0500 Wake                  DarkWake to FullWake [CDNVA] due to HID Activity: Using AC (Charge:100%)        28351 secs[/FONT]
[FONT=Menlo]2015-01-15 12:01:48 -0500 Kernel Client Acks    Delays to Wake notifications: [AppleHDADriver driver is slow(msg: SetState to 1)(409 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(435 ms)][/FONT]
[FONT=Menlo]2015-01-15 12:02:19 -0500 Assertions            PID 2382(Bluetooth Setup) Created PreventUserIdleDisplaySleep "Bluetooth Setup Assistant" 00:00:00  id:0x50000099c [System: PrevDisp kDisp][/FONT]

It always seems to happen less than two hours after falling asleep. Thereafter, there is no sleep unless I actually use the computer, at which point it is willing to go to sleep again. At first I thought it might be my mouse (Logitech M325). I powered it off and it still happens. I removed the usb transmitter and it still happens. There's nothing else attached. It happens plugged in or on battery. I've searched the forums and haven't been been able to find a problem that matches this.
I set hibernatemode to zero, I have wake on usb disabled in the bios and wake on network disabled in the BIOS and preferences. Any ideas I've missed?

Code:
[FONT=Menlo]$ pmset -g custom[/FONT]
[FONT=Menlo]Battery Power:[/FONT]
[FONT=Menlo] autopoweroff         1[/FONT]
[FONT=Menlo] autopoweroffdelay    14400[/FONT]
[FONT=Menlo] standbydelay         4200[/FONT]
[FONT=Menlo] standby              0[/FONT]
[FONT=Menlo] ttyskeepawake        1[/FONT]
[FONT=Menlo] hibernatemode        0[/FONT]
[FONT=Menlo] hibernatefile        /var/vm/sleepimage[/FONT]
[FONT=Menlo] displaysleep         2[/FONT]
[FONT=Menlo] sleep                10[/FONT]
[FONT=Menlo] lessbright           1[/FONT]
[FONT=Menlo] halfdim              1[/FONT]
[FONT=Menlo] disksleep            10[/FONT]
[FONT=Menlo]AC Power:[/FONT]
[FONT=Menlo] autopoweroff         1[/FONT]
[FONT=Menlo] autopoweroffdelay    14400[/FONT]
[FONT=Menlo] standbydelay         4200[/FONT]
[FONT=Menlo] standby              0[/FONT]
[FONT=Menlo] ttyskeepawake        1[/FONT]
[FONT=Menlo] hibernatemode        0[/FONT]
[FONT=Menlo] hibernatefile        /var/vm/sleepimage[/FONT]
[FONT=Menlo] womp                 0[/FONT]
[FONT=Menlo] displaysleep         10[/FONT]
[FONT=Menlo] networkoversleep     0[/FONT]
[FONT=Menlo] sleep                15[/FONT]
[FONT=Menlo] halfdim              1[/FONT]
[FONT=Menlo] disksleep            10[/FONT]
 
Hi,

I just recently completed a clover install of Yosemite on my 4540s. Everything seems to work except sleep. For short periods, sleep works fine. But for longer sleeps, it eventually wakes up on its own, and then stays awake.

When this happens, I see this in the pmset log:
Code:
...
[FONT=Menlo]2015-01-15 12:02:19 -0500 Assertions            PID 2382(Bluetooth Setup) Created PreventUserIdleDisplaySleep "Bluetooth Setup Assistant" 00:00:00  id:0x50000099c [System: PrevDisp kDisp][/FONT]

...

Looks like perhaps you have some bluetooth issue causing full wake, and an assertion?

Check assertions (pmset -g assertions) after it wakes up and won't auto sleep.

Do you have the boxes unchecked at SysPrefs->Bluetooth->Advanced?
 
I was excited because I missed those settings and I thought this would solve my problem. And indeed it lead to a change in behavior.

Now it won't sleep for different reasons. I see this now when it wakes for no reason:

Code:
[FONT=Menlo]2015-01-16 20:43:54 -0500 Kernel Client Acks    Delays to Sleep notifications: [AppleAHCIDiskQueueManager driver is slow(msg: SetState to 0)(613 ms)][/FONT]
[FONT=Menlo]2015-01-16 20:43:57 -0500                       Summary- [System: No Assertions] Using Batt[/FONT]
[FONT=Menlo]2015-01-16 20:43:57 -0500 Notification          Display is turned on             [/FONT]
[FONT=Menlo]2015-01-16 20:44:04 -0500 Wake                  Wake [CDNVA] due to RTC/HID Activity: Using BATT (Charge:98%)                   8 secs[/FONT]
[FONT=Menlo]2015-01-16 20:44:04 -0500 Kernel Client Acks    Delays to Wake notifications: [ApplePS2Controller driver is slow(msg: SetState to 2)(1238 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(403 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(426 ms)] [PRT0 driver is slow(msg: SetState to 2)(2822 ms)] [IOSCSIPeripheralDeviceType05 driver is slow(msg: SetState to 4)(3094 ms)] [BroadcomBluetoothHostControllerUSBTransport driver is slow(msg: SetState to 2)(10004 ms)]

And a whole lot of this:

[/FONT]
Code:
[FONT=Menlo]2015-01-16 20:45:44 -0500 Notification          Display is turned off            [/FONT]
[FONT=Menlo]2015-01-16 20:45:44 -0500 Notification          Display is turned on             [/FONT]
[FONT=Menlo]2015-01-16 20:46:15 -0500 Notification          Display is turned off            [/FONT]
[FONT=Menlo]2015-01-16 20:46:16 -0500 Notification          Display is turned on[/FONT]
 
I was excited because I missed those settings and I thought this would solve my problem. And indeed it lead to a change in behavior.

Now it won't sleep for different reasons. I see this now when it wakes for no reason:

Code:
[FONT=Menlo]2015-01-16 20:43:54 -0500 Kernel Client Acks    Delays to Sleep notifications: [AppleAHCIDiskQueueManager driver is slow(msg: SetState to 0)(613 ms)][/FONT]
[FONT=Menlo]2015-01-16 20:43:57 -0500                       Summary- [System: No Assertions] Using Batt[/FONT]
[FONT=Menlo]2015-01-16 20:43:57 -0500 Notification          Display is turned on             [/FONT]
[FONT=Menlo]2015-01-16 20:44:04 -0500 Wake                  Wake [CDNVA] due to RTC/HID Activity: Using BATT (Charge:98%)                   8 secs[/FONT]
[FONT=Menlo]2015-01-16 20:44:04 -0500 Kernel Client Acks    Delays to Wake notifications: [ApplePS2Controller driver is slow(msg: SetState to 2)(1238 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(403 ms)] [AppleHDADriver driver is slow(msg: SetState to 1)(426 ms)] [PRT0 driver is slow(msg: SetState to 2)(2822 ms)] [IOSCSIPeripheralDeviceType05 driver is slow(msg: SetState to 4)(3094 ms)] [BroadcomBluetoothHostControllerUSBTransport driver is slow(msg: SetState to 2)(10004 ms)]

And a whole lot of this:

[/FONT]
Code:
[FONT=Menlo]2015-01-16 20:45:44 -0500 Notification          Display is turned off            [/FONT]
[FONT=Menlo]2015-01-16 20:45:44 -0500 Notification          Display is turned on             [/FONT]
[FONT=Menlo]2015-01-16 20:46:15 -0500 Notification          Display is turned off            [/FONT]
[FONT=Menlo]2015-01-16 20:46:16 -0500 Notification          Display is turned on[/FONT]

This one here:
Code:
2015-01-16 20:44:04 -0500 Wake                  Wake [CDNVA] due to RTC/HID Activity: Using BATT (Charge:98%)                   8 secs

...is indicative of a wake due to RTC (real time clock). That is, it is a scheduled wake, such as the one done normally (mDNSResponder sleep proxy client). That one can be disabled via the Clover installer.
 
This one here:
Code:
2015-01-16 20:44:04 -0500 Wake                  Wake [CDNVA] due to RTC/HID Activity: Using BATT (Charge:98%)                   8 secs

...is indicative of a wake due to RTC (real time clock). That is, it is a scheduled wake, such as the one done normally (mDNSResponder sleep proxy client). That one can be disabled via the Clover installer.

Here is the scrip for that option:
Code:
set -u

#
# Source clover rc library if needed
#
if [[ ! "$(type -t GetNVRamKey)" == "function" ]]; then
    selfDir=$(cd $(dirname "$0") && pwd -P)
    source "${selfDir}"/../rc.clover.lib
fi

# Variables
mDNSResponderPList=/System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
pListBuddy=/usr/libexec/PlistBuddy
disableOption='-DisableSleepProxyClient'

# Debug mode ?
[[ "$DEBUG" -ne 0 ]] && set -x

[[ ! -f "$mDNSResponderPList" ]] && exit 0

# Check if sleep proxy is not already disabled
already_disabled=$($pListBuddy -c 'Print ProgramArguments:' \
 "$mDNSResponderPList" | grep -c -- "$disableOption")

if [[ $already_disabled -eq 0 ]]; then
    echo "Disabling mDNS responder sleep proxy"
    $pListBuddy -c "Add ProgramArguments: string $disableOption" \
     "$mDNSResponderPList"
else
    echo "mDNS responder sleep proxy already disabled"
fi

But I don't have /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

EDIT: It is replaced by com.apple.discoveryd.plist in Yosemite
 
Here is the scrip for that option:
...
But I don't have /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

EDIT: It is replaced by com.apple.discoveryd.plist in Yosemite

Looks like the Clover installer needs some updating. Personally, I don't use this option as dark waking works just fine on my systems.
 
I've found and fixed yet one more thing. pmset -g assertions finally gave me some information: 'pid 4168(AddressBookSour): [0x00038e9b000112e9] 00:00:19 PreventUserIdleSystemSleep named: "Address Book Source Sync"'

So I set up my iCloud account (hadn't bothered yet because I don't use it) and then disabled any and all syncing. We'll see what happens next.
 
What happens next is more waking from perfectly peaceful sleeps. This latest reason is this:
2015-01-17 18:33:48 -0500 Wake Wake [CDNVA] due to RTC XHC1/HID Activity: Using AC (Charge:100%)

XHC1/HID means USB input device right? The computer was sitting still on the desk. Yes, it did have an m310 wireless mouse plugged in and turned on, but no one touched it. And it's not set to wake on USB. And after I put it to sleep, moving the mouse doesn't wake it (nor does anything else besides the power button).

Also, it looks like discoveryd is a complete rewrite and doesn't support the mDNSResponder command line options.
 
What happens next is more waking from perfectly peaceful sleeps. This latest reason is this:


XHC1/HID means USB input device right? The computer was sitting still on the desk. Yes, it did have an m310 wireless mouse plugged in and turned on, but no one touched it. And it's not set to wake on USB. And after I put it to sleep, moving the mouse doesn't wake it (nor does anything else besides the power button).

Also, it looks like discoveryd is a complete rewrite and doesn't support the mDNSResponder command line options.

RTC means "real time clock" (eg. scheduled wake).

Test without any USB devices plugged in.
 
Short answer: Yosemite 10.10.2 update seems to have fixed this (as others have reported elsewhere), and my probook is now sleeping like a baby.

Longer answer in case anyone cares: It wasn't any plugged in USB device, as I verified that the problem existed multiple times when absolutely nothing was plugged in.

The problem seems as if it had three different parts:

  1. The computer instisted on an RTC-driven DarkWake within a couple hours of going to sleep, every time.
  2. Upon Darkwake, it would apparently think there was HID input, and come fully awake.
  3. Sometimes it would cycle like this every couple of hours, but other times, after it had done this once it would never go to sleep again until I had actually used the system even though there were no pmset assertions listed.

I believe that the Yosemite update fixed problem number 1. nguyenmac had suggested an mDNSresponder fix via a command line option. But with Yosemite mDNSresponder was completely replaced with discoveryd which no longer had this option. So as a guess, I think they fixed discoveryd so that it no longer requests a DarkWake when there are no services that would actually be interested in using it. At any rate, there are no longer any DarkWakes in the log.

I have no idea if the other issues were also fixed by the update, but I don't think I'll ever even see them now that my probook is nolonger doing a darkwake after just a couple of hours.
 
Status
Not open for further replies.
Back
Top