NextPVR Forums

Full Version: Wake after Suspend issue with dvbt devices (LE12 Kodi 21)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
HI,
I decided to test nextpvr again at the weekend.

I'm currently running LibreElec 12 Nightly (Kodi 21) Generic on intel i3-6100 CPU/iGPU VAAPI with a hauppage quad DVB-t PCI-E adapter

I currently use TVHeadend and this setup works fine, but I sometimes like try the latest nexpvr to test as I reallly like the web interface and easy setup.

I noticed an odd issue:
  • With TVHeadend enabled: Suspend LibreElec, then wake, wait for the client to connect and all works as before.
  • With NextPVR enabled: Suspend LibreElec, then wake, wait for the client to connect but then no live tv, no future recordings, only current recordings work. If I then enable Tvheadend it also doesn't work, so for some reason the dvbt adapter seems to not work after suspend but only when using nextpvr. If I reboot it will all work again

I'm not sure if this is a known issue? 

I know you will need some logs, so will try and test again sometime, let me know if you need anything more than just nextpvr/kodi debug logs or have any suggestions that may fix the issue that I can also test.

Thanks
Quote:I'm not sure if this is a known issue?
This is the first time I've seen it mentioned.

Quote:I know you will need some logs, so will try and test again sometime, let me know if you need anything more than just nextpvr/kodi debug logs or have any suggestions that may fix the issue that I can also test.
Yeah, we're going to need to see some logs.
DeviceHousrLinux probably needs to be killed to free the adapter.  TvHeadend if it is running will also steal the tuner so make sure it isn't running too.

Future recordings you must mean after resume but note NextPVR doesn't support Linux power management scripts, the on in LE will work for automatica wake up if you do things via Kodi.  You can integrate

 pkill DeviceHousrLinux 

into those scripts too
Thanks for the suggestions, I will try the DeviceHousrLinux one the next time I can swap over and test and get some logs.

Just for the record, TVHeadend server and client are installed but both disabled when I test nextpvr and vice versa when I use TVHeadend daily. The only reason I'm not using nextpvr as my main pvr is this issue as it stops it being able to wake and record.

I also found this thread from October last year which appears to be exactly the same issue as mine:

https://forums.nextpvr.com/showthread.php?tid=61436

Note, they also use a Hauppauge wintv tuner (though dual not quad) which may be relevant?
I also find it curious that they had also confirmed TVHeadend worked without issue, maybe TVHeadend does something different prior to sleep for this/all tuners?

Thank you for the help
Yes that is the same. A quick test is test live tv after a fail and killing the running DeviceHostlLinux instances. I expect they will be shown on LE with systemctl status service.nextpvr
Hi,
I managed to do a bit of testing this morning.

I put a stable rather than nightly build on my test usb stick, so this is testing using LE 11.0.6 Generic on intel i3-6100 CPU/iGPU VAAPI with a hauppage quad DVB-t PCI-E adapter

First, to try and see if npvr is causing the issue I did the following:

Start LE
Put straight into suspend without using npvr - ok
wake - ok
play a channel - ok
Put into suspend again after npvr has played a channel - ok
wake - ok
play a channel - fails from this point on.

So, playback/recording after suspend is only an issue after LE has used the DVB tuner to do something prior to the system sleeping.

I have uploaded the npvr logs after doing the test above.
[attachment=7489]

Running systemctl status service.nextpvr while trying to play a channel after suspend gives this:

Quote:● service.nextpvr.service - NextPVR Server
    Loaded: loaded (/storage/.config/system.d/service.nextpvr.service; enabled; preset: disabled)
    Active: active (running) since Sat 2024-02-03 09:21:10 GMT; 9min ago
      Docs: https://nextpvr.com
  Main PID: 1625 (dotnet)
      Tasks: 32 (limit: 4073)
    Memory: 199.4M (peak: 239.3M)
        CPU: 8.545s
    CGroup: /system.slice/service.nextpvr.service
            ├─1625 dotnet /storage/.kodi/addons/service.nextpvr/nextpvr-bin/NextPVRServer.dll
            ├─3411 /storage/.kodi/addons/service.nextpvr/nextpvr-bin/DeviceHost/x64/DeviceHostLinux -listen:35561 -typeBig GrinVB-T -device:adapter3/frontend0 -instance:1 -parent:1625
            ├─3418 /storage/.kodi/addons/service.nextpvr/nextpvr-bin/DeviceHost/x64/DeviceHostLinux -listen:38843 -typeBig GrinVB-T -device:adapter2/frontend0 -instance:1 -parent:1625
            ├─3422 /storage/.kodi/addons/service.nextpvr/nextpvr-bin/DeviceHost/x64/DeviceHostLinux -listen:44387 -typeBig GrinVB-T -device:adapter1/frontend0 -instance:1 -parent:1625
            └─3426 /storage/.kodi/addons/service.nextpvr/nextpvr-bin/DeviceHost/x64/DeviceHostLinux -listen:45407 -typeBig GrinVB-T -device:adapter0/frontend0 -instance:1 -parent:162

And then running:

Quote:pkill DeviceHostLinux 


Didn't seem to do anything, but I'm not a linux guy, so i'm not sure if I did all of that right?

I hope something in there helps as for me npvr is currently unusable because waking from sleep to record always fails due to this issue.

If I can run/test anything else please let me know, thanks
Maybe run the status command to confirm pkill is working. and those processes are removed

Remember again there is no Linux power management in NextPVR so you must do all scheduling in Kodi on that PC The recommendation has been to run the server 7/24
(2024-02-03, 02:25 PM)mvallevand Wrote: [ -> ]Maybe run the status command to confirm pkill is working. and those processes are removed

Sorry, what I meant was that running the command didn't do anything to enable npvr to play channels again. I tried it several times like so:

PC wakes
Run systemctl status service.nextpvr - shows no devices
Try to play a channel - fails
Run status again - now shows all 4 devices
Run pkill DeviceHostLinux
Run status again - shows no devices
Try to play a channel again - fails again.
Run status again - now shows all 4 devices again, and so it repeats

When it is in this state, if I then enable TVHeadend to try and play something, this will also fail consistently from now on.

The only way I can restore normal behaviour is to reboot.

Regarding power management:

Yes I do use the kodi options under pvr to set the power options, but regardless of that isn't this still an issue worth looking into? This setup has slept and awakened for years using just kodi power options and tvheadend so what is that combination doing differently? Incidentally I did see another thread with the same issue where they advised that tvheadend had an option to unload dvb modules before sleep etc, that seems like something, except that I've haven't actually enabled anything like that in my setup and it always just worked regardless.

I get that some people may have a seperate server that does allsorts and it makes sense to leave it on, but for those of us who just have a device in our front room used like a digital tv box and only used a few hours a night to watch and record, it seems like a waste? Sure I can just keep on using tvheadend, but it doesn't play mpeg2 576p channels in vaapi hardware without a lot of corruption (same issue on intel and amd as i've tried different setups through the years) but the same channels play in npvr in vaapi hw with no issues whatsoever and my cpu usage is a lot better, so it would be nice to get the sleep issue resolved, even if it means manually adding something to the scripts that kodi uses?

I do appreciate the help in trying to troubleshoot this with me, let me know if there's anything more I can test for you.

Thank you.
Send the zipped logs after the failure following the pkill NextPVR should be doing a clean SIGTERM so it shouldn't be blocking TvHeadend or NextPVR. Perhaps try pkill -signal SIGINT too to see if that works better to close things since that is what NextPVR sends
(2024-02-04, 09:02 AM)mvallevand Wrote: [ -> ]Send the zipped logs after the failure following the pkill NextPVR should be doing a clean SIGTERM so it shouldn't be blocking TvHeadend or NextPVR.

I went through the process agan and attached the npvr logs after the pkill DeviceHostLinux

(2024-02-04, 09:02 AM)mvallevand Wrote: [ -> ]Perhaps try  pkill -signal SIGINT too to see if that works better to close things since that is what NextPVR sends

I tried this but it didn't work, I did see an option to list signals so did that incase it helps:

Quote:pkill -signal SIGINT
pkill: invalid number 'ignal'

BusyBox v1.32.1 (2024-01-26 20:02:39 UTC) multi-call binary.

Usage: pkill [-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]

Send a signal to process(es) selected by regex PATTERN

        -l      List all signals
        -f      Match against entire command line
        -n      Signal the newest process only
        -o      Signal the oldest process only
        -v      Negate the match
        -x      Match whole name (not substring)
        -s      Match session ID (0 for current)
        -P      Match parent process ID

pkill -l
1) HUP
2) INT
3) QUIT
4) ILL
5) TRAP
6) ABRT
7) BUS
8) FPE
9) KILL
10) USR1
11) SEGV
12) USR2
13) PIPE
14) ALRM
15) TERM
16) STKFLT
17) CHLD
18) CONT
19) STOP
20) TSTP
21) TTIN
22) TTOU
23) URG
24) XCPU
25) XFSZ
26) VTALRM
27) PROF
28) WINCH
29) POLL
30) PWR
31) SYS
34) RTMIN
64) RTMAX

Thank you
Pages: 1 2 3 4 5