NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) Slimm GB-PVR and GBPVRcli v
1 2 3 4 Next »
Can I disable "Delayed Standby" after is has been requested?

 
  • 0 Vote(s) - 0 Average
Can I disable "Delayed Standby" after is has been requested?
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#21
2009-01-20, 07:30 PM (This post was last modified: 2009-01-26, 11:13 AM by keith_leitch.)
Mister Slimm Wrote: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.
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#22
2009-01-21, 09:15 AM (This post was last modified: 2009-01-21, 10:31 AM by keith_leitch.)
Mister Slimm Wrote: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.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#23
2009-01-21, 11:31 AM
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
[SIZE="1"]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.[/SIZE]
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#24
2009-01-21, 08:22 PM
Mister Slimm Wrote: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/OSE...ct=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.
K.S.
Offline

Senior Member

Posts: 526
Threads: 12
Joined: Oct 2006
#25
2009-01-22, 02:56 PM
keith_leitch Wrote: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 Big Grin
sub Wrote:Yep, what he said.

curiosity killed the cat Big Grin
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#26
2009-01-24, 09:49 PM
K.S. Wrote: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 Big Grin

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...??
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#27
2009-01-24, 11:16 PM
keith_leitch Wrote: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.
[SIZE="1"]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.[/SIZE]
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#28
2009-01-25, 01:19 AM
Mister Slimm Wrote: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.
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#29
2009-01-25, 08:45 AM
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/
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#30
2009-01-25, 08:54 AM
keith_leitch Wrote: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/
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Batch file access to "standby" and "restart" features keith_leitch 2 7,513 2009-04-06, 11:43 PM
Last Post: keith_leitch
  what standby events will slimm prevent fuzzweed 3 6,626 2008-11-23, 12:02 PM
Last Post: Mister Slimm
  Delayed shutdown Bluethunder 2 3,389 2008-09-23, 01:05 PM
Last Post: Bluethunder
  SlimmGBPVR doesn't prevent standby during recording rob11252 34 20,549 2008-07-28, 10:41 AM
Last Post: Mister Slimm
  Disable auto-restart recording service, green light stuck on and no standby problems pvruser 10 6,869 2007-10-01, 10:39 AM
Last Post: Mister Slimm
  Disable Request to Delete Recording betbest1 3 3,214 2007-06-01, 11:21 AM
Last Post: Mister Slimm
  Delayed shutdown did not shutdown system. FirstTeamOPS 8 4,631 2007-03-17, 09:45 PM
Last Post: FirstTeamOPS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode