[mythtv-users] Two lingering issues with 0.20 and/or Ubuntu

Michael Tiller michael.tiller at gmail.com
Fri Nov 10 15:24:16 UTC 2006


Here is an update...

  If I remove all my "customizations", the backend starts up.  I followed
your advice Mario and added mythtv to the dialout group.  That got rid of
one problem.  However, when I removed the other two lines (to set the input
and channel), the backend started but *did not* set the correct video
source.  I don't understand why.  I reran mythtv-setup and I specified
"Tuner 1" on my PVR-150 and I specified that it should preset the tuner to
channel three and use an external channel changing command.  The external
channel changer is working fine so it "absorbed" that bit but it does not
seem to be getting the inputs setup right.

  So there are two mysteries here.  Why can't the backend get the PVR-150 in
the right mode itself and why does running the ivtv utilities cause the
startup script to bomb out?!?  I tried redirecting the output from the
commands to standard out.  It appears that the ivtvctl --set-input 0 fails
to run when run from a startup script?!?  Perhaps the same thing is keeping
ivtvctl and the mythbackend from setting this...but what could it be?  Do
you think I need to load a kernel module prior to this or something?!?!?!?!?

  Thanks for all the help so far.

--
Mike

On 11/9/06, Mario Limonciello <mario.mailing at gmail.com> wrote:
>
> Michael,
>
> I think I mis-interpreted your first post.  The backend will run from the
> init script if you run it by sudo like this right?:
>
> sudo /etc/init.d/mythtv-backend start
> >
>
> If so, then we need to investigate why it won't run from startup init
> scripts by default.  (You have a different startup problem then what i've
> noticed on the forums)
>
> For controlling /dev/ttyS0,
> add mythtv to the "dialout" group.  I will notate this to be added to the
> guide under serial control.  I'll also try to remember that feisty packages
> should do this by default.
>
> About ivtv control, myth is able to control the devices after these two
> commands, correct?  If so, then try adding to /etc/default/mythtv-backend
> some verbosity switches (probably video related switches) and starting the
> backend to see if it tells you when it tries to set the channel and input.
>
> Regards,
>
> Mario
>
>
> On 11/9/06, Michael Tiller <michael.tiller at gmail.com> wrote:
> >
> > Mario,
> >
> >   Thanks for the response.  I did not use mythtv as my first user.  In
> > fact, I used your guide <https://wiki.ubuntu.com/Install_IVTV_Edgy>(which I think is quite good) which is how I knew not to do this. :-)
> >
> >   Note that I have no trouble starting it manually (via sudo).  I have
> > added three lines which I've highlighted in red.  When I get home I'll try
> > taking them out and see if they make a difference but if the script is run
> > as root I can't see why it would make a difference.
> >
> >   I dont know what the lines:
> > # Default-Start:     24
> > # Default-Stop:      S
> > ...mean but I'm assuming they are fine as configured.
> >
> >   Note that everything in red is a hack so I'm working on trying to
> > eliminate the need for them.  I know that somehow udev is responsible for
> > the permissions on ttyS0 but I have yet to figure out how to specify a rule
> > so it gets the permissions right.  The other two things Myth should do for
> > me but does not seem to?!?
> >
> >   Thanks for any ideas.
> >
> > --
> > Mike
> >
> > #! /bin/sh
> > ### BEGIN INIT INFO
> > # Provides:          mythtv-backend
> > # Required-Start:    $local_fs
> > # Required-Stop:     $local_fs
> > # Default-Start:     24
> > # Default-Stop:      S
> > # Short-Description: Start/Stop the MythTV server.
> > ### END INIT INFO
> >
> > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> > DAEMON=/usr/bin/mythbackend
> > NAME="mythbackend"
> > DESC="MythTV server"
> >
> > # Add this to make sure we can
> > # change channels
> > chmod a+rw /dev/ttyS0
> >
> > test -x $DAEMON || exit 0
> >
> > set -e
> >
> > USER=mythtv
> > RUNDIR=/var/run/mythtv
> > ARGS="--daemon --logfile /var/log/mythtv/mythbackend.log --pidfile
> > $RUNDIR/$NAME
> > .pid"
> > EXTRA_ARGS=""
> > NICE=0
> >
> > if [ -f /etc/default/mythtv-backend ]; then
> >   . /etc/default/mythtv-backend
> > fi
> >
> > ARGS="$ARGS $EXTRA_ARGS"
> >
> > mkdir -p $RUNDIR
> > chown -R $USER $RUNDIR
> >
> >
> > case "$1" in
> >   start)
> >         if test -e $RUNDIR/$NAME.pid ; then
> >                 echo "mythbackend already running, use restart instead."
> >         else
> >                 echo -n "Starting $DESC: $NAME"
> >                 ivtvctl --set-input 0
> >                 ivtv-tune -c 3
> >                 start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
> >                         --chuid $USER --nicelevel $NICE --exec $DAEMON
> > -- $ARGS
> >                 echo "."
> >         fi
> >         ;;
> >
> >
> >
> >
> > On 11/9/06, Mario Limonciello < mario.mailing at gmail.com> wrote:
> > >
> > > Mike,
> > >
> > > Recently, I have seen a few posts similar that people can't get the
> > > backend to launch from myth init scripts in Ubuntu.  I'm trying to find
> > > something common between them but have yet to.  I personally have 2 ubuntu
> > > backends, and haven't come up with any problems with either init script.
> > >
> > > By some weird chance, when you did your ubuntu install - your "first"
> > > user - did you use mythtv?  Your not supposed to as this user is
> > > created when you install myth and is used for myth.  If that is what you
> > > did, then I've got some ideas what we can do.
> > >
> > > If this isn't what you did, then we need to walk through the init
> > > script and find where the trouble is.  What guide did you follow for
> > > installation?  Did you follow a guide?
> > >
> > > Regards,
> > >
> > > Mario
> > >
> > >  On 11/9/06, Michael Tiller <michael.tiller at gmail.com > wrote:
> > >
> > > > I've nearly got my new Ubuntu based MythTV 0.20 system into a robust
> > > > state.  I've just got two little things left that I'm having trouble with
> > > > and hopefully somebody here can point me to a solution.
> > > >
> > > > The first issue is that when I reboot, it does not start the
> > > > backend.  There is a script in /etc/init.d called "mythtv-backend" that was
> > > > installed when I installed MythTV from the repositories.  However, it does
> > > > not appear to get run?!?  If I remove /var/log/mythbackend.log and then
> > > > touch it and chown it to get it to a "0 size" state and then reboot it
> > > > remains empty.  Any idea what is going on there?  Is there anything I have
> > > > to do to (apart from putting the file in /etc/init.d) that I have to do to
> > > > get the system to invoke it (I know how this is done in FC but I'm fairly
> > > > new to Ubuntu, sorry).
> > > >
> > > > As a side note, is this script run as root?  I assume so.  I ask
> > > > because I need to do a few things as root inside this script to get the
> > > > system properly set up.
> > > >
> > > > Actually that leads to another question...I'm having to run ivtvctl
> > > > and ivtv-tune in /etc/init.d/mythtv-backend.  This is because even though I
> > > > have specified to use the tuner input and what the tuner channel should be
> > > > set to, the backend doesn't seem to apply these properly.  Any ideas on what
> > > > might be going on?
> > > >
> > > > The last issue is that, once I get the backend up and running, the
> > > > first time I go to "WatchTV" it just comes back to the menu after showing a
> > > > blank screen for a few seconds.  The second time I go to watch TV, it works
> > > > (and from then on).  Any ideas?  I suspect a similar thing might happen for
> > > > the first attempted recording (if nobody has watched TV) which could cause
> > > > me to miss recordings.
> > > >
> > > > Thanks for any pointers.
> > > >
> > > > --
> > > > Mike
> > > >
> > > >
> > > > _______________________________________________
> > > > mythtv-users mailing list
> > > > mythtv-users at mythtv.org
> > > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> > > >
> > > >
> > > >
> > >
> > > _______________________________________________
> > > mythtv-users mailing list
> > > mythtv-users at mythtv.org
> > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> > >
> > >
> > >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >
> >
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20061110/e113255c/attachment.htm 


More information about the mythtv-users mailing list