NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 20 21 22 23 24 … 101 Next »
Computer Won't Sleep After Upgrade to v6

 
  • 0 Vote(s) - 0 Average
Computer Won't Sleep After Upgrade to v6
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,832
Threads: 954
Joined: May 2006
#21
2023-04-02, 08:51 PM
One Windows sleep setting will keep the PC awake during network activity. As you found as long as the NextPVR server is running Kodi PVR will attempt to contact it. Once the sever is shutdown Kodi PVR will abandon the connection and so the PC could sleep. During all of this NextPVR is not doing anything to keep it awake, but you might be able to disable that setting in Windows or on your network card.

There are some new settings in Kodi Nexus that will reduce and even eliminate this network polling. The problem this causes is the Kodi instance will not be aware of changes happening outside Kodi. If this isn't an issue, perhaps you can try those settings.

I expect you fast start mode uses more energy then the PC does anyway so turning it off may not be a bad thing.

Martin
fla
Offline

Posting Freak

Posts: 880
Threads: 46
Joined: Mar 2006
#22
2023-04-28, 02:42 AM
One thing that might help figure this out would be to see how this error is handled on the NextPVRServer side.

Code:
2023-04-27 20:57:44.383 [ERROR][9] Live stream expired without 15 second renewal. (handle:150001)
2023-04-27 20:57:44.384 [DEBUG][9] http://localhost:50878/stream/stop?handle=1

I got a few strange errors in kodi where a channel took a long time and refused to start playing. Trying again got the channel to play but after cleanly stopping the stream, the server still had ongoing power requests. If some problem on the client causes the stream to fail to renew and expire, does the server remember to withdraw its power request?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,832
Threads: 954
Joined: May 2006
#23
2023-04-28, 02:46 AM
Logs would help. That could even be normal if you aren't timeshifting.

Martin
fla
Offline

Posting Freak

Posts: 880
Threads: 46
Joined: Mar 2006
#24
2023-04-28, 03:24 AM
I am in timeshift mode and the channel didn't start playing and kodi eventually popped up a strange error. I did a bunch of stupid stuff so the logs are messed up. If it happens again, I'll try to get some logs. Once in a while I notice my server is awake for no reason and then there's always an active NextPVRServer power request.

There's certainly an uncommon code path where NextPVRServer doesn't remove a power request even though streaming has somehow ceased. Was just hoping the stream expiry error could provide a useful hint.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,832
Threads: 954
Joined: May 2006
#25
2023-04-28, 03:34 AM (This post was last modified: 2023-04-28, 03:37 AM by mvallevand.)
You switched topics on us from it sleeping too early to it not sleeping but good logs are needed either way.

What you are looking for after an expiry or other stop is this

2023-04-27 23:33:00.389 [DEBUG][11] No longer active

It isn't clear but on Linux that is preceded with a line that explains it.

2023-04-27 23:33:00.389 [DEBUG][11] PowerManagement AllowSleep (needs implementation)

Martin
fla
Offline

Posting Freak

Posts: 880
Threads: 46
Joined: Mar 2006
#26
2023-05-06, 03:11 PM
It happened again and this time I attached good logs. Like last time it happened while attempting to play a live TV channel which takes an abnormally long time and doesn't start and kodi says a channel failed to play. Attempting to play a second time plays fine.

The power requests are not cleaned up and remain forever and keep the server awake. The "live-*.ts" and "live-*.ts.map" files are also not cleaned up and stick around.

It would be great if this 15 second renewal timeout on channel startup never happened but at least NextPVRServer should clean up after itself when it occasionally does happen.

On the kodi PC

Code:
2023-05-06 08:47:08.582 T:7492    error <general>: CCurlFile::CReadState::XFILE::CCurlFile::CReadState::FillBuffer - (0x289dab55040) Failed: Timeout was reached(28)
2023-05-06 08:47:08.582 T:7492    error <general>: CCurlFile::XFILE::CCurlFile::Open - <http://nuc.:8866/service?method=recording.lastupdated> Failed with code 0:

On the NextPVR server

Code:
2023-05-06 08:48:41.494 [ERROR][9] Live stream expired without 15 second renewal. (handle:150001)
2023-05-06 08:48:41.495 [DEBUG][9] http://localhost:52185/stream/stop?handle=1

Thanks guys!


Attached Files
.zip   logs.zip (Size: 373.67 KB / Downloads: 2)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,832
Threads: 954
Joined: May 2006
#27
2023-05-06, 04:29 PM (This post was last modified: 2023-05-06, 04:48 PM by mvallevand.)
First, NextPVR does clean up for itself on startup as shown in your logs

Code:
2023-05-05 20:59:09.251    [DEBUG][9]     - attempting to delete temp file: D:\Users\Public\Videos\live-RDSHD-1.ts.map
2023-05-05 20:59:09.252    [DEBUG][9]     - attempting to delete temp file: D:\Users\Public\Videos\live-CHRODT-2.ts.map
2023-05-05 20:59:09.253    [DEBUG][9]     - attempting to delete temp file: D:\Users\Public\Videos\live-WUHFDT-3.ts.map

Second, does your post have anything to do with failing to sleep or not sleeping? It certainly is not clear what happened "again"

You started the AMD LE after many hours, it issued the WOL, Kodi waits for the server, you start Live TV and it times out after 20 seconds.

You failed to include all the NextPVR logs but it looks like the device took 50 seconds to tune after the WOL

Code:
2023-05-06 08:47:36.800    [DEBUG][59]    body:
2023-05-06 08:48:16.252    [DEBUG][59]    <stream>

What actually seems to be failing in Kodi is the system network connection limit, nothing on the NextPVR side.

Code:
2023-05-06 08:47:55.490 T:8928    error <general>: CCurlFile::CReadState::XFILE::CCurlFile::CReadState::FillBuffer - (0x289dab55680) Failed: Timeout was reached(28)

Without Kodi debug logs I can't be certain but it seems like 20 seconds not the 50 it took. You can increase that timeout in advanced settings, but that can have a negative impact on other things.

Clearly in this situation the 15 second timeout on handle 1 is a very good thing since Kodi does not attempt to close the stream after the initial timeout. If you look at thread 59 in NextPVR it is running while the thread 58 is streaming live tv to Kodi. That is also why there are two handles

Code:
.
    <LiveTV handle="150001">LIVE&amp;D:\Users\Public\Videos\live-CIHFDT-0.ts</LiveTV>
    <LiveTV handle="150002">LIVE&amp;D:\Users\Public\Videos\live-CIHFDT-1.ts</LiveTV>

Also note in addition to the client that woke the server, you have 2 other clients that will re-connect after the WOL and they will spam the server after the WOL to update their databases. Shutting them down will help reduce load after WOL startup.

Knowing the limitations of your setup for what I think is the current problem, I would wait a minute after startup before starting Live TV, or just accept that the first playback could fail which is not the end of the world as NextPVR and pvr.nextpvr are handling it.

Martin
fla
Offline

Posting Freak

Posts: 880
Threads: 46
Joined: Mar 2006
#28
2023-05-06, 05:22 PM
(2023-05-06, 04:29 PM)mvallevand Wrote: Second, does your post have anything to do with failing to sleep or not sleeping?  It certainly is not clear what happened "again"
(2023-05-06, 03:11 PM)fla Wrote: The power requests are not cleaned up and remain forever and keep the server awake. The "live-*.ts" and "live-*.ts.map" files are also not cleaned up and stick around.
In an administrator Command Prompt you can see NextPVR's power requests with powercfg /requests and they normally go away after you press Stop in kodi. In the case of the 15 second renewal timeout, the power requests are not cleaned up by NextPVR and remain forever and keep the server awake.

I got a headache from posting the logs earlier and don't have the energy to read/understand your full reply right now. Thanks for it though.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,832
Threads: 954
Joined: May 2006
#29
2023-05-06, 08:07 PM (This post was last modified: 2023-05-06, 08:08 PM by mvallevand.)
The tl;dr version of my last post; the 15 second expiry you showed us should absolutely not have enabled sleep since there was another stream playing until the logs was zipped.

You need to send logs showing the problem occuring. NextPVR web creates the zipped which is easiest way to get them.

Martin
fla
Offline

Posting Freak

Posts: 880
Threads: 46
Joined: Mar 2006
#30
2023-05-07, 05:23 PM
When the "channel failed to play" error popped up in kodi I immediately tried again and it worked. I can't analyze the logs like you can but perhaps I tried again before NextPVR even considered the first attempt to have timed out (two "concurrent" streams in NextPVR's view).

Even after I eventually stopped watching the 2nd attempt, the powercfg requests were still on the server. Watching yet another channel and stopping could never get rid of the powercfg requests once in that state. I rebooted.

Anyways I'll avoid retrying the failed play the next time this error happens and produce better logs. I'm trying to be helpful but tend to mess things up.

This issue is hard to reproduce. You mentioned a timeout in kodi advancedsettings.xml. What is it exactly and could I make it ridiculously small to reproduce this issue on demand?

Thanks.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Time for upgrade greg in kansas 1 202 2025-05-06, 03:55 PM
Last Post: mvallevand
  Standby/Sleep During Playback motocrossmann 46 3,976 2025-05-05, 05:40 PM
Last Post: gEd
  Video Issues after upgrade from 4.2.4 to 7.0.1.241229 lemmy999 5 456 2025-03-02, 02:10 AM
Last Post: lemmy999
  NextPVRServer.exe (Version 7) Preventing Sleep PVR_Convert 4 365 2025-02-18, 07:18 PM
Last Post: mvallevand
  Minimal EPG since upgrade to v7 hmc 19 1,009 2025-02-02, 02:12 AM
Last Post: sub
  npvr stopped returning computer to hibernate state when recording finished terry 3 415 2024-11-01, 02:54 PM
Last Post: terry
  Sleep WakeUp, PC shuts down instead FM5 3 477 2024-05-09, 09:52 PM
Last Post: mvallevand
  New Computer - NextPVR won't run whizptc 8 933 2024-02-06, 03:56 PM
Last Post: whizptc
  v6.1.2.230502 Will not Sleep after watching TV Channel Lao Pan 24 3,434 2023-05-13, 06:13 AM
Last Post: dawsonjw
  Upgrade from 4.2.5 beartlaoi 11 1,929 2023-05-01, 01:50 PM
Last Post: beartlaoi

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

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

Linear Mode
Threaded Mode