Difference between revisions of "User:Lwoggardner"

From MythTV Official Wiki
Jump to: navigation, search
(Useful config info)
(Updated xorg etc for new LCD television)
Line 52: Line 52:
  
 
== Useful config info ==
 
== Useful config info ==
xorg.conf for PE8700 and TV-Out
+
xorg.conf for PE8700, Samsung LCD
  
ExactModeTimingsDVI is important for the projector.
+
Option ExactModeTimingsDVI is important for the projector.
 
This is the main detail, the driver autodetects the connected display and will use the Projector (DFP) in preference to TV-Out.
 
This is the main detail, the driver autodetects the connected display and will use the Projector (DFP) in preference to TV-Out.
 +
 +
Option "UseEDIDDpi" "false" is important for the Samsung television otherwise you get really small fonts!
 +
 +
There are two layouts, the default uses outputs via VGA to a Samsung LCD television, the second uses DVI to the PE8700 projector.
 +
 
<pre>
 
<pre>
 +
Section "ServerLayout"
 +
    Identifier    "Main" # PC VGA output to Samsung LCD television
 +
    Screen        0 "LCD[0]" 0 0
 +
    InputDevice    "Generic Keyboard"
 +
    InputDevice    "Configured Mouse"
 +
    Option        "Xinerama" "off"
 +
EndSection
 +
 +
Section "ServerLayout"
 +
    Identifier    "Projector"
 +
    Screen        0 "Projector[0]" 0 0
 +
    InputDevice    "Generic Keyboard"
 +
    InputDevice    "Configured Mouse"
 +
    Option        "Xinerama" "off"
 +
EndSection
 +
 +
# .... skipped Files, Modules, InputDevice ....
 +
 
Section "Device"
 
Section "Device"
 
     Identifier    "FX5200[0]"
 
     Identifier    "FX5200[0]"
Line 62: Line 85:
 
     BusID          "PCI:1:0:0"
 
     BusID          "PCI:1:0:0"
 
     Screen        0
 
     Screen        0
    #Not sure of the effect of this
 
 
     Option        "NvAGP" "3"
 
     Option        "NvAGP" "3"
 
EndSection
 
EndSection
  
 
Section "Screen"
 
Section "Screen"
     Identifier    "Screen[0]"
+
     Identifier    "LCD[0]"
 
     Device        "FX5200[0]"
 
     Device        "FX5200[0]"
     Monitor        "Either"
+
     Monitor        "AnyMonitor"
 
     DefaultDepth    24
 
     DefaultDepth    24
 +
    Option        "UseEDIDDpi" "FALSE" #Computed DPI values not so good for TV display
 +
    Option        "UseDisplayDevice" "CRT" # VGA out
 
     SubSection    "Display"
 
     SubSection    "Display"
 
         Depth      24
 
         Depth      24
         Modes      "1280x720" "720x576" "800x600"
+
         Modes      "1360x768" "800x600"
 +
    EndSubSection
 +
EndSection
 +
 
 +
Section "Screen"
 +
    Identifier    "Projector[0]"
 +
    Device        "FX5200[0]"
 +
    Monitor        "AnyMonitor"
 +
    Option        "UseDisplayDevice" "DFP" # DVI out
 +
    DefaultDepth    24
 +
    SubSection    "Display"
 +
        Depth      24
 +
        Modes      1280x720" "800x600"
 
     EndSubSection
 
     EndSubSection
 
EndSection
 
EndSection
  
 
Section "Monitor"
 
Section "Monitor"
     Identifier  "Either"
+
     Identifier  "AnyMonitor"
 
     Option      "DPMS"
 
     Option      "DPMS"
    #Option      "UseEDIDFreqs" "true"
 
 
     Option      "ExactModeTimingsDVI" "true"
 
     Option      "ExactModeTimingsDVI" "true"
 
     Option      "RenderAccel" "true"
 
     Option      "RenderAccel" "true"
    #Option      "TVStandard" "PAL-B"
 
    Option      "TVOutFormat" "COMPOSITE"
 
    Option      "TVOverScan" "0.5"
 
 
EndSection
 
EndSection
 +
 +
 
</pre>
 
</pre>
Because the projector still signals that it is "connected" during its 2 minute warm down phase I have a second ServerLayout that points to a Screen section that specifies
 
  Option "UseDisplayDevice" "TV"
 
in case I am in a hurry to switch back to the TV.
 
  
 
.asoundrc For ALSA digital audio out
 
.asoundrc For ALSA digital audio out
Line 115: Line 146:
  
 
start-frontend() {
 
start-frontend() {
irexec --daemon $HOME/.lircrc
+
rm $HOME/.serverauth.*
 +
irexec --daemon $HOME/.lircrc >> $HOME/irexec.log
  
#If $HOME/.xlayout exists use its contents to specify a layout to the XServer
+
MYTHRC="$HOME/.mythrc"
LAYOUT_SPEC=""
+
if [ -r $MYTHRC ] ; then
XLAYOUT=$HOME/.xlayout
+
   . $MYTHRC
if [ -r $XLAYOUT ] ; then
+
   read LAYOUT < $XLAYOUT
+
  LAYOUT_SPEC="-layout $LAYOUT"
+
  rm $XLAYOUT
+
 
fi
 
fi
  
startx -- $LAYOUT_SPEC -logverbose 5
+
LAYOUT_SPEC=
 +
[ ! -z "$LAYOUT" ] && LAYOUT_SPEC="-layout $LAYOUT"
  
 +
startx --  $LAYOUT_SPEC -logverbose 5
 
}
 
}
  
 
tty | grep tty1 && start-frontend
 
tty | grep tty1 && start-frontend
 +
  
 
</pre>
 
</pre>
Line 136: Line 167:
 
.xsession To start Ratpoison, mythtv-setup and mythfrontend
 
.xsession To start Ratpoison, mythtv-setup and mythfrontend
 
<pre>
 
<pre>
#Remove default blue background around TV-out picture
+
#Remove blue background... from TV-Out picture
 
xvattr -a XV_COLORKEY -v 0
 
xvattr -a XV_COLORKEY -v 0
 
ratpoison &
 
ratpoison &
 
echo $DISPLAY
 
echo $DISPLAY
  
if [ -f $HOME/.mythsetup ] ; then
+
if [ -r $HOME/.mythrc ] ; then
  rm $HOME/.mythsetup
+
    . $HOME/.mythrc
 +
    rm $HOME/.mythrc
 +
fi
 +
 
 +
if [ ! -z "$MYTH_SETUP" ] ; then
 
   mythtv-setup
 
   mythtv-setup
 
fi
 
fi
mythfrontend  -l mfe.log
+
mythfrontend  -l mfe.log $MYTH_ARGS
  
 
</pre>
 
</pre>
Line 164: Line 199:
 
   logger -t "mythtv" "$@"
 
   logger -t "mythtv" "$@"
 
}
 
}
 +
 +
parseopts() {
 +
    MYTH_SETUP=
 +
    LAYOUT=
 +
    MYTH_ARGS=
 +
 +
    while [ ! -z "$1" ]
 +
    do
 +
        case "$1" in
 +
            -l|--layout)
 +
                LAYOUT="$2"
 +
                shift;;
 +
            -s|--setup)
 +
                MYTH_SETUP="y"
 +
                ;;
 +
            -m|--mythargs)
 +
                MYTH_ARGS="$2"
 +
                shift
 +
                ;;
 +
 +
            *) break ;;
 +
        esac
 +
        shift
 +
    done
 +
}
 +
 +
 +
GETOPT=$(getopt -l "setup,layout:,mythargs:" -o "sl:m:" -- "$@")
 +
 +
if [ $? -ne 0 ] ; then
 +
    exit 1
 +
fi
 +
 +
eval parseopts $GETOPT
  
 
OLDEST=$(pgrep -o -u $USER $(basename $0))
 
OLDEST=$(pgrep -o -u $USER $(basename $0))
Line 173: Line 242:
 
log "Restarting on tty1 $USER $(basename $0)"
 
log "Restarting on tty1 $USER $(basename $0)"
  
if [ $1 == "setup" ] ; then
+
cat - << EOF > $HOME/.mythrc
  touch $HOME/.mythsetup
+
LAYOUT=$LAYOUT
  shift
+
MYTH_SETUP="$MYTH_SETUP"
fi
+
MYTH_ARGS="$MYTH_ARGS"
 +
EOF
  
if [ $# -gt 0 ] ; then
 
  echo $1 > $HOME/.xlayout
 
fi
 
 
pkill -u mythtv irexec
 
pkill -u mythtv irexec
  
Line 188: Line 255:
 
#Kill the login shell.
 
#Kill the login shell.
 
pkill -9 -t tty1 -u mythtv
 
pkill -9 -t tty1 -u mythtv
 +
 
</pre>
 
</pre>
  
Line 200: Line 268:
 
end
 
end
  
#Run myth-setup
+
#Run myth-setup before running mythfrontend
 
begin
 
begin
 
     button = cpf
 
     button = cpf
 
     prog  = irexec
 
     prog  = irexec
     config = /home/mythtv/bin/ir_mythtv.sh setup &
+
     config = /home/mythtv/bin/ir_mythtv.sh --setup &
 
end
 
end
  
#Bounce the tty, set the TV layout.
+
#Bounce the tty, use the Projector layout.
 
begin
 
begin
 
     button = tv_onoff
 
     button = tv_onoff
 
     prog  = irexec
 
     prog  = irexec
     config = /home/mythtv/bin/ir_mythtv.sh TV-Only &
+
     config = /home/mythtv/bin/ir_mythtv.sh --layout Projector &
 
end
 
end
 
</pre>
 
</pre>

Revision as of 12:10, 26 February 2007

Let me just start by saying MythTV rocks. I was keeping track of where I was at with Myth on my home wiki, but then figured I might as well share it here!

My Setup

Combined FE/BE.

Hardware

  • AMD S754 Athlon 64 3700+
  • Gigabyte S754 GA-K8VM800M
  • 1GB Ram
  • 320GB Western Digital 7200rpm 8M Serial ATA HDD
  • Albatron FX5200LP 128M 8x Video Card with DVI output.
  • Gigabyte FX5200 128M 8x Video Card with DVI output.
  • DVICO FusionHDTV Hybrid Tuner
  • DNTVLive LP Tuner
  • DVICO FusionRemote
  • BenQ PE8700 DLP Projector

Software

  • Ubuntu Dapper (upgraded from Breezy server install)
  • Kernel 2.6.15-27-amd64-k8
  • v4l-dvb-0.9 drivers patched to handle vendor/device codes being the same between 2 different devices!! (Many thanks to Chris Pascoe for getting the DVICO card going)
  • NVidia amd64 version 8774
  • lirc version 0.8.0 (Dapper upgrade changed device from /dev/usb/hiddev0 to /dev/hiddev0
  • Ratpoison window manager
  • MythTV 0.20.x fixes branch


What's working for me

  • Live TV/TV recording Free to air HD/SD (from Sydney, Australia). Both tuner's simultaneously.
  • AC3 passthrough including 5,1 surround
  • XMLTV grabber from the OZTivo site
  • MythMusic
  • MythGallery
  • MythDVD using xine as an external player
  • MythWeb on Jetty rather than apache including the WAP version on the BlackBerry!
  • Using irexec to restart Myth, including with a different Layout to switch between the Projector and TV

What's not

  • XvMC not sure if this is an NVIDIA driver thing or 0.20 but bad stuttering and "audio buffering" messages in the logs
  • The Gigabyte FX5200 card does not do PAL output properly, as it renders in B&W. Fortunately my TV autodetects NTSC colour.
  • The Albatron FX5200 card has been fingered as the cause of my DVI problems on my projector. Apparently it freaks out a PCB component causing the EDID data to become corrupt. (So far so good on the Gigabyte card since Aug 2006).

What more do I want to do

  • I'd like MythMusic to use MythGallery as a visualisation!
  • More cleanup of MythGallery thumbnail code. (Thumbnail cache is unnecessary if EXIF thumbnails are available in the images themselves)

Useful config info

xorg.conf for PE8700, Samsung LCD

Option ExactModeTimingsDVI is important for the projector. This is the main detail, the driver autodetects the connected display and will use the Projector (DFP) in preference to TV-Out.

Option "UseEDIDDpi" "false" is important for the Samsung television otherwise you get really small fonts!

There are two layouts, the default uses outputs via VGA to a Samsung LCD television, the second uses DVI to the PE8700 projector.

Section "ServerLayout"
    Identifier     "Main" # PC VGA output to Samsung LCD television
    Screen         0 "LCD[0]" 0 0
    InputDevice    "Generic Keyboard"
    InputDevice    "Configured Mouse"
    Option         "Xinerama" "off"
EndSection

Section "ServerLayout"
    Identifier     "Projector"
    Screen         0 "Projector[0]" 0 0
    InputDevice    "Generic Keyboard"
    InputDevice    "Configured Mouse"
    Option         "Xinerama" "off"
EndSection
 
# .... skipped Files, Modules, InputDevice ....

Section "Device"
    Identifier     "FX5200[0]"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
    Screen         0
    Option         "NvAGP" "3"
EndSection

Section "Screen"
    Identifier     "LCD[0]"
    Device         "FX5200[0]"
    Monitor        "AnyMonitor"
    DefaultDepth    24
    Option         "UseEDIDDpi" "FALSE" #Computed DPI values not so good for TV display
    Option         "UseDisplayDevice" "CRT" # VGA out
    SubSection     "Display"
        Depth       24
        Modes       "1360x768" "800x600"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Projector[0]"
    Device         "FX5200[0]"
    Monitor        "AnyMonitor"
    Option         "UseDisplayDevice" "DFP" # DVI out
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes       1280x720" "800x600"
    EndSubSection
EndSection

Section "Monitor"
    Identifier   "AnyMonitor"
    Option       "DPMS"
    Option       "ExactModeTimingsDVI" "true"
    Option       "RenderAccel" "true"
EndSection


.asoundrc For ALSA digital audio out

pcm.!default {
type plug
slave {
pcm "spdif"
rate 48000
format S16_LE
}
}

/etc/inittab entry to auto login the mythtv user

1:2345:respawn:/sbin/mingetty --autologin mythtv tty1


.profile to start X from the auto login, also starts irexec.

PATH=$PATH:$HOME/bin

start-frontend() {
rm $HOME/.serverauth.*
irexec --daemon $HOME/.lircrc >> $HOME/irexec.log

MYTHRC="$HOME/.mythrc"
if [ -r $MYTHRC ] ; then
   . $MYTHRC
fi

LAYOUT_SPEC=
[ ! -z "$LAYOUT" ] && LAYOUT_SPEC="-layout $LAYOUT"

startx --  $LAYOUT_SPEC -logverbose 5
}

tty | grep tty1 && start-frontend


.xsession To start Ratpoison, mythtv-setup and mythfrontend

#Remove blue background... from TV-Out picture
xvattr -a XV_COLORKEY -v 0
ratpoison &
echo $DISPLAY

if [ -r $HOME/.mythrc ] ; then
    . $HOME/.mythrc
    rm $HOME/.mythrc
fi

if [ ! -z "$MYTH_SETUP" ] ; then
   mythtv-setup
fi
mythfrontend  -l mfe.log  $MYTH_ARGS

.ratpoisonrc

#Make escape (default C-t) not clash with mythTV key bindings
escape C-r
#Banish the mouse cursor out of the way.
addhook switchwin banish

ir_mythtv.sh script to restart MythTV via irexec.

#!/bin/bash

function log() {
   logger -t "mythtv" "$@"
}

parseopts() {
    MYTH_SETUP=
    LAYOUT=
    MYTH_ARGS=

    while [ ! -z "$1" ]
    do
        case "$1" in
            -l|--layout)
                LAYOUT="$2"
                shift;;
            -s|--setup)
                MYTH_SETUP="y"
                ;;
            -m|--mythargs)
                MYTH_ARGS="$2"
                shift
                ;;

            *) break ;;
        esac
        shift
    done
}


GETOPT=$(getopt -l "setup,layout:,mythargs:" -o "sl:m:" -- "$@")

if [ $? -ne 0 ] ; then
    exit 1
fi

eval parseopts $GETOPT

OLDEST=$(pgrep -o -u $USER $(basename $0))
if [ $OLDEST -ne $$ ] ; then
   log "Process $OLDEST is still running, so I ($$) will abort"
   exit 1
fi

log "Restarting on tty1 $USER $(basename $0)"

cat - << EOF > $HOME/.mythrc
LAYOUT=$LAYOUT
MYTH_SETUP="$MYTH_SETUP"
MYTH_ARGS="$MYTH_ARGS"
EOF

pkill -u mythtv irexec

pkill -t tty1 -u mythtv mythfrontend
sleep 2
pkill -t tty7
#Kill the login shell.
pkill -9 -t tty1 -u mythtv

the .lircrc file (buttons as per the DVICO remote, which I think are now standard in the lirc distribution)

## irexec
# Bounce this tty
begin
    button = power_onoff
    prog   = irexec
    config = /home/mythtv/bin/ir_mythtv.sh &
end

#Run myth-setup before running mythfrontend
begin
    button = cpf
    prog   = irexec
    config = /home/mythtv/bin/ir_mythtv.sh --setup &
end

#Bounce the tty, use the Projector layout.
begin
    button = tv_onoff
    prog   = irexec
    config = /home/mythtv/bin/ir_mythtv.sh --layout Projector &
end

0.19.x fixes info

  • MythTV 0.19.x fixes branch (had to move /usr/lib/libdts_pic.a to /usr/lib/libdts.a to compile)
  • Xine external DVD/video player
  • XvMC ( with Bob de-interlacing for HD channels. Have to manually turn it off for SD stuff).