December 11, 2011
How to build a HTPC with XBMC and Ubuntu - part 1

Or, how to give honour to ye oldie pc abandoned in the attic :)

Well, this is more or less what happened. Since I bought a second-hand iMac, my old and trusty Dell PC, an Optiplex GX620, was lying around and just getting dust.

One night, I was trying to play on my HDTV an .mkv file with its internal media player and I got the usual “audio codec not supported” error. Enough was enough. I looked at the Dell and it looked back, and we agreed we would team up to make the best HTPC ever! 

THE PC AND ITS GUTS

Well, first and foremost, you need a PC :) An old one is fine, as long as it’s a Pentium I guess. Dual core would be better of course. 64-bit would be even better.

Then, you need to think in terms of noise. You want the PC to be as quiet as possible. You don’t want the HD or the fan spoil your vision with their hums. 

As the HD concerns, I had bought, but never used, a 2TB WD Caviar Green. This one that is:

http://www.wdc.com/en/products/products.aspx?id=120

"Cool and quiet" is promising good, and 2TB can host around 500x 720p or 250x 1080p movies, more than enough to fill the rest of my evenings until I retire.

So, I swapped the old Seagate 500GB that came with the Dell, with the Caviar, leaving the Seagate to continue its life inside a 3.5” USB box.

Then, you need a good video card. You want one with HD hardware acceleration built-in to offload the CPU from doing the rendering. You want it quiet. And possibly cheap. And I also needed a low-profile one. Wow, that sounds like a tall order doesn’t it?

Well, reality is that there indeed is one card packed with all these features: it the ASUS GT520 Silent Card:

http://event.asus.com/vga/2011/engt520/

Oh, 0db is sooooo good! NVidia PureVideoHD is exciting!

Yes I think I found my card!

THE OS

I am a Linux fan, always been. So Ubuntu was the natural choice. I naturally double-checked that there were NVidia drivers available for the GT520 on Linux, and indeed there were. NVidia makes the VDPAU library available too. VDPAU is the equivalent, in the Unix world, of the DirectX libraries in the Microsoft world, and are those who make it possible for the OS to leverage the video hardware acceleration.

32 or 64-bit, that is the question.

Now, the Optiplex sports a Pentium IV 2.8GHz, but unfortunately, there were a few generations of Pentiums as you can read on here

To nail this down, I downloaded the 32-bit ISO of Ubuntu 11.10 (10 minutes), put it on a CD (5 minutes), started in “live” mode (3 minutes), then 18 minutes later I fired a terminal session and typed this to get the answer to the bits question:

$ grep flags /proc/cpuinfo

You want to look for the “long mode” flag - lm. Long mode means CPU is 64-bit capable.

This is the output of that command on my Dell box:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl cid cx16 xtpr

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl cid cx16 xtpr

Well, it’s all nice and good. First of all, there are two “flags” lines, meaning the Pentium sports a dual-core. Then, there is the “lm” flag, confirming it’s a 64-bit capable CPU.

Finally, I decided I’d keep the PC as lean and mean as possible. So, instead of downloading a full desktop distribution, I did set up this one - the Ubuntu minimal distribution:

https://help.ubuntu.com/community/Installation/MinimalCD

I installed it on a USB stick, thanks to Unetbootin, and then set it up on the PC.

Follow the setup instructions, and do NOT install third party drivers if you are asked to. I will explain why later. 

(to be continued…)

  1. spassig posted this