FAGZAL's Personal Blog
Silent, cheap (~$200) XBMC+Linux based HTPC
This is a description of an almost noiseless HTPC I built based on an ITX Atom/ION board, running XBMC and Linux. The Hardware I used is somewhat outdated now, but it is still available and cheap, providing excellent power consumption figures. I will give detailed instructions on how to build your own, with thoughts given to alternatives.
Why build your own?
I had been planning to build a HTPC for quite a long time, but never really got down to it – mostly because I used to had my desktop PC hooked up as a media player (running Fedora, a separate X and mplayer), so I just didn’t really need another PC. However, I love to build things, and I was too much interested in creating a standalone solution, so finally I gave in
Please note that if you just want to play various media files on your TV, you are most likely better off buying an off-the-shelf media player, such as the WD TV Live , the Popcorn Hour, the Hyundai L110 or the LG Smart TV, and so on.
There are a couple of dozen similar devices out there now, while buying the parts for, assembling and configuring a HTPC can be very time consuming. However, if you are into such things, it isn’t very complicated and tons of fun! By building your own, you can create a device that fits your needs exactly, which is rarely the case with the devices you can find in shops. As always, YMMV.
Here are my original requirements. I wanted to build “the perfect HTPC”, without compromises, that played along well with the equipments I already had (a 42″ Panasonic FullHD Plasma and a Yamaha amplifier driving a 5.1 speaker set).
1. Physical features and connectivity
- Nice and small; low power consumption; silent design (no audible noise)
- Simple, cheap, modular design (so that I can hack on it later)
- HDMI 1080p output with optical (S/PDIF) audio
- Remote controll; ethernet, e-SATA and USB connection
2. Multimedia features
- Should play as many formats as possible, e.g. MPEG2/4, H.263/4, MVK, MOV, Flash, FLAC, JPG, OGG, etc…
- Should handle various subtitle formats, including regional (Hungarian) character encoding; variable subtitle rendering settings
- Up to 1080p, real 24,25,23.976,50Hz playback
- Digital audio playback with DTS and AC-3 support
- Streaming, especially YouTube and movie trailers (I love trailers )
- Network playback support (via SMB, FTP, NFTS, SSHFS, DLNA, uPnP, etc.)
- Remote support
3. PC features
- It’s a HTPC, so I also want it to be used as
- a NAS
- a VPN (OpenVPN, PPTP) server
- a Torrent client
- general “scripting server” (for later use, e.g. home surveillance)
- I think optical storage is done for. I am not going to change discs when I can buy a 2T HDD for $70 – so I did not need direct DVD or BluRay playback (you can always play the image from HDD anyway).
- My amplifier cannot handle audio via HDMI, so I needed either coaxial or optical output.
- At the time of constructing this device, it was hard (and expensive) to find a device that could do everything I wanted, so it was yet another reason to build my own.
Chosing the software
I was sure to use Linux (no matter which distribution). I tried various media players, and finally selected XBMC (the obvious choice). I wanted to go with Fedora first, but XBMC likes (at least used to like…) Ubuntu better, so I went with it. (If I was to restart the project now, I would probably chose Fedora. I don’t recommend that to you, though.)
XBMC is a very professional piece of software with a huge community behind it, with a shiny new plugin repository – highly recommended. I started with XBMC Dharma Beta 1, and later upgraded to a stable version.
Chosing the hardware
This wasn’t so obvious. I wanted low power consumption and great Linux support, so I ended up choosing the nVidia ION platform. There are certain ready-made HTPCs out there, for example the Asrock ION, the Asus EeeBox, or my favourite, the Zotac MAG/ZBOX. (You might consider those, too.)
I have almost bought a Zotac MAG, but since I wanted something I can easily hack on and make totally silent, I finally haven’t. I also wanted to figure out whether it is possible to build something that is in the sub-$200 range.
Now ZOTAC manufactures some lovely boards, such as the ION ITX A, but I chose a cheaper ASRock model, the ASRock A330ION. It comes with an Atom CPU (N330), which is dual core and HT enabled – it is considered somewhat slow today, but I used to have a slower PC five years ago , so for a HTPC it is more than enough. Using an nVidia chipset was also important, since GPU HD playback is best supported by nVidia’s VDPAU on Linux. [Note: while both AMD and Intel is progressing nicely with their Linux drivers, I would still opt for an nVidia GPU even today, in 2011/Q1.]
Hardware and hardware drivers are quickly evolving, so if you wanted to build something like this now, you might also consider:
1. A SandyBridge CPU with build-in GPU, like the i3-2100. You would get much higher processing power (compared to the Atom), with only slighlty higher power consumption. It would be somewhat more expensive, especially as cooling the CPU in a small form factor case would require more careful design, but otherwise it’s a sound idea. You should use a fairly recent Linux/XBMC version to be able to use the encoding capabilities of the CPU’s build-in GPU. (I have actually just read that VaAPI runs nicely on Fedora 15.)
2. Something AMD Neo based. Neo is somewhat faster than Atom, but Linux support for AMD based video playback is… erm, not so great.
3. A low power, possibly undervolted Core2 (e.g. E5200) with a separate nVidia card. This is somewhat similar to the SandyBridge version, but possibly cheaper, and more mature – however, it would be harder to put this in a small case, given the 775 socket and the video card. (You would probably have to use a riser card or a bigger case.)
The final hardware
Case + Power: I bought an ITX/mATX case (EPC2) at a near store. It’s not very pretty, but small and affordable, yet easy to hack on. It has a stand so you could use it in a vertical position, too. It also came with a 12V/120W 12V-to-ATX module (passive) and a 12V/90W external PSU. The Case, the converter and the PSU together costs about $60 + VAT altogether, which is very cheap, IMHO. (A Hungarian webshop that sells this can be found here.)
Actually finding a cheap case and a silent PSU is possibly the trickiest part. Use Google . There are kits which are nicer, and usually (much) more expensive. You might want to buy a bigger case if you are not disturbed by its size, with a regular silent PSU, in which case you could also use a wider selection of components, e.g. an mATX board.
Motherboard: ASRock A330ION, with the above mentioned Atom N330 on board, DDR3 slots (which is a nice addition), nVidia ION chipset (that’s basically a low-power GeForce 9 mGPU and some other stuff); serial port (for the remote), ethernet (1Gbit), USB, SATA, eSATA (cool!), optical and analog audio output, HDMI. This set me back by about $120 + VAT.
You might try a ZOTAC board (they are very nice, but IMHO somewhat overpriced), or something like the lovely XFX GeForce 9300 board (that is mATX, and needs a 775 CPU), and so on. Also if you do not want to use an Atom, but favour the ITX form factor, there are 1155 based boards out there now, like this one – with a low-cost Sandy Bridge CPU that’s a power horse compared to the Atom.
HDD, external: this is not part of the system per se, but I connected a 2TB Samsung EcoGreen HDD to the eSATA port of this thing, so now I also have a NAS
HDD, system: Well… I tried many versions. First I bought a 4GB USB drive, but it was extremely slow and somewhat unstable. Then I used the external HDD to boot, which worked OK, but I did not like the idea (I wanted that drive to be idle most of the time). Finally I went with a 4GB SSD I bough for a few bucks (I think for about $20 or so).
YMMV. I like SSDs and silence, but I assume most users would opt for going with less components, e.g. using the main drive (say a 1TB 2.5″ notebook drive) as their boot drive instead. A USB flash drive is also an option, since typical HTPCs are always on, you rarely reboot them – I guess you could just use a small (~2GB is enough) flash drive, if you were more lucky than I was, or maybe try a CF-to-IDE adapter, and use a CF card, which is basically like using an SSD.
Cooling: Zalman chipset coolers (see later why), and a small fan (also see later), for about $15. A few cables.
Altogether the system cost was around $200 + VAT. That’s twice the price compared to a basic media player you could buy in your local HW store – but where’s the fun in that?
Putting it all together
Assembling the hardware
The case is big enough, so assembly is plain and simple. Unfortunately, the original cooler fan was too noisy for me. I tried to decrease it’s speed using the mobo’s controller, but then it started to emit a high-pitch noise for some reason, so I have removed the original heatsinks and put on two Zalman chipset coolers. Look here:
These sinks are fine, but when put in the case, hot air gets trapped, causing the CPU to heat up to 65 Celsius and the GPU to about 85 Celsius quickly, which is more than I like, so I installed a 5 cm fan to blow some air towards the board. To avoid vibration noise I used some dampening material and some duck tape (if you build something on your own, it must have duct tape somewhere in/on it, otherwise it is not proper ) to fixate it. Then I just tossed in the SSD – that’s something I really like about SSDs, you can just toss them around
Here is how everything looks like after about a year of operation:
Actually a somewhat bigger (6 cm) fan would have been better, but I couldn’t find one… anyway, the main point is generate some airflow inside the case, even the slightest one decreases the temperature of the chips to an acceptable level. (BTW, I have also removed the HDD bracket, and later forgot to put it back in, that’s why there’s some chaos in there.)
I hooked up the TV using an HDMI, and the amplifier using an optical cable. I have attached the HDD using an eSATA cable. (Actually the HDD is on the other side of the wall where the TV is mounted, and the eSATA and some other cables go through a hole in the wall – this means there are less cables to mess with when you vacuum , and also the noise the HDD emits is irrelevant.)
Finally, this is how everything looks:
Please also note the mandatory bears used to fine-tune the high frequency response of the NS-555 front speakers
Installing XBMC was plain and simple. I have downloaded the XBMC live image, hooked up a DVD drive temporarily, installed it, and all was ready and working. (As I have mentioned previously, first I tried to use a USB flash drive to host the system, but it was extremely slow and sometimes it did not boot, so I exchanged it to a 4GB SSD drive. Later I found out that the flash drive was broken… I had quite a few broken flash drives in the last few years, all different sizes and manufacturers, so go figure.)
There are gazillion options in XBMC, so you can fine-tune the system according to your needs. A few things I set up (and I might not use proper names of the settings here):
- 5.1 digital passthrough (Dolby, DTS)
- sync display to video playback (very important, but your display must support it)
- VDPAU (HW accelerated) playback
- studio color conversion (YMMV with this one)
- subtitle charset, sizes, position, colors, encoding, etc.
- timezone and location
- fullscreen 1920×1080, 50Hz default
- vblank sync
- web control on port 8080
- various plugins and other settings (e.g. I now have access to about 5000 radio stations)
This is Linux, so I have also installed sshfs, samba, lm-sensors, mc, nfs, and a few other modules and services. Updating the system with apt later broke my digital passthrough (audio) output, so I had to fiddle with ALSA, but I think that’s because I used the beta version of XBMC, and now it is fixed. (If you run into that sort of problem, visit the XBMC forum, or just Google it.)
Lm-sensors, which I use to monitor the CPU/GPU temperatures did not understand the sensor chip that I had on the motherboard, so I had to hack that. I would rather not go into the details, since it’s kind of deep magic, modprobing the w83627ehf kernel module and enforcing a chip id, then adding some regular expressions to advancedsettings.xml and such… If you really need to know, ask me, and I will provide some help!
I have also constructed a serial IR receiver, but later ended up using a wireless keyboard to control the thing. Actually it isn’t as easy to configure everything to work well with an IR receiver: it took me about two days until I figured out how to configure the serial port, how to map the keys to xbmc actions and so on, so be careful if you went this way. I have also found that a remote control is kind of uncomfortable – just think about entering a search into YouTube using a remote. I recommend using a small keyboard or a smartphone applet: I tried the official one for Android, which might not be perfect, but is nice to have if you don’t like a hefty keyboard lying around.
Let’s see the whole configuration!
- Display: 42″ Panasonic Full HD (1080p / 100Hz / 42″) TV with HDMI input
- Yamaha RX-V363 amplifier
- Yamaha NS555 front, NS444 center, NS333 satellite speakers (that’s actually 5.0, but the bass of the NS555 is so good that I dumped my old subwoofer)
- Trust Thinity keyboard for remote controll (I got if for about $50)
- 2TB Samsung EcoGreen HDD
- 1Gbit/s ethernet network
- an the HTPC consisting of:
And this is how it looks like on the shelf:
Conclusion & Advice
If you are interested in building a HTPC, using the now outdated (first) ION platform is still a viable option. It’s cheap (around $200 if you are lucky) and efficient, and all the software comes for free. However, you have to be selective when shopping: make sure that you buy something that works well with Linux/XBMC, and also look around the web as you can easily end up paying $400+ if you are not careful.
If you build something like this, my advice is this: try not to be tricky Use well know components, install everything in the recommended way, stick to proven methods. (I spent a great deal of my time on trying to do things differently, and many times ended up screwing up everything.)
Finally I would like to thank the XBMC guys for putting together what I think is the best media player now, and all the Linux hackers who made it possible to run Linux on this fancy hardware.