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 … 102 Next »
Standby/Sleep During Playback

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

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#41
2025-05-03, 09:30 PM
I had this niggle in the back of my mind that I should check that it really was telling the PC to stay awake but I didn't have time to test it.

Just tested it and no, it's not telling windows to stay awake when playing back via UIdroid. Is *is* doing so when watching live TV.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
fla
Offline

Posting Freak

Posts: 890
Threads: 46
Joined: Mar 2006
#42
2025-05-04, 12:06 AM (This post was last modified: 2025-05-04, 12:16 AM by fla.)
Thanks Martin. I tried setting the server to hibernate after 1, 2 and 5 minutes and it still sleeps after that amount of time when kodi is playing a recording over LAN despite the "PowerManagement PreventStandby".

A quick google found deprecated PBT_APMQUERYSUSPEND event that allows grant/deny the request to suspend so that can't be it. Whatever NextPVR uses on Win11 while serving existing recordings isn't working here. Why not use the same mechanism that works during live TV and creating recordings?

Edit: Didn't see @gEd's post, excuse the redundancy...
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,129
Threads: 957
Joined: May 2006
#43
2025-05-04, 12:28 AM
This should have the pre-release change related to power management https://forums.nextpvr.com/showthread.ph...#pid599524

You probably need to run this tool to check for the state changes those aren't logged by powercfg https://learn.microsoft.com/en-us/window...st/pwrtest

Martin
fla
Offline

Posting Freak

Posts: 890
Threads: 46
Joined: Mar 2006
#44
2025-05-04, 04:47 AM
It seemed to last longer but the server still slept during playback eventually.

Should the stable release be reinstalled before swapping nshared.dll? I have the prerelease build. Maybe I messed up replacing the nshared.dll in two directories? I make lots of mistakes... Hopefully @gEd can test this more reliably. Using that tool will take me more time to learn.

Thanks Martin!
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#45
2025-05-04, 05:42 PM (This post was last modified: 2025-05-04, 10:47 PM by gEd.)
Martin
I'm already running a newer version of nshared.dll that the one in that thread from March 8.
I just see what I believe you guys have already discussed together in this thread previously.

I see StayAwake when you start live TV and AllowSleep when you stop live TV. During Stayawake, we see in powercfg that NextPVRServer.exe (and NPVRTray.exe also initially) is telling windows to stay awake.

However playback via UIdroid shows PreventStandby every 60 seconds but there is [edit: no] process listed in powercfg.
(I presume there is a reason why Sub added PreventStandby instead of just using stayawake)

I can't make sense of pwrtest to understand I should do with it that would be of any help here.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,129
Threads: 957
Joined: May 2006
#46
2025-05-05, 01:56 PM (This post was last modified: 2025-05-05, 02:12 PM by mvallevand.)
I just installed the WDK here https://go.microsoft.com/fwlink/?linkid=2307500 and pwrtest is there.

To monitor the state change I use

"C:\Program Files (x86)\Windows Kits\10\Tools\10.0.26100.0\x64\pwrtest.exe" /es

which gives logs like this during streaming.

Code:
Execution State Changed by a process
TimeStamp:      05/05/2025 09:51:37::669
Process:        \Device\HarddiskVolume3\v8\programs\NextPVRServer.exe
PID:            0x522c
TID:            0xffc
RawState:       0x00000001
Continuous: 0  Display:  0  System:  1  AwayMode: 0  UserPresent: 0

And I see it set every 5 seconds. This resets the sleep timer.

Martin
gEd
Offline

Posting Freak

London
Posts: 3,518
Threads: 100
Joined: Jan 2005
#47
2025-05-05, 05:40 PM
Thanks Martin.

You are (as usual) absolutely correct and I see system and display stayawake messages in pwrtest. Very good news.

What I've also discovered today is that my PC isn't handling it's power settings properly and keeps sleeping despite having a stay awake power profile applied.
So when I chimed in here that my PC was going to sleep during playback, I see that the problem is with my PC, not with UIdroid & NPVR which is good to know.

I'll read about pwrtest some more to troubleshoot my problem but I suspect it's a recent windows11 update not sitting nicely with my 14 year old cpu and mobo. I could just leave it on 24x7 but prefer it to sleep when not needed. It's not a problem worth scrapping an otherwise perfectly useable HTPC.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
fla
Offline

Posting Freak

Posts: 890
Threads: 46
Joined: Mar 2006
#48
2025-07-05, 02:17 PM
A post saying that with the current release "Windows 10 server power management is now working perfectly with Kodi clients" made me curious if that was also the case with Windows 11.

Setup:
Windows 11 NextPVR server set to hibernate after 15 min of inactivity.
Windows 10 kodi client and a cmd window pinging the server

Actions & Results:

8:27 start kodi on client (automatically wakes up the nextpvr server)
8:30 start playing an old recording
8:43 ping timeout & playback freezes
8:45 manual wake on LAN of server from another device
8:45:23 ping ok & playback resumes as if nothing happened
8:46 Stop playback and exit kodi
8:47 Login with browser to get the logs
9:00:48 ping timeout

Here's the key snippit of the attached logs. NextPVR is doing PreventStandby every minute but on Windows 11 that mechanism of resetting the sleep timer isn't working. The mechanism used by NextPVR while recording and during live TV works perfectly on the same Windows 11 PC.

Code:
2025-07-05 08:31:02.697 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:32:02.824 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:33:03.000 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:34:03.037 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:35:03.044 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:36:03.227 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:37:03.389 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:38:03.612 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:39:04.046 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:40:04.147 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:41:04.591 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:42:04.887 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:43:05.164 [DEBUG][56] PowerManagement PreventStandby...
2025-07-05 08:43:29.988 [DEBUG][88] [Suspend]
2025-07-05 08:43:29.988 [DEBUG][88] OnSleep...
2025-07-05 08:45:19.206 [DEBUG][19] [Resume]
2025-07-05 08:45:19.206 [DEBUG][19] OnResume...
2025-07-05 08:45:19.313 [DEBUG][77] [Resume]
2025-07-05 08:45:19.313 [DEBUG][77] OnResume...
2025-07-05 08:45:22.888 [DEBUG][88] Got request [192.168.0.33]: /live


Attached Files
.zip   PlaybackSleep.zip (Size: 10.87 KB / Downloads: 1)
fla
Offline

Posting Freak

Posts: 890
Threads: 46
Joined: Mar 2006
#49
2025-07-06, 12:50 AM
(2025-05-05, 01:56 PM)mvallevand Wrote:
Code:
Execution State Changed by a process
TimeStamp:      05/05/2025 09:51:37::669
Process:        \Device\HarddiskVolume3\v8\programs\NextPVRServer.exe
PID:            0x522c
TID:            0xffc
RawState:       0x00000001
Continuous: 0  Display:  0  System:  1  AwayMode: 0  UserPresent: 0

And I see it set every 5 seconds.  This resets the sleep timer.

Martin

Two years ago when Live TV was having these unwanted sleep issues on Win11 you found that code that should reset the sleep timer wasn't working and proposed a workaround that "doesn't make sense but it worked". No idea how sub fixed it for Live TV. It seems like playback has code that should work to reset the timer but doesn't on Win11.

The powercfg /sleepstudy command lets you retroactively examine what happened and the "PowerManagement PreventStandby..." messages had no effect on the sleep timer.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,129
Threads: 957
Joined: May 2006
#50
2025-07-06, 01:07 AM (This post was last modified: 2025-07-06, 01:37 AM by mvallevand.)
You need to run pwrtest as I explained above to confirm your system isn't the problem. Out of curiousity do you have unattended sleep mode as only 15 minutes. I

2025-07-05 08:28:06.300 [DEBUG][91] OnResume...
2025-07-05 08:43:29.988 [DEBUG][88] [Suspend]

If so set it to never.

Live TV is not the same as basic streaming.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  New Installation on WIN11 Sleep Problem 12vibes 2 27 2 hours ago
Last Post: 12vibes
  nextpvr.exe playback issues? hae 7 886 2025-05-31, 09:02 PM
Last Post: sub
  playback issue artmetz 4 458 2025-03-28, 07:47 PM
Last Post: artmetz
  NextPVRServer.exe (Version 7) Preventing Sleep PVR_Convert 4 500 2025-02-18, 07:18 PM
Last Post: mvallevand
  No standby after update to Version 7 Escape7 163 12,278 2025-01-04, 05:27 PM
Last Post: sub
  Jerky Playback at 2160p dshorrosh 6 713 2024-07-17, 01:49 PM
Last Post: mvallevand
  Error at 58 minutes playback Offroad 4 680 2024-06-01, 01:17 PM
Last Post: Offroad
  Recording wont resume, just playback from beginning dallascowboy23 26 3,456 2024-05-15, 01:35 PM
Last Post: mvallevand
  Sleep WakeUp, PC shuts down instead FM5 3 582 2024-05-09, 09:52 PM
Last Post: mvallevand
  Playback record skips back while recording a program sgar75 2 654 2024-03-23, 05:41 AM
Last Post: sgar75

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

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

Linear Mode
Threaded Mode