Difference between revisions of "User:Lwoggardner"

From MythTV Official Wiki
Jump to: navigation, search
(tweaks after upgrading to Ubuntu Karmic)
(Update configuration for Zotac ION board)
Line 11: Line 11:
 
* [[MythGallery]]
 
* [[MythGallery]]
 
* [[MythVideo]]
 
* [[MythVideo]]
 
+
* Suspend + Wake On USB
  
 
== Backend ==
 
== Backend ==
Line 17: Line 17:
 
=== Hardware ===
 
=== Hardware ===
  
* 2 x 500GB HDDs
+
* HDDs totalling 1.2Tb
 
* Intel S775 Core 2 Q6600 Quad-Core CPU
 
* Intel S775 Core 2 Q6600 Quad-Core CPU
 
* Gigabyte S775 GA-G33M-S2 Motherboard
 
* Gigabyte S775 GA-G33M-S2 Motherboard
Line 36: Line 36:
 
* DVICO used device id 17de:a8a6 for two distinct devices requiring different drivers. Need to set "options cx88xx card=19" in /etc/modprobe.d to force use of Conexant reference drivers. Fortunately the Hauppauge tuner is a USB device so we can override the auto detection rather than patch the v4l dvb drivers to override it.
 
* DVICO used device id 17de:a8a6 for two distinct devices requiring different drivers. Need to set "options cx88xx card=19" in /etc/modprobe.d to force use of Conexant reference drivers. Fortunately the Hauppauge tuner is a USB device so we can override the auto detection rather than patch the v4l dvb drivers to override it.
  
== Frontend / Slave Backend ==
+
== Frontend ==
  
=== Hardware ===
+
== Hardware ==
* AMD S754 Athlon 64 3700+
+
* ZOTAC ionitx-d-e board, 2G memory
* Gigabyte S754 GA-K8VM800M
+
* Szrealan E-2011 case (tiny!)
* 1GB Ram
+
* External DVD player
* 320GB Western Digital 7200rpm 8M Serial ATA HDD
+
* 1Tb external e-Sata drive
* <strike>Albatron FX5200LP 128M 8x Video Card with DVI output.</strike>
+
* Gigabyte FX5200 128M 8x Video Card with DVI output.
+
* DVICO FusionHDTV Hybrid Tuner
+
* DVICO FusionRemote MCE
+
 
* BenQ PE8700 DLP Projector
 
* BenQ PE8700 DLP Projector
 
* Samsung LCD Television
 
* Samsung LCD Television
 
* CambridgeAudio AV receiver
 
* CambridgeAudio AV receiver
 +
* MCE Remote
  
 
=== Software ===
 
=== Software ===
Line 57: Line 54:
 
=== Configuration ===
 
=== Configuration ===
  
* cx88_dvb in /etc/modules (needs to start early to load properly, not sure why)
+
==== 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
 +
 
 +
===== /etc/rc.local =====
 +
<pre>
 +
/usr/local/bin/set_wakeup.sh
 +
</pre>
 +
 
 +
===== /usr/local/bin/set_wakeup.sh =====
 +
<pre>
 +
#!/bin/sh
 +
 
 +
#set wake via remote
 +
 
 +
WAKEUP=""
 +
if [ -f /etc/default/wakeup ] ; then
 +
. /etc/default/wakeup
 +
fi
 +
 
 +
for device in $WAKEUP
 +
do
 +
        enabled=`cat /proc/acpi/wakeup | grep "$device" | awk {'print $3}'`
 +
        if [ "$enabled" != "enabled" ]
 +
        then
 +
                logger -t "wakeup" "Enabling wakeup for $device"
 +
                echo "$device" > /proc/acpi/wakeup
 +
        fi
 +
        enabled=`cat /proc/acpi/wakeup | grep "$device" | awk {'print $3}'`
 +
        logger -t "wakeup" "$device $enabled"
 +
 
 +
done
 +
</pre>
 +
 
 +
===== /etc/default/wakeup =====
 +
<pre>
 +
WAKEUP="USB0"
 +
</pre>
  
* autostart irexec to restart MythTV and switch xorg layout between the Projector and TV
 
 
==== Auto-start X Server ====
 
==== Auto-start X Server ====
  
Line 66: Line 100:
 
* user .xsession linked to /usr/share/mythbuntu/session.sh so we get the same xfce startup.
 
* user .xsession linked to /usr/share/mythbuntu/session.sh so we get the same xfce startup.
  
=====/etc/init/tty7.conf =====
+
===== /etc/init/tty7.conf =====
 
<pre>
 
<pre>
 
# tty7 - mingetty for MythTv
 
# tty7 - mingetty for MythTv
Line 85: Line 119:
 
</pre>
 
</pre>
  
===== ~/.profile =====
+
===== ~mythtv/.profile =====
 
Appended to detect if we are on tty7, in which case we start-up X with an optional layout specified in ~/.mythrc
 
Appended to detect if we are on tty7, in which case we start-up X with an optional layout specified in ~/.mythrc
  
Line 100: Line 134:
 
[ ! -z "$LAYOUT" ] && LAYOUT_SPEC="-layout $LAYOUT"
 
[ ! -z "$LAYOUT" ] && LAYOUT_SPEC="-layout $LAYOUT"
  
startx --  $LAYOUT_SPEC -dpi 100 -logverbose 5
+
startx --  $LAYOUT_SPEC -logverbose 5
 
logout
 
logout
 
}
 
}
Line 110: Line 144:
 
For PE8700  Samsung LCD. See also the tips for the [[NVidiaProprietaryDriver]]
 
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 freaks out a PCB component causing the EDID data to become corrupt.
+
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.
(the 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.
+
(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 ExactModeTimingsDVI is also important for the projector.
Line 119: Line 153:
 
There are two layouts, the default uses outputs via VGA to a Samsung LCD television, the second uses DVI to the PE8700 projector.
 
There are two layouts, the default uses outputs via VGA to a Samsung LCD television, the second uses DVI to the PE8700 projector.
  
<pre>Section "ServerLayout"
+
<pre>
     Identifier    "Main" # PC VGA output to Samsung LCD television
+
Section "ServerLayout"
 +
     Identifier    "Main" # Output to Samsung LCD television
 +
#LCD[0] VGA, LCD[1] HDMI
 
     Screen        0 "LCD[0]" 0 0
 
     Screen        0 "LCD[0]" 0 0
 
     Option        "Xinerama" "off"
 
     Option        "Xinerama" "off"
Line 136: Line 172:
  
 
Section "Device"
 
Section "Device"
     Identifier    "FX5200[0]"
+
     Identifier    "ION-GPU[0]"
 
     Driver        "nvidia"
 
     Driver        "nvidia"
     BusID          "PCI:1:0:0"
+
     BusID          "PCI:3:0:0"
 
     Screen        0
 
     Screen        0
     Option        "NvAGP" "3"
+
EndSection
 +
 
 +
Section "Screen"
 +
    Identifier    "LCD[1] "
 +
    Device        "ION-GPU[0]"
 +
    Monitor        "AnyMonitor"
 +
    DefaultDepth    24
 +
     Option        "UseDisplayDevice" "DFP-1" # HDMI
 +
    Option        "ConnectedMonitor" "DFP-1"
 +
    Option        "IgnoreEDID" "on"
 +
    SubSection    "Display"
 +
        Depth      24
 +
        Modes      "1360x768" "1280x720"
 +
    EndSubSection
 
EndSection
 
EndSection
  
 
Section "Screen"
 
Section "Screen"
 
     Identifier    "LCD[0]"
 
     Identifier    "LCD[0]"
     Device        "FX5200[0]"
+
     Device        "ION-GPU[0]"
 
     Monitor        "AnyMonitor"
 
     Monitor        "AnyMonitor"
 
     DefaultDepth    24
 
     DefaultDepth    24
 +
    Option        "ConnectedMonitor" "CRT-1"
 
     Option        "UseEDIDDpi" "FALSE" #Computed DPI values not so good for TV display
 
     Option        "UseEDIDDpi" "FALSE" #Computed DPI values not so good for TV display
     Option        "UseDisplayDevice" "CRT" # VGA out
+
     Option        "UseDisplayDevice" "CRT-1" # VGA out
 
     SubSection    "Display"
 
     SubSection    "Display"
 
         Depth      24
 
         Depth      24
Line 158: Line 208:
 
Section "Screen"
 
Section "Screen"
 
     Identifier    "Projector[0]"
 
     Identifier    "Projector[0]"
     Device        "FX5200[0]"
+
     Device        "ION-GPU[0]"
 
     Monitor        "AnyMonitor"
 
     Monitor        "AnyMonitor"
 
     Option        "ConnectedMonitor" "DFP"
 
     Option        "ConnectedMonitor" "DFP"
Line 180: Line 230:
 
</pre>
 
</pre>
  
==== LIRC Remote Control ====
+
===== ~mythtv/.mythtv/session =====
  
Standard mythbuntu setup with a few tweaks.
+
Start a ruby program that listens to /dev/lircd and manages -
  
A mythbuntu xsession starts irexec before the window manager which is no good as we want to be able to logout of Xfce on a button press. We disable that with a non-empty ~/.noirexec file.
+
* mythtv via updating the database + network control port
We then use a desktop entry to start it.
+
* 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
  
=====/etc/lircd/hardware.conf =====
+
<pre>
 +
#!/bin/sh
  
Default chooser from mythbuntu did not find the usb device at /dev/usb/hiddev0, so need to edit this file explicitly.
+
#store our dbus session and display where our kill script can pick it up
 +
export | egrep "DBUS_SESSION_BUS_ADDRESS|DISPLAY" > ~/.xsession-export
  
<pre>
+
#Run unclutter to hide the cursor after resume
#Chosen Remote Control
+
unclutter -display $DISPLAY &
REMOTE="DVICO_MCE"
+
 
REMOTE_MODULES=""
+
#run our main lirc control program
REMOTE_DRIVER="dvico"
+
/home/mythtv/bin/audiomodeswitch/main.rb &
REMOTE_DEVICE="/dev/usb/hiddev0"
+
REMOTE_LIRCD_CONF="/usr/share/lirc/dvico/lircd.conf.fusionHDTV"
+
REMOTE_LIRCD_ARGS=""
+
 
</pre>
 
</pre>
  
===== ~/.config/autostart/irexec.desktop =====
+
===== ~mythtv/bin/suspend_mythtv.sh =====
 
+
 
<pre>
 
<pre>
[Desktop Entry]
+
#!/bin/sh
Name=IrExec daemone
+
Comment=A daemon for lirc
+
GenericName=irexec daemon
+
Exec=irexec -d
+
Type=Application
+
</pre>
+
  
===== ~/.lirc/irexec =====
+
# We use dbus-send because it seems to block until resume which is what we want
File is included into ~/.lircrc
+
echo "Suspending"
  
<pre>
+
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer \
## irexec
+
        org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:2
# Bounce this tty
+
begin
+
    button = power_onoff
+
    prog  = irexec
+
    config = /home/ggardner/bin/ir_mythtv.sh &
+
end
+
  
#Bounce the tty, use the Projector layout.
+
echo "Resumed"
begin
+
    button = tv_onoff
+
    prog  = irexec
+
    config = /home/ggardner/bin/ir_mythtv.sh --layout Projector &
+
end
+
 
</pre>
 
</pre>
  
===== ~/bin/ir_mythtv.sh =====
+
===== ~mythtv/bin/kill_mythtv.sh =====
Optionally specify a layout, kills mythfrontend and logs out of the window manager, triggering a restart.
+
Script is called by the ruby program, but also useful to restart from ssh
 
+
 
<pre>
 
<pre>
#!/bin/bash
+
#!/bin/sh
  
function log() {
+
[ -f $HOME/.xsession-export ] && . $HOME/.xsession-export
  logger -t "mythtv" "$@"
+
echo "killing mythfrontend"
}
+
 
+
parseopts() {
+
    LAYOUT=
+
    while [ ! -z "$1" ]
+
    do
+
        case "$1" in
+
            -l|--layout)
+
                LAYOUT="$2"
+
                log "Setting layout to $LAYOUT"
+
                shift;;
+
            *) break ;;
+
        esac
+
        shift
+
    done
+
}
+
 
+
 
+
GETOPT=$(getopt -l "layout:" -o "l:" -- "$@")
+
 
+
if [ $? -ne 0 ] ; then
+
    exit 1
+
fi
+
 
+
eval parseopts $GETOPT
+
 
+
log "Restarting mythtv"
+
 
+
cat - << EOF > $HOME/.mythrc
+
LAYOUT=$LAYOUT
+
EOF
+
 
+
#Logout of our current session
+
 
pkill mythfrontend
 
pkill mythfrontend
xfce4-session-logout
+
pkill unclutter
 
+
echo "xfce logout $DISPLAY"
 +
xfce4-session-logout --logout --fast
 
</pre>
 
</pre>
  
the .lircrc file (buttons as per the DVICO remote, which I think are now standard in the lirc distribution)
+
==== LIRC Remote Control ====
<pre>
+
## irexec
+
# Bounce this tty
+
begin
+
    button = power_onoff
+
    prog  = irexec
+
    config = /home/mythtv/bin/ir_mythtv.sh &
+
end
+
  
#Run myth-setup before running mythfrontend
+
Standard mythbuntu setup for MCE remote.
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
+
</pre>
+
  
 
==== Sound ====
 
==== Sound ====
  
I use a set of ruby scripts so I can use lirc to switch between analog (TV speakers) and digital audio (AV receiver).
+
Onboard sound
 
+
The remote's volup/down buttons are used to control the volume. In analog mode calls the amixer program, in digital/passthrough mode uses the serial port to change the volume directly on the receiver.
+
  
 
=====~/.asoundrc=====
 
=====~/.asoundrc=====
 
ALC650 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.
 
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
+
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
  
 
<pre>
 
<pre>
 
#First line comment
 
#First line comment
 +
 
pcm.myth-music {
 
pcm.myth-music {
   type plug
+
   type copy
   slave.pcm "hw:0,0,3"
+
   slave.pcm "default"
 
}
 
}
  
Line 330: Line 308:
  
 
pcm.myth-video {
 
pcm.myth-video {
   type plug
+
   type copy
   slave.pcm "hw:0,0,3"
+
   slave.pcm "default"
 
}
 
}
  
Line 350: Line 328:
  
 
</pre>
 
</pre>
 
== New ION front-end ==
 
 
== Hardware ==
 
* ZOTAC ionitx-d-e board, 2G memory
 
* Szrealan E-2011 case (tiny!)
 
* external DVD player
 
 
== Software ==
 
* MiniMyth 0.22-72
 
  
 
=== minimyth.conf ===
 
=== minimyth.conf ===
TODO - when I get it working
+
TODO - Works nicely through the WRT310N router etc, but we have a hard drive have decided to stick with Mythbuntu for now.
  
 
== Upgrades ==
 
== Upgrades ==
Line 376: Line 344:
 
=== 0.21-fixes ===
 
=== 0.21-fixes ===
 
upgrade smooth
 
upgrade smooth
 
=== 0.20-fixes ===
 
 
=== 0.19.x fixes info ===
 
* MythTV 0.19.x fixes branch (had to move <code>/usr/lib/libdts_pic.a</code> to <code>/usr/lib/libdts.a</code> to compile)
 
* [http://xinehq.de Xine] external DVD/video player
 
* XvMC  ( with Bob de-interlacing for HD channels. Have to manually turn it off for SD stuff).
 
  
 
[[Category:User_Systems]]
 
[[Category:User_Systems]]

Revision as of 10:46, 24 January 2010

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 9.10 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
  • Suspend + Wake On USB

Backend

Hardware

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

Software

Configuration

  • DVICO used device id 17de:a8a6 for two distinct devices requiring different drivers. Need to set "options cx88xx card=19" in /etc/modprobe.d to force use of Conexant reference drivers. Fortunately the Hauppauge tuner is a USB device so we can override the auto detection rather than patch the v4l dvb drivers to override it.

Frontend

Hardware

  • ZOTAC ionitx-d-e board, 2G memory
  • Szrealan E-2011 case (tiny!)
  • External DVD player
  • 1Tb external e-Sata drive
  • BenQ PE8700 DLP Projector
  • Samsung LCD Television
  • CambridgeAudio AV receiver
  • MCE Remote

Software

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

Configuration

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

/etc/rc.local
/usr/local/bin/set_wakeup.sh
/usr/local/bin/set_wakeup.sh
#!/bin/sh

#set wake via remote

WAKEUP=""
if [ -f /etc/default/wakeup ] ; then
 . /etc/default/wakeup
fi

for device in $WAKEUP
do
        enabled=`cat /proc/acpi/wakeup | grep "$device" | awk {'print $3}'`
        if [ "$enabled" != "enabled" ]
        then
                logger -t "wakeup" "Enabling wakeup for $device"
                echo "$device" > /proc/acpi/wakeup
        fi
        enabled=`cat /proc/acpi/wakeup | grep "$device" | awk {'print $3}'`
        logger -t "wakeup" "$device $enabled"

done
/etc/default/wakeup
WAKEUP="USB0"

Auto-start X Server

  • disabled GDM in /etc/X11/default-display-manager
  • Simple mingetty startup with a tty definition and a startx script in the console
  • user .xsession linked to /usr/share/mythbuntu/session.sh so we get the same xfce startup.
/etc/init/tty7.conf
# tty7 - mingetty for MythTv
#
# This service maintains a mingetty on tty7 from the point the system is
# started until it is shut down again.

start on runlevel 2

stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6

respawn
exec /sbin/mingetty --autologin=<user>  tty7
~mythtv/.profile

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() {
MYTHRC="$HOME/.mythrc"
if [ -r $MYTHRC ] ; then
   . $MYTHRC
fi

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

startx --  $LAYOUT_SPEC -logverbose 5
logout
}

tty | grep tty7 && start-frontend
xorg.conf

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
#LCD[0] VGA, LCD[1] HDMI
    Screen         0 "LCD[0]" 0 0
    Option         "Xinerama" "off"
EndSection

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

Section "Device"
    Identifier     "ION-GPU[0]"
    Driver         "nvidia"
    BusID          "PCI:3:0:0"
    Screen         0
EndSection

Section "Screen"
    Identifier     "LCD[1] "
    Device         "ION-GPU[0]"
    Monitor        "AnyMonitor"
    DefaultDepth    24
    Option         "UseDisplayDevice" "DFP-1" # HDMI
    Option         "ConnectedMonitor" "DFP-1"
    Option         "IgnoreEDID" "on"
    SubSection     "Display"
        Depth       24
        Modes       "1360x768" "1280x720"
    EndSubSection
EndSection

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"
    EndSubSection
EndSection

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"
    EndSubSection
EndSection

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

~mythtv/.mythtv/session

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
#!/bin/sh

#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
unclutter -display $DISPLAY &

#run our main lirc control program
/home/mythtv/bin/audiomodeswitch/main.rb &
~mythtv/bin/suspend_mythtv.sh
#!/bin/sh

# 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"
~mythtv/bin/kill_mythtv.sh

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

#!/bin/sh

[ -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.

Sound

Onboard sound

~/.asoundrc

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
}

minimyth.conf

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

Upgrades

Mythbuntu 9.10

100% clean on server

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

Mythbuntu 8.10

0.21-fixes

upgrade smooth