NextPVR Forums

Full Version: System went to sleep and NPVR was busy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
My computer decided to enter sleep mode at 7:32 tonight while a recording was finishing. With padding it would end at 7:32 and perform post processing which it wasn't able to complete. The following 4 recordings afterwards never woke the system up to record and were missed. The last one started to record once I remotely woke it via LogMeIn.

My windows system event log just says system idle.

This problem has probably always existed on my system as I have not changed anything, but now have a better handle on what it should be recording now.

Is there a bios setting of some type or windows?

thx, Jake

Win 7 64bit
Any ideas about what I should look at or change? Is NPVR not telling the system somehow that it is busy and it just shuts down when it feels like it?
You may be able to narrow down the problem ...

Windows Task Scheduler allows you to create a task and set "Wake the computer to run this task" on the Conditions tab.

Good Luck
d/l MCE standby tool [MST] and it'll give you realtime feedback of what is happening with sleep modes..
you can see the sleep timers and see what's preventing sleep or what's not but should be..
I have a similar problem, reproducible for direct recordings (current shows selected from EPG). The system enters sleep mode after 10 minutes, as if the system was idle. Scheduled recordings wake the PC and put it to standby, as normal.

I tried running MST. The "Windows Idle" tab shows "One or more program(s) require the system" set to "Yes". "Time remaining until suspend" counts down from 0:10:00 to 0:09:00 in 15-second decrements then resets to 0:10:00 - this sequence repeats, but the timer never drops below 9 minutes. Nevertheless, the system went into standby before the end of the program, roughly 10 minutes after the start of recording.

Any ideas?

From NRECORD.log
Quote:2012-05-28 16:46:53.077 [DEBUG][7] Started recording (921:10:D:\Recorded TV\Help! My Supply Teacher Is Magic\Help! My Supply Teacher Is Magic_20120528_16301700.ts)
2012-05-28 16:46:53.195 [DEBUG][7] No C:\Users\Public\NPVR\Scripts\ParallelProcessing.bat
2012-05-28 16:58:26.702 [DEBUG][4] Resuming...
2012-05-28 16:58:28.092 [DEBUG][4] Resuming...
2012-05-28 16:58:28.554 [DEBUG][5] cycling MVP servers
2012-05-28 16:58:28.644 [DEBUG][5] Starting MVP server 0
2012-05-28 16:58:30.272 [DEBUG][7] Recording service noted the system was resuming...

From NPVR.log
Quote:2012-05-28 16:46:48.980 [DEBUG][1] ActivatePopup: null
2012-05-28 16:46:48.980 [DEBUG][1] deactivating old popup: ShowDetailsPopup
2012-05-28 16:46:48.980 [DEBUG][1] Going to dispose popup at end of animation
2012-05-28 16:46:49.238 [DEBUG][1] Calling dispose on old popup(2): ShowDetailsPopup
2012-05-28 16:46:49.238 [DEBUG][1] ShowDetailsPopup.Dispose()
2012-05-28 16:46:49.239 [DEBUG][1] UiStatic.Dispose()
2012-05-28 16:56:47.392 [DEBUG][1] ActivatePopup: FixedImage
2012-05-28 16:56:47.511 [DEBUG][1] No C:\Users\Public\NPVR\Scripts\ScreenSaverStart.bat file found
2012-05-28 16:57:50.685 [DEBUG][1] ActivatePopup: null
2012-05-28 16:57:50.685 [DEBUG][1] No C:\Users\Public\NPVR\Scripts\ScreenSaverStop.bat file found
2012-05-28 16:57:50.686 [DEBUG][1] deactivating old popup: FixedImage
2012-05-28 16:57:50.686 [DEBUG][1] Going to dispose popup at end of animation
2012-05-28 16:57:50.688 [DEBUG][1] Calling dispose on old popup(2): FixedImage
2012-05-28 16:57:50.875 [DEBUG][1] System is going into standby/hibernate
2012-05-28 16:58:21.271 [DEBUG][1] Waking from standby/hibernate
I'm pretty sure this will be case of power manage issues with machine or windows rather than a bug with the app, but I've added a setting in the next release that will force it to log each time it tells the Windows the machine is 'still in use'. With this you'll at least be able to check that NextPVR is doing what it's supposed to, and how regularly it's happening etc.
I can't see any setting in Power Management other than the Multimedia one that prevents idling while streaming. Is that what the scheduled recording service does? Does "instant record" of current programs use a different process?

One source suggests that, since Vista, an application can't stop Windows from suspending the system on idle. If so, how does the recording service prevent idle during scheduled tasks? Is it only scheduled tasks that can suspend the system on completion?

I suspect it might be necessary to make the Sleep setting "never" and just use scheduled tasks to shut down the PC. I hope that isn't the case.
Basically, NextPVR (and GBPVR befrore it) while recording calls the "SetThreadExecutionState(ES_SYSTEM_REQUIRED)" Windows API every minute to tell Window's the machine it shouldn't go to sleep. Windows is supposed to care of the rest.

It's a pretty basic one-line bit of code, so not much wriggle room to do anything differently.
It seems pretty clear that NRecord is doing it's job, setting the ES_SYSTEM_REQUIRED state every minute, and Windows is simply ignoring it's own rules:
Quote:I tried running MST. The "Windows Idle" tab shows "One or more program(s) require the system" set to "Yes". "Time remaining until suspend" counts down from 0:10:00 to 0:09:00 in 15-second decrements then resets to 0:10:00 - this sequence repeats, but the timer never drops below 9 minutes. Nevertheless, the system went into standby before the end of the program, roughly 10 minutes after the start of recording.

I see that the recording service knows that the system is going to sleep:
Code:
2012-05-28 16:57:50.875 [DEBUG][1] System is going into standby/hibernate
is there any call you could make to abort this if it happens when NRecord knows that sleep shouldn't be allowed?
Just found another source that says if an application or service wakes the machine, then it returns to sleep mode afterwards, irrespective of power management settings. If a user wakes the machine (e.g. for manual recording), then the sleep timer applies.

sleep-after-wake-up.html

Edit: I set the sleep timer to "Never". A manual recording completed OK, and the PC remained on afterwards. A scheduled recording woke the PC at the required time and put it to sleep again afterwards, confirming the above source. It seems that Windows 7 ignores the API call, possibly in both instances, and is following its own "sleep-after-scheduled-wake" rule.

One answer might be to change the sleep timer. This could be done within Parallelprocessing.bat and Postprocessing.bat, possibly using powercfg to change the setting.
Code:
POWERCFG -X -standby-timeout-ac <minutes>
<minutes> would be "0" (never) for the first file, and the default "10" for the second. I haven't used batch files yet, but does this seem feasible? Could successive or overlapping recordings cause a problem? E.g. if the sleep timer is set to 10 minutes while another recording is still in progress, could that cause an early exit?

Edit 2: The batch commands seemed to work OK. A manual recording finished and the system went to sleep. MST showed the sleep timer disabled, then reset at the end. The system also went to sleep after completing consecutive direct and scheduled recordings. This seems to be a satisfactory workaround.

Can anyone else confirm that Windows 7 ignores this API call and it's not just my system?
Pages: 1 2