Wednesday, February 18, 2009

Mythbuntu: Awesomeness and Annoyances

I recently switched distros on my Mythbox from Knoppmyth to Mythbuntu, because I couldn't get my new wireless keyboard/mouse combo to work under Knoppmyth. I'm generally quite pleased with Mythbuntu, and find it to be much more polished than Knoppmyth. There are some weirdnesses, though. This post collects some of my experiences in setting up my Mythbuntu box. Note that not all of these are directly related to Mythbuntu.

Transferring my LVM disk



My mythbox uses LVM to glob three separate partitions into one 600 GB monster mounted as /myth, which holds all of my recordings and other media. It's an ugly solution, but it works for now. The problem is, you can't simply reinstall Linux and hope that an LVM partition will "just work" like a normal partition would. Fortunately, it's pretty straightforward to do the transfer (the following instructions assume the LVM partition is named "vg", and that it is mounted at /myth):


  • Backup all of the data in the LVM partition!
  • Prior to reinstalling the system!, unmount the /myth partition, and "deactivate" the LVM partition by typing vgchange -an vg.
  • "Export" the LVM partition by typing vgexport vg. This allows the new linux system to recognize that the physical partitions are part of a LVM group.
  • Install your new linux system
  • Verify that the partitions are recognized as part of an LVM group with the command pvscan. You should see your partitions listed as "inactive" and "part of EXPORTED VG 'vg'". Note the partition names listed (e.g., /dev/sda1).
  • "Import" the LVM partition using the command vgimport vg /dev/sda1 ... (where instead of /dev/sda1 ..., you put a space-separated list of the partitions).
  • "Activate the LVM partition: vgchange -ay vg.
  • Mount the partition: mkdir /myth; mount /dev/vg /myth and verify that your data are intact.
  • Add a line to your fstab so that the partition will auto-mount in the future.



No TV signal



This problem actually also happened on KnoppMyth, right after I hooked up my Comcast Digital STB via Firewire. The STB was automatically detected by mythtv-setup, but when I set the starting channel to "2", I got no signal when watching TV. Same story after switching to Mythbuntu. In both cases, I modified the starting channel to "9" (our local PBS station), and then it "just worked". Channel 2 is a valid channel that I can tune now with no problem. *shrug*


Sound stopped working



Sound worked out-of-the-box at first, but then it inexplicably stopped after a few days. I eventually ran alsamixer and saw that the problem was that the master channel had been muted somehow. I have no idea how that happened, but it's pretty annoying; what if I was a new Linux user who didn't know about alsamixer and didn't care to find out about it? Wouldn't it be nice if sound didn't spontaneously mute itself and require a command-line tool to fix it?


Auto-shutdown from MythWelcome didn't work



With system idling in MythWelcome, the shutdown timer would count down to zero, and then reset to 300 sec, rather than shutting down the system. By starting mythwelcome from an xterm on the desktop, I was able to figure out the problem from the console output: sudo was asking for the mythtv user's password. This was resolved by adding the mythtv user to the "sudo" group with sudo usermod -G sudo mythtv, and changing the /etc/sudoers file so that it wouldn't prompt for a password. Worked like a charm after that (but wouldn't it be nice if it worked this way out of the box?)


mythtv user can't access the MySQL database



I never figured out why, but mysql does not allow access by the mythtv user. I changed my setup so that my "normal" user does the access instead. It would definitely be nice if I didn't have to muck about with the database like this (although, to be fair, this may have happened because I imported my DB from my previous KnoppMyth installation...)


MythTV doesn't auto-start by default



This is easily solved in the nice Mythbuntu Myth-config tool accessible from the desktop menu. However, one annoyance is that it auto-starts Mythfrontend rather than Mythwelcome, so auto-shutdown will not work. I had to go into the normal settings GUI, in the Autostart Programs tab, and add Mythwelcome (and remove Mythfrontend) from the list of autostart programs. The Myth-config tool did correctly set it up to auto-login my user rather than give a login screen.


HDMI connection to my TV leads to overscan issues




My TV is a 42-inch Panasonic LCD, and my mythbox is connected through an HDMI port, using a DVI-to-HDMI converter I bought at Target. When using my mythbox, it quickly became apparent that the computer display was extending beyond the visible area of my screen, such that I was missing 10-20 pixels along each edge. After much research with the google, I learned that this problem is known as overscan. Basically, TVs routinely crop the displayed image this way. There is a general solution, but it is incredibly obscure: you have to craft a custom "modeline" for your xorg.conf file, which apparently involves understanding not only scan timings and pixel clocks, but also something called the front porch and back porch. This is one of those times that makes me go, "You know what? I don't care what the front porch is, I just want to see all of the pixels on my screen! Why does it havbe to be so difficult?". Then I found out about a tool called xvidtune, which allows you to modify the screen size and position and then spits out the corresponding modeline. Sweet, right? Unfortunately, when I tried to run it, I got an obscure error message (like, "Could not query monitor parameters"), and googling the error didn't yield any leads.


I was about to give up, and just accept that I wasn't going to see the edges of my screen, when I decided to do the unthinkable. I opened the User Manual for my TV. Amazingly, I found an obscure menu option in there called something like "HDMI scaling". Even more amazingly, activating this option did exactly what I was hoping for! The screen is reformatted such that I can now see all the way to each edge. And it isn't done with resampling that destroys image clarity. Sweet.

No comments:

Post a Comment