Scheduled wake from DRIPs (Modern Standby)

Page 1 of 2 12 LastLast

  1. Posts : 3
    Windows 10 x64 1809
       #1

    Scheduled wake from DRIPs (Modern Standby)


    So, I've spent the last week scouring the web for this and failed!

    I am trying to wake a Dell XPS laptop overnight to run maintenance tasks, including backup to local network server, and so far it has proven impossible.

    While in the "Resiliency Phase" (https://docs.microsoft.com/en-us/win...modern-standby) all apps run in an Interactive Session are suspended by the Desktop Activity Moderator, but tasks running In Session-0 appear able to run. However, once the computer has entered DRIPS any task that relies on sleeping hardware will not succeed and on the Dell XPS, which runs in "Standby (S0 Low Power Idle) Network Disconnected", this includes the network adaptors (both WiFi and USB connected Ethernet), so even backup tasks that I can get to run still fail due to no network connection.

    Waking from DRIPS on a schedule seems impossible! Wake timers do not work on Modern Standby systems, so neither do any user created Task Scheduler tasks (even ones set to run under SYSTEM). About the only thing that will occasionally wake the system is Windows Update, but it seems there is no longer any way to schedule that. Microsoft docs say UWP apps can (https://docs.microsoft.com/en-us/win...y-wake-sources) but it seems no one has written one for this purpose.

    Surely there must be a way, short of writing your own UWP app, to get a Modern Standby system to wake from DRIPS for out-of-hours for housekeeping?? There don't seem to be any code snippets we can use. This just seems crazy hard!

    All that needs to happen is for the software equivalent of a "power button press" or even, I think, just the computer to leave DRIPS. The tasks are waiting to run and as soon as the system wakes they should keep the system awake until they have completed.

    Hopefully someone can make me look a total fool and point out something I have missed!
    Last edited by Jong; 13 May 2019 at 03:23.
      My Computer


  2. Posts : 3,274
    Win10
       #2

    Just a thought; are you using the AC adaptor when the laptop is in mainenance mode ?

    "AC power vs. battery power

    Modern Standby systems are capable to go into maintenance mode while on AC power. If a maintenance task occurs while on AC power, networks would connect, allowing for updates and other activities to occur."

    Modern Standby – Nick's IT Blog
      My Computers


  3. Posts : 3
    Windows 10 x64 1809
    Thread Starter
       #3

    Hi. Thanks for this. Interesting idea. I had not come across the Maintenance Mode documentation before.

    The laptop is always on AC power when we want this task to run.

    Trouble is if you follow the link given in Nick's blog it seems:
    • Tasks that run in maintenance mode cannot be run on a schedule. Windows will do it when it feels like it.
    • It looks like only the authors of specifically written maintenance mode software can use it. It doesn't appear you can use the standard Task Scheduler UI to create a Maintenance task. Not least because....
    • Any task must be able to suspend at any time, if Windows determines the appropriate time for Maintenance Mode has expired, to be resumed at a later date. They specifically say this may happen several times during the running of a task.

    It does appear Microsoft are trying to make it impossible for even system administrators to actively schedule tasks during standby, which for backup tasks in particular seems to lead to a lack of predictability that is, to say the least, undesirable!
      My Computer


  4. Posts : 2
    Windows 10 Home
       #4

    Hi Jong did you find a solution to this issue? I recently purchased a new Acer laptop that only supports 'Modern Standby' and like you I need to schedule tasks(Task Scheduler) to wake from S0(Modern Standby) to run programs that I have written, but have had no luck. I edited the registry to disable CsEnabled = 0(Connected Standby) "HKey_Local_Machine\System\CurrentControlSet\Control\Power\CsEnabled" and subsequently reinstate S3(Standby), unfortunately upon waking from S3 the laptop graphics are distorted and the laptop requires a hard shutdown to recover, Event Viewer shows System went to S3 and woke. Acer support claims S3 isn't supported. As it is, my hair is thinning, I have been at this for a week now, I am going to take the laptop to Acer support as it is effectively a product that is not working as advertised...
      My Computer


  5. Posts : 3
    Windows 10 x64 1809
    Thread Starter
       #5

    Sad to say Chris, no I did not.

    It seems the majority of programs - commercial and freeware - don't seem to have done anything to support Modern Standby and there is remarkably little info on it out there, beyond basic MS documentation and the hack you have tried. Like you, disabling Modern Standby and forcing S3 just led to system instability on my Dell XPS 13.

    Even getting into a discussion on it seems hard (I've tried here, on Reddit and a few other places). Everyone just seems to shrug their shoulders!
      My Computer


  6. Posts : 2
    Windows 10 Home
       #6

    Thanks for returning to me, sad indeed, unless this is resolved it will become a deal breaker for me. Whether or not Acer support, upon apply the thumb screws, resolve the issue I'll let you know, cheer mate...
      My Computer


  7. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #7

    I also have a computer that uses Modern standby and it cannot wake on a timed TS task either. It supports hibernation but not S3 sleep, just like yours.
    Scheduled wake from DRIPs (Modern Standby)-available-sleep-states-modern-standby-computer.png

    I think the [very short-sighted] idea is that you do not put the Modern standy computer into hibernation in the first place unless you are content to allow Windows to wake it whenever it feels like doing so
    - this implies that, before hibernating it, you must always choose a power plan that sends it back into hibernation after a short period of inactivity or that undesired Windows job will drain your battery without your knowledge.
    -This Modern standy computer is the only computer I have ever had that allows wake from hibernation without an AC power source [whilst it has never been documented, Windows has always refused scheduled wake from hibernation unless there was a power source].

    I wouldn't mind but since Windows maintenance tasks do wake the computer from hibernation it's only me they are thwarting.

    Denis
    Last edited by Try3; 30 Aug 2019 at 10:56.
      My Computer


  8. Posts : 4
    Windows 10
       #8

    Possible solution


    Hi.

    Since I need to achieve the same goal I am studying the possible wake sources related to modern standby at https://docs.microsoft.com/en-us/win...y-wake-sources

    One of the wake source is “Power source change” (AC to battery, or battery to AC).
    In particular when there is a power source change from battery to AC the SoC wakes and the display turns on, this is also true in Windows 10 version 2004.

    Now I can’t test my theory, but I can’t see why it cannot work: if you leave your pc attached to the power adapter and you use an electrical timer to schedule the power off at specific time and the power on after some time the screen should turn on waking the system.

    If this works than it’s just a matter of scheduling a task in the task scheduler that is triggered on a wake event.

    This scheduled task can change the unattended sleep timeout and the standard sleep timeout like this:

    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 0
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 0
    powercfg /SETDCVALUEINDEX SCHEME_CURRENT 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da 0
    powercfg /SETACVALUEINDEX SCHEME_CURRENT 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 29f6c1db-86da-48c5-9fdb-f2b67b1f44da 0
    powercfg /SETACTIVE SCHEME_CURRENT

    If this works the pc won’t come back to modern standby and you’ll be able to perform your scheduled task.

    At the end of your task you can restore the sleep timeout settings so that the pc will be able to enter modern standby.

    Let me know if it works.

    Regards

    Mike



    Jong said:
    So, I've spent the last week scouring the web for this and failed!

    I am trying to wake a Dell XPS laptop overnight to run maintenance tasks, including backup to local network server, and so far it has proven impossible.

    While in the "Resiliency Phase" (https://docs.microsoft.com/en-us/win...modern-standby) all apps run in an Interactive Session are suspended by the Desktop Activity Moderator, but tasks running In Session-0 appear able to run. However, once the computer has entered DRIPS any task that relies on sleeping hardware will not succeed and on the Dell XPS, which runs in "Standby (S0 Low Power Idle) Network Disconnected", this includes the network adaptors (both WiFi and USB connected Ethernet), so even backup tasks that I can get to run still fail due to no network connection.

    Waking from DRIPS on a schedule seems impossible! Wake timers do not work on Modern Standby systems, so neither do any user created Task Scheduler tasks (even ones set to run under SYSTEM). About the only thing that will occasionally wake the system is Windows Update, but it seems there is no longer any way to schedule that. Microsoft docs say UWP apps can (https://docs.microsoft.com/en-us/win...y-wake-sources) but it seems no one has written one for this purpose.

    Surely there must be a way, short of writing your own UWP app, to get a Modern Standby system to wake from DRIPS for out-of-hours for housekeeping?? There don't seem to be any code snippets we can use. This just seems crazy hard!

    All that needs to happen is for the software equivalent of a "power button press" or even, I think, just the computer to leave DRIPS. The tasks are waiting to run and as soon as the system wakes they should keep the system awake until they have completed.

    Hopefully someone can make me look a total fool and point out something I have missed!
      My Computer


  9. Posts : 16,950
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #9

    Mike,

    I looked at such a task but the wake event is not specific to a particular cause. If you trigger a task upon wakeup then it will run even if you wake it up deliberately.

    The wake event record in Event viewer does contain the information necessary but it is not easily analysed. The wake event identifies what caused it [such as, in many of the annoying cases, the USOClient / UpdateOrchestrator]. You can see these details in Event viewer but they are not normally sent anywhere else.

    I once spent a long time trying to overcome this [for a completely different event related to networking] but the results were not reliable enough for use. But I can suggest an outline of what you would do.
    1 Set the wake event to start a TS task that runs a batch file.
    2 Get the batch file to extract the full event details using the built-in utility wevtutil
    3 Read the full event details using an appropriate command - the For command is useful for this.
    4 If the cause of the wakeup is found to be UpdateOrchestrator then use a command to send the computer back into sleep/hibernation [whichever it was woken from].
    - It is not necessary to alter power plan, just use a direct command to, for example, hibernate it C:\Windows\System32\shutdown.exe /h.

    wevutil - MSDocs
    wevutil - SS64

    This is an example of what a wevutil command to examine an event [not your one] can look like
    wevtutil qe Microsoft-Windows-NetworkProfile/Operational /c:3 /rd:false /f:text
    or
    wevtutil qe Microsoft-Windows-NetworkProfile/Operational /c:3 /rd:false /f:text >D:\Desktop\results.txt


    Denis
      My Computer


  10. Posts : 4
    Windows 10
       #10

    First, from you notes I can conclude that a modern standby (connected or disconnected) pc can be truly woken up by a dc/ac power source change with a simple and cheap electrical timer.

    Did you try that or are you talking about other waking cases?

    I ask that because this is the main question the OP asked, and I think that if my reasoning is correct this solves the OP main problem.

    Said that, you are right about the fact the task I Imagined could be triggered many times and not when I really intended to.

    The specific event that must be triggered the task is the next one:

    Log Name: System
    Source: Microsoft-Windows-Kernel-Power
    Event ID: 507
    Description: The system is exiting connected standby

    As you said this event is created many times but since the OP needs to schedule his task at specific time, he can schedule the electrical timer to power off at, let’s say, 3am and schedule the power on three minutes later.

    So, in the triggered task it is enough to check the system time and if it is near to the OP expected scheduled task time than the task can be run.
    To avoid running the task multiple times the task itself can log the result and avoid running multiple instances if the log exists.

    There are also other more precise methods, but those methods require some programming knowledge.

    About hibernation, I don’t use it and I disable it because it’s a waste of disk space so I prefer to use sleep only (clearly I have Ups to avoid the risk of losing data), this means that changing the sleep timeout with powercfg is the only way to stop the system entering the connected or disconnected standby or to allow it.



    Try3 said:
    Mike,

    I looked at such a task but the wake event is not specific to a particular cause. If you trigger a task upon wakeup then it will run even if you wake it up deliberately.

    The wake event record in Event viewer does contain the information necessary but it is not easily analysed. The wake event identifies what caused it [such as, in many of the annoying cases, the USOClient / UpdateOrchestrator]. You can see these details in Event viewer but they are not normally sent anywhere else.

    I once spent a long time trying to overcome this [for a completely different event related to networking] but the results were not reliable enough for use. But I can suggest an outline of what you would do.
    1 Set the wake event to start a TS task that runs a batch file.
    2 Get the batch file to extract the full event details using the built-in utility wevtutil
    3 Read the full event details using an appropriate command - the For command is useful for this.
    4 If the cause of the wakeup is found to be UpdateOrchestrator then use a command to send the computer back into sleep/hibernation [whichever it was woken from].
    - It is not necessary to alter power plan, just use a direct command to, for example, hibernate it C:\Windows\System32\shutdown.exe /h.

    wevutil - MSDocs
    wevutil - SS64

    This is an example of what a wevutil command to examine an event [not your one] can look like
    wevtutil qe Microsoft-Windows-NetworkProfile/Operational /c:3 /rd:false /f:text
    or
    wevtutil qe Microsoft-Windows-NetworkProfile/Operational /c:3 /rd:false /f:text >D:\Desktop\results.txt


    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:02.
Find Us




Windows 10 Forums