NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
1 2 3 4 5 … 100 Next »
Standby/Sleep During Playback

 
  • 0 Vote(s) - 0 Average
Standby/Sleep During Playback
motocrossmann
Offline

Junior Member

United States
Posts: 15
Threads: 7
Joined: May 2020
#1
2020-10-01, 12:01 AM
I have my PC set to use Standby, which works great for the most part.  The PC wakes for recordings and generally does a nice job.  My issue is that when I am playing back a recording from Kodi via the NextPVR plugin on a remote machine, sometimes the PC will go back to sleep if I momentarily pause or go back to the home screen.  Is there a way to prevent this?
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#2
2022-06-30, 06:41 PM
My NextPVR PC has this problem too when watching live TV (HDPVR2) over the LAN with kodi. Microsoft says "The computer is considered idle if all the processors and all the disks were idle for more than 90%" "In Windows 8, the CPU and IO thresholds are set to 80%". On my new faster PC the CPU and disk usage is almost zero/undetectable during this activity appearing idle to Windows 10. Only 10 Mb/s is visible on the ethernet interface.

If I schedule a task to run after an idle period, it runs during the TV watching above even though the NextPVR icon is red/active in the taskbar. If you play a youtube video in firefox, the powerfg /requests are as follows until you hit pause"

Code:
C:\Windows\system32>powercfg /requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume3\Program Files\Mozilla Firefox\firefox.exe
display request

SYSTEM:
None.

AWAYMODE:
None.

EXECUTION:
[PROCESS] \Device\HarddiskVolume3\Program Files\Mozilla Firefox\firefox.exe
non-display request

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.

I'm no expert but shouldn't NextPVR v5 make an execution power request while recording/playing back/live TV remotely to prevent Windows from thinking an active NextPVR server is idle.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#3
2022-06-30, 06:44 PM (This post was last modified: 2022-06-30, 06:45 PM by mvallevand.)
Sub started to address this in pre-release and he says he fixed something for Live TV but recordings still are a problem. Are you using Windows 11? I know for me I saw this change with it for recordings that I never had before.

Martin
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#4
2022-06-30, 08:07 PM
Two things changed here. The new PC is much faster and has NextPVR v5 instead of v4. Still Windows 10 though.
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#5
2023-01-05, 08:40 PM
I finally got another new PC 6 months after returning the previous one. It came with windows 11 this time not windows 10. I installed NextPVR v6 (was v5 6 months ago) and this problem is solved when playing/pausing live TV over the LAN from both kodi and the web browser client. I didn't test long recordings as I rarely do that.

The powerfg /requests are as follows while watching live TV:

Code:
C:\Windows\System32>powercfg /requests
DISPLAY:
None.

SYSTEM:
[PROCESS] \Device\HarddiskVolume5\Program Files\NextPVR\NPVRTray.exe
[PROCESS] \Device\HarddiskVolume5\Program Files\NextPVR\NextPVRServer.exe
[DRIVER] Legacy Kernel Caller

AWAYMODE:
[PROCESS] \Device\HarddiskVolume5\Program Files\NextPVR\NPVRTray.exe
[PROCESS] \Device\HarddiskVolume5\Program Files\NextPVR\NextPVRServer.exe

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#6
2023-01-16, 08:31 PM
I'm still having an issue with unwanted sleep in v6 playing live TV from kodi (though not technically during playback). This seems like the opposite of this thread.

I noticed that if I watch live TV from kodi for a long while, press stop, pick another channel from the guide and watch it, the server has already hibernated. I worked around this a few times by not pressing stop and the new channel would play.

Yesterday I had two concurrent live sports events of interest and switched maybe 10 times between the two and even by using this no stop workaround, the server hibernated once when switching between channels. The power requests are probably cancelled briefly for the first channel playing before being made for the second channel playing and even that very brief window allowed hibernation to happen.

I wonder if the nextpvr service could queue its requests to stop maintaining power and process them after a delay. If a new request to maintain power comes before the delay expires then the pending requests to stop maintaining power are dropped.

The delay could be based on power plan settings. Here's a poweshell script gotten online that prevents screen blanking and hibernation during the running of an audio player. It reads power plan settings.

Code:
#Get GUID of active plan
#$GUID = (((Get-CimInstance -classname Win32_PowerPlan -Namespace "root\cimv2\power" | where {$_.IsActive -eq "true"}).InstanceID) -split("\\"))[1]
#Cut {} off of string at beginning and end of GUID
#$GUID = $GUID.Substring(1, $GUID.Length-2)

#The original script getting the GUID only worked as admin so use this method instead
$powerScheme = powercfg -getactivescheme
$GUID = $powerScheme.Substring($powerScheme.IndexOf(":")+2)
$GUID = $GUID.Substring(0, $GUID.IndexOf(" "))
#Write-Host "GUID = ""$GUID"""

#Get a list of all video idle options for this plan
$Options = powercfg -query $GUID SUB_VIDEO VIDEOIDLE
$index = 0

#Find index of line that contains Turn off screen Settings
For($i=0; $i -lt $Options.Length; $i++)
{
    $line = $Options[$i]
    if($line.ToLower() -like "*Turn off display after*")
    {
        $index = $i

        break
    }       
}

#Get a list of all hibernate idle options for this plan
$Options2 = powercfg -query $GUID SUB_SLEEP HIBERNATEIDLE
$index2 = 0

#Find index of line that contains Hibernate Settings
For($i=0; $i -lt $Options2.Length; $i++)
{
    $line = $Options2[$i]
    if($line.ToLower() -like "*(Hibernate after)*")
    {
        $index2 = $i

        break
    }       
}

#AC Setting is 6 lines later
$screenOffSetting = $Options[$index + 6]
#trim off the beginning of the string, leaving only the value
$screenOffSettingTrimmed = $screenOffSetting.Substring($screenOffSetting.IndexOf(":")+2)
$screenOffSetting = [int]$screenOffSettingTrimmed / 60 # convert to minutes

#AC Setting is 6 lines later
$hibernateSetting = $Options2[$index2 + 6]
#trim off the beginning of the string, leaving only the value
$hibernateSettingTrimmed = $hibernateSetting.Substring($hibernateSetting.IndexOf(":")+2)
$hibernateSetting = [int]$hibernateSettingTrimmed / 60 # convert to minutes

# prevent screen turn off , run our program & wait, restore screen turn off
powercfg -change -monitor-timeout-ac 0
powercfg -change -hibernate-timeout-ac 0
Start-Process -FilePath "C:\Program Files\DeaDBeeF\deadbeef.exe" -Wait
powercfg -change -hibernate-timeout-ac $hibernateSetting
powercfg -change -monitor-timeout-ac $screenOffSetting
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#7
2023-01-16, 08:38 PM
There were no zipped logs attached. You can also enable extra logs in config.xml as sub noted in the thread you linked to.

Martin
fla
Offline

Posting Freak

Posts: 876
Threads: 45
Joined: Mar 2006
#8
2023-01-16, 11:14 PM
With hibernate set to 5min for testing, here's what happens in nrecord.log while watching live tv from 4:08PM to 4:35PM :

Code:
2023-01-16 16:08:25.560    [DEBUG][23]    File is in live mode
2023-01-16 16:08:25.560    [DEBUG][23]    <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
</rsp>

2023-01-16 16:08:25.857    [DEBUG][9]    Active...staying awake

//
// deleted a bunch of lines here for uneventful live TV watching...
//

2023-01-16 16:35:24.434 [DEBUG][103] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<Status>
  <Device oid="21" identifier="Local Recorder (Hauppauge Siena Crossbar)">
  </Device>
</Status>
</rsp>
2023-01-16 16:35:27.631 [DEBUG][9] No longer active
2023-01-16 16:35:32.669 [DEBUG][23] [Suspend]
2023-01-16 16:35:32.669 [DEBUG][23] OnSleep...
2023-01-16 16:35:32.669 [DEBUG][23] stopping device process
2023-01-16 16:35:34.439 [DEBUG][103] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<Status>
<Device oid="21" identifier="Local Recorder (Hauppauge Siena Crossbar)"> </Device>
</Status>
</rsp>
2023-01-16 17:07:22.160 [DEBUG][103] [Resume]
2023-01-16 17:07:22.160 [DEBUG][103] OnResume...
2023-01-16 17:07:22.164 [DEBUG][24] [Resume]
2023-01-16 17:07:22.164 [DEBUG][24] OnResume...

AfterI hit stop at 4:35PM the [Suspend] happens just over 5s after the "No longer active". I then woke it up manually at 5:07PM with the kodi "Advanced Wake on LAN" addon.

I think the server is doing what nextPVR is asking it to do but it results in unwanted sleeps during channel changes as already explained in my previous post.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#9
2023-01-16, 11:24 PM
I like logs rather then snippets especially with the setting on. I think you are saying that as soon as you hit stop Windows is telling NextPVR to sleep and because NextPVR isn't playing anything it sleeps. That feels like the hidden sleep mode to me.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#10
2023-01-16, 11:39 PM
Just to be clear, NextPVR never asks Windows to sleep. It only ever tries to keep it awake. Anything putting Windows to sleep is outside of NextPVR itself.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  playback issue artmetz 4 306 2025-03-28, 07:47 PM
Last Post: artmetz
  NextPVRServer.exe (Version 7) Preventing Sleep PVR_Convert 4 332 2025-02-18, 07:18 PM
Last Post: mvallevand
  No standby after update to Version 7 Escape7 163 8,736 2025-01-04, 05:27 PM
Last Post: sub
  nextpvr.exe playback issues? hae 5 525 2024-12-29, 10:15 PM
Last Post: hae
  Jerky Playback at 2160p dshorrosh 6 549 2024-07-17, 01:49 PM
Last Post: mvallevand
  Error at 58 minutes playback Offroad 4 545 2024-06-01, 01:17 PM
Last Post: Offroad
  Recording wont resume, just playback from beginning dallascowboy23 26 2,611 2024-05-15, 01:35 PM
Last Post: mvallevand
  Sleep WakeUp, PC shuts down instead FM5 3 463 2024-05-09, 09:52 PM
Last Post: mvallevand
  Playback record skips back while recording a program sgar75 2 557 2024-03-23, 05:41 AM
Last Post: sgar75
  Occasional delay during skip/playback artmetz 11 1,258 2023-11-11, 03:29 PM
Last Post: artmetz

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

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

Linear Mode
Threaded Mode