Difference between revisions of "Installing MythTV on Fedora VGA&composite"

From MythTV Official Wiki
Jump to: navigation, search
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center><div style="text-align: center; margin: 0 10% 1em 10%;">
+
{{Ready_for_deletion}}
{| class="notice noprint" style="background: #69C; border: 1px solid #aaa; padding: 0.1em; margin: 0.5em auto;"
 
|-
 
| style="padding: 0.1em" | '''This page is incomplete!'''<br><div style="font-size: 90%;">The text of this page is still being filled-in.</div>
 
|}
 
</div></center>
 
 
 
This "How-To" guide is for instruction on getting both VGA and composite working on a MythTV box on Fedora Core 6.
 
 
 
==Introduction==
 
This guide is based after installing with '''Jarod Wilson's''' how to guide which you can find [http://www.wilsonet.com/mythtv here].
 
 
 
I stopped with Jarod's install instructions at the rebuilding of the ram-disk. If you have gotten that far, you should have a box that once worked with VGA and currently works with the composite out. This document covers how to get both to work and how to get the PVR-350 remote to switch between the two.
 
 
 
==How to VGA and Composite with a PVR-350 on FC6==
 
- Create a second user account to run X with. In my case, I'm using "mythtv" and "mythtv-composite". You could the system config tool to set up the users
 
 
 
'''#''' system-config-users
 
 
 
- Create a symbolic link to your mythfrontend binary, in the same directory, called mythfrontend-composite. This unique name allows the script to know if both copies are running.
 
 
 
'''#''' ln -s /usr/bin/mythfrontend /usr/bin/mythfrontend-composite
 
 
 
- Make changes to X. Fist backup your current xorg.conf
 
 
 
'''#''' cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orginal
 
 
 
Then create a separate "ServerLayout" section in your Xorg.conf file, for the PVR card. Its name is referenced in the video select script. Below is an example that uses "NTSCLayout" for the layout identifier.
 
 
 
from my /etc/X11/xorg.conf I have this addition
 
 
 
'''#''' Added for TV out options with MythTV by Jared
 
 
 
<code>Section "ServerLayout"
 
        Identifier    "NTSCLayout"
 
        Screen      1  "ScreenNTSC" 0 0
 
        InputDevice    "Keyboard0" "CoreKeyboard"
 
EndSection
 
 
 
</code>
 
Section "Files"
 
 
 
'''#''' RgbPath is the location of the RGB database.  Note, this is the name of the
 
'''#''' file minus the extension (like ".txt" or ".db").  There is normally
 
'''#''' no need to change the default.
 
'''#''' Multiple FontPath entries are allowed (they are concatenated together)
 
'''#''' By default, Red Hat 6.0 and later now use a font server independent of
 
'''#''' the X server to render fonts.
 
        RgbPath      "/usr/X11R6/lib/X11/rgb"
 
        FontPath    "unix/:7100"
 
EndSection
 
 
 
Section "Module"
 
        Load  "dbe"
 
        Load  "extmod"
 
        Load  "fbdevhw"
 
        Load  "glx"
 
        Load  "record"
 
        Load  "freetype"
 
        Load  "type1"
 
EndSection
 
 
 
Section "Monitor"
 
        Identifier  "NTSC Monitor"
 
        HorizSync  30-68
 
        VertRefresh 50-120
 
        Mode "720x480"
 
          # D: 34.563 MHz, H: 37.244 kHz, V: 73.897 Hz
 
          DotClock 34.564
 
          HTimings 720 752 840 928
 
          VTimings 480 484 488 504
 
          Flags    "-HSync" "-VSync"
 
        EndMode
 
EndSection
 
 
 
Section "Device"
 
        Identifier  "Hauppauge PVR 350 iTVC15 Framebuffer"
 
        Driver      "ivtvdev"
 
 
 
        '''###''' change fb1 to whatever your card grabbed
 
        Option      "fbdev" "/dev/fb0"
 
  Option      "ivtv" "/dev/fb0"
 
 
 
        '''###''' change the BusID to whatever is reported by lspci,
 
  '''###''' converted from hex to decimal
 
        BusID "PCI:2:0:0" # lspci says 02:00.0
 
  '''###''' More examples
 
  '''#'''BusID "PCI:0:10:0" # lspci says 00:0a.0
 
  '''#'''BusID "PCI:1:14:0" # lspci says 01:0e.0
 
  '''#'''BusID "PCI:0:5:1" # lspci says 00:05.1
 
EndSection
 
 
 
Section "Screen"
 
        Identifier  "ScreenNTSC"
 
        Device      "Hauppauge PVR 350 iTVC15 Framebuffer"
 
        Monitor    "NTSC Monitor"
 
        DefaultDepth 24
 
        DefaultFbbpp 32
 
        Subsection "Display"
 
          Depth 24
 
          FbBpp 32
 
          Modes "720x480"
 
        EndSubsection
 
EndSection
 
 
 
Section "DRI"
 
        Group        0
 
        Mode        0666
 
EndSection
 
 
 
Once you have appended this look it over and make sure there aren't conflict's or missing sections. Specifically look closely at keyboard and mouse configs. The rest should be unique enough to avoid problems. Also be careful with items like system-config-display, it will often blows away your modified file.
 
 
 
- Download and install wmctrl
 
 
 
'''#''' yum -y install wmctrl
 
 
 
- setup the video select script by creating /usr/local/bin/start-script and modifing it to your needs. Here is my current script.
 
 
 
'''#'''!/bin/sh
 
 
 
vt=8
 
prog=mythfrontend-composite
 
disp=':1.0'
 
disp_short=':1'
 
user=mythtv-composite
 
note=upstairs
 
dev=/dev/dsp
 
args='-layout NTSCLayout -dpi 100'
 
vscan='0'
 
hscan='0'
 
yscan='0'
 
guioffsetx='34'
 
guiheight='464'
 
guiwidth='658'
 
painter='qt'
 
debug='/dev/pts/1'
 
 
 
echo "start-script" > $debug
 
 
 
if [ "$1" != '-composite' ] ; then
 
'''#''' normal operation
 
  vt=7
 
  prog=mythfrontend
 
  disp=':0.0'
 
  disp_short=':0'
 
  user=mythtv
 
  note=downstairs
 
  dev=ALSA:default
 
  args=''
 
  vscan='3'
 
  hscan='6'
 
  yscan='13'
 
  guioffsetx='0'
 
  guiheight='0'
 
  guiwidth='0'
 
  painter='qt'
 
fi
 
 
 
'''#''' 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
 
else
 
  echo "X is running so vt" $vt > /dev/pts/2
 
  # it's already running, so just switch the VT
 
  chvt $vt
 
fi
 
 
 
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' &"
 
'''#'''else
 
'''#'''  # make it topmost
 
'''#'''  wmctrl -a $prog
 
'''#'''fi
 
 
 
'''#''' 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 Myth stuff for now. Once you get X switching correctly, then you can add the Myth sections.
 
when you are working on the Myth stuff, modify the script to make any additional DB changes.
 
 
 
- Get irexec working and automatic, by editing /etc/rc.d/rc.local. I added this line to the bottom
 
 
 
/usr/bin/irexec /home/mythtv/.mythtv/lircrc &
 
 
 
Now it's probably best to reboot to make sure it will start correctly. To confirm the irexec is started do the following command.
 
 
 
'''#''' ps -A | grep irexec
 
 
 
==Troubleshooting==
 
 
 
To be determined
 
 
 
==Credits==
 
The original install of FC6 was from Jarod Wilson
 
The original video select script came from Dan Wilga
 
 
 
[[Category:HOWTO]]
 

Latest revision as of 23:01, 9 December 2014

Trash.png Ready for Deletion: All links to it have been either transferred or moved.