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 2 3 4 5 … 26 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: 45,396
Threads: 868
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: 45,396
Threads: 868
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: 102,457
Threads: 743
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,059
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: 45,396
Threads: 868
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
  Request for supporting Ceton devices on Linux dapharsyde 280 17,644 8 hours ago
Last Post: run088
  New linux setup extras help greatwhitenorth 8 372 2023-01-26, 07:11 PM
Last Post: mvallevand
  Moving NextPVR to new system (linux) cyber 17 450 2023-01-15, 04:04 PM
Last Post: cyber
  EPG Data Location in Linux kevin-pvr 3 162 2022-12-18, 08:26 PM
Last Post: mvallevand
  EPG not updating after linux installation mark31 2 198 2022-11-09, 04:08 AM
Last Post: mark31
  Linux IR blaster solutions? greatwhitenorth 2 170 2022-11-06, 04:10 PM
Last Post: dlfergrd
  Channel count different between Linux and Windows chrisbtx 1 153 2022-10-04, 05:31 PM
Last Post: mvallevand
  (solved) Arch/Arm64 DVB/ATSC EPG not available donutschool 1 201 2022-09-24, 02:12 PM
Last Post: mvallevand
  Arch linux core dump CDinger 11 914 2022-09-14, 09:31 PM
Last Post: jwh7
  Error installing NextPVR on Linux Mint 21 ag100pct 9 503 2022-08-17, 02:01 AM
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