Adventure in a Home Theatre PC

So I am a Boxee Box user (also, a linux user, if you didn’t see that coming).  A while back I did the Boxee Hacks+ and Kodi Plugin for the device, which breathed new life into the same.  Too bad you have to reboot into Boxee Launcher to run Netflix (which is being used less often now).  But from the get-go (before the Boxee) I wanted a device that could rule them all (media streaming including Netflix, local files, DVD), and settled with the Boxee box, because not one device could do them all and be cost-responsible … until now.

Enter the Home Theatre Personal Computer (or HTPC).  I was thinking of this option before the Boxee, but was stumped as at that time Netflix couldn’t be run in Linux, so you would have had to buy a Windows Licence.  The cost of a decent PC back then (especially for Windows, ideally low-power) made the whole thing cost-prohibitive.

Why a return to this model?  Well, three words: Partners for Care.  I upgraded my main computer (by a tiny bit) with a computer for sale at the hospital I work at for a mere $10 (mind you, the hard drives were removed for confidentiality reasons).  That left my old PC as a spare.

So in haste, I prepared the old box.  While setting the new (to me) PC up, I found I could not connect my TV tuner card anymore.  So, I would leave it for the HTPC.  I connected all the cables, powered up, and pushed the tower against the wall, and the system powered down.  Interesting…

I pull it out from the wall, press power, system powers up again.  This is where I should have left things be.  But I had to investigate on what caused the power failure.  I determine that pushing the tower against the wall pushes on the TV Tuner’s coaxial cable, unseating the card.  So I remove the card, and try a different slot.  The PC doesn’t want to power up at all now (fans spin for a second, then die off).  I remove the card, still, no power.  I try an old power supply.  No response at all.  I reconnect the original power supply, fans spin for a second, and that’s it.  I think I just lost the motherboard.

Bruised, but not broken, I opt for plan B.  The new (to me) PC I got cost me $10, why not get another one?  There is a problem though … the Lenovo’s that the hospital sell do not have HDMI ports (as they are business-class PC’s) – rather VGA and DisplayPort connectors – and neither connectors carry sound (in the case of the latter, at least with this PC).  I was hesitant to get one, until I saw a DisplayPort to HDMI adapter at The Source that could handle the video (and then I could pipe the audio into the stereo system).  So I picked the adapter up, and then the PC.

Top of the Lenovo PC Back of the PC - Including the TV Tuner Inside the Lenovo M58

I did a quick test as it was – using a DisplayPort monitor – and everything checked out.  I then equipped the hardware – put in a spare hard drive (although I know it will fail some point in the near future since my last PC’s previous power supply trashed it), added more RAM, and inserted the TV tuner.  Tested it again on the same monitor, and blank screen.  Tried a VGA monitor, no problems.  Huh?

Turns out that the Intel chipsets in the M58’s were set up as if there is something in the PCI-Express slot (in this case, the TV Tuner), the DisplayPort shuts down.  D’oh!  Have to regroup – either remove the TV Tuner (which would be second time it was regrettably taken out of a machine), or find a way to output to VGA instead. proves if there is a will, there’s a way.  They had such a connector from VGA to HDMI, which included piping from the audio jack so the TV gets sound as well.  I gave that a shot.

Tried it on my netbook first.  Didn’t work in Windows XP, but it did work in Linux in GUI mode.  I figured that was enough.  So I hooked up the HTPC, powered on, popped in an install disc (Debian Jessie), and (eventually) the setup menu appeared.  I selected text install, pressed [TAB], and typed in “desktop=xfce” before I continued.  I then reconfigured my partitions, for my 1/2TB hard drive:

64GB        –    Windows OS    sda1
30GB        –    Linux rootfs    sda5
6GB        –    Linux swap    sda6
8GB        –    Linux var    sda7
60GB        –    Linux home    sda8
Rest(*)GB    –    Shared partit’n    sda9

(*) -> for 500GiB, this varies.  Assuming 460GB, then 292GB remain.

Although I probably won’t put windows on, I left the space for it anyway.  The shared space was to be formatted NTFS, and that would contain the local library of content accessible to both OS’es.

Anyway, I let the install continue…

Installing Debian via Amazon's Display Adapter

When it was done, I removed the disc, and rebooted.  All went black, for too long.  The video didn’t come back up.  Essentially, I documented this in a StackExchange question, so I will try not to repeat it all here.  Suffice to say I never got the screen back, no matter what resolution (although when I popped the installed CD back in again, and the screen returned).  I don’t know what’s missing.

Well, looks like I am to go back to option one, and remove the TV tuner so I can use the DisplayPort.  It was tricky getting the card out of the slim slot, but it was possbile.  Plugged the adapter in, and straight from the power on self test, I got video!  The Linux GUI started up no problem either.  Logged in, and then I notice … Some of the screen is hidden from view, as in, I cannot see the edges.

So after trying different resolutions, I figured the best course of action is to use XRandR to crop and centre the screen, using the –fb and –transform options.  I added this script to the XFCE autostart:

xrandr –fb 1800×960 –output HDMI1 –mode 1920x1080i –transform 1,0,-60,0,1,-60,0,0,1

This made the missing edges minimal.  I then proceeded to set up Netflix and Kodi.  I found with the former you no longer need to fake a Windows browser anymore, that it will work in Chrome regardless.  Kodi was easy.  Downloaded the extra streaming plugins, and installed them.  Will need to borrow a recently-pressed DVD to get that portion running, and then it will be all set up!

Testing Kodi (using the DisplayPort Adapter)

All the functionality, and a lower price tag than a Boxee Box – I like it!

Adventure in a Home Theatre PC

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s