Announcement

Collapse
No announcement yet.

Sleeper entering S3 after it finishes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sleeper entering S3 after it finishes

    Hi Passmark,

    I'm making an automated script that calls sleeper to go into S3 for 10 cycles via Command line.

    Sleeper.exe -S0010 -N 10 -D 30 -F -E -L sleeper.log

    After the process finishes, my app parses the log and reports back. However, sometimes the system goes into S3 AFTER the sleeper.exe has exited. And the system does not automatically wake up from S3. Do you know what's causing this? Currently, I have a workaround that simulate keypresses after the sleeper.exe process exited, and that seems to help 90% of the time. Please look into this extra S3.



    Sidenote: For some odd reason, calc.exe opens up after every S3. Anyone seen that?

    Sidenote#2: Is there a way to specific Log Level via Command Line?


    Thanks for a great tool!
    -Dennis

  • #2
    If command line options are specified without a configuration file (i.e. without --config option), default values will be used and the command line options will override its default values. If any of the command line option is invalid, Sleeper will use its default values.

    So the option to open up calc is probalby set in the default file.

    To set the log level use a config file, then call the config file from the command line.

    I don't know why you system might go to sleep after the software has finished running.

    Comment


    • #3
      s3 issue

      Hi ,
      I am trying to run PassMark Sleeper to cycle through the power cycles s1,s3 and s4. But even after a single cycle of s1(or s3 or s4) after the application exists the system goes to s3 state by itself after 2 minutes(without user intervension within that time frame). If there is a mouse click or a key press after sleeper exists there is no problem. I have also tried setting the power managment timers back to zero. It is specific to vista environment.

      Any views?

      Comment


      • #4
        What settings are you using in Sleeper?

        Comment


        • #5
          settings

          In the UI I select S1 and sleep time duration-45 secs, Configuration->Number of cycle(s)-1, No log->'Sleep now'

          Comment


          • #6
            From your description of the settings you used I am guessing you are using a old version of the software. V2.3 (Build 1004) is the current release. See,
            http://www.passmark.com/products/sleeper.htm

            Comment


            • #7
              similar S3 issue

              I am experiencing a simliar problem running Sleeper v2.3 build 1004 on Vista. I don't use the command-line settings, but edit the settings in the GUI manually.

              I have only S3 and S4 selected (alternates between each state) with the following...
              S3 = 60
              S4 = 120
              Number of Cycles = 300
              Cycle Interval Duration = 180
              Delay before first sleep = 30
              Log to file = Enabled
              Append to log file = Enabled
              Log level = Normal
              Error handling = all Unchecked
              External actions = all Unchecked

              After resuming from Sleep, the 180 sec countdown begins, but after about 100 sec the unit returns to Sleep and stays there (never wakes up). I have run the test without S3 selected (S4 only) and it runs fine - no problems. But re-enable S3 state and after the 1st cycle the unit again returns to S3 after about 100 sec during the middle of the countdown.

              I can reduce the 180 sec countdown to less than 100 sec, but then that doesn't give the unit enough time to finish stabilizing after resuming from Hibernate before initiating the next sequence. I ran an S3-only test with a 20 sec countdown, no problems.

              I also ran the same test using WinXP on the unit and it works fine - no problems. Also, prior to SP1 I used this same test (different version of Sleeper then) and it would work fine under Vista. I tried build 1003 on SP1, but the same thing happens. I don't keep any older versions of Sleeper on hand.

              Comment


              • #8
                This seems to be an intentional behaviour from Vista to stop certain applications and system activities from waking the computer without the users knowledge and leaving it running. There is a brief mention of it in this article from Microsoft

                http://support.microsoft.com/kb/937556

                When the computer goes back to sleep

                After the computer wakes up, the computer goes back to its previous sleep state if the computer is idle for a certain time. For example, this behavior may occur after the computer wakes up to automatically install a Windows update.
                Our testing has shown that the time for this to happen is two minutes.

                Comment


                • #9
                  Is there anyway around this? I'm using sleeper.exe to automate some testing in a lab, but if the system goes to sleep after we're done testing, the following tests might not get executed.

                  My temporary workaround is to reboot the system after sleeper is done.

                  Comment


                  • #10
                    We are not aware of any way to turn it off. But we haven't looked for one either.

                    Comment


                    • #11
                      Originally posted by ucdchan View Post
                      Is there anyway around this?
                      I have found a two work arounds.

                      WORKAROUND 1:

                      On Vista and later, some Googling reveals that there should be a registry setting that controls this. I haven't tried the settings because I haven't been encountering the problem on Vista or later. But the relevant posts can be found by Googling for the following keywords:

                      How to change the Return to Sleep Timeout for a Unattended Wake Up in Vista

                      The post I found that details these registry keys is here:

                      http://www.vistax64.com/tutorials/171042-sleep-return-timeout-unattended-wake-up.html




                      WORKAROUND 2:

                      I cannot find those registry keys on Windows XP, yet XP is where I'm encountering the problem. (Yes, I know XP is old but we're still shipping software for it and so I still have to test it.) So instead, I am implementing the solution described in this post:

                      http://www.vistax64.com/vista-performance-maintenance/52657-task-scheduler-sleep-mode-sleeps-too-soon.html

                      This solution involves writing another keep-awake program that you use as part of your automation. I happened to write the program in VB because that was the example given at the link above, but you could do it in C as well. The program doesn't have to do anything to keep the system awake... it doesn't need to move the mouse or press keys or anything. It merely sits there idle and does nothing, after executing this single code line:

                      SetThreadExecutionState(&H80000001)
                      ' parameter is the hexadecimal sum of the ES_CONTINUOUS and the ES_SYSTEM_REQUIRED flags

                      As long as that program is left running (even minimized) with its thread execution state set that way, then the system theoretically will not go into the second unexpected "automatic" sleep if the system is left idle after Sleeper is done. Interestingly, in my tests, this does NOT seem to interfere with deliberate sleeps such as those Sleeper.exe would induce, and it does not interfere with deliberate sleeps from pressing the Sleep key on the computer. It only seems to fix the "wake unattended re-sleep" issue that we're hitting here in this thread. Convenient!

                      You could theoretically include that line (or its equivalent) in your test automation code itself instead of writing another program.

                      Comment


                      • #12

                        An update to this very old issue (June 2017):

                        This issue seemed to have disappeared for a long time. We had no reports of it in Win7, Win8 nor the initial Win10 release. But with Windows 10 Redstone 2 (Build 10.0.15063), the issue has returned. So the problem happens with Win10 RS2, but not RS1.

                        We had a couple of customers reporting an extra sleep occurring at the end of a Sleeper test cycle. And the system never auto-waking after that sleep. Which can interrupt unattended scripting.

                        According to MSDN, the Sleep unattended idle timeout function may be provoked by the wake source type. When the same version of sleeper is used on RS1 and RS2, the Wake Source is observed to be different in the event viewer for RS1 and RS2.

                        RS1: Wake Source: Unknown, but possibly due to timer - Sleeper.exe
                        RS2: Wake Source: Timer - Sleeper.exe

                        So it is plausible that in RS2 Microsoft are now reporting the correct wake source, which in turn provokes the Sleep unattended idle timeout function.

                        Some additional background information.
                        https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
                        https://msdn.microsoft.com/library/w...(v=vs.85).aspx

                        Comment

                        Working...
                        X