Well, I’ve pretty much concluded Version 1 of my MythTV rig. It’s been a learning experience, and I consider myself better for having endured it. Although Myth is a simply amazing system, the hardware I chose to deploy it on (Specifically, the Abit BP6 motherboard) just isn’t up to the task and the results are far less than I had hoped. But before we get to where I am now, let me take you through the journey of the last few weeks.

Note: This is an extremely long post…

[tag:mythtv][tag:pvr][tag:dvr][tag:bp6]

I purchased a 250GB hard drive and the Microsoft MCE Remote to finish off the system, which arrived about two weeks ago. I eagerly installed them both, and then proceeded to install the newest version of MythDora on it. The install was a little rocky, but the problems really became evident when I realized that the MythDora 2.32 install does not use an SMP kernel. Somewhat disheartened, I went back to KnoppMyth and found a new version R5D1 out. While still not using Myth 0.20, it did have some bugfixes I wanted (specifically the DVD burning fix I mentioned earlier) so I loaded it up. The install went flawlessly and within the hour I was watching live TV. (Just watching, I didn’t have speakers hooked up). Just to get this out there for anyone considering, I believe KnoppMyth has a far larger development & user community than MythDora (right now), and it currently far ahead of MythDora in the ease of installation and configuration. It will remain my Myth installation of choice for quite some time.

Now, this was the first time I had really used the MythTV Front-end much. All my previous efforts had been without X, solely as a backend. Once I started using the front-end I ran into the old nemesis of all BP6 owners: APIC errors. I was able to watch live TV for about 30 seconds before the entire system would lock-up. The previous solution to this was to disable ACPI (Power Management) in the BIOS, but when I did the USB remote stopped working! I’m still not entirely sure what the connection is between USB & APIC, but I found myself having to choose between two unpleasant scenarios: Stable but with no Remote, or unusable with a remote.

Not having many other options, I thought I would search for a new BIOS to flash the system with. At this point hosing it wouldn’t have cost me much and I was grasping at straws. I already had the latest "official" bios (RU), but there is apparently an active community of homebrew BIOS’s. One, the RV bios, has integrated the latest BIOS (RU) with new HighPoint drivers (from 1.25 to 1.28) and a new ACPI table. Since ACPI was related to my problems I thought perhaps this would help.

After loading up the RV Bios, I had expected the next linux reboot to be a train wreck of new devices and scrambled IRQ’s, but everything loaded up just fine. I was able to watch live TV now and the remote worked just fine. The resulting system was far more stable than previously, so I considered it a success and left it running in the corner of the room for a week while I managed it remoted via MythWeb.

This weekend I moved the system to the living room and hooked it up to the TV. This was where the real disappointment set in. At first, it was a failure. It seems the ivtv that ships with R5D1 didn’t properly configure the card, so while I got perfect video for all my recordings, the sound was nothing but a high-pitched shrill. Essentially the entire week of recordings lost. I fought with it for a long time before I decided to simply re-install R5C7 and see if it was any better. Much to my surprise, it was. The sound worked perfectly. (Update: I finally figured out how to fix this problem.. Read the details in MythTV 2.0 : Page 2 )

Then the fun part began. Here’s a list of the various customizations I had to make to get it working the way I wanted:

  • Installed the DVD Playback stuff
  • Rebuilt the .lircrc and myth/lircrc files with guidance from here. The default files didn’t properly setup the remote for use with Xine so the menu’s were unusable.
  • Added the mythpowerbutton.sh script to toggle the monitor’s DPMS state with the remote’s power button. This was important because my automatic input switcher will automatically activate that port when it’s active, but switch back to the main cable when it’s off. This lets me keep than functionality and use the MythTV with all the rest of my TV equipment without leaving my couch.
  • Tweaked the startup of the mythtv user to disable access control (xhost +) so that the mythpowerbutton.sh script will work.
  • To get DVD Import to work, I had to enter the Configuration for the Video Manager and reset the DVD and CD Locations. They defaulted to /mnt/cdrom, but in reality they need to be set to /dev/dvd and /dev/cdrom (which are just symlinks to /dev/hdc). Without this change it would never notice I had inserted a disk, and keep saying "No jobs. Checking for inserted DVD".
  • I disabled automount on the DVD Drive. While automount is neat, it’s a pain to have the eject button turned into a "give me a glimpse of the disk". The continuous polling kept retracting the tray before I could load/unload it. Myth seems to work just fine without automount anyway.
  • I edited the /etc/dhclient.conf to specify a hostname.

I was simply amazed at how well it all worked. I was able to watch recordings, I was able to watch DVD’s, I was able to import some of Rhianna’s favorites to the system. DVD Watching was exceptionally nice (I had worried that the Celeron 533 didn’t have enough horsepower for it, but I was pleasantly surprised) as I could now skip all those pesky FBI warnings and such.

Unfortunately, the old APIC problem came back. After about 2 hours of runtime, the whole system would lock-up again. Two hours seemed to be the magic number, and there didn’t seem to be any way around it. Disabling ACPI didn’t help this time, and there’s not really any other BIOS options. Disheartened, I took it down and left it for dead.

There is a bit of a silver lining tho: Last night I ripped the video card and sound card out of the system, leaving just the NIC & PVR-150 (No onboard sound or video on this system). This not only makes the system quieter and cooler, it opens alot of PCI slots (for extra PVR150’s maybe?). I was afraid that without video the BIOS would refuse to post. To my surprise it still booted just fine, and I connected in remotely to disable X, lirc, and a few other unnecessary things. It’s now a dedicated back-end. It’s essentially a VCR on steroids now. I can record shows (scheduled via MythWeb) and burn shows to DVD to watch on my DVD player. It’s pretty decent, and without the extra load of the front-end it seems stable. I’m at 12-hours of uptime now without any problems, and it ran before for a solid week like this.

Also, I installed WinMyth on my windows machine so that I can watch the recordings there. WinMyth is tricky to setup, requiring a very particular combination of WinMyth 0.19 + DSMyth CVS 2-12 + gplmpgdec to get it all working. And the one extra trick they don’t tell you in the install documentation: You must run mythtv-setup and specify the IP address of the Master Backend and Backend Server. By default these are 127.0.0.1, and so long as the Backend and Frontend are on the same machine this isn’t a problem. Once you start separating the Backend and Frontend (or using multiple Frontends with a single backend) you MUST specify these values. For those of us without X on the system, you can manually edit the mysql "mythconverg.settings" table with commands like this:

mysql -u root mythconverg
mysql> update settings set data="192.168.1.103" where value="BackendServerIP";
mysql> update settings set data="192.168.1.103" where value="MasterServerIP";

If you forget to change this IP address then WinMyth will work to the point that you can see a list of recordings, but every attempt to view them simply comes up blank (no preview pane, big blank full-screen window during View). A simple restart of mythbackend and I’m able to watch recordings (and Live TV) on my PC. It’s no replacement for a full frontend, but it’ll do for now. I’m sure someone out there will ask "Why not just use Streaming? It’s already installed, and available via the Web Interface?" Believe me, I’ld love to. Unfortunately, the 533Mhz processors just aren’t powerful enough, leaving me in a perpetual state of 5-seconds of video with 5-seconds of "Buffering…".

I’m really not willing to spend any more money on the system without first doing some "burn in" testing to see how well it works. And when I do drop some money on it, it’ll be for a new motherboard+CPU+Memory (hopefully I can reuse my PVR150, soundcard, videocard, case, HD, etc). If I do anything else on configuration with this setup, it may be to dual-boot my desktop as a KnoppMyth Front-end. Although, I really don’t think I’m going to be watching that much TV in the computer room.

So that’s the state of things now. It’s really not what I had originally envisioned, but for now it will work. Hopefully the notes I’ve posted will be useful for anyone else attempting to do something like this. If they are, feel free to post a comment with any tweaks or other information you have.

For those who may find it useful, find the scripts I modified on the next page…
[page_break]

~mythtv/.lircrc ~mythtv/mythtv/lircrc
# lircrc.mceusb

###################
#
# IRExec
#
###################
begin
prog = irexec
button = Power
repeat = 3
config = /usr/local/bin/mythpowerbutton.sh
#config = Key Alt-Escape CurrentWindow
end

###################
#
# MPlayer
#
###################
begin
prog = mplayer
button = Back
config = quit
end

begin
prog = mplayer
button = More
config = osd
end

begin
prog = mplayer
button = Replay
config = seek -10
repeat = 1
end

begin
prog = mplayer
button = Skip
config = seek +10
repeat = 1
end

begin
prog = mplayer
button = Rewind
config = seek -60
repeat = 1
end

begin
prog = mplayer
button = Forward
config = seek +60
repeat = 1
end

begin
prog = mplayer
button = Pause
config = pause
end

begin
prog = mplayer
button = VolUp
config = volume +1
repeat = 1
end

begin
prog = mplayer
button = VolDown
config = volume -1
repeat = 1
end

begin
prog=mplayer
button=Mute
config=mute
end

###################
#
# XINE
#
###################
##
# xine key bindings.
# Automatically generated by xine-ui version 0.9.23.
##

# start playback
begin
button = Play
prog = xine
repeat = 0
config = Play
end

# playback pause toggle
begin
button = Pause
prog = xine
repeat = 0
config = Pause
end

# stop playback
begin
button = Stop
prog = xine
repeat = 0
config = Stop
end

# take a snapshot
begin
button = Record
prog = xine
repeat = 0
config = Snapshot
end

# set position to -60 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative-60
end

# set position to +60 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative+60
end

# set position to -30 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative-30
end

# set position to +30 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative+30
end

# set position to -15 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative-15
end

# set position to +15 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative+15
end

# set position to -7 seconds in current stream
begin
button = Rewind
prog = xine
repeat = 2
config = SeekRelative-7
end

# set position to +7 seconds in current stream
begin
button = Forward
prog = xine
repeat = 2
config = SeekRelative+7
end

# set position to beginning of current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition0%
end

# set position to 1027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition10%
end

# set position to 2027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition20%
end

# set position to 3027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition30%
end

# set position to 4027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition40%
end

# set position to 5027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition50%
end

# set position to 6027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition60%
end

# set position to 7027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition70%
end

# set position to 8027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition80%
end

# set position to 9027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition90%
end

# increment playback speed
begin
button = xxxxx
prog = xine
repeat = 0
config = SpeedFaster
end

# decrement playback speed
begin
button = xxxxx
prog = xine
repeat = 0
config = SpeedSlower
end

# reset playback speed
begin
button = xxxxx
prog = xine
repeat = 0
config = SpeedReset
end

# increment audio volume
begin
button = VolUp
prog = xine
repeat = 1
config = Volume+
end

# decrement audio volume
begin
button = VolDown
prog = xine
repeat = 1
config = Volume-
end

# audio muting toggle
begin
button = Mute
prog = xine
repeat = 0
config = Mute
end

# select next sub picture (subtitle) channel
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SpuNext
#end

# select previous sub picture (subtitle) channel
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SpuPrior
#end

# cycle aspect ratio values
begin
button = Videos
prog = xine
repeat = 0
config = ToggleAspectRatio
end

# jump to media Menu
begin
button = DVD
prog = xine
repeat = 0
config = Menu
end

# jump to Title Menu
#begin
# button = Menu
# prog = xine
# repeat = 0
# config = TitleMenu
#end

# jump to Root Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = RootMenu
#end

# jump to Subpicture Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SubpictureMenu
#end

# jump to Audio Menu
#begin
# button = Music
# prog = xine
# repeat = 0
# config = AudioMenu
#end

# jump to Angle Menu
#begin
# button = TV
# prog = xine
# repeat = 0
# config = AngleMenu
#end

# jump to Part Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = PartMenu
#end

# menu navigate up
begin
button = Up
prog = xine
repeat = 0
config = EventUp
end

# menu navigate down
begin
button = Down
prog = xine
repeat = 0
config = EventDown
end

# menu navigate left
begin
button = Left
prog = xine
repeat = 0
config = EventLeft
end

# menu navigate right
begin
button = Right
prog = xine
repeat = 0
config = EventRight
end

# menu select
begin
button = OK
prog = xine
repeat = 0
config = EventSelect
end

# jump to next chapter
begin
button = Skip
prog = xine
repeat = 0
config = EventNext
end

# jump to previous chapter
begin
button = Replay
prog = xine
repeat = 0
config = EventPrior
end

# select next angle
#begin
# button = TV
# prog = xine
# repeat = 0
# config = EventAngleNext
#end

# select previous angle
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = EventAnglePrior
#end

# display stream information using OSD
begin
button = More
prog = xine
repeat = 0
config = OSDStreamInfos
end

# enter key binding editor
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = KeyBindingEditor
#end

# enter the number 0
begin
button = Zero
prog = xine
repeat = 0
config = Number0
end

# enter the number 1
begin
button = One
prog = xine
repeat = 0
config = Number1
end

# enter the number 2
begin
button = Two
prog = xine
repeat = 0
config = Number2
end

# enter the number 3
begin
button = Three
prog = xine
repeat = 0
config = Number3
end

# enter the number 4
begin
button = Four
prog = xine
repeat = 0
config = Number4
end

# enter the number 5
begin
button = Five
prog = xine
repeat = 0
config = Number5
end

# enter the number 6
begin
button = Six
prog = xine
repeat = 0
config = Number6
end

# enter the number 7
begin
button = Seven
prog = xine
repeat = 0
config = Number7
end

# enter the number 8
begin
button = Eight
prog = xine
repeat = 0
config = Number8
end

# enter the number 9
begin
button = Nine
prog = xine
repeat = 0
config = Number9
end

# add 10 to the next entered number
begin
button = Ten
prog = xine
repeat = 0
config = Number10add
end

# quit the program
begin
button = Back
prog = xine
repeat = 0
config = Quit
end

# select Audio mode
begin
prog = xine
button = Music
repeat = 0
mode = Audio
end

# select Subtitle mode
begin
prog = xine
button = Pictures
repeat = 0
mode = Subtitle
end

# select Angle mode
begin
prog = xine
button = TV
repeat = 0
mode = Angle
end

begin Audio

# select next audio channel
begin
button = ChanUp
prog = xine
repeat = 0
config = AudioChannelNext
end

# select previous audio channel
begin
button = ChanDown
prog = xine
repeat = 0
config = AudioChannelPrior
end

end Audio

begin Subtitle

# select next sub picture (subtitle) channel
begin
button = ChanUp
prog = xine
repeat = 0
config = SpuNext
end

# select previous sub picture (subtitle) channel
begin
button = ChanDown
prog = xine
repeat = 0
config = SpuPrior
end

end Subtitle

begin Angle

# select next angle
begin
button = ChanUp
prog = xine
repeat = 0
config = EventAngleNext
end

# select previous angle
begin
button = ChanDown
prog = xine
repeat = 0
config = EventAnglePrior
end

end Angle

##
# End of xine key bindings.
##

# lircrc.mceusb
###################
#
# MythTV
#
###################
begin
prog = mythtv
button = One
config = 1
end

begin
prog = mythtv
button = Two
config = 2
end

begin
prog = mythtv
button = Three
config = 3
end

begin
prog = mythtv
button = Four
config = 4
end

begin
prog = mythtv
button = Five
config = 5
end

begin
prog = mythtv
button = Six
config = 6
end

begin
prog = mythtv
button = Seven
config = 7
end

begin
prog = mythtv
button = Eight
config = 8
end

begin
prog = mythtv
button = Nine
config = 9
end

begin
prog = mythtv
button = Zero
config = 0
end

begin
prog = mythtv
button = Back
config = Esc
end

begin
prog = mythtv
button = Guide
config = M
end

begin
prog = mythtv
button = More
config = I
end

begin
prog = mythtv
button = VolDown
repeat = 1
config = F10
end

begin
prog = mythtv
button = VolUp
repeat = 1
config = F11
end

begin
prog = mythtv
button = ChanUp
repeat = 3
config = Up
end

begin
prog = mythtv
button = ChanDown
repeat = 3
config = Down
end

begin
prog = mythtv
button = Up
repeat = 3
config = Up
end

begin
prog = mythtv
button = Down
repeat = 3
config = Down
end

begin
prog = mythtv
button = Left
repeat = 3
config = Left
end

begin
prog = mythtv
button = Right
repeat = 3
config = Right
end

begin
prog = mythtv
button = Play
config = Return
end

begin
prog = mythtv
button = OK
config = Return
end

begin
prog = mythtv
button = Enter
config = Return
end

begin
prog = mythtv
button = Mute
config = F9
end

begin
prog = mythtv
button = Rewind
config = <
end

begin
prog = mythtv
button = Forward
config = >
end

begin
prog = mythtv
button = Record
config = R
end

begin
prog = mythtv
button = Stop
config = O
end

begin
prog = mythtv
button = Pause
config = P
end

# Use for backwards commercial skip
begin
prog = mythtv
button = Replay
config = Q
end

# Use for forward commercial skip
begin
prog = mythtv
button = Skip
config = Z
end

### The following keys need to be mapped before they can be used
### (I mapped mine using MythWeb)
begin
prog = mythtv
button = LiveTV
config = !
end

begin
prog = mythtv
button = Videos
config = ^
end

begin
prog = mythtv
button = Pictures
config = &
end

begin
prog = mythtv
button = Music
config = $
end

begin
prog = mythtv
button = TV
config = @
end

begin
prog = mythtv
button = DVD
config = (
end

begin
prog = mythtv
button = Home
config = )
end

/usr/local/bin/mythpowerbutton.sh

#!/bin/sh
DISPLAY=:0.0
if [ `cat /tmp/mythsleeptogglestatus` == "off" ]
then
xset dpms force on;
echo "on" > /tmp/mythsleeptogglestatus
else
sleep 1;
xset dpms force off;
echo "off" > /tmp/mythsleeptogglestatus
fi

I also edited the /usr/local/bin/launch-irx.sh script to remove the conditionals, because I knew I wanted irexec & irxevent running.

Also, in the ~mythtv/.fluxbox/apps I added the following line:
[startup] {xhost +}

That’s important because the irexec process could be running as a different user (whatever the LIRC process is running as I believe), and they’ll need permissions to run the xset commands to use the DPMS.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • FriendFeed
  • MySpace
  • Netvibes
  • Ping.fm
  • Technorati
  • Tumblr