Linux as a Home Theatre PC (HTPC) – Installation

Tuesday, February 23rd, 2010 | hardware, linux

See Linux as a Home Theatre PC (HTPC) – Introduction for an introduction to using Linux as a HTPC. In this post, I detail the steps I used to actually install and configure the HTPC and some minor gotcha’s that cropped up in relation to audio over HDMI.

  1. Downloaded Mythbuntu 9.10 64-bit edition from the Mythbuntu site.
  2. Installed Mythbuntu using the standard configuration settings (I may reinstall with a different partitioning scheme in the future but for now, at least, I just need a partition in which to dump various bits of media).
  3. Connected the MythTV box to my HDTV using a standard HDMI cable.
  4. Ensure you are using the NVidia Restricted Driver version 180 (and not 173) in order for HDMI audio to work (there is also a newer version 190 driver but I haven’t verified that this works yet).
  5. During initial MythTV configuration, configured to use ALSA:hdmi for audo playback rather than the default. This is sufficient to have MythTV play video files loaded in /var/lib/mythtv/video correctly.
  6. While MythTV presents a nice interface, I would also like to be able to use the standard Ubuntu desktop from time to time (Mythbuntu installs an XFCE4 environment by default – you can install GNOME or KDE also if you wish but for occasional use, the standard environment works very well). To get HDMI audio working outside of MythTV (for example, when browsing), added the following to /etc/asound.conf
    pcm.hdmi_hw {
     type hw
     card 0     #  <-----  Put your card number here
     device 3   #  <-----  Put your device number here
    pcm.hdmi_formatted {
     type plug
     slave {
     pcm hdmi_hw
     rate 48000
     channels 2
    pcm.hdmi_complete {
     type softvol
     slave.pcm hdmi_formatted hdmi_volume
     control.card 0
    pcm.!default hdmi_complete

    and then went to Applications/Multimedia/Mixer and clicked on Select Controls and enabled IEC958 2 and hdmi_volume. Back in the main mixer window, select the Switches tab and enable IEC958 2. Sound over HDMI should now be working (thanks to for tips on this, configuring HDMI sound output can be a little tricky for now at least).

  7. ALSA includes a useful utility called speaker-test which you can use to test your sound output.
    speaker-test -Dplug:hdmi -c2 -twav

Of course this is an experimental system – so not everything works perfectly. In particular, the TV card is not currently picking up output from my UPC cable set-top box (the set-top box includes a standard TV aerial socket on the back which I’ve connected to the Hauppage PVR-150). When I tested the system with Mythbuntu 9.04, I detected a signal from this and could view some television channels (the quality was mediocre but I didn’t attempt any tuning or tweaking) and could use the system as a PVR / DVR – one of MythTV’s key features. Since installing Mythbuntu 9.10, I haven’t detected a signal despite some efforts to configure it. I suspect a kernel driver issue but I have yet to work my way through the IVTV troubleshooting procedure mainly because I’m not very interested in this functionality for the momet at least. It’s something I’ll investigate at some stage, although in the future – I’ll probably be more interested in adding a DVB-T card to the system to avail of Ireland’s Digital Terrestrial Television.

In conclusion – things that are working well include,

  • Video playback – both in the MythTVin frontend and from the XFCE desktop (using VLC or Totem).
  • Music playback,
  • HD playback including using VDPAU. During playback of some HD samples, processor load on the system remained negligible, suggesting that the bulk of the decoding activity is happening on the 9400 rather than on the cpu.

Tags: , , , , , , ,

4 Comments to Linux as a Home Theatre PC (HTPC) – Installation

April 7, 2010

I have also reached the conclusion that any kind of media player is just inferior to a proper HTPC. Finally I seem to have found the perfect, cheap PC to fit the purpose: there’s also a video that give s anice overview:

I think I’ll order it within the next few days. I’ve not decided yet what software I’ll stick on but either XBMC on ubuntu or XBMC Live are the most likely.

The low price of the revo will make me feel less guilty about dropping quite a bit more on a proper A/V receiver and speaker setup – the final pieces of my HE puzzle.

April 8, 2010

Hey Albert, thanks for dropping by! The Revo is a nice bit of kit alright although I wonder if the Atom has enough grunt – especially if you want to do any encoding. If you don’t, it should be a good purchase alright. As for what software to go with, XBMC is very nicely put together (but doesn’t do DVR – if thats not a concern for you, I think XBMC is a great choice. You might be interested in trying Ubuntu Element ( if XBMC is your thing – I haven’t tried it yet but it has gotten good reviews.

April 10, 2010

Yeah, I should have mentioned I’ve no intention of ripping or encoding anything on it or using it as a DVR, so I won’t be using a TV card. The revo can play HD video without breaking a sweat so it will do.

I just need a working torrent client and access to my existing digital media library. My PS3 will be used for any DVD/BD playback. That Ubuntu Element looks interesting, I had not come across that before.

I’m almost certain I’m going to go with the Sony STRDH800 A/V receiver. There are other options but its remote will play nice with my other Sony hardware. You don’t seem to have mentioned any audio setup in your posts – any plans there?

(PS: sorry about the last double comment post, I got an error trying to submit on the other post and wasn’t sure it went through.

April 12, 2010

On the audio side of things I must admit to being something of a heretic – there’s sound coming out of both sides of the television so I’m more than happy 🙂 Some day I’ll go and play around with home cinema speaker setups but the cable management hassles put me off – and like I said, I’m easily pleased on the audio side of things.