Jump to content

DarkWake on macOS Catalina | boot args darkwake=8 & darkwake=10 are obsolete


holyfield
 Share

29 posts in this topic

Recommended Posts

There are plenty of users who suggest to use darkwake=8 or darkwake=10 or darkwake=0 boot args to solve sleep issues.

 

Are these suggestions valid at all?

 

For first we have to clarify something about Darkwake. The DarkWake feature was for first introduced in Mac OS X Lion. This feature allows to wake up certain parts of computer from sleep, while leaving other parts in sleep mode (for example display etc). Darkwake = display stays dark when comp wakes and performs some tasks. When tasks are done, comp should go back to sleep. But on Hack's Darkwake caused several problems, for example comps went into state, where those become inaccessible and forced reboot were needed. On some cases Darkwake caused reboots too and.. Darwake is related to Power Nap which is available since OS X Mountain Lion.

 

Disclaimer! Before posting below please read it:

 

If you really want to get some help from Hackintosh community, learn how to leave others out of guesswork! Learn how to collect diagnostics data which can help others on solving your case. It's annoying to ask over and over to provide some diagnostics related to Hack issue. That's why there are millions on unanswered posts on Hackintosh forums, their authors doesn't respect other's actually, they do not think out of their own shoes. Your first question before posting should be, what data is needed to help me, do I have provided all data available to help me immediately?

 


 

Darkwake and XNU

 

Darkwake is part of XNU

 

Quote

XNU kernel is part of the Darwin operating system for use in macOS and iOS operating systems. XNU is an acronym for X is Not Unix. XNU is a hybrid kernel combining the Mach kernel developed at Carnegie Mellon University with components from FreeBSD and a C++ API for writing drivers called IOKit. XNU runs on x86_64 for both single processor and multi-processor configurations.

 

Darkwake behaviours are defined in IOPMrootDomain.cpp.

 

The easiest way to check XNU version is to use terminal command uname -av

 

uname -av
Darwin MyHack.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

According to this macOS Catalina 10.15.2 uses XNU 6153.61.1.

 

The latest publicly available source code of XNU is 4903.241.1. So we cannot check source code of latest XNU's. Please correct me if I'm wrong. 

 

Code below reveals that boot arg darkwake correlates to enum gDarkWakeFlags.

PE_parse_boot_argn("darkwake", &gDarkWakeFlags, sizeof(gDarkWakeFlags));

 

So lets check the xnu-4903.241.1/iokit/Kernel/IOPMrootDomain.cpp for Darkwake flags:

// 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
};

Let's translate these values into decimals and easier to read strings

HID Tickle Early = 1
HID Tickle Late = 2
HID Tickle None = 3
HID Tickle Mask = 3
Alarm Is Dark = 256
Graphics Power State 1 = 512
Audio Not Suppressed = 1024

HID = Human-interface devices, such as keyboards, pointing devices, and digitizers like pens and touch pads.

 

As flags are used for bitwise operations, then we can easily notice that combinations 10 and 8 are for sure invalid now. darkwake=8 equals actually to darkwake=0 and darkwake=10 equals to darkwake=2.

 

If we check older XNU versions, then these values are removed since XNU 2782.1.97 ( = Yosemite ):

    kDarkWakeFlagIgnoreDiskIOInDark  = 0x04, // ignore disk idle in DW
    kDarkWakeFlagIgnoreDiskIOAlways  = 0x08, // always ignore disk idle
    kDarkWakeFlagIgnoreDiskIOMask    = 0x0C

According to this boot flags darkwake=8 and darkwake=10 are obsolete if you have Yosemite or newer macOS as related flags are removed from XNU. 

 

What is the default value for darkware boot arg?

 

According to XNU source code the default value of boot arg darkware is 3 (darkwake=3):

static uint32_t         gDarkWakeFlags = kDarkWakeFlagHIDTickleNone;

We have to clarify that xnu 4903.221.2 is used since macOS Mojave 10.14.1 and xnu 4903.241.1 is used since macOS Mojave 10.14.3. How about the latest macOS? Sadly there is no source code available. 

 

To figure out which value is defined on latest kernel we have to download the latest available Kernel Debug Kit, which is 10.15.1 build 19B77a. By using Hopper Disassembler we see that default value on macOS Catalina 10.15.1 for gDarkWakeFlags is 0x00000003, which equals to 3.

                     __ZL14gDarkWakeFlags:        // gDarkWakeFlags
ffffff80012b93b0         dd         0x00000003

So by default Darkwake should not post any HID Tickle's. This also reveals the secret why some users encounter issues with frozen peripheral device's on Hack's when Power Nap is enabled. To use Darkwake on Hack's require very well configured USB ports.

 


 

Power Nap & Darkwake

 

If you have Power Nap disabled then computer shouldn't wake automatically. On most cases darkwake boot arg affects how computers should behave on case of Power Nap enabled. If everything is configured properly you do not need define darkwake boot flag at all. Anyhow, there might be motherboards, which benefit from user defined value. But keep in mind that darkwake=8 and darkwake=10 are obsolete since Yosemite.

 


 

Which values are valid for darkwake?

 

As flags are used for bitwise operations, then these values are valid:

 

darkwake=0
darkwake=1 (darkWakePostTickle behaviour)
darkwake=2 (darkWakePostTickle behaviour)
darkwake=3 (darkWakePostTickle behaviour)
darkwake=256

darkwake=257
darkwake=258
darkwake=259

.. and so on...

 

As I'm not familiar how PE_parse_boot_argn function exactly works, I cannot say much about boot arg darkwake=0. According to source code there is no any checks or behaviours defined for darkwake=0. There is a huge chance that using darkwake=0 actually equals to darkwake=3. I hope someone can clarify from source code what exactly happens if darkwake=0 is used trough PE_parse_boot_argn, but it's obvious that darkwake=0 does not equal to darkwake=NO (or darkwake=FALSE). darkwake=0 does not disable power nap, it only affects HID tickle. Please note that darkwake=3 is combination of flags 1 & 2. 1 + 2 = 3. On case we say to the system to do early (1) and later (2) HID tickle both (3), there is no any tickle at all.

 

Some code samples from IOPMrootDomain:

            else if (!darkWakeMaintenance)
            {
                // Early/late tickle for non-maintenance wake.
                if (((gDarkWakeFlags & kDarkWakeFlagHIDTickleMask) ==
                     kDarkWakeFlagHIDTickleEarly) ||
                    ((gDarkWakeFlags & kDarkWakeFlagHIDTickleMask) ==
                     kDarkWakeFlagHIDTickleLate))
                {
                    darkWakePostTickle = true;
                }
            }
        if (darkWakePostTickle &&
            (kSystemTransitionWake == _systemTransitionType) &&
            (gDarkWakeFlags & kDarkWakeFlagHIDTickleMask) ==
             kDarkWakeFlagHIDTickleLate)
        {
            darkWakePostTickle = false;
            reportUserInput();
        }
        if (powerState > maxPowerState)
        {
            DLOG("> plimit %s %p (%u->%u, 0x%x)\n",
                service->getName(), OBFUSCATE(service), powerState, maxPowerState,
                changeFlags);
            *inOutPowerState = maxPowerState;

            if (darkWakePostTickle &&
                (actions->parameter & kPMActionsFlagIsDisplayWrangler) &&
                (changeFlags & kIOPMDomainWillChange) &&
                ((gDarkWakeFlags & kDarkWakeFlagHIDTickleMask) ==
                 kDarkWakeFlagHIDTickleEarly))
            {
                darkWakePostTickle = false;
                reportUserInput();
            }
        }
void IOPMrootDomain::reportUserInput( void )
{
#if !NO_KERNEL_HID
    OSIterator * iter;
    OSDictionary * matching;

    if(!wrangler)
    {
        matching = serviceMatching("IODisplayWrangler");
        iter = getMatchingServices(matching);
        if (matching) matching->release();
        if(iter)
        {
            wrangler = OSDynamicCast(IOService, iter->getNextObject());
            iter->release();
        }
    }

    if(wrangler)
        wrangler->activityTickle(0,0);
#endif
}

As you see from code examples above, there is no any huge mystery about darkwake boot arg and you should use it mostly on case when you really need to manipulate HID tickle behaviour. On most cases it's more important to properly configure you system power management rather than paying with darkwake boot arg, which can be done via terminal command pmset.

 


 

Power Management

 

To check Power Management settings use terminal command:

pmset -g

Also you can use Hackintool to check power management settings:

 

hackintool-pmset-output.jpg.527e4b658f3488e13583286d4118f970.jpg

 

Power Management Settings explained:

 

  • displaysleep - display sleep timer; replaces ’dim’ argument in 10.4 (value in minutes, or 0 to disable)
  • disksleep - disk spindown timer; replaces ’spindown’ argument in 10.4 (value in minutes, or 0 to disable)
  • sleep - system sleep timer (value in minutes, or 0 to disable)
  • womp - wake on ethernet magic packet (value = 0/1). Same as "Wake for network access" in the Energy Saver preferences.
  • ring - wake on modem ring (value = 0/1)
  • powernap - enable/disable Power Nap on supported machines (value = 0/1)
  • proximitywake - On supported systems, this option controls system wake from sleep based on proximity of devices using same iCloud id. (value = 0/1)
  • autorestart - automatic restart on power loss (value = 0/1)
  • lidwake - wake the machine when the laptop lid (or clamshell) is opened (value = 0/1)
  • acwake - wake the machine when power source (AC/battery) is changed (value = 0/1)
  • lessbright - slightly turn down display brightness when switching to this power source (value = 0/1)
  • halfdim - display sleep will use an intermediate half-brightness state between full brightness and fully off (value = 0/1)
  • sms - use Sudden Motion Sensor to park disk heads on sudden changes in G force (value = 0/1)
  • hibernatemode - change hibernation mode. Please use caution. (value = integer)
  • hibernatefile - change hibernation image file location. Image may only be located on the root volume. Please use caution. (value = path)
  • ttyskeepawake - prevent idle system sleep when any tty (e.g. remote login session) is ’active’. A tty is ’inactive’ only when its idle time exceeds the system sleep timer. (value = 0/1)
  • networkoversleep - this setting affects how OS X networking presents shared network services during system sleep. This setting is not used by all platforms; changing its value is unsupported.
  • destroyfvkeyonstandby - Destroy File Vault Key when going to standby mode. By default File vault keys are retained even when system goes to standby. If the keys are destroyed, user will be prompted to enter the password while coming out of standby mode.(value: 1 - Destroy, 0 - Retain)

 

If you want to disable proximitywake the this command should be used:

sudo pmset -a proximitywake 0

 

Recommended settings for Hack's are:

sudo pmset -a hibernatemode 0
sudo pmset -a proximitywake 0
sudo pmset -a powernap 0

Settings above disable Hibernate, Bluetooth wake by iDevices and Power Nap.

 

To check what might prevent computer from going into sleep we can pmset tool:

pmset -g assertions

 

So, before using blindly darkwake boot arg to solve some sleep issues, make instead sure that USB ports and Power Management settings of your Hack are configured properly.

 


 

Sleep & Wake

 

Quite often Hack's users have sleep/wake issues because they don't pay attention to the fact that Apple's macOS is developed for Apple hardware in mind, not regular PC's. 

 

Of course sleep mode isn't something that Apple has invented first. Since December 1996 ACPI superseded APM. ACPI - Advanced Configuration and Power Interface. APM - Advanced Power Management. The ACPI specification defines several states for various hardware components and devices. There are global "Gx" states and sleep "Sx" states specified.

 

Gx Name Sx Description
G0 Working S0 The computer is running and the CPU executes instructions. "Awaymode" is a subset of S0, where monitor is off but background tasks are running
G1 Sleeping S1 Power on Suspend (POS): Processor caches are flushed, and the CPU(s) stops executing instructions. The power to the CPU(s) and RAM is maintained. Devices that do not indicate they must remain on may be powered off
S2 CPU powered off. Dirty cache is flushed to RAM
S3 commonly referred to as StandbySleep, or Suspend to RAM (STR)RAM remains powered
S4 Hibernation or Suspend to Disk: All content of the main memory is saved to non-volatile memory such as a hard drive, and the system is powered down
G2 Soft Off S5 G2/S5 is almost the same as G3 Mechanical Off, except that the power supply unit (PSU) still supplies power, at a minimum, to the power button to allow return to S0. A full reboot is required. No previous content is retained. Other components may remain powered so the computer can "wake" on input from the keyboard, clock, modemLAN, or USB device
G3 Mechanical Off   The computer's power has been totally removed via a mechanical switch (as on the rear of a PSU). The power cord can be removed and the system is safe for disassembly (typically, only the real-time clock continues to run using its own small battery)

 

Since Mac OS X Lion Apple is using DarkWake, which were wrapped into Power Nap on OS X Mountain Lion. To understand and fix macOS sleep issues we also need the knowledge about sleep states which macOS comps may have. To check log of macOS computers sleep/wake we can use pmset tool. Following terminal code prints sleep/wake history.

pmset -g log|grep -e " Sleep  " -e " Wake  "

 

I to check more closely sleep history then we can recognise that macOS has at least 3 different sleep "modes":

 

  • Software sleep
  • Idle sleep
  • Maintenance sleep

 

Software sleep

Software sleep is trigged by computer user or by some software, which is configured to put comp sleep after certain tasks done.

 

Idle sleep

Idle sleep is triggered by idle timer. Each time user interacts with computer idle timer is reset. If users doesn't interact within idle timer countdown time, then Idle sleep is triggered.

 

Maintenance sleep

If user has enabled "Wake for Ethernet network access", then macOS goes from Idle or Software sleep into Maintenance sleep immediately. 

 

Power Nap

If Power Nap is enabled, then computer wakes up automatically after certain period of time, handles certain tasks and goes back to sleep. Apple's documentation reveals that behaviour of power nap doesn't depend only macOS version running on comp but at hardware and it's firmware too. Documentation clearly states that comps made on different time behave differently. which points directly that Power Nap is related to the hardware/firmware too.

 

Quote

Power Nap responds to your battery power state
The year your notebook computer was released determines how Power Nap responds to your battery power state.
Computers with 2013 or a later year in the model name use Power Nap until the battery is drained. Computers with 2012 or an earlier year in the model name suspend Power Nap if the battery has a charge of 30% or less. Power Nap resumes when you connect to AC power.
To increase battery life while using Power Nap, disconnect any USB, Thunderbolt, or FireWire devices that may draw power from the computer. Learn more about maximizing battery life.


Power Nap checks for updates at specific intervals
When your computer isn't connected to AC power, Power Nap communicates and transfers data for only a few minutes per Power Nap cycle. When connected to AC power, communications and data transfers are continuous.

 

According quote above we have to very carefully choose which firmware is emulated on Hack. Changing SMBIOS on Clover/Opencore can help to solve sleep issues or cause them.

 

An example of sleep log when powernap is enabled:

2020-01-05 09:03:23 +0200 Sleep               	Entering Sleep state due to 'Idle Sleep': Using AC (Charge:0%) 21 secs   
2020-01-05 09:04:29 +0200 Sleep               	Entering Sleep state due to 'Maintenance Sleep': Using AC (Charge:0%) 1945 secs 
2020-01-05 09:37:39 +0200 Sleep               	Entering Sleep state due to 'Maintenance Sleep': Using AC (Charge:0%) 3187 secs 
2020-01-05 10:31:33 +0200 Sleep               	Entering Sleep state due to 'Maintenance Sleep': Using AC (Charge:0%) 12467 secs
2020-01-05 14:00:06 +0200 Sleep               	Entering Sleep state due to 'Maintenance Sleep': Using AC (Charge:0%) 11312 secs
2020-01-05 17:08:40 +0200 Wake                	DarkWake to FullWake from Normal Sleep [CDNVA] : due to UserActivity Assertion Using AC (Charge:0%)    

 

An example of sleep log, when ethernet wake and power nap is disabled:

2020-01-03 18:15:43 +0200 Sleep               	Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=inactive Using AC (Charge:0%) 3210 secs 
2020-01-03 19:09:13 +0200 Wake                	Wake from Normal Sleep [CDNVA] : due to XDCI CNVW/HID Activity Using AC (Charge:0%) 207 secs  
2020-01-03 19:12:40 +0200 Sleep               	Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=inactive Using AC (Charge:0%) 165903 secs
2020-01-05 17:17:43 +0200 Wake                	Wake from Normal Sleep [CDNVA] : due to XDCI CNVW/HID Activity Using AC (Charge:0%)  

As we see from log above, computer stays in sleep without any wakes and no 'Maintenance Sleep'.

 

So there are several variables which have effect on your computer sleep/wake behaviour and the solution that helped another people, might be useless or even worse on you case.

 

...

Edited by holyfield
  • Like 2
  • Thanks 3
Link to comment
Share on other sites

3 hours ago, luki1979 said:

Thank you, I'm having weird sleep issue. If I put machine to sleep it wakes normally but If I leave it alone for a while, the display stays black and I have to hard reset. Everything was sweet in Mojave.

 

See if disk idle sleep is enabled. He who usually causes it.

Link to comment
Share on other sites

2 hours ago, ludufre said:

 

See if disk idle sleep is enabled. He who usually causes it.

 

I would recommend to start from diagnostics first instead of blind suggestions. IF to read my initial post on this thread, then I have provided some tips how to check power management settings and sleep issues. 

Edited by holyfield
Link to comment
Share on other sites

14 hours ago, luki1979 said:

Thank you, I'm having weird sleep issue. If I put machine to sleep it wakes normally but If I leave it alone for a while, the display stays black and I have to hard reset. Everything was sweet in Mojave.

 

As we know, Hackintosh = hacking macOS to work on PC. So hacking is inevitable part of Hackintosh world. Please keep in mind that hacking itself isn't unethical, its just overcoming some computer related problem.

 

Quote

If you really want to get some help from Hackintosh community, learn how to leave others out of guesswork! Learn how to collect diagnostics data which can help others to solve your case. It's annoying to ask people over and over to provide some diagnostics related to their Hack issue. That's why there are millions on unanswered posts on Hackintosh forums, their authors doesn't respect other's actually, they do not think out of their own shoes. Your first question before posting should be, what data is needed to help me, do I have provided all data available to help me immediately?

 

Could you tell how I should actually help you without any related diagnostic data?

Link to comment
Share on other sites

I'm having problems with this website, certificate is expired. Attaching photos also don't work for me.

 

I've just created custom SSDT with pikers script and ticked off Generte PStates, CStates now CPU have more steps from raging from 1.60 GHZ to 3.80 GHz turbo.  Previously only 4 steps were avaliable with Clover auto generation.

This seems to sort audio crackling and performance issues. So only sleep issue remains :)

 

My:

pmset -g

 

Quote

System-wide power settings:

Currently in use:

standby              1

Sleep On Power Button 1

womp                 0

halfdim              1

hibernatefile        /var/vm/sleepimage

powernap             0

gpuswitch            2

networkoversleep     0

disksleep            0

standbydelayhigh     86400

sleep                30 (sleep prevented by sharingd, coreaudiod)

autopoweroffdelay    14400

hibernatemode        0

autopoweroff         1

ttyskeepawake        1

displaysleep         30 (display sleep prevented by com.apple.WebKit.WebContent)

highstandbythreshold 50

standbydelaylow      86400

 

I have FakeSMC in EFI/.../Other and USBInjectAll in L/E

 

Lilu and WhateverGreen has absolutely no effect on my machine so I'm not using them.

 

What do you think stops display from waking up? 

 

Link to comment
Share on other sites

35 minutes ago, luki1979 said:

Lilu and WhateverGreen has absolutely no effect on my machine so I'm not using them.

 

On most cases it's untrue. WhateverGreen solves many Hackintosh related issues, for example sleep wake to black screen on AMD, DRM playback failure, Injects IOVARendererID into GPU properties etc.

 

So, until you are not some kind of Hackintosh or hardware expert I suggest to use WhateverGreen.

 

41 minutes ago, luki1979 said:

What do you think stops display from waking up? 

 

I do not think anything as I doth have any valuable information from your side to make even any general suggestions.

 

As I see you have automated GPU switch enabled.

0 = integrated
1 = discrete
2 = auto switch

Are you aware that Hibernation doesn't work on Hackintosh? Why you have set standby  to 1 and autopoweroff to 1?

 

Could you explain in details (every setting in details) why you are using these settings which you posted about your power management?

 

 

Link to comment
Share on other sites

This is default sleep settings that was installed with Catalina for iMac 13,2 definition I'm using. I didn't change anything yet hence I'm asking for help to get my sleep working.

I don't discard WhateverGreen but it is created for more recent hardware than what I got at the moment. I had newest Lilu and WG installed recently and my system works the same with or without them. I'm using Hackintosh from Snow Leopard and learned that less 3rd party kexts is always better, if you can of course. 

 

 I really appreciate your suggestions, I never explored sleep settings as it always worked for me with just hibernation disabled but not on Catalina. 

I've set standby and autopoweroff to 0 now and gpuswitch to 1.

Quote

System-wide power settings:

Currently in use:

standby              0

Sleep On Power Button 1

womp                 0

halfdim              1

hibernatefile        /var/vm/sleepimage

powernap             0

gpuswitch            1

networkoversleep     0

disksleep            10

standbydelayhigh     86400

sleep                30 (sleep prevented by mds_stores, sharingd, coreaudiod)

autopoweroffdelay    14400

hibernatemode        0

autopoweroff         0

ttyskeepawake        1

displaysleep         30 (display sleep prevented by com.apple.WebKit.WebContent)

highstandbythreshold 50

standbydelaylow      86400

 

I will test now

Link to comment
Share on other sites

1 hour ago, luki1979 said:

 I really appreciate your suggestions


@luki1979, I cannot make any suggestions as I don’t have any information about your system! You are keeping us in dark about your system. I’m not the clairvoyant. Why you do not provide information about your system?

 

It’’s 100% up to you how you build your Hack. I personally use WhateverGreen, so I can watch DRM content. 
 

At certain point older hardware wouldn’t play well or at all with latest Apple macOS, because it’s made for newer hardware only and maybe you have to use older version of macOS. I was unable to upgrade macOS for a while as I had NVIDIA graphics card. Finally I bought new AMD graphics card that I could upgrade macOS.

 

I suggest you to create separate post for your build, where you list all information about your hardware, current configuration in deep details etc. Listing what works and what doesn’t work. 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

As per my experience darkwake=0 does indeed disable Power Nap. When I use darkwake=0 the power preference pane changes. The Power Nap checkbox disappears and the sleep timer slider is separated into two sliders, one for display sleep and one for actual PC sleep.

Link to comment
Share on other sites

  • 2 weeks later...

I got sleep working, thanks to this thread. But only if I remove my NVIDIA RTX 2080. On macOS I use the built-in Intel iGPU UHD 630. I only use the NVIDIA card under Windows, so somehow macOS seems to be bothered by the card just sitting in my mac (and eating up 50 Watts doing nothing :w00t:).

 

Does anyone know what I can setup in BIOS or macOS to get sleep working with the NVIDIA card still installed?

 

  • macOS 10.15.3
  • ASUS Prime Z390-A
  • Intel Core-i9 9900K

Thanks in advance!

Link to comment
Share on other sites

1 minute ago, S3Atze said:

I got sleep working, thanks to this thread. But only if I remove my NVIDIA RTX 2080. On macOS I use the built-in Intel iGPU UHD 630. I only use the NVIDIA card under Windows, so somehow macOS seems to be bothered by the card just sitting in my mac (and eating up 50 Watts doing nothing :w00t:).

 

Does anyone know what I can setup in BIOS or macOS to get sleep working with the NVIDIA card still installed?

 

  • macOS 10.15.3
  • ASUS Prime Z390-A
  • Intel Core-i9 9900K

Thanks in advance!

 

If using WhateverGreen.kext add -wegnoegpu to boot args.

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

While "darkwake=8" is working for me in High Sierra, Mojave and Catalina, the title of this thread "DarkWake on macOS Catalina | boot args darkwake=8 & darkwake=10 are obsolete" intrigued me.  Without "darkwake=8" my Dell Latitude E6410 wakes to a dark screen if the lid is opened when running High Sierra 10.13.6, Mojave 10.14.6 and Catalina 10.15.3.  Without "darkwake=8," I need to "wake" the LCD by pressing a key after opening the lid.  With Clover boot arg "darkwake=8" my LCD wakes when the lid is opened.   I haven't tried other values of darkwake.  

 

I am aware that I am using High Sierra kexts for my Nvidia display for Mojave and Catalina (I used DosDude's patcher), but I believe this thread implies that darkwake=8 shouldn't work for High Sierra.

 

Am I just lucky that "darkwake=8" still works for me in High Sierra, Mojave and Catalina and if so, is there a reason that I shouldn't be using "darkwake=8"?

Edited by tonyx86
Link to comment
Share on other sites

18 hours ago, tonyx86 said:

While "darkwake=8" is working for me in High Sierra, Mojave and Catalina, the title of this thread "DarkWake on macOS Catalina | boot args darkwake=8 & darkwake=10 are obsolete" intrigued me.

 

I suppose that you haven't read properly DarkWake on macOS Catalina | boot args darkwake=8 & darkwake=10 are obsolete and you probably do not know what is bitwise operation.

 

darkwake=10 actually equals to darkwake=2 and darkwake=8 actually equals to darkwake=0 because kDarkWakeFlagIgnoreDiskIOAlways is removed.

 kDarkWakeFlagIgnoreDiskIOAlways  = 0x08, // always ignore disk idle

If we check older XNU versions, then we see that kDarkWakeFlagIgnoreDiskIOAlways removed since XNU 2782.1.97 ( = Yosemite ).

 

 

  • Like 1
Link to comment
Share on other sites

1 minute ago, tonyx86 said:

 I should have read your post more carefully!  darkwake=0 works perfectly.  Thank you!

 

You are welcome!

 

Computing is a very strict science. I recommend to read Bitwise operation! I hope it helps to understand what are so called flags, the most efficient technique to store a number of Boolean values using as little memory as possible.

Link to comment
Share on other sites

  • 4 weeks later...

Hello guys! I'm using OpenCore. My system is ASUS x99 Deluxe. Everything tuned and set properly and rig works just fine - usb, power management, sleep. But I have one small problem - I can't wake my Hack with keyboard or mouse... Only by pressing Power Button on system block. Also without darkwake=0 my hack wakes up, but screen stays off until I click mouse. Can you tell me where to dig on enabling wake by mouse click? Thank you!

Link to comment
Share on other sites

  • 7 months later...
2020-10-24 21:42:16 +0530 Sleep               	Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=active Using AC (Charge:0%) 887 secs  
2020-10-24 21:57:03 +0530 DarkWake            	DarkWake from Deep Idle [CDN] : due to RTC0 GLAN EH01 EH02/Maintenance Using AC (Charge:0%) 14 secs   
2020-10-24 21:57:17 +0530 Wake                	DarkWake to FullWake from Deep Idle [CDNVA] : due to UserActivity Assertion Using AC (Charge:0%) 16 secs   
2020-10-24 21:57:33 +0530 Sleep               	Entering DarkWake state due to 'Clamshell Sleep':TCPKeepAlive=active Using AC (Charge:0%)           
2020-10-24 21:58:21 +0530 Sleep               	Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=active Using AC (Charge:0%) 126 secs  
2020-10-24 22:00:27 +0530 Wake                	Wake from Deep Idle [CDNVA] : due to PWRB GLAN EH01 EH02/Lid Open Using AC (Charge:0%)

is this sleep/wake behaviour normal?

Edited by rajuchacharuk
Link to comment
Share on other sites

  • 11 months later...

Hi Holyfield, thank you for this post it is great work.

 

I have an wake issue RTC Alarm.


Going through this post would

Darkwake 256 stiffle all alarms including RTC? Looking at your post above..

 

HID Tickle Early = 1
HID Tickle Late = 2
HID Tickle None = 3
HID Tickle Mask = 3
Alarm Is Dark = 256
Graphics Power State 1 = 512
Audio Not Suppressed = 1024
Link to comment
Share on other sites

3 minutes ago, makk said:

Hi Holyfield, thank you for this post it is great work.

 

I have an wake issue RTC Alarm.


Going through this post would

Darkwake 256 stiffle all alarms including RTC? Looking at your post above..

 

HID Tickle Early = 1
HID Tickle Late = 2
HID Tickle None = 3
HID Tickle Mask = 3
Alarm Is Dark = 256
Graphics Power State 1 = 512
Audio Not Suppressed = 1024

 

Previously as I am an amateur here and require work like yours to jump up and get in the fire, --was uncertain of Powernap as this seemed a bit strange word to use for waking to work in the background during sleep.

 

So to get this straight if I disable Powernap  --> sudo pmset -a powernap 0, no wakey for any reason? Even RTC Alarms?

 

Link to comment
Share on other sites

Has anyone managed to completely disable Darkwake on BigSur (11.5-> )? 

 

My HP 800G1 hack is working fine except that when I WOL it drops back to sleep after about 45seconds even though once woken I have processes running which usually prevent sleep (emby server). 

The logs show the WOL event as a darkwake. What I want is the WOL to be treated the same as a HID input and cause a full wake. 

 

I had the exact same issue on Catalina which was fixed with darkwake=0 but unfortunately the same isn't working in BigSur. 

 

The bootflag is present in Nvram but darkwakes still happening.

 

any ideas welcomed ! 

 

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...