funbox htpc
Funbox - Media Center

Funbox is my project to complete a homegrown media center in linux.  After researching various projects such as Elisa, XBMC, etc... I have found that the best option is actually the most compact, yet complex.  Here we go, this adventure is going to suck.

Hardware
MadWifi - Wifi Gone Mad

The Netgear W311T PCI wireless adapter comes with an Atheros chipset.  This was supported in linux, but not native to Slackware 12.  I'd always heard that wireless was a pain-in-the-ass to setup so I had been apprehensive.  It turns out my fears were correct.  Secure wireless capabilities for the do-it-yourself linux newbie is full of lack of documentation, old documentation, ubuntu, and lots of google searches of unanswered mailing lists and forum posts.  At the Corporate apartment we're using an Apple Airport Extreme configured with WPA2 – A word of warning – Do not trust Apple's WEP-fake implementation, it is not correct and reports as WPA anyway.

MadWifi drivers are not so straight forward to compile.  For some reason even though I passed the KERNEL_PATH variable to make it was hard to compile drivers for a different kernel version.  This is frustrating.  Okay, so we have our drivers, and all we have to do is

modprobe ath_pci
And that should load up all the related modules as well.

WPA2 is handled by a utility called "wpa_supplicant", which has some of the most unintelligble debug (some of which is MadWifi's fault too).

Good News. I just upgraded funbox to a patched 2.6.28-rc4 kernel, and switched over to the newer ath5k driver instead of the ath_pci driver. There weren't any instructions on the ath5k page, but I did find a bug report, which gave instructions on how to run wpa_supplicant with ath5k. instead of using the 'madwifi' driver in wpa_supplicant, switching to 'wext' worked great. No connection issues so far, dmesg has great output.

What works now:

  • /sbin/modprobe ath5k (should be done automatically)
  • /sbin/iwconfig wlan0 essid "$ESSID" channel $CHANNEL ap "$AP_MAC"
  • /usr/sbin/wpa_supplicant -c/etc/wpa_supplicant.conf -Bdw -Dwext -iwlan0
  • /sbin/dhcpcd wlan0

Bad News: I've noticed some instability with the ath5k module. At one point it was taking a lot of processor usage and I needed to kill it.

Westinghouse TV

At the corporate apartment my old supervisor had bought a Westinghouse LCD TV as an impulse buy. It's a cheap piece of crap. Westinghouse sucks. After a little over a year the tv began to have issues – the screen will scramble. This happens on any input (coax, hdmi, component rca). I have to turn the tv off for 5 minutes, and then I can continue. It seems to get progressively worse as I'll come back from the 5 minute cooldown to have it crap out on me after another 2-10 minutes. In conclusion, Westinghouse sucks, and I knew at the time that the tv was bought that impulse buys are like Wal Mart products, they suck for everyone.

X.org

How to get dri2proto?
X.org repository.  I was trying to git pull everything from january, and I couldn't find dri2proto or how to get it for the life of me.  It's not on X.org's wiki at either the DRI2 or Modular Developer's Guide.  Instead I found an obscure Sourceforge Mail Archive Post.  Update: Somehow it's showing up on google now.

Note, dri2 is not in-use in x server 1.5 because of the intel GEM switchover.

i965 and video tearing
The next step in a htpc is of course making sure you can play video in mplayer including the latest h.264 720p and 1024p content.  I'm not into Blu-Ray or HD-DVD (fuck drm seriously).  So this box will just be for matroska encapsulated video.  More on i965 drivers and video tearing and xv overlay support.

The XV port on my i965 chipset was 94 back in January, but is now 89 here November 2008. You can use xv overlay by doing this in mplayer:

  • mplayer -vo xv:port=89 filename