MythTV upgrade

In February of last year, I finally succeeded in installing MythTV on a computer that a friend gave me.  I used Mythbuntu, which (in my admittedly limited experience) is the best way to install MythTV.  It’s been working pretty well since last February but recently a number of issues cropped up that made me decide to do an upgrade of both the software and the hardware.  What follows is the reasons behind the upgrade, a description of the upgrade, and a few pitfalls and solutions that I experienced along the way.

First the issues that motivated me to upgrade:

1) I wanted to use Netbeans 6.5.  This requires Subversion 1.5 or higher.  I had Ubuntu 7.10 installed and the package repository for that version contains only version 1.4 or something. I probably could have forced it to use a version from a different repository, but I didn’t know what the dependencies would be and this approach usually leads to a broken or less stable system.

2) We’ve been playing our music from iTunes on our Windows computer through our stereo via a USB FM transmitter.  The sound quality isn’t great and occasionally the reception is really dependent on where people are standing in the room – not ideal.  So, I copied all our music over to our MythTV machine with the idea that we could play all our music from it.  However, I couldn’t install the Songbird .deb file on 7.10 and I couldn’t get the regular version to play anything other than MP3s.  Since most of our tracks are (unencrypted) AAC, this is a problem.  By upgrading to a more recent version of Ubuntu, I hoped to solve this problem.

3) The fan on the graphics card I had been using (NVidia GeForce 5200) died due to excessive dust intake.  I wanted to replace it with a better card that has passive cooling (i.e. no fan but a good heat sink).

4) We started watching Hulu using this machine.  Under my old setup, the TV-out functionality had been handled by the MPEG-2 decoder on my Hauppauge PVR-350.  While this looks good for watching shows in MythTV, it’s pretty jerky if you try to watch other video.  So, I wanted to stop relying on my PVR-350 for TV-out and move it to the graphics card. I probably could have made this change without upgrading the software, but it’s just easier to let the installer auto-detect everything.  Also, some MythTV functions are not supported by the PVR-350 TV-out, so pressing certain buttons on the remote would cause the system to freeze or crash – not good.

The upgrade:

I ordered a new graphics card (NVidia GeForce 6200 4x AGP) and a new hard drive (320GB Western Digital EIDE) from GovConnection.  Let me say that I love GovConnection because I get a discount as well as free shipping due to my affiliation with MIT.  Plus, we have an account manager, so if I have any questions, I can send him an email or call him.  It’s great.  Anyway, I got a new hard drive because my preferred method of installing a new operating system is to take out the old drive and put it away for safe keeping, install the OS on the new drive, and then copy over any files I need.  This method works well if the installation takes too long and you need to use your computer again – just pop the old drive back in and you’re good to go.  This time around, I used an old drive I had put away for safe keeping from a previous OS installation (80GB Western Digital EIDE) as the boot drive and the new drive I ordered to store all my media.

I opened up the case, vacuumed it out, installed the graphics card, installed the drives, cut my hand on a sharp edge of the case, and put the case back together.  I decided to do a clean install rather than a version upgrade because I would have needed to do 3 consecutive version upgrades to get to the most recent version (7.10 -> 8.04 -> 8.10 -> 9.04). Using the Mythbuntu 9.04 ISO I had burned earlier, I started up the installer.  Everything went smoothly until I got to the partitioner.  I learned to install Linux back in 2002-2003 on old versions of Debian so I’m most comfortable with the manual partitioner, however, I got momentarily tripped up while trying to partition the disk.  I made 2 swap partitions on the 80GB boot drive – one at the beginning and one at the end.  I made an ext3 partition in the middle with the remaining space.  Then, I formatted my 320GB drive using XFS (because it does really fast deletes on large files – necessary for a DVR).  I told the partitioner to mount this disk at /media, since it would be storing all my DVR recordings and music.  However, I got an error saying that I was trying to install a separate filesystem on /media and that it needed to be part of the root filesystem.  I couldn’t figure out what the problem was.  Finally, after maybe 20 minutes, I realized that Ubuntu uses the /media mount point to mount removable disks when they are plugged into the system.  So, I changed the mount point of my 320GB drive to /data and everything worked.  Lesson learned: Don’t try to create a partition and mount it at /media – that mount point is reserved by the operating system.

Once the partitioner has done its thing, the installer copies over all the files you need.  Mythbuntu installs XFCE by default since it is less resource intensive than KDE or Gnome.  It also basically takes care of almost everything you need that is related to MythTV.  In addition to installing and partially configuing MythTV, it installs MySQL and creates the appropriate user and database, it installs Apache2 and configures MythWeb to communicate with MySQL, it installs and configures LIRC with a little input from you.  You still have to do some configuration of your MythTV backend and frontend, though.  I had some recordings on my previous MythTV installation that I didn’t want to lose so I followed these instructions to migrate the recordings over into my new setup.  They worked perfectly!  Also, when the installer was setting up the remote control (LIRC), I didn’t see my particular remote in the list of options, so I picked the one that seemed closest.  I still had my config files from the old setup, so I figured I could just copy those over.  However, once I started up the MythTV frontend, I was shocked to find the remote already worked!  When I was setting up my tuner, the default was V4L something.  I picked that but it didn’t work.  So, I switched to the MPEG-2 ivtv tuner and that seems to work.  Lessonss learned: 1) if you have a PVR-350, don’t pick V4L as your tuner type.  2) if you have a PVR-350 do choose the generic Hauppauge remote when you’re asked to choose a remote – it’ll work without any further intervention.

The installer asks about how you want the video to be displayed.  I choose TV-out via S-Video.  After everything was setup and I rebooted the system, everything was displayed on my TV.  This was great but I also have an LCD monitor that I want to use for other tasks.  Unfortunately, I had a really hard time getting a picture back on my LCD monitor.  I didn’t want to edit any files manually because I didn’t know whether the settings were now automatically managed by some program since a lot has changed in Ubuntu since 2007.  So, I tried the display configuration utilities in XFCE – no dice.  I installed Gnome and tried its display configuration utilities – no dice.  I installed KDE and tried its display configuration utilities – no dice.  I tried the NVidia display utilities (in package “nvidia-settings”) – no dice.  In the end, I had to edit /etc/X11/xorg.conf manually and fiddle with the nvidia settings utility.  It turns out that you need to set up 2 devices in the config file.  Since both displays are running off the same card with a single bus id, you need to specify a screen in each entry as well. Initially this didn’t work because I had set the S-Video port as screen 0 and the VGA port as screen 1.  These need to be reversed.  Then, you have to go into the NVidia utilities and enable the 2nd display (the TV), which, for some reason is disabled by default.  After some tweaking I got it all to work.  Lessons learned: 1) don’t be afraid to manually edit your xorg.conf file. 2) separate ports on a graphics card are accessed using two separate device entries in xorg.conf – both have the same busid entry but different screen numbers.

Finally, I had things mostly working.  I could start MythTV up on my TV screen and watch TV or a recorded show.  However, when I exited out of watching either live TV or a show, MythTV crashed.  I looked around online and found a group of people complaining about the same problem.  Fortunately, they had a solution: remove pulseaudio.  This fixes the problem but limits what your system can do.  So, if you reinstall pulseaudio, also mark libavcodec and libavutil for reinstallation.  This fixed the problem for others and it worked for me as well.  Lesson learned: if you install Mythbuntu 9.04, reinstall pulseaudio, libavcodec and libavutil to fix problems with MythTV crashing.

I think the upgrade has already accomplished most of what I set out to accomplish when I undertook this project.  MythTV works, the remote works, the MythTV features that I couldn’t use before (like fast forward) now work, watching shows on Hulu is now much smoother, I have Subversion 1.5 installed along with Netbeans 6.5.  There are still a couple of things on my to do list, however.  I haven’t installed Songbird yet, so I don’t know if we’ll be able to stop using the FM transmitter just yet.  Also, I am still having a problem with the wireless networking.  When I reboot, my wireless card doesn’t work.  I have to type >sudo ifup wlan0 to get the network to work.  Perhaps I need to put that in a startup script or something.  On the other hand, I have the wireless card in the bottom-most PCI slot in my computer.  The ethernet card, which is in the slot above it, is enabled when the machines boots.  Maybe if I just swap the cards’ slots, the wireless card will be enabled and the ethernet card disabled.  I’ll have to give that a try.

As a last note, working with old hardware is a pain.  This computer was bought in September of 2002, so it’s nearly 7 years old.  Nowadays, graphics cards almost exclusively use the PCIe interface; my computer uses AGP (4x AGP at that!).  Nowadays, many computers use serial ATA connections exclusively to connect to hard drives and optical drives; my computer uses exclusively IDE.  What I found in pricing components is that antiquated technology is more expensive than current technology.  That is, low-end AGP graphics cards are more expensive than low-end PCIe cards.  Similarly, all the good deals on hard drives are on SATA drives, not IDE.  In fact, the selection of IDE drives available at all is very small.  Hopefully, though, I won’t have to deal with this old hardware much longer.  I look forward to ultimately replacing this machine either with a more powerful MythTV box or with a Windows Media Center machine hopefully with CableCard tuners.

0 Responses to “MythTV upgrade”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


May 2009

Recent Twitterings

Follow Me on Twitter

RSS That to which I am listening

  • An error has occurred; the feed is probably down. Try again later.

%d bloggers like this: