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 … 8 9 10 11 12 … 34 Next »
Linux dvb/atsc devices not shutting down cleanly

 
  • 0 Vote(s) - 0 Average
Linux dvb/atsc devices not shutting down cleanly
Gazavant
Offline

Junior Member

United States
Posts: 10
Threads: 3
Joined: Jul 2020
#1
2020-08-20, 07:10 PM
I'm using NPVR v5.0.7.200726 on an Intel NUC running Linux Mint 19.3 and using a Win-TV DualHD atsc usb tuner.  It works well, but if the machine sleeps, live tv or recording no longer work after wake.  If I click Rescan on the web interface Device settings page, the status of all the tuners changes to Unavailable.  Only a reboot will restore tuner availability.


This problem seems to be related to the tuners not shutting down completely or properly after use.  If I don't let the computer sleep, recording and live tv work fine all the time.  I also discovered that TVHeadend worked properly after sleep using the same hardware and OS, so I don't think the tuner or drivers are a factor.

The release notes for NPVR v5.0.7.200726 referred to the removal OnSleep/OnResume logic that was affecting many users.  I was hoping this change would correct my Linux sleep issue, but it did not.

In a Linux forum post from January, 2020, it was mentioned that there was a known issue with Linux dvb/atsc devices not shutting down cleanly.  Has that issue been resolved, and if not, could it be the cause of my problem?


Any information regarding this matter is greatly appreciated.

Cheers
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#2
2020-08-20, 07:17 PM
NextPVR doesn't support any power management on linux it is left to the user. Out of curiosity if you don't use a device and wake from sleep is the device available?

Martin
Gazavant
Offline

Junior Member

United States
Posts: 10
Threads: 3
Joined: Jul 2020
#3
2020-08-20, 09:47 PM
Thanks for your response, Martin.

I was aware that NPVR doesn't provide or support any power management functions in Linux, but it seems like it should still be possible to access devices after a wake from sleep. When NPVR is done recording, the tuner activity light does turn off, which would suggest that at least some level of device release has been attained. And if no sleep periods occur, the tuner will become active again when called upon. But it appears that a sleep cycle destabilizes some part of the tuner, but only with NPVR -- not with TVHeadend.

I've used a number of methods to manage sleep/wake, e.g., Kodi, shell scripts I've written or found, and manually putting the box to sleep with the power switch, remote, or OS. All methods cause subsequent tuner use to fail.

In response to your question, if I don't access a device, then suspend the computer, and finally wake it, the device functions normally and continues to do so until the next suspend. That would suggest the sleep state itself is not disrupting the device, but rather the combination of NPVR device usage followed by sleep.

I should also add that, in addition to the DualHD tuner, I've also tried a WinTV HVR-955Q, HVR-950Q, and HVR-850. All achieved the same result.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#4
2020-08-20, 10:20 PM (This post was last modified: 2020-08-20, 11:25 PM by mvallevand.)
I wanted the confirmation that if you didn't access the device that things was be ok. I know that sub hooks the DeviceHostLinux process to NextPVRServer (which I would prefer he didn't do) and I suspect that might be part of problem.

It might be worth it if you set up a test after a resume that had tuners failing and tried

sudo kill -9 `pidof DeviceHostLinux`

To see if that gives access to the tuners.

Martin
Gazavant
Offline

Junior Member

United States
Posts: 10
Threads: 3
Joined: Jul 2020
#5
2020-08-21, 12:04 AM
Thanks for that great test suggestion, Martin.

I'll give it a try ASAP and let you know the results.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2020-08-21, 02:05 AM
(2020-08-20, 10:20 PM)mvallevand Wrote: It might be worth it if you set up a test after a resume that had tuners failing and tried

sudo kill -9 `pidof DeviceHostLinux`
Yeah, that's what I'd suggest checking.
Gazavant
Offline

Junior Member

United States
Posts: 10
Threads: 3
Joined: Jul 2020
#7
2020-08-21, 04:33 PM
I tried the suggested command several times in different situations and always got the following result:

kill: failed to parse argument: 'pidof DeviceHostLinux'

To further deepen the mystery, I discovered that if you try to play a live show after wake from sleep, if you leave the player in a play state for about one minute and 45 seconds, it will start playing the live stream and the usual live.ts file will appear in the temp folder. If you click player stop before 1:45, no live.ts file is created, but a 4k .fuse_hidden file is created instead.

In one test, I waited over three minutes, but no live stream appeared. However, after clicking stop, there was now a 47k .fuse_hidden file in the temp folder. Dropping that file into VLC played three minutes of the program I was trying to test (though the audio seemed slightly out of sync). The 4k files in VLC did nothing.

Very strange.
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#8
2020-08-21, 04:45 PM
(2020-08-21, 04:33 PM)Gazavant Wrote: I tried the suggested command several times in different situations and always got the following result:

    kill: failed to parse argument: 'pidof DeviceHostLinux'

"pid" is a number ... https://www.linux.com/training-tutorials...mand-line/
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#9
2020-08-21, 04:49 PM (This post was last modified: 2020-08-21, 04:52 PM by mvallevand.)
Those are quote marks they are back ticks `` I was expecting you to copy and paste from my message.

Martin
Gazavant
Offline

Junior Member

United States
Posts: 10
Threads: 3
Joined: Jul 2020
#10
2020-08-21, 07:51 PM
Sorry about that, Martin. I've been burned so many times by curly quotes and back quotes in pasted code, I automatically replace everything with straight quotes.

I tried the proper command before attempting to view a live stream (no error message this time), but it was not effective. But I did discover though that if I launch the web player to view a live program, then run the command, the tuner lights up and the stream starts playing. You need to run it every time a new stream is started. This leads me to think I might be able to automate running the command when a recording starts and thus solve my issue. I'll let you know how that goes.

Graham, thanks for the link for Linux processes. I found the top command to be very helpful with giving me some visibility as to what was going on under the hood.

And of course, my thanks to Martin and Sub for all their patience and help.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Linux Command Line To Initiate SchedulesDirect EPG Update LinuxDVR 1 157 2025-04-13, 06:35 PM
Last Post: mvallevand
  Linux install failed -- permission denied? FrogFan 4 398 2025-03-26, 12:39 AM
Last Post: FrogFan
  Is there a 'recommended' version/release of Linux? Bobthegoldfish 1 356 2024-12-24, 12:28 AM
Last Post: mvallevand
  Downgrade on Linux eriberg 3 422 2024-09-04, 08:46 PM
Last Post: mvallevand
  Pi5 / Firefox 128.0 - ctrl key in devices screen does not work TheRealRoland 4 597 2024-08-02, 07:26 PM
Last Post: TheRealRoland
  linux mint 22 bccicone 2 510 2024-08-01, 10:10 PM
Last Post: bccicone
  Client Recommendations on Linux devarionarias 6 1,520 2024-06-18, 04:31 PM
Last Post: devarionarias
  Linux setup - Help a Windows user... prothed 18 2,344 2024-06-03, 11:08 AM
Last Post: Rod Hutchinson
  Install NexPVR backend in Buildroot based Linux Tnix 3 962 2024-03-14, 11:50 AM
Last Post: mvallevand
  Wake after Suspend issue with dvbt devices (LE12 Kodi 21) ShadowMask 41 4,397 2024-02-09, 07:11 AM
Last Post: ShadowMask

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

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

Linear Mode
Threaded Mode