PDA

View Full Version : Live TV not starting first thing in the morning



Lao Pan
2019-07-03, 06:12 AM
NPVR is waking computer for epg update at 02:44 and appears to complete. Computer then stays awake for the rest of the night. (Should be sleeping after 30 mins)
On opening Kodi, going to TV Guide and starting first Channel in the list Live TV fails to start. Requires a Control C and restart of NPVR to get Live TV working - I have also had it freeze completely requiring a Reboot to get it working.
For the rest of the day, Kodi starts Live TV every time.
This has happened almost every day since installing v5 (the last 2 versions)
Still only testing v5, using v4 for primetime - it's more the complexity of Kodi for the prime user than problems with NPVR.

In the attached logs NRecord shows 2 attempts for live TV (wasn't sure the button had pressed the first time) after line 27912 along with exceptions being thrown.

Lao Pan
2019-07-12, 05:23 AM
Still getting this problem.
In the attached nrecord log from line 10640 onward kodi requests BBC1 live which throws exceptions and never plays.

In the nrecord 3 log at the end around 06:15 (yesterday morning) kodi requests BBC1 HD then plays a few seconds of buffer from exactly 24 hours previously, (the weather girl was wearing the same dress as the previous day and different from the one she was wearing in v4) a second attempt plays the same buffer then v5 locks up solid requiring an end process on the Console Window Host - Kodi hadn't been used for 24 hours.

Once v5 has been restarted after the overnight update these problems don't appear to happen.
Also once the computer wakes for the update it doesn't go back to sleep.

sub
2019-07-12, 06:21 AM
I've just taken a look through your logs. I can't see an obvious cause for the symptoms you describe.

I did not the device.log was cut short. I've fixed this for the next build, so that we can always get the latest things that happened with a device.

For the machine not sleeping, could your try setting <LogPowerManagement>true</LogPowerManagement> in the <General> section of config.xml. This will log all power operations, so we can see when NextPVR is asking the machine to stay awake etc.

sub
2019-07-12, 06:22 AM
Are you able to reproduce the problem with a manual EPG update? ie, restart the server, manually update the epg, wait for it to complete, then try watching a channel.

Lao Pan
2019-07-13, 11:07 AM
Are you able to reproduce the problem with a manual EPG update? ie, restart the server, manually update the epg, wait for it to complete, then try watching a channel.

I have now tried that - waited an hour after epg update - and it played OK. Also tried playing a channel - then updating epg - then playing a channel several hours later - and it played OK (this was to check that keep digital tuners primed wasn't the culprit)

I have put the <LogPowerManagement>true</LogPowerManagement> in confi.xml - where will it be logging the information?

sub
2019-07-13, 09:12 PM
I have put the <LogPowerManagement>true</LogPowerManagement> in confi.xml - where will it be logging the information?You get messages in nrecord.log like "PowerManagement PreventStandby" and "PowerManagement StayAwake" and "PowerManagement AllowSleep".

The "PreventStandby" one is a short term thing, where it's just telling Windows I'm using it right now, so reset any sleep timers you have.

The "StayAwake" one is a long term one, saying stay awake from now until "PowerManagement AllowSleep"

Lao Pan
2019-07-14, 06:04 AM
You get messages in nrecord.log like "PowerManagement PreventStandby" and "PowerManagement StayAwake" and "PowerManagement AllowSleep".

The "PreventStandby" one is a short term thing, where it's just telling Windows I'm using it right now, so reset any sleep timers you have.

The "StayAwake" one is a long term one, saying stay awake from now until "PowerManagement AllowSleep"

Does v5 only write logs in chunks? I was looking at the live nrecord log with notepad++ about 06:15, and all day there were PreventStandby messages where appropriate until line 46355 when there was a StayAwake message for the epg update.
The last line of the log was line 49960 Finished Updating EPG.

Now that I have zipped and saved the logs - after having an attempt at live TV in Kodi (failed) - line 49961 is AllowSleep (at 02:56)

Before opening Kodi I noticed that both of the Tuners used for v5 were showing busy lights, could they be getting stuck during the epg update? Or would that be expected if having the keep alive box in settings ticked.

sub
2019-07-14, 06:13 AM
Does v5 only write logs in chunks?It writes log messages, but it doesn't force Windows to flush each line to disk immediately. This means the logging has much less impact on the system (a lot less disk activity). Windows will periodically flush them to disk.

However, when you hit the 'Log Files' button on Setting -> General page, it'll tell Windows to flush any outstanding writes, so that you get everything in the resulting zip file. Your logs will end with messages like this:
2019-07-14 06:28:45.994 [INFO][39] Flushing logs

sub
2019-07-14, 06:18 AM
In those logs, I can see it starting the overnight EPG update with:

2019-07-14 02:44:38.845 [DEBUG][10] PowerManagement StayAwake
2019-07-14 02:46:08.848 [DEBUG][10] About to update EPG

...doing some epg stuff, then...

2019-07-14 02:56:27.960 [INFO][40] Finished updating EPG
2019-07-14 02:56:27.961 [DEBUG][10] PowerManagement AllowSleep



Before opening Kodi I noticed that both of the Tuners used for v5 were showing busy lights, could they be getting stuck during the epg update?Could be. What type of tuner was it?


Or would that be expected if having the keep alive box in settings ticked. It's hard to know how your tuner behaves regard lights, but if you have 'Keep digital tuners primed', then yes there is a good chance that is normal. ie, this effectively tells the app to keep the device effectively in use and ready to make a recording.

Lao Pan
2019-07-14, 07:00 AM
Could be. What type of tuner was it?

They are a PCTV 290e & 292e DVBT2 USB Stick



It's hard to know how your tuner behaves regard lights, but if you have 'Keep digital tuners primed', then yes there is a good chance that is normal. ie, this effectively tells the app to keep the device effectively in use and ready to make a recording.

I'm wondering if being USB they are not coming back from sleep reliably with the keep primed setting ticked - I'll try unticking for a few days and see what happens.

sub
2019-07-14, 04:49 PM
I'm wondering if being USB they are not coming back from sleep reliably with the keep primed setting ticked - I'll try unticking for a few days and see what happens.Yep, that could be the case. Let me know if that helps. If it does, I could probably tweak the logic to force them to fully stop and be restarted properly when it notice the machine coming out of standby.

Lao Pan
2019-07-15, 08:26 AM
Had a perfect start of Live TV in Kodi this morning, but Wife had been up in the middle of the night watching TV and put computer to sleep after - so we had better give it several more days.

sub
2019-07-15, 04:44 PM
Ok - keep me up to date on how things go.

Lao Pan
2019-07-17, 05:19 AM
v5 has been running minimized in the task bar for 48 hours now with the [keep digital tuners primed] setting unticked.
Both epg updates have been followed by computer going back to sleep and kodi live TV has started OK at first attempt on each use.

So it would appear that these USB Tuners don't like waking up running and possibly inhibit sleep while running as well.