Jump to content

darkwake from sleep Monterey [SOLVED]


gorans
 Share

11 posts in this topic

Recommended Posts

Hi,

 

I upgraded to Monterey and now I have a problem that WOL and USB wakes to darkwake, requiring double key press or mouse click.

DarkWake from Normal Sleep [CDN] : due to XDCI CNVW PEG2 PEG3 RP04/ Using AC

second keypress:

DarkWake to FullWake from Normal Sleep [CDNVA] : due to UserActivity Assertion Using AC

I found my XHC with gfxutil:

00:14.0 8086:06ed /PCI0@0/XHC@14 = PciRoot(0x0)/Pci(0x14,0x0)

And put this into config.plist DeviceProperties/Add/:

<key>PciRoot(0x0)/Pci(0x14,0x0)</key>
    <dict>
        <key>acpi-wake-type</key>
        <data>AQ==</data>
    </dict>

However, it doesn't help, first wake is still darkwake with no display.

I also tried darkwake=0 and darkwake=8 in boot args but nothing changed.

Is there a way to disable darkwake on Monterey?

 

pmset -g:

 standby              0
 Sleep On Power Button 1
 womp                 1
 hibernatefile        /var/vm/sleepimage
 proximitywake        0
 powernap             0
 networkoversleep     0
 disksleep            0
 standbydelayhigh     86400
 sleep                10 (sleep prevented by bluetoothd)
 hibernatemode        0
 ttyskeepawake        0
 displaysleep         15
 tcpkeepalive         0
 highstandbythreshold 50
 standbydelaylow      86400

config.plist

Edited by gorans
added config and other info
Link to comment
Share on other sites

In my experience, if you are able to wake your screen by an extra mouse or keyboard click, then boot-arg darkwake may be the culprit.  You could try different values of boot-arg darkwake (1, 2).  I think that the the two values that you tried ( 0 and 8 )are actually the same.

 

This reference might help to explain darkwake.

Edited by deeveedee
  • Like 1
Link to comment
Share on other sites

4 hours ago, miliuco said:

@gorans

This can fix your problem, try it and comment.

https://github.com/osy/USBWakeFixup

Didn't help.

 

3 hours ago, deeveedee said:

In my experience, if you are able to wake your screen by an extra mouse or keyboard click, then boot-arg darkwake may be the culprit.  You could try different values of boot-arg darkwake (1, 2).  I think that the the two values that you tried ( 0 and 8 )are actually the same.

This reference might help to explain darkwake.

Yeah, I read that but there is no conclusive results, especially for Monterey. I started with no darkwake boot arg but I didn't try darkwake=2.

 

1 hour ago, dMatik said:

 

That script actually works! Hack now fully wakes on USB and WOL. Thank You!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@gorans I'm glad to hear it, I think our hacks suffer from "PMCS.PM_Status" and for me untill catalina USBWAKEFIXUP worked flawlessly, i think in big sur were some changes made under the hood and they moved from kernel handling the wake to iokit, is just a theory i had but i did not have the expertise to make a fix. Even for this script I found it accidentally after searching for a script to turn off bluetooth when i sleep and turn back on when I wake (bluetoothd high cpu usage after wake and no bluetooth on my fenvi t919 with BCM943602CS chip inside). For me now all forks perfectly on ventura 13.0 aside of continuity camera, and there i think is a whitelist thing from apple servers "com.apple.bluetooth.services.cloud" is updated everyday in /Users/User/Library, i had continuity camera without video from b3 (when i bought the fenvi) till b8, after that, only on cable (without video). I read on the prerelease forum that someone made a experiment changing from original apple card to a intel, and when he put back the original apple card he lost continuity camera (all other continuity services and airdrop keep working, only continuity camera lost". What is funny about this is that after a discution with apple support about my macbook, my "iMacPro" hack is visible on checkcovereage apple page, maybe after some updates continuity camera will start to work "like magic"

  • Like 2
Link to comment
Share on other sites

@gorans @dMatik

 

Sometimes old things come in handy again 🙂


In 2009 we were already trying to fix sleep problems in Leopard 10.5.8 with a script created by @Thireus based on the SleepWatcher app (by bernhard-baehr). This method with some changes is the one that has now been useful to @gorans.
Shortly after that, the SleepEnabler.kext extension was released which did the same function as the script but gave errors on some systems.


I'm glad the issue has been resolved.

 

EDIT: of course credits to @dMatik for the new app, including BT off and on as extra.

Edited by miliuco
  • Like 2
Link to comment
Share on other sites

It seems for me that every OS update I have sleeping problems on hacks. What was working perfectly in 10.6, stopped working in 10.9. And I sort it out. Then an update to 10.11. and again sleep/wake problems. And I sort it out.... I think that only update that went without problems was 10.14 -> 10.15. Or maybe just WOL issues. :D

I'm not happy with this solution but I tried all other ways with no luck, so It'll have to do.

 

2 hours ago, dMatik said:

@gorans I'm glad to hear it, I think our hacks suffer from "PMCS.PM_Status" and for me untill catalina USBWAKEFIXUP worked flawlessly, i think in big sur were some changes made under the hood and they moved from kernel handling the wake to iokit, is just a theory i had but i did not have the expertise to make a fix.

That's a good info. Not for me, as I'm no expert either, but maybe a pointer for someone with more knowledge.

 

Thanks guys. :)

 

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...