From MythTV Official Wiki
Revision as of 01:19, 12 January 2013 by Lwoggardner (talk | contribs) (My Setup)

Jump to: navigation, search

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

MythBuntu 12.04 with separated front-end/backend

  • Live TV/TV recording Free to air HD/SD (from Sydney, Australia)
  • Multi-rec
  • DTS/AC3 passthrough including 5,1 surround digital out
  • MythMusic
  • MythGallery
  • MythVideo
  • Frontend Suspend to RAM + Wake On USB
  • Backend Suspend to RAM



  • HDDs totalling 1.2Tb
  • Intel S775 Core 2 Q6600 Quad-Core CPU
  • Gigabyte S775 GA-G33M-S2 Motherboard
  • 4GB RAM
  • PCI Hauppauge Nova-T-500 MCE(OEM) Dual DVBT tuner
  • PCI Hauppauge Nova-TD 400 Dual DVBT tuner



  • Channel 9, Gem, GO will not tune. The dtv_multiplex.network_id is null - set to 4114 seems to fix things.

Shepherd grabber

Standard install except cron job is disabled and allow mythtv to run mythfilldatabase. This is to allow mythtv to also be in control of suspend.

Suspend to RAM

For a variety of reasons I want my backend to wakeup quickly so instead of halting when idle I suspend to RAM.



  • ZOTAC ionitx-d-e board, 2G memory
  • Szrealan E-2011 case (tiny!)
  • External DVD player
  • 1Tb external e-Sata drive
  • BenQ PE8700 DLP Projector
  • Sony Bravia TV over HDMI
  • CambridgeAudio AV receiver


  • MythBuntu 12.04 64bit
  • Synergy to allow laptop to be the keyboard/mouse.


Enable Wake on USB

We need to enable USB0 in /proc/acpi/wakeup

Note if USB2 is also enabled, then the board immediately wakes up regardless, unsure if this is due to another USB device

Seems to be enabled by default for Mythbuntu 12.04 but Current cheap as Chinese remote does not send the wakeup signal from the power button unfortunately

Auto-start X

  • disabled lightdm in via upstart override (echo 'manual' > /etc/init/lightdm.override)
  • Simple mingetty startup with a tty definition and a startx script in the console
  • user .xsession linked to /usr/share/mythbuntu/ so we get the same xfce startup.
# tty7 - mythtv
start on runlevel [23]
stop on runlevel [!23]

exec /sbin/mingetty --autologin=mythtv tty7

Appended to detect if we are on tty7, in which case we start-up X with an optional layout specified in ~/.mythrc

Note that when X is stopped we automatically logout and respawn

start-frontend() {
if [ -r $MYTHRC ] ; then
   . $MYTHRC

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

startx --  $LAYOUT_SPEC -logverbose 5

tty | grep tty7 && start-frontend

For PE8700 Samsung LCD. See also the tips for the NVidiaProprietaryDriver

The FX5200 cards were the cause of my DVI problems on my projector. Apparently they freak out a PCB component causing the EDID data to become corrupt. (a Gigabyte card lasted from Aug 2006 to Dec 2007. Fortunately the new nvidia driver allow you to use a CustomEDID to load the data from a file.

Option ExactModeTimingsDVI is also important for the projector.

Option "UseEDIDDpi" "false" or some equivalent control of DPI is important for the Samsung television otherwise you get really small fonts (fixed in 0.21)

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" # Output to Samsung LCD television
    Screen         0 "LCD[1]" 0 0
    Option         "Xinerama" "off"

Section "ServerLayout"
    Identifier     "Projector"
    Screen         0 "Projector[0]" 0 0
    Option         "Xinerama" "off"
Section "Module"
        Load    "glx"

Section "Device"
    Identifier     "ION-GPU[0]"
    Driver         "nvidia"
    BusID          "PCI:3:0:0"
    Screen         0
    #This prevents the cursor being displayed on resume from suspend
    Option         "HWCursor" "off"

Section "Screen"
    Identifier     "LCD[1]"
    Device         "ION-GPU[0]"
    Monitor        "AnyMonitor"
    DefaultDepth    24
    Option         "UseDisplayDevice" "DFP-1" # HDMI
    Option         "ConnectedMonitor" "DFP-1"

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

Section "Screen"
    Identifier     "Projector[0]"
    Device         "ION-GPU[0]"
    Monitor        "AnyMonitor"
    Option         "ConnectedMonitor" "DFP"
    Option         "UseDisplayDevice" "DFP" # DVI out
    Option         "CustomEDID" "DFP-0:/etc/X11/benq-c.bin"

    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes       "1280x720" "800x600"

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


Start a ruby program that listens to /dev/lircd and manages -

  • mythtv via updating the database + network control port
  • the AV receiver via RS232 - volume/mute, power on/off, input type
  • alsa via calls to amixer - volume/mute, digital/analog outputs
  • suspend on lirc idle or power button
  • restart specifying TV or Projector layout

#store our dbus session and display where our kill script can pick it up
export | egrep "DBUS_SESSION_BUS_ADDRESS|DISPLAY" > ~/.xsession-export

#Run unclutter to hide the cursor after resume - not required - see HWCursor in xorg.conf
#unclutter -display $DISPLAY &

#run our main lirc control program
/home/mythtv/bin/audiomodeswitch/main.rb &

# We use dbus-send because it seems to block until resume which is what we want
echo "Suspending"

dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer \
        org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:2

echo "Resumed"

Script is called by the ruby program, but also useful to restart from ssh


[ -f $HOME/.xsession-export ] && . $HOME/.xsession-export
echo "killing mythfrontend"
pkill mythfrontend
#pkill unclutter
echo "xfce logout $DISPLAY"
xfce4-session-logout --logout --fast

LIRC Remote Control

Standard mythbuntu setup for MCE remote.


Onboard sound


Could probably do better 48/44kHz switching on the analog output between music and video but if that is important we just go digital passthrough and let the receiver do the work.

In myth config, you can see that default sound device is ALSA:myth-video, the passthrough device is ALSA:myth-passthru, and mythmusic uses ALSA:myth-music. the AC3PassThru and DTSPassThru settings are managed by the ruby program

#First line comment

pcm.myth-music {
  type copy
  slave.pcm "default"

ctl.myth-music {
  type hw
  card 0

pcm.myth-video {
  type copy 
  slave.pcm "default"

ctl.myth-video {
  type hw
  card 0

pcm.myth-passthru {
  type copy
  slave.pcm = "spdif"

ctl.myth-passthru {
  type hw
  card 0


TODO - Works nicely through the WRT310N router etc, but we have a hard drive have decided to stick with Mythbuntu for now.


Mythbuntu 12.04

Reconfigured from scratch for no particular reason

Mythbuntu 10.10

100% clean on server

front end was missing non-versioned symlink for vdpau nvidia library

ln -s /etc/alternatives/ /usr/lib/

Mythbuntu 9.10

100% clean on server

front end needed /etc/events.d/tty7 moved to /etc/init/tty7.conf

Mythbuntu 8.10


upgrade smooth