05 Cadillac SRX Sat Radio Install

April 20th, 2009

Diana had XM radio in her old car and really liked having it. When we got her new car it did not have sat radio. I had installed the XM in her old car and figured it could not be that hard in her new car. So far I do not have any sat radio in her new car. This weekend I pulled quite a bit of the interior apart to get to the radio components. I took some pictures and am attempting further research.

8 pin plug for head unit

8 pin plug for head unit

8 pin plug for head unit

8 pin plug for head unit

20 pin head unit plug

20 pin plug for head unit

20 ping head unit plug

20 pin plug for head unit

As I get more info I will post it.

MythTV Systems 2/3 – mythbedrm

February 20th, 2009

My second MythTV system is a frontend (often shortened to FE) only system that sits in the bed room. I bought it from woot.com. It is a HP Media computer that is quite small. It has a 500GB drive, AMD Athlon64 x2 5200+, builtin wireless (that I do not use), and is small and quiet. It does not have an onboard digital video out connetion so I added a PCI-E video card. As luck would have it I purchased an Nvidia 8400GS card. Now that Nvidia has provided the VDPAU video acceleration system the next version of Myth will be able to offload much of the video processing to the video card. I do not really need any more speed for OTA ATSC 1080i MPEG2 playback, but for full 1080p Blu-Ray my system is not fast enough.

MythTV Systems 1/3 – mythfront

November 21st, 2008

This post will be the first of three describing my MythTV systems. This system was my first dedicated MythTV system. Previous attempts had tried to kludge Myth onto my main desktop when I lived in a single room instead of having my own house. This system was purchased in May 2006 and has had a few upgrades since then.

The original system consisted of these parts:

The case and PVR-500 encoder are the only parts of the original system that remain. The first upgrade, however, was to replace the original CPU with a Athlon64 4000+ (2.4GHz) when I was experimenting with HD. Video output was via the onboard Nvidia 6150 to a projection TV at 720P. Audio output was analog to the TV. After two years of operation I decided to go full scale into HD in preparation for a new LCD TV. The socket 939 CPUs were starting to increase in price. I really wanted a dual core system and the price of a socket 939 CPU alone would be rather high. My wife also needed a new computer and so I decided to reuse the MB/RAM/CPU from the Myth box for her new computer and purchase new parts for Myth.

Socket AM2 was the new interface from AMD and that is what I chose for my upgrade. These parts were added to the new system:

I also added a Microsoft MCE USB IR Receiver and remote to replace my RF ATI remote. The button response from the MCE remote was much better than the RF remote. I was not paying enough attention when I ordered the motherboard and purchased one without onboard video. That might turn out to be to my benefit. I purchased a Nvidia Geforce 8400GS fanless card for the system. I also have added a second 500 GB Seagate drive and a Pinnacle 800i ATSC/QAM encoder card.

One of the 500GB SATA drives holds the OS, MySQL db, and static media files (pictures, DVD rips, CD rips, etc). The other drive is used solely for TV recordings.

The hardware in the system is still what is described in this post, but the locations of some things have changed due to the addition of another frontend and NFS storage on my desktop PC.

Optimizing XFS filesystem with MythTV

November 19th, 2008

I use MythTV for all my TV watching needs. I am a full time student and work a full time job. That does not leave much time to watch TV. With the commercial flagging and auto commercial skip functions turned on in Myth I rarely ever even see a commercial anymore. Another plus is it takes about 40 minutes to watch an hour long show.

Recently I was attempting to watch one of the HD recorded programs from my secondary frontend machine and the video would pause for a couple of seconds every 10 to 15 seconds. I could hear the hard drive in the master backend machine screaming along.

I don’t have an overly advanced Myth setup, but I do have two analog tuners (PVR-500 single PCI card) and a single digital tuner (Pinnacle 800i PCI card). Neither of these require the CPU to do any encoding of the video so the CPU requirements are minimal. The I/O on the computer can easily get overloaded though! If all three of my tuners are recording at once the raw write bandwidth is 2 x (4500-6000) bits/sec + up to 17.89 mb/sec for 1080i. Total is ~20 mb/sec up to a max of 29.89 mb/sec (3.74 MB/sec). Not really too much of load yet; especially for a SATA-II drive. The next thing that will be consuming I/O bandwidth is commercial flagging.

In a nutshell Myth plays the entire show through and flags where it thinks the commercials are. That is a very simple explanation, but it works incredibly well. It also requires a read of the recording from the HD. My BE machine has an AMD Athlon64 x2 5000+ and I have it set to run a maximum of 2 commercial flagging jobs at once. My FE has an AMD Athlon64 x2 5200+ and I have it set to run only a single job, leaving one core free for watching TV. Total commercial flagging jobs that can run at once is 3. So add reading of three shows from the HD to the total I/O load. The CPUs I have can comm flag SD or HD content very near real time so they need the data as fast as it records. Total I/O load is now up to ~60 mb/sec (7.94 MB/sec). So far my single SATA-II drive should be able to keep up, but this is only basic PVR recording. I still have to account for watching a show and fragmentation.

Now that my system is pushing roughly 8MB/sec to/from the drive I start watching a show. If it is 1080i HD then add another 17.89 mb/sec (2.24 MB/sec) of read. This is where I started to notice the choppy playback.

There are several things that can be done with the Linux settings as well as from within MythTV to alleviate some of the problem. One of the first things I looked at was fragmentation of the XFS filesystem where I saved the recorded video. XFS is a very high performance filesystem when working with large files (recordings are from 2GB – 10GB per show). The problem is the default XFS options allocate space in small chunks when saving the file. There is no other data saved to the drive that holds my recordings. The smallest file I can see being added to the drive is ~2GB (30 min SD show). For this reason I added the mount option to tell XFS to allocate 1GB chunks when saving files. This would create between 2 and 10 fragments per file instead of the potentially enormous number of fragments. Default allocation size is 64KiB rather than 1GB. This is what the line in /etc/fstab looks like now:

root@mythfront:~# grep sdb1 /etc/fstab
/dev/sdb1 /var/lib/mythtv/recordings xfs logbufs=8,noatime,nodiratime,allocsize=1G 0 0

The other options turn off recording the access time of files and directories and using 8 buffers for the file system journal. The extra journal buffers cost some RAM, but my system has 2GB which is plenty.

I also used the xfs_fsr command to check the fragmentation of the filesystem:

root@mythfront:~$ xfs_db -r /dev/sdb1
xfs_db> frag
actual 947896, ideal 95491, fragmentation factor 89.93%
xfs_db>

The ‘-r’ option is needed to view (read only) a mounted filesystem. As you can see the fragmentation is rather large. The command to defrag an XFS filesystem is xfs_fsr. It has a couple of options, but the only one I cared about was ‘-t [seconds]‘ which allows me to tell XFS how long to run. After several runs like this:

root@mythfront:~# xfs_fsr
xfs_fsr -m /etc/mtab -t 7200 -f /var/tmp/.fsrlast_xfs …
/var/lib/mythtv/recordings start inode=0
xfs_fsr startpass 0, endpass 0, time 9334 seconds

I now have a much better optimized filesystem. Current fragmentation is:

root@mythfront:~# xfs_db -r /dev/sdb1
xfs_db> frag
actual 109246, ideal 95568, fragmentation factor 12.52%
xfs_db>

Much better! If you change the allocation size of the XFS filesystem and your Myth system is constantly recording there is little need to manually defrag. As shows are deleted the new ones will automatically be written in 1GB chunks. I may loose a little space by doing this, but that could be alleviated by setting the allocsize down to 512M or if recording mainly SD content 256M. It has only been a few days since I fixed these settings, but I have not seen any problems.

The next thing I will do is add some spare 250GB drives into my desktop tower case so that I can use them for recordings as well. Myth, through the magic of storage groups, will save one recording to each physical drive. This will create less I/O per drive but move some of that to the network. I guess a gigabit switch is also in order. I will post some details once I get the next upgrade done.

Nvidia 8400 GS Fanless card

November 18th, 2008

I use MythTV for all of my TV watching needs. I have two systems one connected to each TV in our house. The PC for the bedroom is an HP model I picked up on sale at woot.com. It has an onboard GeForce 6150 with only VGA out. Because our TV does not have a VGA input I bought an extra PCI-E video card. I had trouble locating an Nvidia model that was half height, had TV (component/s-video) out, and  was fanless. I purchased a card from NewEgg.com that fit the bill except the fanless part. How bad could the noise from a little fan be?

After installing the card and hearing the whine of that tiny, little 40MM fan I had to do something about it. The first solution I devised was to use an old CPU cooler from a Pentium or something. It was about 40MM^2 and maybe 15MM tall. I removed the stock heatsink and fan and fashioned a new bracket to attach the new heatsink using the original mounting holes on the card.

CPU Heatsink

CPU HeatsinkCPU Heatsink 2

I was excited about getting my new _quiet_ Myth system back up and going. After installing the card and starting up the computer I started a HD TV show and watched the temps…climb, and climb, and climb. I pushed the envelope a little and let things go until they stabilized. Average temp watching HD (although it should not matter what I was watching as none of the video decode happens on the GPU) was 95C+. I saw it running at 107C once before I turned the machine off. Wow! Way to hot! Back to the drawing board.

When my northbridge fan had died on another motherboard I purchased a passive heatsink for it. Just in case, I had gotten an extra. This heatsink was a little smaller than the first attempt, but was made for a fanless setup and had many more fins that were taller. The northbridge cooler is a Zalman ZM-NB47J. It is 37MM^2 and 47MM tall. The Zalman comes with an adjustable mounting system that was easy to use with the card’s stock mounting holes.

Zalman Northbridge Cooler

Zalman Northbridge Cooler

This looked much better, and has a much larger surface area, than my first attempt. I was excited to see how this would work.
After installing the card back into the computer I noticed my first problem. The heatsink was too tall for the case to fit back on. No problem. Quick trip to the garage and a few minutes with a dremel and the heatsink was about 5MM shorter. The case now fit back on and I was ready to test it out. Started Myth and began playing a HD show. The temps did not click as quickly as my first attempt, but they did climb. I let things go and it stabilized around 75C-80C. Better than the first try, but still not very good. I used the system for a few days this way, but the temperature bothered me. Stability was fine, but I thought the temperature was too high.
I searched on the internet for another card, or a cooler for this card and found that the market for fanless, low-profile PCI-E cards with component out is rather small. I decided to try another heatsink.
There is a local PC repair and sales store that sells some old parts they have scavenged from broken computers. I visited them to see what they might have. In a bin of old heatsinks and fans I found several aluminum heatsinks that might work. I paid $5 for 5 heatsinks.
After getting them home and seeing how each would fit on the card and in my case I settled on one. The heatsink has an open area down the center where I could drill holes for mounting. The holes on the card are not parallel to the top edge of the card and so the heatsink would have to sit angled or I would have to remove fins to make room for another mounting hole. I decided to tilt the heatsink and see if I could make it work. Because of the angle of the heatsink it dropped below the connection to the PCI-E slot on the motherboard. To make room I cut off a small part of the heatsink. I also had to notch around a capacitor on the video card.

Attempt 3

Attempt 3

It takes up the PCI slot beside the PCI-E slot, but I don’t need it for this use.

Fanless Nvidia 8400GS

Fanless Nvidia 8400GS

This heatsink actually has fewer fins than the Zalman, but they are thicker and much more widely spaced. This case has very limited airflow, but I hoped the proximity of the heatsink to the aluminum case would help radiate the heat. After putting everything back together and watching some video I was quite impressed with this setup. The GPU under load is only 60C and it idles in the low 50C range. Stability has been excellent. Here is a shot of Sadie inspecting my work!

Inspector Sadie

Inspector Sadie

I have been very happy with this setup. The entire computer is very quite. I can hear the hard drive in the master back end on the other side of the wall when it is recording, but I am unable to hear this system in the same room. The master backend has a fanless 8400GS full height PCI-E card that idles higher (around 66C) than does my homemade version.

Dell 1501FP LCD

October 6th, 2008

Over the last couple of weeks I have seen 4 failed LCD monitors. All of them are Dell brand because that is what we have at work.

One of them is a 151 and I took it apart to see if I could find the problem. Once it was disassembled on the bench I powered it up and it was working. I put it back together and let it run for four straight days. After the fourth day of continuous use it was still working. It has now been boxed back up and we are waiting to see if it will fail later.

The other three monitors are 1501FP models. These are made by Samsung and are identical to the Samsung 153V model. The first one has been repaired. It failed due to bad electrolytic capacitors. The capacitors in turn put a larger strain on the FET transistors that produce the high voltage needed for the backlight. One of the FETs failed and darkened a large section of the PCB. I ended up replacing 2 FET IC chips (N-channel and P-channel in one package) along with a fuse and several capacitors. That monitor is now working.

Neither of the other two monitors shows an obvious failure like a burned part, but the PCB is a little darker around one of the FET chips. I only have a basic multimeter so advanced troubleshooting is rather difficult. Because I have a few extra FET chips on hand I may just replace them and see what happens. I had quite a time locating the correct chip. It is an 8 pin SOIC with a stylized A logo and the numbers 4600 on it. I finally tracked down the company that made the chip. It is Alph and Omega Semiconductor. The 4600 is no longer made, but 4619 is. The 4619 is stocked by DigiKey.

I will take some pics of one of these monitors.

Hello world!

October 6th, 2008

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!