HTPC on Ubuntu 11.10

HTPC on Ubuntu 11.10

How to install and set-up hardware drivers for a specific combination of hardware in a home-theater computer on Ubuntu 11.10 to support HD content.

The case

When Ubuntu 11.10 came out, I was intrigued about the updates it would bring over 11.04. A fresher look using the renewed Unity interface  and a lot of new features along with the 3.0 kernel. Ubuntu has surely matured over the years and the moves Canonical has made recently to give the OS a clearly distinctive look and feel.

With Oneiric Ocelot released I’ve switched to three out of four computers to Ubuntu as the main OS – home server, htpc and private laptop. The only contestant staying on Microsoft Windows is the corporate laptop, because of standards of interchange such as Exchange for planning and communication as soft phone connections.

Mainly the type of programs available on Ubuntu are maturing so fast that they are becoming a serious alternative to the traditional setup of a computer, as well as the documentation on how to troubleshoot Linux based enhancements. Let me warn you though – much what you want to do on Ubuntu is easy out of the box. However, there will be some times when you really need to make your hands dirty in the terminal. The power lies in the fact that you can do a lot with scripts – but it is not for the fainthearted.

The trouble

In the current setup for our HTPC there are some issues with drivers that have driven me crazy. Out of the box, Ubuntu 11.10 recognized all hardware, but not all features were supported. You expect that if your hardware is working, it should work with full features…

The HTPC is a Asus P5K WS – The workstation edition with a lot of onboard features such as digital audio out with optical support. The video card is a fanless Radeon HD2600 XT. The onboard sound is recognized in 11.10 as “Digital Stereo”, when in reality it is optically connected to a 5.1 surround set which supports Dolby Digital and DTS.  The video card is recognized with additional drivers and supports 3D visualiztion. However while playing videos, there is some lag or depending on the codec, the video is played in double speed without sound.

The intention for the HTPC is to run XBMC and be able to play multiple video formats (SD and HD content) with multiple codecs and support an audio library with HD content (lossless FLAC / DTS Wav). Specifically the  HD content to be processed by the amplifier directly require the support of digital output.

The solution

After multiple hours spent trying to fix this HTPC setup to work with full hardware support and running XBMC, I’ve found the following changes applied to the system to work. It must be noted that not always the changes apply at first, you might have to try for more than once to get it working.

Use a clean installation of Ubuntu 11.10 if possible. First set up the audio driver and then update the video driver.

Technical Audio details

The Asus P5K WS motherboard has the Realtek 888 Azalia audio processing chip onboard which supports up to 48.8 KHz of digital audio output. To enable the functions over S/PDIF Optical or Coaxial out to play digital HD content, you need to force the audio driver (ALSA) to address the right ports.

To set the correct options, you first need to know what chipset your hardware uses, then find out the possible entry lines in the ALSA configuration files an apply them.

This thread points out the correct steps, but need some alteration to support the P5K WS setup:

  1. Open a terminal window with <ctrl>+<alt>+<t>
  2. Enter the following command in the terminal:

    cat /proc/asound/card0/codec* | grep Codec
  3. Based on the ALC888 chipset and my personal need to use the 6 channel S/PDIF connection I found this entry: 6stack-dig 6-jack digital with SPDIF I/O (this is the ‘MODEL’ for the setting)
  4. Edit your ALSA configuration file with the following command in the terminal (provide your password to get super user access):

    sudo gedit etc/modprobe.d/alsa.conf
  5. Add to the bottom of the file:

    options snd-hda-intel model=6stack-dig
  6. Save the file and close the GEdit window and the terminal
  7. Reboot the system (you can do this in terminal using the command sudo reboot)

 Technical Video details

The video card HD 2600 XT is part of the R600 video chip architecture. There are open source drivers and closed source drivers for the radeon series of graphics cards. If you need stability and good 2D performance with multiple monitors, us the open source video drivers. For some programs however, you want full 3D hardware acceleration, which is best addressed with the closed source catalyst fglrx drivers.

The standard Ubuntu 11.10 drivers are not providing enough 3D power to the video card. The ‘additional hardware’ pop-up after installing provides you with a driver of AMD, however this specific driver is outdated. You need to remove the currently installed driver completely, reboot the system and then install the latest driver using the terminal.

  1. Download the latest linux drivers for 32 bit & 64 bit
  2. Open a terminal window with <ctrl>+<alt>+<t>
  3. Force remove current video driver:

    sudo apt-get remove --purge fglrx*
  4. Reboot the system – If you keep getting a black screen, do not panic but follow these instructions to force VESA drivers
  5. Open a terminal window with <ctrl>+<alt>+<t>
  6. navigate to the downloaded driver file: cd /home/<username>/Downloads
  7. Run the installation script, you can use the <tab> key to complete the complex filename with typing ‘ati<tab>’:

    sudo sh ati-driver-installer-11-10-x86.x86_64.run
  8. Reboot the system
  9. Configure the Catalyst drivers by opening the administrative version and enable the tearfree option to improve performance in display transitions. You can open this program by using the <super> key (<windows>) and enter ‘amd’.

As a small bonus, I’d like to tell you how to install XBMC on 11.10, as at this point in time the repository link has not been established by Team-XBMC over at launchpad, so updating your APT with a PPA link to the standard repository is broken. Some users have made a clone of the xbmc builds (stable and nightly) to fit with newer versions of Ubuntu.

  1. Open a terminal window with <ctrl>+<alt>+<t>
  2. Enter the following command to add a repository to the existing list in APT:

    sudo add-apt-repository ppa:nathan-renniewaldock/xbmc-stable

    OR

    sudo add-apt-repository ppa:nathan-renniewaldock/xbmc-nightly

    (**WARNING** nightly builds are test versions of software and can break your system in the worst case.)

  3. Enter the following command to update APT:

    sudo apt-get update

Enjoy XBMC!

(I added the code snippets using this nifty website’s help: http://www.hilite.me/)

Posted by artens

Categorised under Audio, Drivers, Hardware, Linux, Ubuntu, Video
Bookmark the permalink or leave a trackback.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

or