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
#31
2009-01-25, 09:05 AM (This post was last modified: 2009-01-26, 11:12 AM by keith_leitch.)
erik Wrote:I have found this to be the simplest and totally reliable solution.
And it may totally fail to work for you

It may come to that...but I want to be stubborn awhile longer, first, to try to make this power up and down like a "real" PVR. I am quite close (I think). One of the remaining problems, which drives me crazy, is Windows XP's propensity to make useful announcements about when it is "Preparing to Stand By..." My HTPC shares a TV with numerous other devices through an automatic switch.

Nothing kills the mood of a new release rental then having Windows yell at you in the middle of it.

Does anyone know how to kill this splash screen, and I mean kill it DEAD?
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#32
2009-01-25, 01:00 PM
keith_leitch Wrote: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.

Entry points (the IsSystemResumeAutomatic bit) are case sensitive. You have to type exactly as I have. This code runs without error:
Code:
rundll32 Kernel32.dll, IsSystemResumeAutomatic
If it sets the return code then I believe the following should perform the echo when the system resume is unattended:
Code:
IF ERRORLEVEL 1 THEN ECHO "Spooky, there's no-one here."
However, as you point out, it is a boolean function and the return code is likely to always be zero. I've written a teensy console app (it still requires .NET 2.0) that sets the return code to the result of this function and so the ERRORLEVEL check should perform correctly. I've tested that it sets the return code but haven't tested whether it does what is expected on an unattended resume. Also note that all power management functions in Windows are notoriously inconsistent and only require the tiniest thing to be different (like tying your shoelaces the opposite way to normal or only giving the cat 3mm of water in their dish) to produce unexpected results. Still, if it helps that'll be great.
[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
#33
2009-01-25, 08:38 PM
Mister Slimm Wrote:Entry points (the IsSystemResumeAutomatic bit) are case sensitive. You have to type exactly as I have. This code runs without error:
Code:
rundll32 Kernel32.dll, IsSystemResumeAutomatic
If it sets the return code then I believe the following should perform the echo when the system resume is unattended:
Code:
IF ERRORLEVEL 1 THEN ECHO "Spooky, there's no-one here."
However, as you point out, it is a boolean function and the return code is likely to always be zero. I've written a teensy console app (it still requires .NET 2.0) that sets the return code to the result of this function and so the ERRORLEVEL check should perform correctly. I've tested that it sets the return code but haven't tested whether it does what is expected on an unattended resume. Also note that all power management functions in Windows are notoriously inconsistent and only require the tiniest thing to be different (like tying your shoelaces the opposite way to normal or only giving the cat 3mm of water in their dish) to produce unexpected results. Still, if it helps that'll be great.

I will experiment with this. Thank you.

I also had the bright idea that I would use GBPVRcli to detect the number of minutes pending until the next recording. Presumably this would be consistent--perhaps 3 minutes every time--and that would be a fairly reliable indicator of how the machine had awakened.

I set about trying to capture this value so that I could determine the correct number. Oddly, GBPVRcli reports nothing--a big blank--when I run it from the wakeup script. It works fine from the command line or any other batch file. Any thoughts? Does it need some kind of preparation time?
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#34
2009-01-25, 08:44 PM
To solve a different problem, I recently set the recording service to interact with the desktop.

It appears that some other service may be calling PostProcessing.bat. One of the commands I have called from that file is PowerCfg, to set a short standby timeout. This command is being ignored (yes, hours of testing, again).

If I can identify the service that is calling PostProcessing.bat, I may be able to set it to interact with the user interface to solve this problem. Can anyone help?

ALSO: Does anyone know a way to cancel a standby request AFTER it has been issued? That is, I want my shutdown script to check for pending recordings, and block the standby request that invoked it if necessary.
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#35
2009-01-25, 11:36 PM
Mister Slimm Wrote:I've written a teensy console app (it still requires .NET 2.0) that sets the return code to the result of this function and so the ERRORLEVEL check should perform correctly. I've tested that it sets the return code but haven't tested whether it does what is expected on an unattended resume. Also note that all power management functions in Windows are notoriously inconsistent and only require the tiniest thing to be different (like tying your shoelaces the opposite way to normal or only giving the cat 3mm of water in their dish) to produce unexpected results. Still, if it helps that'll be great.

I've been thinking...which is dangerous...

Shouldn't it be possible to simply detect whether the Recording Service / EPG Update Service / etc. is running after a wakeup? On a machine running GBPVR, this would virtually establish that the wakeup was not manual.

Also and alternatively, what if a cat were to just compare the current date and time to the recording service log? If there is an entry that matches, my thinking is that recording service must be what woke up the machine. Problems are that the check would happen a few seconds later, so it would have to be an "approximate" match, and that this wouldn't handle wakeups for EPG updates or system maintenance tasks.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#36
2009-01-26, 12:00 AM
keith_leitch Wrote:I've been thinking...which is dangerous...

Shouldn't it be possible to simply detect whether the Recording Service / EPG Update Service / etc. is running after a wakeup? On a machine running GBPVR, this would virtually establish that the wakeup was not manual.

Also and alternatively, what if a cat were to just compare the current date and time to the recording service log? If there is an entry that matches, my thinking is that recording service must be what woke up the machine. Problems are that the check would happen a few seconds later, so it would have to be an "approximate" match, and that this wouldn't handle wakeups for EPG updates or system maintenance tasks.

The recording service is always running. The little exe and batch code in the above post should provide the information you want.
[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
#37
2009-01-26, 12:55 AM (This post was last modified: 2009-01-26, 03:35 AM by keith_leitch.)
Mister Slimm Wrote:The recording service is always running. The little exe and batch code in the above post should provide the information you want.

Oh, yes, and I will use them if they test successfully. I was responding to your concern that the APIs are unreliable...trying to come up with a "second level" of checking. GBPVRcli can provide this, but not elegantly. When I was suggesting checking the service, I didn't exactly mean the recording service: I meant whatever service is causing the recordings to wake up the PC (like Scheduled Tasks might).

Slimm: Can GBPVRcli check for pending EPG updates?
K.S.
Offline

Senior Member

Posts: 526
Threads: 12
Joined: Oct 2006
#38
2009-01-26, 04:06 PM
@keith_leitch: if your still looking for a possibility for checking resume type (automatic vs manual), take a look at the standby function in start_gbpvr.au3 dunno for sure, but it could be an option for detecting
sub Wrote:Yep, what he said.

curiosity killed the cat Big Grin
keith_leitch
Offline

Senior Member

Posts: 510
Threads: 53
Joined: Nov 2008
#39
2009-01-26, 08:03 PM
K.S. Wrote:@keith_leitch: if your still looking for a possibility for checking resume type (automatic vs manual), take a look at the standby function in start_gbpvr.au3 dunno for sure, but it could be an option for detecting

Is this a file you posted for me? I can't find the one you mean.

I am currently detecting this with a good deal of success by using GBPVRcli. The batch file has to run about a 40-second delay (problem 1), then calls upon GBPVRcli to check for the next pending recording. If it occurs in two minutes or less, then the file assumes (problem 2) that the system was started automatically, to deal with that event. This does not handle starts for EPG updates (problem 4) or system maintenance events like defrags (problem 5).

Mr. Slimm has also posted me a mini-app solution that I still haven't had a chance to test (sorry, Slimm). This is based on Windows APIs, which are notoriously unreliable. I was thinking of doing it as a two-level check using both methods.
Mister Slimm
Offline

Senior Member

Posts: 437
Threads: 41
Joined: Nov 2005
#40
2009-01-27, 10:41 AM
keith_leitch Wrote:Slimm: Can GBPVRcli check for pending EPG updates?

No, but you set the time for this yourself in GBPVR configuration so you'll always know when it is.
[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]
« 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,586 2009-04-06, 11:43 PM
Last Post: keith_leitch
  what standby events will slimm prevent fuzzweed 3 6,722 2008-11-23, 12:02 PM
Last Post: Mister Slimm
  Delayed shutdown Bluethunder 2 3,445 2008-09-23, 01:05 PM
Last Post: Bluethunder
  SlimmGBPVR doesn't prevent standby during recording rob11252 34 21,045 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,991 2007-10-01, 10:39 AM
Last Post: Mister Slimm
  Disable Request to Delete Recording betbest1 3 3,268 2007-06-01, 11:21 AM
Last Post: Mister Slimm
  Delayed shutdown did not shutdown system. FirstTeamOPS 8 4,737 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