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) GB-PVR Support (legacy) v
« Previous 1 2 3 4 5 1231 Next »
Inhibit Computer Shutdown While Recording

 
  • 0 Vote(s) - 0 Average
Inhibit Computer Shutdown While Recording
rwnz
Offline

Member

Posts: 89
Threads: 15
Joined: Aug 2006
#1
2009-10-31, 01:16 AM
When I was running XP Pro, GB-PVR, Slimm GB-PVR and a WinTV-PVR-150 on my old PC and someone tried to shutdown or hibernate the computer while it was recording then the shutdown was delayed untill recording had finished. However this inhibit is not happening on my current system - Vista Home Premium, GB-PVR v1.4.7, Slimm GB-PVR v1.8.3447.20527, WinTV-HVR-2200 - and I've been in trouble with my wife because she hates watching only the first 85% of a program! Any idea's why?
Hauppauge WinTV-HVR-2200, Intel C2D E8400; 4GB RAM; ASUS EN9400GT SILENT 512MB; Windows 10 Home 64 Bit; NPVR + EPG Collector. TVersity; Sony Smart TVs; Xtreamer Sidewinders. TV source: DVB-T
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2009-10-31, 07:22 AM (This post was last modified: 2009-10-31, 09:18 AM by pBS.)
running slimgbpvr still? maybe it had something in it to keep system on while it was recording...
but probably just the fact that vista's power management sucks bigtime...lol
[a few key things you can't do in vista that worked in xp]

maybe using a different login for rec service?
[rec service may not have rights to prevent shutdown if not right account]
just a thought...

mine doesn't wait for recordings in xp....Sad
hibernate/suspend will be delayed, but not shutdown..
maybe you can use gpedit.msc to disallow users from shutting down...it probably translates to a reg entry that you could script to work only when recording...[thus preventing shutdown by user while recording]

hmmm, sometimes ya just get lucky with google...lol
http://www.raymond.cc/blog/archives/2008...s-running/
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#3
2009-10-31, 11:49 AM (This post was last modified: 2018-10-17, 04:37 AM by pBS.)
actually just wrote something for this, but i want to know if it works on vista too..Smile
[i don't have any vista machines handy]

it relies on tray app being started to know when it's recording [recordingstatus.bat]
and if recording, aborts any shutdown/restart action..

let me know if you can test it...
just need to run an exe..and try to shutdown...

i'll put some balloon tips in so you can see what's going on with it and upload soon..
eventually i'l merge it with my suspend interceptor to really safeguard things..
[tho suspend intercept only works in xp,sorry]
i added a command to abort shutdown that's supposed to work in vista so hopefully that covers it and win7...

let me know if it works for you...it doesn't check for recording, just halts any shutdown in this exe...look at tray for a message if it triggers..and hopefully doesn't shut down..Smile

note: whatever you do, DON"T USE SHUTDOWN/RESTART FROM SYSTEM PLUGIN MENU,IT IS FORCED..
IT NEVER WAITS FOR PROGRAMS TO EXIT [tho it does tell you there's a recording happening]
use shutdown -r -t 0 instead or the 'start' button shutdown...
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
rwnz
Offline

Member

Posts: 89
Threads: 15
Joined: Aug 2006
#4
2009-11-01, 09:47 PM
Thanks pBs. I was short on time to spend on this yesterday but did quickly download your file and run the exe so that it put a little icon in the system tray. I see that when I click on the icon the process is paused and I then need to un-tick 'Pause'.

I set GBPVR to record then pushed my computer power button, which is set to hibernate the system, and the computer continued into hibernation. I've tried this 2 or 3 times, so no success so far.

I see that you have said not to use the menu to shut down (which I presume includes hibernate) but that using the power button is OK. As it happens I didn't realise it was different.

Do you think there is any chance that Win 7 will be any better. Vista is only temporary for me as I needed to upgrade my computer before Windows 7 became available so I purchased Vista with an upgrade option. If it is likely to be OK then I guess I don't need to muck around too much now with Vista, though I'd be happy to continue testing for you as I may not get the upgrade for a little while (after getting 32 but Vista I learnt that 64 bit Win 7 has much better drivers compatibility than 64 bit Vista, and also that 32 bit doesn't use all of my RAM, so I'm trying to figure out if I can upgrade to 64 bit. I've had no success with my retailer & Microsoft so far but we also recently got a Dell laptop with 32 bit Vista & Dell said they'd upgrade to 64 bit Win 7 so I'm hanging out to see if my PC retailer might eventually see the light too).
Hauppauge WinTV-HVR-2200, Intel C2D E8400; 4GB RAM; ASUS EN9400GT SILENT 512MB; Windows 10 Home 64 Bit; NPVR + EPG Collector. TVersity; Sony Smart TVs; Xtreamer Sidewinders. TV source: DVB-T
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,830
Threads: 954
Joined: May 2006
#5
2009-11-01, 10:27 PM
Vista power management has been excellent for me for several years, I'm not sure where pBS got his information. I put my machine to Sleep every day and I almost always make it to patch Tuesday without a full poweroff, no problems with restarting to my two Hauppauge PCI cards. I tend to blame power management problems on the motherboard and not the OS.

I do use Sleep not Suspend or Hibernate.

Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#6
2009-11-02, 12:29 AM
it's the trying to stop power changes that is harder in vista...
it tends to ignore any program's request Not to shutdown...

the app i uploaded won't stop the hibernating, that's a suspend mode, not a shutdown..
my only effort here was to stop shutdowns when recording is happening...
that's not the same as hibernating, whole different issue to tackle there..
it's true that vista's suspend is better, but they changed some other rules..

so if you're recording in vista, does it deny shutdown?
[a nice shutdown, like shutdown from start menu, or restart from start menu]

i've gotten it to work from xp with my app...denying both shutdowns and suspends...
can't do that in vista...why i said it's power man. is whacky...
[and i haven't seen anyone else being able to]
so now i won't accidentally shutdown while recording..Big Grin
[a feature that should be built in to gbpvr IMHO...tho the multiple os's handle it differently so isn't easy]

rwnz, if you just run the app and try a shutdown or restart from start menu, what happens?
[ps. don't click on the tray menu, that just pauses it for now]
[it does''t work for hibernating yet]
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,830
Threads: 954
Joined: May 2006
#7
2009-11-02, 01:24 AM
Programs should not block sleep mode. There is nothing I hate more than a 1/2 my programs closed. If Vista doesn't handle this code for turning of APM from msdn I agree there is a problem.

Code:
// Television recording is beginning. Enable away mode and prevent
// the sleep idle time-out.
//
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_AWAYMODE_REQUIRED);

//
// Wait until recording is complete...
//

//
// Clear EXECUTION_STATE flags to disable away mode and allow the system to idle to sleep normally.
//
SetThreadExecutionState(ES_CONTINUOUS);
Martin
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2009-11-02, 06:59 AM
that only resets the idle timers, i thought he meant a 'user initiated' sleep or shutdown request...
you can still force a shutdown with force switch so it doesn't lock you out...
[just use system menu restart, it's forced]

and my utils don't cancel it completely, they wait till coast is clear[run check] to continue, otherwise it lets system shut normally..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
rwnz
Offline

Member

Posts: 89
Threads: 15
Joined: Aug 2006
#9
2009-11-02, 10:42 AM
I need to prevent a user of the computer inadvertently hibernating it while recording is in progress. I use hibernation as GB-PVR can take it out of hibernation when starting a recording. The pBs app did not prevent the computer being put into Power Off, Hibernation or Standby while GB-PVR was recording. I hope that I'm doing all that is required: ran abortshut.exe; started a GB-PVR recording, then did a Shutdown, Hibernate or Standby.
Hauppauge WinTV-HVR-2200, Intel C2D E8400; 4GB RAM; ASUS EN9400GT SILENT 512MB; Windows 10 Home 64 Bit; NPVR + EPG Collector. TVersity; Sony Smart TVs; Xtreamer Sidewinders. TV source: DVB-T
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#10
2009-11-02, 11:48 PM (This post was last modified: 2009-11-03, 11:44 AM by pBS.)
sounds like it, it's only supposed to abort a shutdown or restart...sleep modes are next on the agenda..[suspend/hibernate]
as i thought, may not be able to abort it on vista+
can't find any other progs that can halt vista from shutdown either...
tho there's always built-in "shutdown.exe -a" [abort shutdown] Smile
[not sure if i can make that work tho]

did you try any of those programs on the link?

aha, found a vist/win7 prog that can abort the shutdown...so it seems it's possible..
http://code.google.com/p/shutdownguard/
now to just find out how....[i believe it's similar]

AHA, found the bits i need for vista...it just needs a 'reason' in addition to returning false to WM_QUERYENDSESSION
http://msdn.microsoft.com/en-us/library/...85%29.aspx
now i have a rough working prog, and the suspend bits may be same, now jus to meld the two xp/vista versions into one...Smile
in vista, it just pops up a dialog reminding you that you're recording, [i'll add recording what] so you still get options to do it or not...
like: "Don't shutdown! Recording 'Monk' till 8:00PM"

AND, i found out how to make sure it's the first app called so no other apps get killed first..Big Grin
SetProcessShutdownParameters
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Audio buzzing second time recording launched. dennit 2 4,510 2012-12-09, 11:28 PM
Last Post: dennit
  Start PC for recording, Sleep/Hibernate when done Basher52 6 4,911 2011-12-17, 02:52 PM
Last Post: Sykor
  GBPVR will not wake up XP computer from sleep keith_leitch 8 4,761 2011-10-10, 08:26 PM
Last Post: keith_leitch
  intermittent recording failures bcdudley 6 3,566 2011-09-28, 07:28 AM
Last Post: bcdudley
  Recording fails but only on one channel (live viewing still works) dshoup 5 3,469 2011-09-19, 01:15 AM
Last Post: sub
  Query : How to use multiple TV Cards (thru GB-PVR) in a Desktop Computer? seymoria 7 4,488 2011-09-07, 08:17 PM
Last Post: martint123
  Sattelite interent recording? crsfooddude 1 2,119 2011-07-26, 02:32 AM
Last Post: mvallevand
  Recording problem with Hauppauge Nova-S USB2 ... softfoot 4 3,334 2011-06-27, 02:06 AM
Last Post: sub
  How to kill an orphan Live TV recording? martint123 2 2,315 2011-05-16, 05:33 PM
Last Post: martint123
  SUB: Recording show in two pieces. Found bug(?) lif 10 4,983 2011-05-11, 09:30 AM
Last Post: jksmurf

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

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

Linear Mode
Threaded Mode