MythTV - An Installation of Epic Proportions
patrick — Tue, 2008-05-20 12:05
I've been talking about putting together a set of MythTV boxes for quite a while. I've been looking at hardware for the last couple of years and last summer I had stumbled across an mini-ITX board that I wanted to test, but I had need a file server, my job ended, and then I got overly busy with a new job. This last christmas I ended up buying parts for a new desktop (the timing just ended up being right) and the project got delayed again.
A friend of mine has kept nagging me about why would I want to build my own and possibly spend a lot of money on this crap if I could just spend money over time to rent a TiVo or whatever cable company's DVR. When I was down in Tulsa this last year I did just that - I rented a dvr from Cox cable and other than the hard drive being to small (and not being able to upgrade), being limited to 2 channels total, and not being able to archive something for later viewing... it worked great! Well, at least until I was getting ready to move out... I had been keeping up with a particular series and hadn't had time to watch a couple episodes and as I was heading up to visit my parents I figured I'd drag it along and show my parents the greatness of what a dvr does. I plugged it into the TV and got nothing initially. I then figured I'd plug it into their cable and see if that might help and if I might be able to record something from their cable provider... How niave. Plugging it into their cable provider completely reset the dvr (deleting everything I had recorded and had been hoping to watch). Ok, my stuff is gone, but surely I can at least record stuff for them - even on the non digital channels that don't require a set top box? Nope, nothing... just sat there trying to configure itself and boot up. Of course, when I got back to Tulsa it came right up, reconfigured itself, and was ready to go - I think it even remembered what TV shows I was recording. Yay for proprietary crap.
What is your reason for even looking into using something like MythTV? Beyond curiosity I wanted to have the ability to do things my way. I tend to move around a lot and I want to be able to take my recordings with me. I also don't want to have to pay a monthly fee (on top of all my fees just to watch TV) just to have the priveledge to record stuff (which cuts TiVo out of the picture for taking my recordings with me). I also tend to end up with lots of extra computer hardware lying around and let it sit around and do nothing while I'm paying out my nose for somebody else's dvr? Not only that, but I've toured several of these new million dollar homes here in the midwest (multiply by 10 for the coasts) and they usually have several media servers that do everything from record/play tv shows, play music that follows people around the house, etc. I was looking at possibly turning this into a money maker of some sort that I could have a lot of fun with.
Because of these media servers my plan has always been to set up a MythTV server (or what they refer to as a backend) and have a separate MythTV client (or frontend). This means the server can be as butt ugly, loud, and whatever as it needs to be to do whatever I want to get stuff done. It also means I can add frontends as necessary and I can experiment with hardware specs.
- Hardware
- Pre-Install Jitters
- Installing Mythbuntu - Backend (Server)
- Installing Mythbuntu - Frontend (Client)
- Epic Conclusion
Hardware
Considering my funds for this project dried up the only thing new I purchased was a Hauppauge PVR-500 MCE with remote and a 500GB hard drive. I used my old desktop as the base for the MythTV server (backend), rearranged some of the hardware, pulled the extra network card out to make room for the PVR-500, and swapped out 1 of the 80GB hard drives for the 500GB hard drive. While the motherboard has an onboard SATA Raid (0, 1) I was unable to get it to even detect there being any drives attached to it - I'm not sure whether this is because it's not working or because I didn't have 2 exactly the same drives connected to it.
The MythTV server hardware:
- AMD Athlon(tm) 64 Processor 3200+ 2.2GHz (capacity: 3GHz)
- A-bit KV80/KV81/KV82(VIA K8M800-8237) motherboard
- VIA Technologies VT8233/A/8235/8237 AC97 Audio Controller
- 1GB RAM (2x 512mb)
- ATI Radeon 9600 w/ VGA, DVI, and S-video outs (256mb ram)
- 4 hard drives
- [40GB] Western Digital WDC WD400BB-75DK (IDE Primary Master - /dev/sdc)
- [39.5GB (36gb)] ext3 /
- [501.7mb (478mb)] Linux swap
- [40GB] Western Digital WDC WD400EB-11CP (IDE Primary Slave - /dev/sdd)
- [39.5GB (36gb)] LVM
- [501.7mb (478mb)] Linux swap
- [80GB] Western Digital WDC WD800JD-00LS (SATA 0)
- [79.51GB (74gb)] LVM
- [501.7mb (478mb)] Linux swap
- [500GB] Western Digital WDC WD5000AAJS-0 (SATA 1)
- [499.449GB (465gb)] LVM
- [501.7mb (478mb)] Linux swap
- [40GB] Western Digital WDC WD400BB-75DK (IDE Primary Master - /dev/sdc)
- Samsung DVD R/RW SH-W08A (IDE Secondary Master)
- Hauppauge PVR-500 MCE with remote
- 2x iTVC16 (CX23416) MPEG-2 Encoder
Current MythTV client hardware (Compaq Armada E500):
- Pentium III (Coppermine) 500MHz (capacity: 650MHz)
- 128mb RAM (2x 64mb DRAM)
- ATI Rage Mobility P/M AGP 2x (4mb ram)
- [12GB] Toshiba MK1516GA (IDE)
- [1003mb] Linux swap
- [remainder] ext3 /
- Compaq SCSI CD-ROM CD-224E
Pre-Install Jitters
I've been messing with Debian for a couple of years and just started switching over to *buntu (ubuntu, kubuntu, ubuntu-server, etc) about mid summer last year. One of the nifty things is they all use the same repositories so if you have Ubuntu (Gnome) installed and decide you'd rather use KDE (from kubuntu) you just need to install the kubuntu-desktop package, choose to use the kdm server instead of gdm, and you're all set - you now have kubuntu... Even though you didn't download another CD, re-partition, format, blah, blah. Considering the recent release of 8.04 *buntu I had recently downloaded the kubuntu i386 desktop and burned it to CD for a friend and figured I'd just start with that, install the mythbuntu-desktop package, and be done... Little did I know the problems I'd come across. To be fair, the problems I spent the most time on fixing where hardware issues that had nothing to do with MythTV.
GRUB Errors and Hard Drives
I installed kubuntu, but I was somewhat frustrated with what it decided was the correct
order of the hard drives. I've got 2 IDE drives connected to a controller directly on the motherboard and 2 SATA drives connected to a PCI expansion card. Normally I would expect to see the IDE drives first in the list followed by the SATA drives because of the way the BIOS detects the hardware when it boots up. The reverse order of my expectations confused me, but I figured it was something new in the way linux was detecting hard drives (it is, I think it's libata project that changed this order). I rebooted, and after seeing the normal display of components I didn't get what I expected...
GRUB Loading...
Error 17
Other than maybe tweaking a few things on the boot menu, I've not delved into anything on GRUB or LILO (2 common boot loaders for linux) since I got started with linux and had no idea what I was doing (in linux) or what they did. On a rare occasion I've had problems on the first boot, but doing a re-install usually fixes things. I re-installed, rebooted, and...
GRUB Loading...
Error 17
Ok... Well, before messing with this this ex-desktop had dual-booted windows and linux and I remember having some issues with the MBR and a couple problems with windows and linux booting when I first set it up... I used some super duper recovery utility disc somebody had pointed me at on sourceforge (or somewhere else?) to fix the MBR. I thought perhaps this was a similar issue, but I figured I could probably fix it with fdisk on a linux live CD.
I started googling around and all the references I saw to fdisk /mbr referred to the fdisk on windows. Apparently linux doesn't require this. During this search I thought if I made some kind of a change to the partition table it might rewrite the beginning of the drives that keeps track of partition info and thought that might fix the problem. While doing this I also noticed that absolutely none of the physical drives had anything marked as bootable. I changed partitions, marked the initial partitions as bootable, installed a base ubuntu-server and rebooted. I got the same GRUB error.
Somebody being helpful in the local lug's IRC channel insisted I download and install the latest Fedora and that would solve all my problems. He's been trying to get everybody to use Fedora - it's his favorite distro. I started the torrent download, but with 8 hours of download ahead (it's a DVD after all) there was a lot of time to waste before I could even try that.
I found a post somewhere that mentioned using dd to overwrite the first several bytes where the mbr is stored. I did this and sure enough it destroyed whatever was in the mbr portion of the drive, but that was the whole point. This didn't fix my problem however. After re-installing I got my fun GRUB error 17 again.
After asking around more channels on freenode with no productive answers yet, 3 hours of torrent download left and the movie I was watching over... Time for bed.
Next day I get up, burn Fedora 9 to a DVD, turn on my box, install a base system, reboot and cross my fingers. I'm pleasantly assaulted by a Fedora boot up screen which then proceeds to load the rest of the Fedora stuff. Ok, Fedora was a success - time to get rid of it and go back to what I was doing. I pop in kubuntu, reboot, and during the install process I notice that Fedora set a bootable flag on the initial partition on every single drive. I cross my fingers and reboot.
This time rather than getting the GRUB error I'm dumped at a grub prompt. Progress! But this means I'm still having problems. I asked a bunch of questions in a bunch of channels on freenode. I googled lots and went through a couple posts and howtos on GRUB. I don't know if there's a way to do what I did next from the grub prompt, but I ended up rebooting on the kubuntu Live CD, and opened konsole. I mounted /dev/sdc1 to /media/sdc1, opened boot/grub/menu.lst and looked at it. Everything looked right so I wrote down root, kernel, and initrd parameters.
root (hd2,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=94737c4f-9d70-42f9-ab45-234503e607e7 ro splash
initrd /boot/initrd.img-2.6.24-16-generic
I popped out the CD, rebooted the computer, got the grub prompt and proceeded to type them in. I didn't even get past the 1st entry when I got an error. Apparently (hd2,0) doesn't have a filesystem that grub knows how to deal with. Going back to my initial issues with the wrong expected (or at least my expectations) order of the drives I input
root (hd0,0) and it successfully accepted it! Aha! I input the other 2 parameters and then boot. Linux proceeded to boot and after a certain point it spewed some more errors about missing drives and dumped me to an (initramfs) prompt. What the hell?I rebooted into the Live CD, remounted the drive, checked the UUIDs, and still the correct UUIDs. I fiddled around with this some more, going back and forth between the Live CD and the grub prompt. No success and hours upon hours spent on trying to kubuntu to load. I thought of maybe going back to debian for this, but it wouldn't help me in the long term with keeping everything *buntu.
Meh, I'll go oldskool... If you've just built a new box and you can't even get to the BIOS or shortly thereafter (before even installing an OS) most people I've talked to follow a fairly good method for figuring out the problem. You just disconnect everything and proceed to slowly connect hardware bit by bit, with a reboot after each piece is connected, until you discover which part is giving you a problem and then figure out why.
Rather than starting with everything pulled apart, I'm already past the BIOS and hardware detecting, it's an issue with the operating system. I disconnected all the hard drives I didn't need in order to install the operating system. I rebooted, installed kubuntu, rebooted, and kubuntu loaded just fine! Aha!
I turned the box off, connected all the drives back up again, rebooted the computer and fully expected to get a grub prompt again. Kubuntu booted up just fine - yay! problem solved. I went back and announced my solution in all of the channels on freenode I'd been asking questions in and somebody told me I needed to complain to the libata group.
LVM for Videos
So now I've got my root partition set up and 3 other drives with LVM partitions. I had initially thought about making them all ext3 or some such, but then I wasn't quite sure how I would go about mounting them so I could put tv recordings on all of them. Then I remembered I've been wanting an excuse to mess around with LVM. Most of what I've done with multiple drives requires some sort of redundancy or recoverability in which case raid is very useful. LVM is useful for data you don't care whether it gets toasted or not. Granted, it's nice to keep tv shows, but if 1 of the drives dies and I lose the whole thing there's always reruns...
LVM is awesome because you can use drives of different sizes and you can grow or shrink partitions fairly easily. I proceeded to set up my LVM with my 3 extra drives - 40gb, 80gb, and 500gb. That was pretty easy to setup (LVM HOWTO - Chapter 11. Common Tasks, Columbia Astrophysics Laboratory - Expanding an existing LV (logical volume), and Setting Up LVM - Without A Clean Install all had useful info and were easy for me to connect the dots across) so I figured I'd go download updates and install mythbuntu-desktop.
Reading the Instructions
I think I finally got around to heading off to the mythbuntu website (it's been a long time since the last time I came around). I downloaded the installation instructions and started reading. I came across this:
Most people will want to install using the Live CD. Of the three options, this is the fastest selection. It also provides the most granularity for selecting options, and configuring packages. The GUI for installation is very easy to follow and friendly for new users.
Another advantage to performing a Mythbuntu installation from CD is the higher level of automation that the Mythbuntu ubiquity CD installer provides. To achieve the same results in method 2 or 3 as those of 1 would require additional configuration steps to be performed.
Installation method 1 provides several options immediately during the installation process that are not available in method 3 or 2 until the Mythbuntu Control Center (MCC) can be run post-install. For example, installation of the mythbuntu-desktop meta-package does not install any plugins. Installation of plugins in method 3 requires installing plugins as a separate step. Additional tasks that can be performed during install include...
Oh great... I stopped the package updates and started downloading the mythbuntu CD via torrent. I went back to reading through the installation manual to see what else might be coming up. After about an hour of downloading I burned the iso to a CD and started the install process. I used the Mythbuntu Live CD to install both my server and my laptop client - for my desktop I just installed the extra packages needed.
Installing Mythbuntu - Backend (Server)
Considering my earlier installation issues I started by disconnecting my 2 SATA drives. Installation went without a hitch, I turned the box off without rebooting (GRUB had the correct hd listed and the UUIDs for the IDE drives had already been setup and written correctly), connected my SATA drives, turned the box on, and successfully loaded mythbuntu.
I can't remember whether I did a Standard Installation
or the Advanced Installation -> Primary Backend w/Frontend
, but ended up with a couple of problems later on with my remote client. My initial backend configuration seemed to go fairly easily.
General
During my initial setup this seemed to be fairly obvious and straight forward. All the defaults seemed to be setup and nothing seemed amiss. The local backend was set to 127.0.0.1 and so was the master backend. Unfortunately I didn't understand the redundancy between the MythTV frontend and backend.
I'm not completely sure what's going on, but considering the small changes that fixed major problems... It seems that the MythTV frontend connects to a backend. The backend then tells the frontend what to connect to in order to find the backend (wth?). In debugging my frontend it kept trying to connect to 127.0.0.1 for the media stream, but it was connecting to the right mysql server and seemed to be making other connections to the correct backend. All I can say is what the hell?? Does the backend really need to tell the frontend where to connect for the media stream?
If you're going to use more than 1 box in your MythTV setup, make sure you set the correct network accessible IP address for both the local backend ip address (this isn't used locally, it's broadcast to the frontends) and the master backend ip address (even if the master is the localhost). Otherwise, after your frontends make the initial connection to the backend they'll be comfused and you'll sit around for hours on end pulling your hair out.
Another issue is that people keep asking about hostnames. I think this is a major bug in MythTV. Currently a few people don't have problems using resolvable computer names, but the vast majority of people seem to have problems using anything other than a static IP address. I'm not sure what the issue is, but apparently MythTV doesn't bother to resolve computer names. This has become a fairly standard way of dealing with defining computers on a network.
The Security Pin (Required)
is only required if you want to allow remote connections. I still haven't figured out where to input the PIN in my frontend - I set this value to 0000
to allow connections from any client as I was trying to eliminate possible problems.
Other than setting the TV format (PAL or NTSC depending on your region) and the Channel frequency table you should probably be able to accept the defaults for the rest unless you want to do something specific.
Capture Cards
When setting up my capture cards
I figured I just needed to set up 1 capture card
for my PVR-500, but later I couldn't find the 2nd channel. You'll need to set up 2 separate capture cards
to get both recorders on the PVR-500 to work. As it states in the Installation Manual you'll need to set the Card type
to MPEG-2 Encoder Card
for both recorders. Once that's selected, the first recorder can use the default Video device
(for me it was /dev/video0), but for the second you'll need to select the other available Video device
from the drop down menu (for me it was /dev/video1). Unless you've got some weird hardware you should be able to accept the rest of the defaults for both recorders.
Video Sources
North America has the wonderful SchedulesDirect.org which provides tv schedules. You'll need to go there and create an account. Once you've created an account, you'll need to select the Add a new lineup
, input your zip code (it will remember any zip codes you enter), and select 1 of the lineups. If you're not sure which lineup you need you can 'Preview Lineup' to see what channels it shows.
For my current cable provider, Everest, there's 2 listings - Everest GT Cable
and Everest GT Cable - Digital
. The difference is that the non-digital only lists the channels that don't require a set top box and the digital includes all of the channels whether they require a set top box or not. As my stuff is in the basement and I currently don't have a set top box I'm going with the non-digital. When this changes I'll have to go through and figure out how to setup the set top boxes... Unless there's something I don't know about I'll also have to figure out how to setup 2 set top boxes for a single line in on the PVR-500.
Then just input your user id and password, then select the Retrieve Lineups
and select it from the Data Direct Lineup
. If you've just got the 1 there's not much else to do. If you've got multiple recording sources you can set them all up from here.
Input Connections
Here's where you assign Video Sources
to your Capture Cards
. As I'm currently only using the Coax connection for getting my cable channels I've only set up tuner 1 and 2. If I end up with set top boxes I'm guessing I'll have to use the S-Video or Composite inputs.
[MPEG:/dev/video0](Tuner 1) -> Everest nondigital [MPEG:/dev/video0](S-Video 1) -> (None) [MPEG:/dev/video0](Composite 1) -> (None) [MPEG:/dev/video0](S-Video 2) -> (None) [MPEG:/dev/video0](Composite 2) -> (None) [MPEG:/dev/video1](Tuner 2) -> Everest nondigital [MPEG:/dev/video1](S-Video 1) -> (None) [MPEG:/dev/video1](Composite 1) -> (None) [MPEG:/dev/video1](S-Video 2) -> (None) [MPEG:/dev/video1](Composite 2) -> (None)
Channel Editor
The Channel Editor is great if you've got multiple sources (like you're using both Cable TV and Satellite or you're also using a TV antannae). I'm still not sure what DVB is, but you can fix your DVB transports via the Transport Editor
button.
Initially this should pull in all of the channels from your Video Sources
. They're sorted by Channel Name in this list and you can resort them by channel number if you want. You can use this list to modify the channel numbers in your frontend and in your front end (at least afaik) they show up only in channel number order.
Be careful as Delete Channels
deletes all of the channels at which point you'll have to rerun the Channel Scanner
. To delete a single channel, just select it from the list and press the delete key.
To modify specifics of a channel, select it from the list. From here you can do everything from change the XMLTV ID (this will change what it uses to show you the schedule), on screen channel number, and the frequency or channel
(not suggested unless you know what you're doing) to the contrast, brightness, color, and hue... or whether (and how) you want it to do commercial flagging...
I think I set TCM to Commercial Free... It doesn't really have commercials. I guess you could call the hosts discussing the movies, blips about big name movies being played during the month, bursts on celebrities by celebrities, and tv shorts or historical news clips played between movies commercials
, but they're usually interesting, informative, or interestingly informative. Not to mention they're between movies and they're not usually played all that often... except I think I've seen that 1 about letterbox vs edited to fit the size of your screen
(i.e. widescreen vs fullscreen) so many times - I agree, widescreen is better, people who like full screen just don't know what they're missing... Did I mention that these commercials
are between and not during movies?
Storage Directories
Storage Directories or Storage Groups can be used for grouping new recordings... somehow. I've not messed with this, but there seems to be 2 defaults - LiveTV and DB Backups.
Installing Mythbuntu - Frontend (Client)
Now that I had the backend setup it was time to work on the frontend. I initially installed the frontend on my server so I could watch while I worked on getting another frontend setup. Unfortunately I didn't seem to have much success with this and I'm not sure whether it's because I was trying to record and play at the same time or whether it was just the video card. Considering some other issues I've had with the card (and the fact that my friend gave me the card after it kept causing his computer to reboot on him while he was playing WoW) I'm going to blame it on the video card for now.
Installing on Existing Desktop
Next step was to try to install it on my desktop as I tend to play lots of video in my secondary monitor while working on things, not to mention it's definitely over powered enough to do this. This is where I discovered lots of things about putting the frontend together.
I kept getting a can't find server error and my debug output kept listing a failure to connect to the backend server on 127.0.0.1 - duh. I put my debug output up on paste2 and dumped the URL in chat and I had several helpful people keep telling me to change my IP address on my client to whatever my backend's IP address was. I then proceeded to put all of my config files on paste2 showing all my IP addresses for my server (backend) and posted that URL. I had yet another helpful person tell me I needed to stop using 127.0.0.1 on my client - I pointed to my config files and asked them to please show me where or how 127.0.0.1 was appearing in my frontend.
It was at this point that somebody asked me to go dig through my server setup. I had to wait for a tv show to finish recording before even being able to view the backend configuration stuff. It would be nice if you could at least view the config info without having to shutdown the server. After the show was over I discovered that the local backend
needed to be set to an IP address that the frontend can connect to. I changed the IP address to the local server's network IP address and exited out of all of the setup stuff and let the server restart.
I ran the client again on my desktop and I got a new error! Yay, progress... Unfortunately the new error was about a difference in the mythtv protocol version. Oh goodie... So I run an update with aptitude and then check to see if there's a newer version of mythtv and discover I'm already running the latest mythtv version for gutsy. Considering some of the problems people have had with upgrading to hardy I've been holding out on upgrading my desktop and considering I wanted to get this done in time to watch all 3 Indiana Jones movies on sci-fi I didn't want to spend lots of time trying to fix any possible issues that came up in order to get my desktop working again. I'll work on this again later as the client I finally got working has some issues due to hardware specs.
Installing on My Old Laptop
Considering the hardware specs on my laptop I wasn't sure if this would work at all. I got it back in '01 as part of a programming course and we were kind of frustrated that they weren't a bit better. It's a 500mhz with 128mb ram and has an ATI Rage Mobility video card (4mb ram!). Considering the low amount of ram I was wanting my swap to be a bit faster so placed it at the beginning of the hard drive instead of the end. To pad the fact that it has such low ram I set the swap to be about 1gb.
Also because of the low amount of ram I also wanted to limit how much crap was running. I initially installed xdm to replace gdm, but xdm doesn't allow auto login so I went back to gdm (I'll have to check kdm). I asked about just using X, but found out it's suggested that you at least use a window manager (WM) of some kind so you can avoid the posibility of window focus issues. Xfce (the default WM in mythbuntu) uses less resources than Gnome and KDE, but still... I wanted something really light weight. I've used IceWM before (it's what I'm using on my current laptop), but I can't seem to get the mythfrontend to appear over the top of the taskbar. I started asking around and 1 of the guys in either #ubuntu-mythtv or #mythtv-users on freenode mentioned that he uses TWM.
TWM doesn't seem like much of an improvement over just plain X. In order to give a window focus, the mouse has to be over it - I really don't like this. I prefer to be able to alt+tab to give different windows focus, especially when dealing with maximized windows like the mythfrontend app. Oh well, most things that I need the terminal for I can do remotely. Here's the ~/.twmrc file I put together.
NoTitle {
"mytharchivehelper"
"mythbrowser"
"mythbuntu-control-centre"
"mythbuntu-lirc-generator"
"mythbuntu-lircrc-generator"
"mythfrontend"
"mythfrontend.real"
"mythlcdserver"
"mythreplex"
"mythshutdown"
"mythtranscode"
"mythtv"
"mythtvosd"
"mythtv-status"
"mythwelcome"
}
BorderWidth 0
Button1 = : root : f.menu "prg"
Button3 = : root : f.menu "window"
menu "prg"
{
"TWM" f.title
"xterm" f.exec "xterm -sl 255 -bg midnightblue -fg white -name xterm@twm.org &"
"Kate" f.exec "/usr/bin/kate &"
"mythfrontend" f.exec "/usr/bin/mythfrontend &"
}
menu "window"
{
"X Windows" f.title
"Kill Window" f.destroy
"Delete Window" f.delete
"" f.nop
"Focus" f.focus
"Unfocus" f.unfocus
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"" f.nop
"Redraw" f.refresh
"Restart" f.restart
"Quit" f.menu "quit"
}
menu "quit"
{
"Really Quit?" f.title
"No" f.nop
"Yes" f.quit
}
The "NoTitle" section causes those windows to not have a title bar across the top. You don't really want to be watching TV and see a title bar across the top of the TV screen stating mythfrontend.real
.
My next issue was to try to get the composite TV-Out to work. I made sure the atitvout and xserver-xorg-video-ati packages were installed and checked my /etc/X11/xorg.conf file to see if they were being used. There was no indication that either were being used. Here's the part of the generated xorg.conf file I had dealing with the video card and monitor:
Section "Device"
Identifier "Configured Video Device"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
I googled around and found How to get TV-Out working on ATI graphic cards
, HOWTO TV-Out
, HOWTO: TV-out for legacy ATI cards using GATOS
, and tv out with ati radeon 7000 (hoary)
. I made sure the gatos package was installed, messed around a bunch with my /etc/X11/xorg.conf file, and restarted gdm after each change. The first several tries failed to even come up on my external monitor or the TV. Then I started seeing things on the monitor, but still absolutely nothing on the TV. I kept trying and trying - commenting stuff out, adding new stuff, uncommenting. Nothing seemed to work and then I remembered about the fn+F4 to change which displays are being used. I finally got lots of fuzzy stuff across the screen - so I at least got it to display something on the TV.
I then messed around with the xorg.conf file some more, restart gdm after each change. I was getting video garbage across the screen, but nothing seemed to give me a picture. Considering 1 of the links above, I wanted to see if I could get the TV-Out to even give me a console. A quick CTRL+ALT+F2 gave me a very grainy login prompt. I logged in, did several directory listings, cat a file, etc... just something to fill up the screen and start scrolling it to make sure the entire TV screen was working right. Everything seemed to be working there, so a quick CTRL+ALT+F7 put me back in X, but with video garbage across the screen again. Out of morbid curiosity I pressed fn+F4 a couple times and suddenly got a very clear (at least as far as overly grainy can be clear) image of the desktop on my TV.
With that issue solved I promptly closed the lid on the laptop and, after the flash to readjust which displays are being used, the desktop showed up on my external monitor, but absolutely nothing on the TV (not even the garbage). I quickly opened the lid again, the quick flash, and the desktop appeared on both the external monitor and the TV. At this point I figured it was going to be a game of which display mode is going to work with the lid down and proceeded to press fn+F4 and the TV went blank. I thought crap, this isn't going to work
, but closed the lid any way to see if the TV would display something. I got the lucky as this first try immediately worked. So apparently I need 1 display mode if I keep the laptop lid open and a completely different display mode if I'm going to close it. Hopefully I won't have to deal with this all that much.
I'm not sure what (if any) parts of my xorg.conf file set up my ability to display to the TV, but here is the new video card and monitor portions including the commented sections:
Section "Device"
Identifier "RADEON-TVOut"
# Driver "radeon"
# Driver "fglrx"
Driver "ati"
# Option "AGPMode" "4"
# Option "AGPMode" "1"
# Option "AGPFastWrite" "yes"
Option "TVOutput" "NTSC"
# Option "IgnoreEDID" "true"
# Option "MonitorLayout" "NONE, CRT" #here it is!
# Option "NoTV" "no"
Option "TVFormat" "NTSC-M"
Option "TVStandard" "NTSC-M"
# Option "TVHSizeAdj" "0"
# Option "TVVSizeAdj" "0"
# Option "TVHPosAdj" "0"
# Option "TVVPosAdj" "0"
# Option "TVHStartAdj" "0"
# Option "TVColorAdj" "0"
# Option "GammaCorrectionI" "0x06419064"
# Option "GammaCorrectionII" "0x07d1905b"
EndSection
Section "Monitor"
Identifier "TV Monitor"
HorizSync 30.0 - 40.0
VertRefresh 60
Modeline "800x600" 40.00 800 840 968 1056 600 601 605 628
EndSection
Section "Screen"
Identifier "TV Screen"
Device "RADEON-TVOut"
Monitor "TV Monitor"
DefaultDepth 16
# SubSection "Display"
# Depth 16
# Modes "800x600"
# EndSubSection
EndSection
Epic Conclusion
I have to say that this amazingly low end, sub-par hardware does a decent job. When watching Live TV
and previously recorded shows it usually uses anywhere from 10-50% cpu. However, it can hit up to 100% cpu every 5-20 minutes at which point the video becomes jerky. I'm not sure whether it's the video card, my TV, or a combination (or maybe my eyes are going and I'm not wearing my glasses), but the picture seems a bit grainier than it normally does does. I've been recording things using the preset High Quality
profile on mythbuntu so I'm hoping things will look much better once I get my desktop setup with a frontend. This laptop will definitely not survive playback of HDTV.
After about 2.5 days (that's the entire day, not just a couple of hours each day... granted, lots of installing, rebooting, googling, etc - while watching TV) I finally got everything setup. I got to watch Indiana Jones and the Raiders of the Lost Ark
(2:33 hours) about 30 minutes after it had already started last Saturday. My poor laptop made it all the way to the point where the evil priest is lowering the first sacrifice into the fire in Indiana Jones and the Temple of Doom
(2:36 hours) when the MythTV client crashed and left me looking at the desktop. I'm not sure what exactly happened, but I'm guessing I ran out of swap or I ran out of stream.
Since then, over the remainder of the weekend, I've made some more tweaks and disconnected the external monitor. I also discovered that if I need to restart gdm I need to plug in an external monitor and change display modes a couple of times to get it to display properly on the TV again. I also installed the htop package so I could get a cpu/memory usage and top display via terminal so I could login remotely and watch what was going on during any possible problems. I think I finally got over 6 hours of Live TV
to play without MythTV dying so I went back to finish up Indiana Jones and the Temple of Doom
and followed up with Indiana Jones and the Last Crusade
(2:51 hours).
The only problems I encountered was jerky video and 1 place where it stuck a little too long. Watching the output from htop I could tell that the CPU was hitting 100% and shortly after the video would stop being jerky and the CPU would drop back down to 10-50%.
Overall I'm happy to be able to pause and rewind live TV again. I'm somewhat frustrated that the backend can't adjust to the client and use the previous streaming protocol, which means I'll have to update my desktop before being able to use the frontend on my desktop. I'm also excited and frustrated, at the same time, with my frontend. I'm excited that I've been able to use such crappy hardware and frustrated that it is such crappy hardware (I can't wait to replace it once I get the money to do so).
I also got frustrated with some of the keymappings on my remote tonight. Luckily I should be able to go in and remap them to do what I want. I couldn't get what I assumed to be the page up/page down buttons to work the way I expected them to in the guide listing - they simply scrolled 1 channel at a time. Then, when I attempted to change channel in the guide by pressing the numbers I seemed to get weird behaviour - page up/page down and the day would change. I started paying attention and messing around - 3 does a page up, 9 does a page down, 1 increases the day, and 7 decreases the day. I keep trying to find an exit
, cancel
, or go back
button that makes sense with any of the labels on my remote. The <-
button doesn't seem to be mapped to anything (it's a smaller button to the left of the left arrow button around the OK button) and it's something that I'd associate with the jump back 10 seconds button for TiVo's.
As I've not really gone through all the issues with the keymappings I'm guessing some of the problem is due to the keymapping defaults that come in mythbuntu (not sure if they're a part of any other MythTV package/distro) and some of it is due to the funky button layout on the Windows MCE
remote that came with my Hauppauge PVR-500.
Sign: umsun Hello!!!
megan fox (not verified) — Fri, 2009-09-11 09:41Sign: umsun Hello!!! rcuwwymhyw and 4872ssgfhphzye and 547I like your blog. cool post!
Hi! I was surfing and found
sandrar (not verified) — Thu, 2009-09-10 06:56Hi! I was surfing and found your blog post... nice! I love your blog. :) Cheers! Sandra. R.