[mythtv-users] Seperate video out with PVR-350?

mythtv-users at jaredharvey.com mythtv-users at jaredharvey.com
Tue Jan 16 17:11:50 UTC 2007

Hello Dan and the list,

I'm  having  a bit of trouble getting this to work the way I expect it
to  work.  So  as  a confirmation, should I expect to run two separate
front  ends  at  the same time? I know the hardware can handle it, but
I'm  not certain that the separate vt's can handle it. Currently I can
switch  from  VGA X to composite X with the remote, but I can only use
one  X  at  a time. Also I'm having some trouble with black screens in
MythTV menu's.

For now I'll focus on getting the switching working correctly from VGA
to  composite  with  the  remote. Then I'll tweak the specifics later.
Right  now I need to know what the preferred method of starting irexec
is?  I  tried  the  below  in  inittab, but it seems like I'll need to
create  a  script to start it with rc files or something. Below is the
progression I made.

Currently  the  FC6  machine  boots  into  level 5 usr mythtv and auto
starts mythfrontend. I added to inittab the following lines.

# for MythTV-out remote
ir:345:respawn:/usr/bin/irexec /home/mythtv/.lircrc

To confirm the irexec is started

# ps -A | grep ir

shows 5355 ?        00:00:00 irexec

/home/mythtv/.lircrc includes

prog = irexec
button = Red
repeat = 3
config = start-script -composite

prog = irexec
button = Blue
repeat = 3
config = start-script

I did a ln -s /usr/bin/mythfrontend /usr/bin/mythfrontend-composite

so /usr/bin/ now contains the below.

-rwxr-xr-x 1 root root 3030764 Dec 29 19:45 mythfrontend
lrwxrwxrwx 1 root root      21 Jan 15 17:59 mythfrontend-composite -> /usr/bin/mythfrontend

/usr/local/bin/start-script contains


args='-layout NTSCLayout -dpi 100'

echo "start-script" > $debug

if [ "$1" != '-composite' ] ; then
# normal operation 

# start X if not already running
gotx=`ps h -C X | grep " $disp_short "`
echo "gotx is next" $args > $debug
echo ${gotx}X > $debug
if [ "${gotx}X" = 'X' ] ; then
   echo "no X so startx --" $disp_short $args "vt is" $vt > $debug
   echo -n 1 > /var/run/console/$user
   su -c -l - $user "startx -- $disp_short $args &"
   chvt $vt
   sleep 2
   echo "X is running so vt" $vt > /dev/pts/2
   # it's already running, so just switch the VT
   chvt $vt

echo "just switched X over" > $debug

## start mythfrontend, or make it the topmost app
#pid=`/sbin/pidof $prog`
#export DISPLAY=$disp
#export XAUTHORITY="/home/$user/.Xauthority"
#if [ "${pid}X" = 'X' ] ; then
#   echo "Starting frontend for $note TV"
#   su -c -l - $user "exec gnome-terminal -e '$prog' &"
#   # make it topmost
#   wmctrl -a $prog

# update the DB
#echo \
#"update settings set data='$guioffsetx' where value='GuiOffsetX';" \
#"update settings set data='$guiheight' where value='GuiHeight';" \
#"update settings set data='$guiwidth' where value='GuiWidth';" \
#"update settings set data='$painter' where value='ThemePainter';" \
#"update settings set data='$dev' where value='AudioOutputDevice';" \
#| mysql --password=mythtv -u mythtv mythconverg

I've  commented  out  the  DB changes and Myth because I was trying to
simplify it a bit. Then I'll tweak it fit later.

irw  produces "000000000000178b 00 Red Hauppauge_350" when I press the
red  button.  Also  when  in  VGA mode it allows me to switch to watch
videos  ect.  So  the  IR  stuff  should  be  working and it should be
launching the script.

When at a physical X terminal as root and not sshed in, I type

/usr/local/bin/start-script -composite

and it switches to composite. At a first glance, it appears to work as
expected,  but didn't launch from the red button. I believe this means
the additions to xorg.conf are in good order.

To  can  get  it  to  come  back  to  the  VGA (VGA went black appears
unresponsive) when I ssh in as root and run


Which  doesn't quite bring it back, but after an crtl+alt+F1 then back
to  F7,  it come back to life. I think that makes since, I believe the
chvt  is  messed up when I ssh to it, and wouldn't be a problem if the
remote was working.

So  I guess first things first, why doesn't it switch with the remote?
Is  there  a way to sniff and see that irexec is calling the script? I
just added some echo commands in the script but did not get output so,
I think the script is not being called at all. If I remove the inittab
stuff then start irexec my handy it seems to work. I sshed as root

irexec /home/mythtv/.mythtv/lircrc &

Now  I can switch with the red and blue buttons. But this doesn't work
automatically  on  boot.  I  need  to know how to enter it into either
inittab,  or how to write a script to add to init.d then I can turn it
on with the service commands.

On  a  separate  note that I believe is unrelated, but probably should
mention,  when in MythTV, at the mainmenu, it often come up black, but
the  menu is there and one can select items. When I switch to Live TV,
Watch videos, guide and a handful of other, it works fine. But many of
the  menus  come  up  as black. I think this is a separate issue. Same
problem  appears  with  the  composite.  I  think  it  may be a mythtv
specific  problem, not a PVR problem, but perhaps something is getting
confused by the multiple outputs.

Best regards and thanks in advance.

 mythtv-users at jaredharvey.com                        HAM KB1GTT

e-mail jared at jaredharvey.com
Web page http://jaredharvey.com

More information about the mythtv-users mailing list