Contribute
Register

Darkwake Deciphered

Status
Not open for further replies.
Joined
Jun 20, 2014
Messages
1,015
Motherboard
Gigabyte Aero 15X v8-BK4K4P
CPU
i7-8750H
Graphics
UHD 630 / GTX 1070
Based on NeXTguy's post I have created a chart with all the values for Darkwake deciphered.

Meanings of the values:
Code:
HIDTickleEarly                hid tickle before gfx suppression
HIDTickleLate                 hid tickle after gfx suppression
HIDTickleNone                 hid tickle is not posted
IgnoreDiskIOInDark *          ignore disk idle in DW
IgnoreDiskIOAlways *          always ignore disk idle
AlarmIsDark                   0x100
GraphicsPowerState1           0x200
AudioNotSuppressed            0x400
* Don't seem to be available in the latest source.

Values available in Clover Configurator:
Code:
darkwake=0            -
darkwake=1            HIDTickleEarly
darkwake=2            HIDTickleLate
darkwake=3            HIDTickleNone
darkwake=4            IgnoreDiskIOInDark
darkwake=8            IgnoreDiskIOAlways
darkwake=10           HIDTickleLate | IgnoreDiskIOAlways

Default (according to this):
Code:
darkwake=3            HIDTickleNone

Other potential values:
Code:
darkwake=5            HIDTickleEarly | IgnoreDiskIOInDark
darkwake=6            HIDTickleLate | IgnoreDiskIOInDark
darkwake=7            HIDTickleNone | IgnoreDiskIOInDark
darkwake=9            HIDTickleEarly | IgnoreDiskIOAlways
darkwake=11           HIDTickleNone | IgnoreDiskIOAlways
darkwake=12 *         IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=13 *         HIDTickleEarly | IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=14 *         HIDTickleLate | IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=15 *         HIDTickleNone | IgnoreDiskIOInDark | IgnoreDiskIOAlways
* Likely not valid

AlarmIsDark / GraphicsPowerState1 / AudioNotSuppressed:
I'm not sure what these values are but you can set it to any value above by adding 256 (0x100), 512 (0x200) or 1024 (0x400) to the value. For example, to add AlarmIsDark to darkwake=10 simply add 256 to get darkwake=266.

NOTE:
According to this source file the IgnoreDiskIO flags have been removed.
 
Last edited:
You can check xnu version by using uname -av command on terminal.

For example:

Code:
uname -av
Darwin videoStudio.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64

Which reveals that Catalina 10.15.2 uses xnu 6153.61.1.

On the source code the Darkwake flags are defined in enum gDarkWakeFlags.

According to the xnu-4903.241.1/iokit/Kernel/IOPMrootDomain.cpp only these flags are defined:

Code:
// gDarkWakeFlags
enum {
    kDarkWakeFlagHIDTickleEarly      = 0x01, // hid tickle before gfx suppression
    kDarkWakeFlagHIDTickleLate       = 0x02, // hid tickle after gfx suppression
    kDarkWakeFlagHIDTickleNone       = 0x03, // hid tickle is not posted
    kDarkWakeFlagHIDTickleMask       = 0x03,
    kDarkWakeFlagAlarmIsDark         = 0x0100,
    kDarkWakeFlagGraphicsPowerState1 = 0x0200,
    kDarkWakeFlagAudioNotSuppressed  = 0x0400
};

So there is no darkwake=8 flag at all.

Sadly there is no xnu 6153.61.1 source code available yet. Seems that the version 4903.241.1 is the latest source code of xnu available.

So, for example boot flag darkwake=8 and darkwake=10 are obsolete now as there is no kDarkWakeFlagIgnoreDiskIOAlways defined anymore. Which leads us to next possible combinations:

darkwake=0
darkwake=1
darkwake=2
darkwake=3
darkwake=256
darkwake=257
...

Please check this post for more details:

 
Last edited:
Based on NeXTguy's post I have created a chart with all the values for Darkwake deciphered.

Meanings of the values:
Code:
HIDTickleEarly                hid tickle before gfx suppression
HIDTickleLate                 hid tickle after gfx suppression
HIDTickleNone                 hid tickle is not posted
IgnoreDiskIOInDark *          ignore disk idle in DW
IgnoreDiskIOAlways *          always ignore disk idle
AlarmIsDark                   0x100
GraphicsPowerState1           0x200
AudioNotSuppressed            0x400
* Don't seem to be available in the latest source.

Values available in Clover Configurator:
Code:
darkwake=0            -
darkwake=1            HIDTickleEarly
darkwake=2            HIDTickleLate
darkwake=3            HIDTickleNone
darkwake=4            IgnoreDiskIOInDark
darkwake=8            IgnoreDiskIOAlways
darkwake=10           HIDTickleLate | IgnoreDiskIOAlways

Default (according to this):
Code:
darkwake=3            HIDTickleNone

Other potential values:
Code:
darkwake=5            HIDTickleEarly | IgnoreDiskIOInDark
darkwake=6            HIDTickleLate | IgnoreDiskIOInDark
darkwake=7            HIDTickleNone | IgnoreDiskIOInDark
darkwake=9            HIDTickleEarly | IgnoreDiskIOAlways
darkwake=11           HIDTickleNone | IgnoreDiskIOAlways
darkwake=12 *         IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=13 *         HIDTickleEarly | IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=14 *         HIDTickleLate | IgnoreDiskIOInDark | IgnoreDiskIOAlways
darkwake=15 *         HIDTickleNone | IgnoreDiskIOInDark | IgnoreDiskIOAlways
* Likely not valid

AlarmIsDark / GraphicsPowerState1 / AudioNotSuppressed:


NOTE:
@headkaze Is this still accurate and current?
 
Darkwake=8 still does something. Because on my Aorus Master Z390 motherboard & 10.15.3 Catalina, computer wakes right back up after sleep unless darkwake=8 is in the clover boot arguments.
 
Status
Not open for further replies.
Back
Top