NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
« Previous 1 … 3 4 5 6 7 … 34 Next »
Wake after Suspend issue with dvbt devices (LE12 Kodi 21)

 
  • 0 Vote(s) - 0 Average
Wake after Suspend issue with dvbt devices (LE12 Kodi 21)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#11
2024-02-05, 08:25 AM (This post was last modified: 2024-02-05, 11:00 AM by mvallevand.)
Just try 2 then -INT
ShadowMask
Offline

Member

Posts: 58
Threads: 3
Joined: Apr 2019
#12
2024-02-05, 11:50 AM
(2024-02-05, 08:25 AM)mvallevand Wrote: Just try 2 then -INT

Ok,
I've done the same test:

Started up
Played a channel - ok
suspend system
played a channel - fail
ran pkill - DeviceHostLinux
played a channel - fail
ran pkill -l (wasn't sure if INT is always 2)
ran pkill -s 2 
played a channel - fail

logs attached, thank you


Attached Files
.zip   logs-20240205-1143.zip (Size: 106.23 KB / Downloads: 2)
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#13
2024-02-05, 12:14 PM
It looks like BusyBox wants pkill -INT I don't see the sessions ending without restarting the service. You do need to wait after resume for the device to reinitiate. Dmesg will tell you how long
ShadowMask
Offline

Member

Posts: 58
Threads: 3
Joined: Apr 2019
#14
2024-02-07, 07:00 AM
(2024-02-05, 12:14 PM)mvallevand Wrote: It looks like BusyBox wants pkill -INT I don't see the sessions ending without restarting the service.  You do need to wait after resume for the device to reinitiate.  Dmesg will tell you how long

I tried 
pkill -INT 
and 
pkill -x INT

Just to test, still no luck playing any channel after the system is suspended.

I've also tried waiting 10 seconds + after wake before trying playback or running any commands, but still get the same results.

Also tried VDR in LE to compare with TVH and NPVR and that works pretty much the same as TVH - I think both services were written by the LE team? They have interesting similarities, at least on my system:
  • TVH & VDR both suspend and wake without issue
  • TVH & VDR both have corruption in VAAPI MPEG2 on certain channels - particularly E4 and ITV2 in the UK. These channels play fine with VAAPI MPEG2 disabled
  • TVH & VDR both change channel fast and never have the buffer ring
  • NPVR does not work after suspend at all for me
  • NPVR has no issue playing VAAPI MPEG2 on any channel
  • NPVR always has the buffer running briefly when switching channels in live, particularly if switching between SD/HD and vice versa. You can eliminate this by using timeshift mode, but then it's a lot slower to change channels

I think it's interesting that both TVH & VDR have exactly the same VAAPI issues, it seems like they're both doing something similar in the way they interact with kodi player and suspend the system, but it's beyond me to know what.

Apologies, I know I type too much, but I'm ASD so these things eat away at me and I start to look for reasons and solutions.

Thank you for all of your help.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#15
2024-02-07, 08:23 AM
Try systemctl restart in the LE power on script as I said there is no Linux power management built in. This should be like a startup

The buffer continues but will immediately stop when the client reconnects or after 15 seconds Keeping tuners primed can be faster or slower depending on tuners.

Custom streaming is faster for TvHeadend and VDR buty http is more versatile
ShadowMask
Offline

Member

Posts: 58
Threads: 3
Joined: Apr 2019
#16
2024-02-07, 10:58 AM (This post was last modified: 2024-02-07, 12:29 PM by ShadowMask.)
(2024-02-07, 08:23 AM)mvallevand Wrote: Try systemctl restart in the LE power on script as I said there is no Linux power management built in.  This should be like a startup

I realised I didn't have "keep tuners primed" selected, so I ticked that but it's still the same.

I'm not sure what you mean by LE power on script, is that autostart.sh? I didn't think that ran after suspend, but I'm not sure?

Anyway, to test I did a suspend, woke, failed to play a channel then tried the following:

systemctl restart service.nextpvr
That didn't work but I assume this would only be like disabling/enabling the service from within kodi anyway?

So I tried:
systemctl restart kodi
And that didn't do anything either, to me its like the tuners just aren't working correctly after the suspend, but they do work if I suspend before playing or recording anything with nextpvr, or suspend when using TVH or VDR, so I'm at a loss as to how I can recover them at the moment.

Thank you for explaining the differences in how npvr works compared to VDR and TVH, that makes things a lot clearer to me. I do prefer npvr for the playback quality and the working MPEG2 VAAPI as a lot of my TV is still only SD.

*EDIT*

After trying several things, I have found a way to get nextpvr working with suspend:

what doesn't work:
Start system
Play a channel - ok
suspend
wake
Play a channel - fails

Also doesn't work:
Start system
Play a channel - ok
suspend
wake
Disable nextpvr service in myaddons
enable nextpvr service in myaddons
wait
Play a channel - fails

what does work:
Start system
Play a channel - ok
Disable nextpvr service in myaddons
suspend
wake
enable nextpvr service in myaddons
Play a channel - ok
repeat

Note: The above also works after a failed playback, as long as I disable npvr service before shutdown and enable afer wake the system recovers
Note2: I tried doing the same thing with the npvr client, but that doesn't work, it only works again if the server is diabled before suspend and enabled after wake, the cliet then reconnects and everything works

It looks to me like it's a timing issue: If LE suspends too close to npvr finishing playback or recording and presumably not releasing the tuners then I get this broken tuners issue when the system wakes?

I'm not sure how I could get npvr to shutdown prior to suspend and awaken after using scripts in LE, but I'm pretty sure I can write a python service to do this in kodi, do you have any suggestions on a better way of doing this?

Thanks

*EDIT2*

I have got this working now by writing a kodi python service that disables nextpvr when System.OnSleep and enables it when System.OnWake.

I'll test over a period of time and check that it can now wake and record reliably

Thank you
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#17
2024-02-07, 11:40 AM
So basically it sounds like NextPVR can't release the tuners correctly after resume. In this thread you can try the restart in pre before sleep https://forum.libreelec.tv/thread/26904-...t-at-wake/ and see if that helps.

Martin
ShadowMask
Offline

Member

Posts: 58
Threads: 3
Joined: Apr 2019
#18
2024-02-07, 12:31 PM
(2024-02-07, 11:40 AM)mvallevand Wrote: So basically it sounds like NextPVR can't release the tuners correctly after resume.  In this thread you can try the restart in pre before sleep https://forum.libreelec.tv/thread/26904-...t-at-wake/ and see if that helps. 

Martin

Ah nice, thanks Martin.

I have solved it now with a kodi service addon, but I'll look into that as well and see which works better.

Thank you
satforall
Offline

Member

Ireland
Posts: 149
Threads: 3
Joined: Aug 2022
#19
2024-02-07, 12:38 PM
I notice you are using Ubuntu 22.04. Is that the LTS HWE version. The reason I ask is that a major kernel 6.5 upgrade was dropped on that version quite recently which appears to be affecting certain hardware and its ability to function correctly.

I’m having a similar problem with an Hauppauge WinTV Nova HD S2 PCI internal tuner. Problem seemed to start after the kernel upgrade. Both Kaffeine and TVHeadend are functioning correctly but not NPVR.

Is your tuner an internal PCI/e one or a USB one. Sub you might want to have a closer look at the possibility this 6.5 kernel upgrade has broken something.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,124
Threads: 957
Joined: May 2006
#20
2024-02-07, 12:54 PM
This thread is about LE and a lot of the power management scripts require root. A new thread would be better

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Guide data issue using NextPVR in a Proxmox LXC njc 10 1,295 2025-03-23, 01:40 PM
Last Post: njc
  Kodi Addon not connecting on server if vpn on sgar75 1 390 2025-01-27, 12:44 PM
Last Post: mvallevand
  Recording Plyback Timeline Issue JeffH 11 877 2025-01-17, 03:20 PM
Last Post: mvallevand
  Not Waking From Suspend dumfy 6 1,537 2024-12-04, 06:56 AM
Last Post: Evo_Evz
  Wake on suspend for recording flyingsubs 15 4,813 2024-12-03, 01:07 PM
Last Post: mvallevand
  Pi5 / Firefox 128.0 - ctrl key in devices screen does not work TheRealRoland 4 792 2024-08-02, 07:26 PM
Last Post: TheRealRoland
  "Unexpected error scanning for other devices" BlackJack 2 829 2023-07-15, 03:03 PM
Last Post: BlackJack
  Request for supporting Ceton devices on Linux dapharsyde 280 43,531 2023-04-02, 12:34 AM
Last Post: run088
  Yay! DST issue :-( TheRealRoland 3 824 2023-03-12, 04:45 PM
Last Post: mvallevand
  Recent streaming issue with Matt Huisman Aus TV streams ballfam 74 12,132 2023-03-08, 10:35 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode