2011-01-19, 01:26
If you're not interested in the story of my trials and tribulations please scroll down to my second post to get into the meat of the modeline tweaking process.
It's been a year of my life I'll never get back. I've had not one but several near breaks with reality in the process. I've become depressed and frustrated to the point of contemplating committing horrible acts of violence upon my hardware. I've undergone manic cycles of elated victory and crushing defeat. Please forgive my ramblings. I only mean to help others.
Let me begin with these words of advice: If you are happy with the way your XBMC system is playing videos then I beg you to stop reading now. It's possible that I may draw attention to flaws that are better left unnoticed and once brought to light you may never be able to cease the niggling awareness of imperfection. If you are pleased with your current results then please click away and never return. It's for your own good.
My obsession has been to accomplish perfect playback with a mac mini. Why this hardware? Simply because I already had it. I picked it up cheap as the studio I worked for was giving it away for a song. It began life as a core duo 1.8Ghz 1G ram system with an intel GMA965M video chipset. Having run XBMC for years on a original xbox I was finally ready to take the leap to a high definition TV and wanted the same functionality in my living room. We bought a samsung ln52b750 LCD TV and a harmony 880 remote. I hooked the mini to the tv through HDMI and optical sound to our onkyo receiver. I tried Plex, and boxee, but quickly found my way back to XBMC.
The mini was running OSX (10.6.x) for most of this last year. I downloaded the SVN versions of XBMC and one thing was readily apparent. This crap hardware was not handling 1080p at all and even 720p playback had many issues. Hmm... well we need more CPU and RAM I thought. So I bought a core2 duo 2.0 CPU and a second stick of ram and tore into the mini. Several hours later I had a newer, faster, 64 bit capable machine. A machine that now overheated and became unstable. Thankfully a "fan control daemon" program existed and once applied I was able to bump up the fan speed and it became fully stable once again. Unfortunately I was still plagued by stutters and glitches. So now I tore into the OS. I learned how to use iotop and identify any OS X process that might be hitting the internal hard drive. I spent days pouring over launchd plist system files in order to shut down absolutely any unnecessary process. I disabled the dock and killed the finder. I reniced xbmc to a higher priority. I learned that OS X doesn't handle file caching well over NFS and the VM system creates problems when the cache gets full. I spun up a samba server on my network and converted XBMC to use SMB directly. Still, 1080p was not working acceptably and 720p had problems. I cringed every time I saw an imperfection. Each attempted solution brought the rise of hope into my soul to be followed quickly by defeat and despair.
Then one day I saw the announcement "Broadcom crystal HD, it's magic!". HOLY CRAP! MAGIC! If there was anyone on earth who needed magic it was certainly me. Sacrificing my wifi card to the gods of HD video was a small price to pay for magic! I bought a BCM70012 and tore apart the mini again. I hacked through the manual .kext driver and lib install process. I upgraded to the proper SVN version of XBMC and eagerly enabled crystalHD support in the GUI. The result, predictably, was more stutters and hiccups. This time the stutters were pronounced and drawn out "jerk, jerk, jerk" as the crystalHD system tried to sync back up with the video stream. I was however able to play many of the 1080p vides that never worked before.
I spent most of 2010 dealing with this exact setup, upgraded mac mini, OS X, crystal HD. I read the forums like they were an encyclopedia of eternal wisdom with pages dispersed among piles of cranky and typically useless chatter. I spend hours and days tweaking system parameters, hunting down CPU and IO using processes, and a never ending cycle of upgrading both XBMC and the crystal HD software versions. In the end I got close to perfect playback in 720p and 1080p. God damned close but and but for a few minor judders I was almost there. It just wasn't good enough.
Then one day my beautiful and oh so eternally patient and understanding girlfriend sent me an IM. Someone where she was working was selling a 1st gen apple TV. I knew from the forums that the crystal HD card would go in an AppleTV and that some wise and gifted fellows had a ubuntu install working. I leapt on that purchase like cat on a mouse and ordered the newer BCM70015 card to go in it. Once again I sacrificed wireless connectivity to the gods of HD video. I have gig-e everywhere and to hell with wifi.
I thanked the gods this was going to be a Linux system. I wanted to do linux on the mini but was terrified of blowing away the OSX system I had been tweaking for months. I love linux. I started with linux in 1994 at a job where we used slackware on 386 machines because we didn't want to pay for the expensive X windows terminals to access our central RS6000 system. I've been a devoted linux fan for the past 16 years and have progressed through early redhat, debian, and for a long time gentoo distributions. Ubuntu is new to my world as I decided that I just had to have something with decent package management that didn't require compiling everything at install time. I've fostered and pushed for linux as a server environment at every job I've had. Now I support, build, and work with it daily. I love linux like a parent with a child he has watched grow into a mature and praiseworthy adult.
I connected up the ATV and installed the latest XBMC and crystal HD from svn source. I hunted down and killed a few unnecessary processes. After all that I had nice HD video. The broadcast TV had never looked better. No more judder and most of the time the video files played smoothly. In the cases where they did not I was able to demonstrate repeatable errors in the video files themselves. TV watching was good. 1080p on the other hand had gone the opposite direction. You see the ATV only has 256 MB of ram, and in this case.... it just didn't seem to be enough to handle 1080p after all. We marched on like this for a while and didn't watch anything in 1080p.
I needed to rest and recoup. I had lost every battle for perfect 1080p playback in the past 10 months.
I was beaten but not defeated. After a time I realized that because our basic HD TV needs were being met by the ATV I could go back and experiment with the mac mini. I decided I wanted a 64 bit OS. I wanted an OS that would stick around for a while. I wanted a dedicated XBMC system that would only serve as a video player and nothing else. I settled on ubuntu 10.0.4.1 LTS minimal (amd64) with the xbmc-live packages. Unfortunately the mac mini wasn't giving up it's EFI boot partition without a fight. I had to learn about refi-it and force some hair raising install options in grub. I delved into the mysteries of lm-sensors in order to speed up the mini's fan and prevent the same overheating. I spent three days fighting with ircd and remote config files to get our harmony remote working acceptably. Eventually though it booted and dual booted actually as I had retained an OS X install just in case. My video comes over Gig-E from a dedicated NAS ubuntu server and I need very little local storage.
As a side note I'd like to state for the record that I believe there is a significant difference between the BCM70012 and BCM70015 cards. The 70015 on spec supports another notch higher h264 decoding and a bit more bandwidth. In my experience this made a significant difference for certain 720p and 1080p files. It also seems to recover from a loss of sync much more rapidly and smoothly than the 012. At one point I directly swapped these two cards and, without any os, driver, or software changes was able to realize an immediate and significant gain in playback.
As I overstated above. I love linux dearly. However I hate xorg. Xorg is a simply horrible way to handle video drivers. Where I work we have a huge install base of artists using linux as their daily creative platform. Xorg, the nvidia drivers, and various openGL application interactions are one of the most system crashing and work disrupting aspects of our desktop image, and has been for years. The xorg.conf file is cryptic and hard to understand. It's ancient syntax is born of the twisted and inhuman union of early VGA and CRT monitor couplings. It's the unholy offspring of proprietary and open source software and hardware driver interaction. I believe it to be the biggest weakness of a professional linux desktop deployment. But I digress....
Then came the process of getting all the assorted software bits and pieces put together. Alsa sound, check... broadcom svn driver, check, xbmc-live ppa packages, check. It all seemed to be working on my 60Mhz LCD TV and other PC monitors. I brought it into the TV room and made the call. We were going back to the Mac mini. This cursed object of months of obsession and despair. It was coming back into our TV viewing lives.
This ends the unburdening of my soul portion of this diatribe. If you actually read this far then bless you. I hope you found some humor or solace in what I have written. If you're also on this path to madness then take heart in the fact that you are not alone.
It's been a year of my life I'll never get back. I've had not one but several near breaks with reality in the process. I've become depressed and frustrated to the point of contemplating committing horrible acts of violence upon my hardware. I've undergone manic cycles of elated victory and crushing defeat. Please forgive my ramblings. I only mean to help others.
Let me begin with these words of advice: If you are happy with the way your XBMC system is playing videos then I beg you to stop reading now. It's possible that I may draw attention to flaws that are better left unnoticed and once brought to light you may never be able to cease the niggling awareness of imperfection. If you are pleased with your current results then please click away and never return. It's for your own good.
My obsession has been to accomplish perfect playback with a mac mini. Why this hardware? Simply because I already had it. I picked it up cheap as the studio I worked for was giving it away for a song. It began life as a core duo 1.8Ghz 1G ram system with an intel GMA965M video chipset. Having run XBMC for years on a original xbox I was finally ready to take the leap to a high definition TV and wanted the same functionality in my living room. We bought a samsung ln52b750 LCD TV and a harmony 880 remote. I hooked the mini to the tv through HDMI and optical sound to our onkyo receiver. I tried Plex, and boxee, but quickly found my way back to XBMC.
The mini was running OSX (10.6.x) for most of this last year. I downloaded the SVN versions of XBMC and one thing was readily apparent. This crap hardware was not handling 1080p at all and even 720p playback had many issues. Hmm... well we need more CPU and RAM I thought. So I bought a core2 duo 2.0 CPU and a second stick of ram and tore into the mini. Several hours later I had a newer, faster, 64 bit capable machine. A machine that now overheated and became unstable. Thankfully a "fan control daemon" program existed and once applied I was able to bump up the fan speed and it became fully stable once again. Unfortunately I was still plagued by stutters and glitches. So now I tore into the OS. I learned how to use iotop and identify any OS X process that might be hitting the internal hard drive. I spent days pouring over launchd plist system files in order to shut down absolutely any unnecessary process. I disabled the dock and killed the finder. I reniced xbmc to a higher priority. I learned that OS X doesn't handle file caching well over NFS and the VM system creates problems when the cache gets full. I spun up a samba server on my network and converted XBMC to use SMB directly. Still, 1080p was not working acceptably and 720p had problems. I cringed every time I saw an imperfection. Each attempted solution brought the rise of hope into my soul to be followed quickly by defeat and despair.
Then one day I saw the announcement "Broadcom crystal HD, it's magic!". HOLY CRAP! MAGIC! If there was anyone on earth who needed magic it was certainly me. Sacrificing my wifi card to the gods of HD video was a small price to pay for magic! I bought a BCM70012 and tore apart the mini again. I hacked through the manual .kext driver and lib install process. I upgraded to the proper SVN version of XBMC and eagerly enabled crystalHD support in the GUI. The result, predictably, was more stutters and hiccups. This time the stutters were pronounced and drawn out "jerk, jerk, jerk" as the crystalHD system tried to sync back up with the video stream. I was however able to play many of the 1080p vides that never worked before.
I spent most of 2010 dealing with this exact setup, upgraded mac mini, OS X, crystal HD. I read the forums like they were an encyclopedia of eternal wisdom with pages dispersed among piles of cranky and typically useless chatter. I spend hours and days tweaking system parameters, hunting down CPU and IO using processes, and a never ending cycle of upgrading both XBMC and the crystal HD software versions. In the end I got close to perfect playback in 720p and 1080p. God damned close but and but for a few minor judders I was almost there. It just wasn't good enough.
Then one day my beautiful and oh so eternally patient and understanding girlfriend sent me an IM. Someone where she was working was selling a 1st gen apple TV. I knew from the forums that the crystal HD card would go in an AppleTV and that some wise and gifted fellows had a ubuntu install working. I leapt on that purchase like cat on a mouse and ordered the newer BCM70015 card to go in it. Once again I sacrificed wireless connectivity to the gods of HD video. I have gig-e everywhere and to hell with wifi.
I thanked the gods this was going to be a Linux system. I wanted to do linux on the mini but was terrified of blowing away the OSX system I had been tweaking for months. I love linux. I started with linux in 1994 at a job where we used slackware on 386 machines because we didn't want to pay for the expensive X windows terminals to access our central RS6000 system. I've been a devoted linux fan for the past 16 years and have progressed through early redhat, debian, and for a long time gentoo distributions. Ubuntu is new to my world as I decided that I just had to have something with decent package management that didn't require compiling everything at install time. I've fostered and pushed for linux as a server environment at every job I've had. Now I support, build, and work with it daily. I love linux like a parent with a child he has watched grow into a mature and praiseworthy adult.
I connected up the ATV and installed the latest XBMC and crystal HD from svn source. I hunted down and killed a few unnecessary processes. After all that I had nice HD video. The broadcast TV had never looked better. No more judder and most of the time the video files played smoothly. In the cases where they did not I was able to demonstrate repeatable errors in the video files themselves. TV watching was good. 1080p on the other hand had gone the opposite direction. You see the ATV only has 256 MB of ram, and in this case.... it just didn't seem to be enough to handle 1080p after all. We marched on like this for a while and didn't watch anything in 1080p.
I needed to rest and recoup. I had lost every battle for perfect 1080p playback in the past 10 months.
I was beaten but not defeated. After a time I realized that because our basic HD TV needs were being met by the ATV I could go back and experiment with the mac mini. I decided I wanted a 64 bit OS. I wanted an OS that would stick around for a while. I wanted a dedicated XBMC system that would only serve as a video player and nothing else. I settled on ubuntu 10.0.4.1 LTS minimal (amd64) with the xbmc-live packages. Unfortunately the mac mini wasn't giving up it's EFI boot partition without a fight. I had to learn about refi-it and force some hair raising install options in grub. I delved into the mysteries of lm-sensors in order to speed up the mini's fan and prevent the same overheating. I spent three days fighting with ircd and remote config files to get our harmony remote working acceptably. Eventually though it booted and dual booted actually as I had retained an OS X install just in case. My video comes over Gig-E from a dedicated NAS ubuntu server and I need very little local storage.
As a side note I'd like to state for the record that I believe there is a significant difference between the BCM70012 and BCM70015 cards. The 70015 on spec supports another notch higher h264 decoding and a bit more bandwidth. In my experience this made a significant difference for certain 720p and 1080p files. It also seems to recover from a loss of sync much more rapidly and smoothly than the 012. At one point I directly swapped these two cards and, without any os, driver, or software changes was able to realize an immediate and significant gain in playback.
As I overstated above. I love linux dearly. However I hate xorg. Xorg is a simply horrible way to handle video drivers. Where I work we have a huge install base of artists using linux as their daily creative platform. Xorg, the nvidia drivers, and various openGL application interactions are one of the most system crashing and work disrupting aspects of our desktop image, and has been for years. The xorg.conf file is cryptic and hard to understand. It's ancient syntax is born of the twisted and inhuman union of early VGA and CRT monitor couplings. It's the unholy offspring of proprietary and open source software and hardware driver interaction. I believe it to be the biggest weakness of a professional linux desktop deployment. But I digress....
Then came the process of getting all the assorted software bits and pieces put together. Alsa sound, check... broadcom svn driver, check, xbmc-live ppa packages, check. It all seemed to be working on my 60Mhz LCD TV and other PC monitors. I brought it into the TV room and made the call. We were going back to the Mac mini. This cursed object of months of obsession and despair. It was coming back into our TV viewing lives.
This ends the unburdening of my soul portion of this diatribe. If you actually read this far then bless you. I hope you found some humor or solace in what I have written. If you're also on this path to madness then take heart in the fact that you are not alone.