[pvrusb2] recent problem: getting frontend status failed

A. F. Cano afc at shibaya.lonestar.org
Thu Jun 26 14:22:30 CDT 2014


On Thu, Jun 26, 2014 at 09:13:54AM -0800, Roger wrote:
> >So, to summarize: it appears that running myth causes the driver or the OnAir
> >Creator to go into a not-quite working state after a while.  Then, the
> >/dev/video0 device is not accessible until a re-init (unplug/replug).  When
> >in this state, if myth does some (sequence of?) operations, the I/O error
> >previously reported happens.  This is also solved by an unplug/replug.
> >
> >Does anyone have other tests I could perform?  Any ideas as to what is
> >happening?
> >
> >Thanks.
> >
> >Augustine
> 
> I think MythTV runs a background process called mythbackend as root, started 
> via sysv, openrc, etc...

Yes, I know that.  I run mythbackend from a konsole, then run
mythfronend from another tab.  That way I have easy access to the status
messages output to standard output.

> Since this process is being run as root, mythbackend has priority over the 

Actually, I run mythbackend as myself (regular user - not root) and it
works fine.

> device and usually tends to hold the /dev files within an open state.  (ie.  
> /dev/dvb devices are usually also held open or polled for obtaining EIT 
> information.  There's an option to toggle this option on and off.  
> http://www.mythtv.org/wiki/EIT)

Yes, I run EIT as that is the only way I have of obtaining program info.
To see what EIT is doing, I do this:

mythbackend --setverbose eit

after mythbackend is started.  I notice that the EIT messages stop at
some point.  Sometimes, going to "watch live tv" does something and the
EIT messages start again, but just as often I get the I/O errors and I
need to go through the whole process of stopping the frontend, stopping
the backend (kill pid) and uplugging and re-plugging the tuner.  The
latter is the only thing that fixes the problem.

> If I'm not mistaken, it's usually best to assumed once mythbackend has started, 
> any device files given within the configuration will be held open.  (With the 
> exception of disabling the EIT for /dev/dvb devices?)

Yes.  I assumed that much.  The results of the latest tests seem to
indicate that either the pvrusb2 driver or the device itself (OnAir
Creator hybrid usb tuner) is left in an incorrect state that requires
a re-init (unplug/replug of the usb cable).  The latest tests described
were all done after mythbacked was stopped.

> I used MythTV briefly five to ten years ago, but got tired of the constant 
> problems with bugs, bloat and breaking upgrades.  As such, I'm a minimalistic 
> person these days, using less code usually means better stability.  It's a 
> balancing act, which usually means creating Bash scripts for wrapping around 
> simple tools such as 'cat' or 'dd', etc.  I've never needed all the features of 
> such a larger utility such as MythTV, and prefer to just to record the raw 
> streams avoiding remixing.

Yes.  I agree in principle.  That's why I was trying to run tests with
other software after stopping mythbackend.

> Using two programs at once on one device does tend to cause access problems.  
> Handling sound or audio is a very good example, as only one sound can be played 
> at one time with any audio device.  Playing more than one sound file at once is 
> accomplished by the operating system having a software layer remixing the audio 
> streams so that all audio files passing through this layer can be heard playing 
> all at once using one audio device.  (ie.  ALSA DMix, PulseAudio, and Windows 

Yes.  It appears that the default in Debian these days is PulseAudio,
and I've experienced it working (mixing 2 audio streams) when I ran two
applications that had sound output.

> KMixer/WASAPI)  One of the pros for having direct access to the /dev device, 
> there's usually a significant redundancy for delays and the stream can be 
> captured within it's original detail without any loss.  (ie.  Audio Stream 
> Input/Output Wikipedia)

Yes, I agree, but that is not the problem here.  Even after stopping
mythbackend, the driver (or the firmware in the device) prevents reopening
the device until a re-init (unplug/replug) happens.

> I've never heard of a software layer for holding open or mixing more than one 
> video device or video stream at one time, although Mike may have as he's been 
> coding the video driver.

Luckily that's not what I was attempting to do.  I stopped mythbackend and
then had to re-init the usb driver by unplug-replug before vlc would
work.

The test of zoneminder was also done after stopping mythbackend.  I would
like eventually to be able to have access to the analog camera from
mythzoneminder, but first regular zoneminder needs to work.  The error
returned by zoneminder was about the streaming capability, after the
re-init of the device.

> Hope this helps.

Thanks for taking the time to reply.

Augustine



More information about the pvrusb2 mailing list