Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 50

Thread: Can I disable "Delayed Standby" after is has been requested?

  1. #21
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Love a mystery

    Quote Originally Posted by Mister Slimm View Post
    XP SP3, oh. This tweak almost certainly won't make any difference.

    The automatic delayed shutdown is still there, nothing has changed for years, but I last ran XP with SP2 a couple of years ago. I had tremendous difficulty getting the feature to work in the first place as Microsoft's documentation seemed to be rather at odds with what was happening in front of my eyes.

    I am also confused as to why Slimm GBPVR only intercepts some sleep requests. All the utilities should use the same library commands: SetSuspendState to put the machine into standby (sleep) or hibernate and ExitWindowsEx to log off, shutdown or restart. You'd have thought that either they all can be intercepted or they all can't be. I don't get it at all and Microsoft have made it a moot point by removing the PBT_APMQUERYSUSPEND message and adding Away Mode from Vista onwards.

    Other people and programs have had this problem also and it seems to stem from some changes in .NET 2.0 which were probably related to the change of behaviour in Vista.

    I have no plans to add shutdown options to the command line.

    Setting your machine to sleep when idle and learning never to switch the machine off manually may be the way to go.
    I will test your patch later anyway, but we should put out an appeal for someone running Vista to also do so. Let's get to the bottom of this.
    Last edited by keith_leitch; 2009-01-26 at 11:13 AM. Reason: Problem vanished.

  2. #22
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Same result on XP SP3

    Quote Originally Posted by Mister Slimm View Post
    enabled the appropriate flag, I think, which will place the machine in away mode when you try and sleep or shutdown etc. It appears that GBPVR Recording Service does not set this flag but Slimm GBPVR now does. I would be most appreciative if you could test this tweak for me and report whether it helped or not in this thread.

    Download Slimm GBPVR.

    Please note that this is not the same as Slimm GBPVR catching the sleep request and enabling delayed sleep. That functionality can no longer be performed by Slimm GBPVR on Vista as it was on XP. Therefore I suspect that while the system shouldn't turn off or sleep during a recording now, it won't automatically turn off etc after it finishes unless you have your OS set to sleep when idle.
    This patched version appears to function under XP version SP3 in the same manner as the previous version: That is, it intercepts a manual standby request, or a standby request using RUNDLL POWRPROF, SUSPENDSTATE. It correctly sends the machine into standby as soon as a recording is complete.

    However, it does not intercept standby requests from programs such as Nircmd or PSShutdown.

    The problem with this is that the RUNDLL command puts the machine into a standby state from which it won't wake up for the next recording.

    I was working on a system of batch files that will use GBPVRCLI to determine which standby request to issue. These have worked to an extent, but I tonight's test seems to suggest that Slimm-GBPVR puts the system into "unwakeable" standby after intercepting the RUNDLL command.

    Again, these tests were all run under Windows XP with Service Pack 3. I am hoping that someone else will test your patched version under Vista.
    Last edited by keith_leitch; 2009-01-21 at 10:31 AM. Reason: Ran further tests

  3. #23
    Join Date
    Nov 2005
    Location
    Coventry, England, UK
    Posts
    434

    Try suspend, not hibernate

    When originally writing and testing this stuff, I seem to remember that hibnerating my machine stops it waking up automatically.

    Try setting the first parameter to 0. That should suspend the machine instead of hibernating it.

    Code:
    rundll32 powrprof.dll,SetSuspendState 0,0,0
    Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
    See my blog for releases, HD wallpapers, movie, game and anime reviews and more.

  4. #24
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496
    Quote Originally Posted by Mister Slimm View Post
    When originally writing and testing this stuff, I seem to remember that hibnerating my machine stops it waking up automatically.

    Try setting the first parameter to 0. That should suspend the machine instead of hibernating it.

    Code:
    rundll32 powrprof.dll,SetSuspendState 0,0,0
    I will try after work; however, my machine has definitely been standing by, not hibernating. There appear to be different "levels" of standby: here is more evidence.

    I have my remote sensor attached to a USB port that I have set via the MCE Standby Tool to remain active when the system is in standby. This works as expected when standing by from the start button, or by using psshutdown or nircmd. However, when I use the rundll command (the only one that Slimm-GBPVR will intercept), the light on the remote sensor goes off and I cannot awaken the system.

    Also, I found this software, which is also intended to intercept shutdown requests:

    http://www.codeproject.com/KB/system...select=2808736

    It behaves in exactly the same manner as Slimm-GBPVR. It will intercept "Start Button" or "RunDLL" standby requests, but not those generated by the third party programs (the ones that can be intercepted).

    My latest crazy plan is to parse the "End Recording" value from GBPVRCLI, and use PSSHUTDOWN to stand the system by after that amount of time. Problems that I anticipate involve back-to-back recordings, or recordings that are separated by only a minute or two. Any advice would be welcome.

  5. #25
    Join Date
    Oct 2006
    Location
    good ol' germany
    Posts
    546
    Quote Originally Posted by keith_leitch View Post
    My latest crazy plan is to parse the "End Recording" value from GBPVRCLI, and use PSSHUTDOWN to stand the system by after that amount of time. Problems that I anticipate involve back-to-back recordings, or recordings that are separated by only a minute or two. Any advice would be welcome.
    if you don't want to reinvent the wheel with your crazy plan, take a look at my patchwork solution here. i do check for pending/inprogress recordings, current UI activity & video playback prior to calling psshutdown
    Quote Originally Posted by sub View Post
    Yep, what he said.
    curiosity killed the cat

  6. #26
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Massive standby problems

    Quote Originally Posted by K.S. View Post
    if you don't want to reinvent the wheel with your crazy plan, take a look at my patchwork solution here. i do check for pending/inprogress recordings, current UI activity & video playback prior to calling psshutdown
    I am constantly amazed at how much of a PVR forum is dedicated to the seemingly simple task of "turning it off".

    I have just used K.S.'s solution as a model to construct my own. The main differences are 1) I wanted to be able to stand by even from the playback screen, and 2) after many tests I find EVERY software package (nircmd, psshutdown, etc.) to be unreliable at best (see below). My best results are achieved by using batch files to set the system standby timeout to 1 minute or infinity.

    My system runs a check for a user request (must want a standby) and pending recordings before proceeding. If both are OK, it sets the timeout to 1 minute, otherwise to "never standby". If there is a request but a recording is pending, this is caught in the postprocessing.bat file (and the postepgupdate.bat file) where the check is repeated. It is not necessary to check for inprogress recordings, as I am using the system timeout which is prevented by the disk activity.

    MY MAIN PROBLEM: When the system comes out of standby, I have set the wakeup script to set the system timeout back to "never standby". This is good if I woke it up with the remote, but not if a scheduled recording woke it up.

    MY QUESTION: Is there some way in a batch file for my computer to detect the difference between a manual wakeup (the boss pressed the button) and a scheduled one (time to record something)?

    MY OTHER PROBLEM: Every so often, the machine responds to a standby request by going into a state that I call "stupid standby". This happens infrequently when I use the system timeout, but it happens every second attempt with programs like psshutdown. "Stupid standby" involves cutting power to the remote sensor and other peripherals, leaving the fans on, and ignoring everything I say. The only way to recover from "Stupid standby" is to hard-power the computer down, UNPLUG the computer (yes, that's right) and power it up again.

    MY OTHER QUESTION: What the...??

  7. #27
    Join Date
    Nov 2005
    Location
    Coventry, England, UK
    Posts
    434
    Quote Originally Posted by keith_leitch View Post
    MY QUESTION: Is there some way in a batch file for my computer to detect the difference between a manual wakeup (the boss pressed the button) and a scheduled one (time to record something)?
    I don't know if such a command exists for a batch file but the Windows api command for the information you need is called IsSystemResumeAutomatic and is found in Kernel32.dll. Maybe it will set ERRORLEVEL in the DOS batch file correctly and can thus be tested.
    Akasa Zen case, AMD Phenom II X3 720, 4.00Gb Ram, Sapphire ATI Radeon 4890, Terratec Terratec Cinergy 2400i Twin Digital Tuner, 1050Gb storage, Windows 7 Home Premium.
    See my blog for releases, HD wallpapers, movie, game and anime reviews and more.

  8. #28
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    496

    Rundll32

    Quote Originally Posted by Mister Slimm View Post
    I don't know if such a command exists for a batch file but the Windows api command for the information you need is called IsSystemResumeAutomatic and is found in Kernel32.dll. Maybe it will set ERRORLEVEL in the DOS batch file correctly and can thus be tested.
    I'm not sure what I'd do without you. I'd like to experiment with this. I've tried:

    RUNDLL32 KERNEL32DLL,ISSSYTEMRESUMEAUTOMATIC

    and similar syntaxes. I only get complaints. This is not surprising, since this is a boolean function rather than a command. It would expect to return a result.

  9. #29
    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    1,200
    just to confuse everybody I am bringing in the only solution that worked for me.
    I set in the power control the automatic standby to 5 minutes.
    Without PVRX2.exe running the system goes now reliable to standby after 5 minutes of no activity.
    When PVRX2.exe is running the system goes to standby after 5 minutes of non activity when it is in the main menu but there all kind of situations where the state of PVRX2.exe and the drivers it is using will prevent the system to go to standby, an example is music is playing. Even when the music stopped playing and you are still in the music library the system will not go to standby.
    So I used my universal remote to program the "shutdown" sequence (putting all the equipment to standby) to also kill PVRX2.exe. It does NOT request the PC to go to standby! Any recording that is ongoing will continue and the system will go to standby automatically when all recordings are done.
    It will wakeup automatically when a recording has to be made.
    When the system wakes up for a recording and I switch on the TV later the screen stays black. This is solved by programming the universal remote with the following IR sequence which I use always to wakeup the system( only the part for waking the PC is shown, the total sequence for all the other equipment is about 15 actions).
    Send the standby key to wake the PC
    Wait 10 seconds for the PC to wakeup
    Send a key programmed to start PVR2.exe This always wakes up the screen.
    The connection between the IR keys and the actions on the PC are made with HIP.
    I have found this to be the simplest and totally reliable solution.
    And it may totally fail to work for you
    P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
    Support Comskip, visit the forum and donate at http://www.comskip.org/

  10. #30
    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    1,200
    Quote Originally Posted by keith_leitch View Post
    MY QUESTION: Is there some way in a batch file for my computer to detect the difference between a manual wakeup (the boss pressed the button) and a scheduled one (time to record something)?
    Yes there is.
    There is a power dll that you can call to determine if the system woke automatically or by user action.
    You then can connect that action to the wakeup event do whatever you need to do.
    The only problem left is that it is a microsoft solution, that means: it almost always works.
    And now you only have to explain to your partner that "if the system does not work then don't get angry but simply reset the PC and don't complain about the lost recording."
    P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
    Support Comskip, visit the forum and donate at http://www.comskip.org/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •