2021-03-05, 05:06 PM
Hi
NextPVR V5 is waking my Windows 10 system from sleep. It is not doing it because a recording needs to be made or the EPG needs to be updated. These wakes are happening in the middle of the night when no recordings are scheduled and there is no EPG update to be performed. It appears that it is waking to be ready to receive requested from the NextPVR add-on running on Kodi for maintenance of EPG data, the schedule of recordings, etc - I am not really sure which of these is happening based on reviewing the NextPVR nrecord logs, as I don't know what the methods being logged do.
I have run a powercfg -sleepstudy command on Windows to generate a sleep study report and it clearly shows the sleep Exit Reason to be 'Timer - NextPVRServer.exe'. For example per the sleep study report (see attached) on 2021-03-02 at 06:12:31 the system entered Hybrid Sleep only to be woken 1 minute and 2 seconds later by 'Timer - NextPVRServer.exe'. When I checked the nrecord logs for 06:12:31 plus 1:02 or around 06:13:33 I can see that the following:
2021-03-02 06:13:34.101 [DEBUG][42] [Resume]
2021-03-02 06:13:34.144 [DEBUG][42] OnResume...
2021-03-02 06:13:38.791 [DEBUG][234] Got request [192.168.2.102]: /service (recording.lastupdated)
2021-03-02 06:13:38.792 [DEBUG][234] method=recording.lastupdated
2021-03-02 06:13:38.792 [DEBUG][234] parameters:
2021-03-02 06:13:38.792 [DEBUG][234] method: recording.lastupdated
2021-03-02 06:13:38.792 [DEBUG][234] sid: 412f64654cf04f5494979edd7a357e7c
2021-03-02 06:13:38.792 [DEBUG][234] client_ip: 192.168.2.102
2021-03-02 06:13:38.792 [DEBUG][234] user_agent: Kodi/19.0 (Linux; Android 9.0; SHIELD Android TV Build/PPR1.180610.011) Android/9.0.0 Sys_CPU/aarch64 App_Bitness/64 Version/19.0-(19.0.0)-Git:20210218-f44fdfbf67
2021-03-02 06:13:38.792 [DEBUG][234] host_callback: 192.168.2.101:8866
2021-03-02 06:13:38.793 [DEBUG][234] LastUpdated
2021-03-02 06:13:38.793 [DEBUG][234] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<last_update>1614661561</last_update>
</rsp>
Based on this it looks like NextPVR service reported that the system resumed at 06:13:34:101 and then at 06:13:38:791 it got a request from 192:168:2:102 which happens to be my Nvidia Shield (it has a fixed IP address to make debugging easier) for the method=recording.lastupdated. I am not sure exactly what this does, but if you look through the nrecord logs this an may other events including methiod:channel.groups, method:channel.list and method:recording list (these are around 07:31:28 in the nrecord log) - I think these later are normal to update the channels and scheduled recordings from the Windows server, but I am not sure.
More background. On Feb 24 overnight, Kodi on the Shield was updated to Kodi 19 automatically and on the night of Feb 25 my sleep problems started. To be honest there is also another event waking the Windows server - an interrupt, probably a magic packet (wake on LAN) being received by the network ethernet interface card ( Device -Realtek PCIe GbE Family Controller ) which I am also investigating. But there are clearly events in the sleep study report that show that NextPVR is waking the server too.
My EPG update interval is set to 120 minutes on Kodi if that has a bearing on what is happening. My EPG data is updated daily from Schedules Direct at 19:05:00 (7:05 PM) and historically we have seen that NextPVRService wakes the Windows system just prior to 7:05 to do this update if Windows is sleeping.
When we upgraded to NextPVR 5 back in the late fall of 2020, the Windows systems continued as it had before, sleeping when there was nothing to do and being woken when NextPVR had something to do - update EPG or make a recording. The upgrade of Kodi on the Shield from 18 to 19 seems to have triggered these new behaviors. We want the Windows 10 PC to sleep when NextPVR is not updating the EPG or making recordings OR we are watching recorded shows. My sleep interval on Windows was set to 1 hour so I could gather debug data easier, but has now been set back to 20 minutes that we desire (at 20 minutes there were to many sleep / wake vents on the Sleep Study Report to look through).
Perhaps there are some new configuration parameters that I need to learn about to get the behavior back to where it was before the upgrade to Kodi 19. We checked last night a we can no see new configuration parms - perhaps the behaviour of some have changed.
Attachments
NextPVR V5 is waking my Windows 10 system from sleep. It is not doing it because a recording needs to be made or the EPG needs to be updated. These wakes are happening in the middle of the night when no recordings are scheduled and there is no EPG update to be performed. It appears that it is waking to be ready to receive requested from the NextPVR add-on running on Kodi for maintenance of EPG data, the schedule of recordings, etc - I am not really sure which of these is happening based on reviewing the NextPVR nrecord logs, as I don't know what the methods being logged do.
I have run a powercfg -sleepstudy command on Windows to generate a sleep study report and it clearly shows the sleep Exit Reason to be 'Timer - NextPVRServer.exe'. For example per the sleep study report (see attached) on 2021-03-02 at 06:12:31 the system entered Hybrid Sleep only to be woken 1 minute and 2 seconds later by 'Timer - NextPVRServer.exe'. When I checked the nrecord logs for 06:12:31 plus 1:02 or around 06:13:33 I can see that the following:
2021-03-02 06:13:34.101 [DEBUG][42] [Resume]
2021-03-02 06:13:34.144 [DEBUG][42] OnResume...
2021-03-02 06:13:38.791 [DEBUG][234] Got request [192.168.2.102]: /service (recording.lastupdated)
2021-03-02 06:13:38.792 [DEBUG][234] method=recording.lastupdated
2021-03-02 06:13:38.792 [DEBUG][234] parameters:
2021-03-02 06:13:38.792 [DEBUG][234] method: recording.lastupdated
2021-03-02 06:13:38.792 [DEBUG][234] sid: 412f64654cf04f5494979edd7a357e7c
2021-03-02 06:13:38.792 [DEBUG][234] client_ip: 192.168.2.102
2021-03-02 06:13:38.792 [DEBUG][234] user_agent: Kodi/19.0 (Linux; Android 9.0; SHIELD Android TV Build/PPR1.180610.011) Android/9.0.0 Sys_CPU/aarch64 App_Bitness/64 Version/19.0-(19.0.0)-Git:20210218-f44fdfbf67
2021-03-02 06:13:38.792 [DEBUG][234] host_callback: 192.168.2.101:8866
2021-03-02 06:13:38.793 [DEBUG][234] LastUpdated
2021-03-02 06:13:38.793 [DEBUG][234] <?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<last_update>1614661561</last_update>
</rsp>
Based on this it looks like NextPVR service reported that the system resumed at 06:13:34:101 and then at 06:13:38:791 it got a request from 192:168:2:102 which happens to be my Nvidia Shield (it has a fixed IP address to make debugging easier) for the method=recording.lastupdated. I am not sure exactly what this does, but if you look through the nrecord logs this an may other events including methiod:channel.groups, method:channel.list and method:recording list (these are around 07:31:28 in the nrecord log) - I think these later are normal to update the channels and scheduled recordings from the Windows server, but I am not sure.
More background. On Feb 24 overnight, Kodi on the Shield was updated to Kodi 19 automatically and on the night of Feb 25 my sleep problems started. To be honest there is also another event waking the Windows server - an interrupt, probably a magic packet (wake on LAN) being received by the network ethernet interface card ( Device -Realtek PCIe GbE Family Controller ) which I am also investigating. But there are clearly events in the sleep study report that show that NextPVR is waking the server too.
My EPG update interval is set to 120 minutes on Kodi if that has a bearing on what is happening. My EPG data is updated daily from Schedules Direct at 19:05:00 (7:05 PM) and historically we have seen that NextPVRService wakes the Windows system just prior to 7:05 to do this update if Windows is sleeping.
When we upgraded to NextPVR 5 back in the late fall of 2020, the Windows systems continued as it had before, sleeping when there was nothing to do and being woken when NextPVR had something to do - update EPG or make a recording. The upgrade of Kodi on the Shield from 18 to 19 seems to have triggered these new behaviors. We want the Windows 10 PC to sleep when NextPVR is not updating the EPG or making recordings OR we are watching recorded shows. My sleep interval on Windows was set to 1 hour so I could gather debug data easier, but has now been set back to 20 minutes that we desire (at 20 minutes there were to many sleep / wake vents on the Sleep Study Report to look through).
Perhaps there are some new configuration parameters that I need to learn about to get the behavior back to where it was before the upgrade to Kodi 19. We checked last night a we can no see new configuration parms - perhaps the behaviour of some have changed.
Attachments
- Nrecord logs (created from settings)
- Sleep Study report ( I do not seem to be able to attach two files, so I will try to post it in a reply to this post)