[mythtv-users] PVR350 problems with Myth 0.25.2

Paul Onley onley at att.net
Mon Sep 24 00:33:53 UTC 2012


I am having issues with the PVR-500 (3 of them with identical symptoms 
actually) that include a distorted picture and the "Error opening jump 
program file buffer" problem. Could all of those in this thread please 
check to see if there is a coinciding entry in their syslog like
>
>>
>>         ivtv0: Encoder has died : ivtv_serialized_open
>>         ivtv0: Detected in ivtv_serialized_open that firmware had
>>         failed - Reloading
>>
>>
>>     Yes, I've got that in my syslog:
>>
>>     Sep 23 15:45:53 nslin01 kernel: [194952.355339] ivtv0: Encoder
>>     has died : ivtv_serialized_open
>>
>>     Sep 23 15:45:53 nslin01 kernel: [194952.355344] ivtv0: Detected
>>     in ivtv_serialized_open that firmware had failed - Reloading
>>
>>     Sep 23 15:45:54 nslin01 kernel: [194953.404361] ivtv0: Loaded
>>     v4l-cx2341x-enc.fw firmware (376836 bytes)
>>
>>     Sep 23 15:45:54 nslin01 kernel: [194953.470965] ivtv0: Loaded
>>     v4l-cx2341x-dec.fw firmware (262144 bytes)
>>
>>     Although it coincides with a quick mplayer test that I did which
>>     didn't show the picture distortion.
>>
>>     Regards,
>>
>>     Dave.
>>
>>
>>
>>     _______________________________________________ mythtv-users mailing listmythtv-users at mythtv.org  <mailto:mythtv-users at mythtv.org>  http://www.mythtv.org/mailman/listinfo/mythtv-users  
>
>     The last two lines indicate that the ivtv driver reloaded the
>     firmware successfully so ideally you should have had a good
>     picture. I have been watching the log file and  when I see the
>     Encoder has died message about half the time the recording will
>     have a corrupt picture. The ivtv driver claimed to have
>     successfully reloaded the firmware but the picture say otherwise.
>
>     I have written a script to kill the backend, remove and reload the
>     ivtv module and restart the backend whenever I see the Encoder has
>     died message and this results in good recordings (albeit with
>     about 30 seconds missing at the begining) 100% of the time. I have
>     3 pvr-500 cards and they all 'developed'  this problem when I
>     upgraded my backend box to Debian Wheezy and Myth 0.25. I suspect
>     the ivtv driver is the problem but do not know how to proceed from
>     here. I have posted this issue to the ivtv users list but there
>     has been no response. If everyone here in this thread is seeing
>     the same error then how about posting in my PVR-500 Problem thread
>     so that ivtv knows there is a reproducible problem and can maybe
>     help us track it down.
>
>     Paul
>
> Hi Paul,
>
> I'll check my syslog next time I get a problem picture and see if I 
> get that error at that time.
>
> Excuse my ignorance, but how do I get on the ivtv mailing list as I've 
> never had the need before?
>
> Also, could you post your script as that would be an acceptable short 
> term fix for me.
>
> Regards,
>
> Dave.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
First off you can find the ivtv list info at
http://ivtvdriver.org/mailman/listinfo/ivtv-users


As far as my script, it is rather heavy handed and should be considered 
a last resort. You could look at the thread that Mike referenced, I 
tried work arounds listed and they did not fix my problem but I found 
that manually removing and reloading the ivtv module always worked so I 
automated it. The script must be run as root, I call it from roots 
crontab every minute. It is also written for a debian system, depending 
on your distro you may have to change some of the commands like the one 
to restart the syslog daemon or the backend. Remember that all commands 
in a cron job need to have full paths so check that all the commands are 
in the same place on your system as mine are. Also remember that if you 
have more than one capture card and one is successfully recording when 
the second has a problem killing the backend kills BOTH recordings. When 
the backend restarts it will restart the killed recording but there will 
be about a 30 gap missing between them.

Remember, if this fixes your problem the PLEASE let the ivtv list know 
that this is a reproducible problem that needs attention.

Paul

##########################################################
#!/bin/bash
#This script will automate the reloading of the ivtv modules. It is 
rather heavy handed but due to
#issues with firmware failures in the ivtv module causing recording 
issues on my PVR-500 it was
#my last resort to prevent failed recordings. Note that this script must 
be run as root in order to
#be able to reload the ivtv module. As such it has full root privilege 
and should be used very
#carefully. While it works as intended on my debian system I cannot 
guarantee it will work as
#intended on your system. Please check all commands before using.



#Cron jobs start on the minute and so do myth recordings so wait 15 seconds
#for the problem to occur and be logged
sleep 15

#If we find an indication in the syslog that the ivtv driver has failed
if  grep "Encoder has died : ivtv_serialized_open" /var/log/syslog ;  then

         #Kill both frontend and backend so that we can unload the ivtv 
module

         pkill mythfrontend
         pkill mythbackend

    #The ivtv module will not unload until the frontend and backend are 
stopped so
     #rather than sleep for some arbitrary ammount of time lets just try 
to unload
     #repeatedly until we succeed

         while ! /sbin/modprobe -vr ivtv ; do

         #Wait for a second

                 sleep 1
                 i=$(($i+1))

         #See if we have tried more than 15 times indicating there is a 
real problem

                 if [ $i -gt 15 ];then

          #In which case return an exit value of 1

                         exit 1
                 fi
     #Otherwise try again

         done

     #Relax for a second

         sleep 1

     #And reload the ivtv module the debug level is so that when someone 
tells
     #me what to look for my logs should have everything


         /sbin/modprobe -v ivtv debug=127


     #We are moving the logfile to another file so that we can corelate 
the failures with
     #Logs. the new file name is syslog.restart.n so check to see if n 
exists

         i=0
         while [ -e /var/log/syslog.restart.$i ];do

         #and if so iterate until we find a good name

                 i=$(($i+1))
         done

     #Save the syslog file

         mv /var/log/syslog /var/log/syslog.restart.$i

     #start a blank syslog

         touch /var/log/syslog

     #restart the syslog daemon

         /etc/init.d/rsyslog restart

         sleep 5

     #Restart the backend

         /etc/init.d/mythtv-backend restart

fi


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120923/57486d78/attachment.html>


More information about the mythtv-users mailing list