MythTV – Deployment Post-Mortem
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]
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
################### ################### begin begin begin begin begin begin begin begin begin ################### # start playback # playback pause toggle # stop playback # take a snapshot # set position to -60 seconds in current stream # set position to +60 seconds in current stream # set position to -30 seconds in current stream # set position to +30 seconds in current stream # set position to -15 seconds in current stream # set position to +15 seconds in current stream # set position to -7 seconds in current stream # set position to +7 seconds in current stream # set position to beginning of current stream # set position to 1027777754410f current stream # set position to 2027777754410f current stream # set position to 3027777754410f current stream # set position to 4027777754410f current stream # set position to 5027777754410f current stream # set position to 6027777754410f current stream # set position to 7027777754410f current stream # set position to 8027777754410f current stream # set position to 9027777754410f current stream # increment playback speed # decrement playback speed # reset playback speed # increment audio volume # decrement audio volume # audio muting toggle # select next sub picture (subtitle) channel # select previous sub picture (subtitle) channel # cycle aspect ratio values # jump to media Menu # jump to Title Menu # jump to Root Menu # jump to Subpicture Menu # jump to Audio Menu # jump to Angle Menu # jump to Part Menu # menu navigate up # menu navigate down # menu navigate left # menu navigate right # menu select # jump to next chapter # jump to previous chapter # select next angle # select previous angle # display stream information using OSD # enter key binding editor # enter the number 0 # enter the number 1 # enter the number 2 # enter the number 3 # enter the number 4 # enter the number 5 # enter the number 6 # enter the number 7 # enter the number 8 # enter the number 9 # add 10 to the next entered number # quit the program # select Audio mode # select Subtitle mode # select Angle mode begin Audio # select next audio channel # select previous audio channel end Audio begin Subtitle # select next sub picture (subtitle) channel # select previous sub picture (subtitle) channel end Subtitle begin Angle # select next angle # select previous angle end Angle ## |
# lircrc.mceusb ################### # # MythTV # ################### begin prog = mythtv button = One config = 1 end begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin begin # Use for backwards commercial skip # Use for forward commercial skip ### The following keys need to be mapped before they can be used begin begin begin begin begin begin |
/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.
