XBMC on ASRock ION 330

This document gives a brief account on my experience installing Minimum Ubuntu Karmic Koala (9.10) and the XBMC on an ASRock ION 330, featuring a dual Atom 330 and an NVIDIA ION graphics processor. The installation procedure was derived partly from Springy Development's Minimal install of XBMC on Ubuntu Karmic Koala (9.10), XBMCbuntu and HOW-TO install XBMC for Linux on Ubuntu, a Step-by-Step Guide.

Installing a Minimum Ubuntu Karmic Koala

First, download the minimal install of Ubuntu Karmic Koala (12.1mb x86) and burn it onto CD.

Second, power up the ASRock, press F2 to enter the BIOS setup and select the CD as boot device. Save & Exit the BIOS and the ASRock should boot from the CD. Don't forget to insert the previously burned Minumal Ubuntu CD before rebooting.

Start the installation, and follow the onscreen instructions, e.g. choose the Ubuntu mirror close to your location, set the language and keyboard layout, and, if desired, partition the hard disk. I use in general one partitiion for the system (16GB), one for swap (2GB) and the rest for data. At some stage, enter a username and password for your main account; I chose "jeeves" for the user name, as in Jeeves & Wooster. The installer will ask what packages to install, scroll down to "OpenSSH Server" and press SPACE, then press ENTER to continue.

After the installation has completed, your computer will reboot. When you get to the login screen, login with the username and password entered.

Installing ALSA, the audio sub-system

Some sound drivers have to be installed, in this case ALSA:

sudo apt-get install linux-sound-base alsa-base alsa-utils

"jeeves" needs to be added to the sound group.

sudo usermod -a -G audio jeeves

The sound level will be set to zero; to change the volumes we need to enter the sound mixer:

sudo alsamixer

Use the up and down keys and set the volumes to the maximum they will go. Press the right key until you get to IEC958, EC958 D, EC958 1 and press M on each of them to un-mute them. Press ESC to quit out of the mixer. To make alsa save the volumes run.

sudo alsactl store 0

Installing X window system and NVIDIA drivers

First, install the X server by typing

sudo apt-get install xinit x11-xserver-utils x11-common

In order to compile the NVIDIA drivers, get the build environment and a few tools first:

sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 wget dkms linux-headers-$(uname -r)

Then, get the NVIDIA drivers and run the install script. This will build the kernel. Select Yes for generating the X config files automatically.

wget http://uk.download.nvidia.com/XFree86/Linux-x86/190.42/NVIDIA-Linux-x86-190.42-pkg1.run
sudo chmod +x NVIDIA-Linux-x86-190.42-pkg1.run
sudo ./NVIDIA-Linux-x86-190.42-pkg1.run

At this stage the X server and the underlying NVIDIA drivers should be operational.

Installing XMBC proper

We need to add the PPA (Personal Package Archive) for XBMC.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:team-xbmc

then import the TeamXBMC key:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 91E7EE5E 318C7509

and finally

sudo apt-get update

Now we can install XBMC.

sudo apt-get install xbmc xbmc-eventclients-* xbmc-scripts-*

This will install xbmc and eventclients. At this point of time I did not succeed to install the skins "xbmc-skin-*".

Configuring power policy

XBMC will need to control power settings of the computer:

sudo apt-get install pm-utils policykit

And give your user access to these power features:

sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.suspend
sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.hibernate
sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.reboot
sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.shutdown
sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.reboot-multiple-sessions
sudo polkit-auth --user jeeves --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions

Configuring XBMC startup

The idea behind this installation is top keep the system lean and only start what is necessary to run XBMC, i.e. in essence login, launch the X server and have it start XBMC. To automatically login on tty1 at startup, edit the file

sudo nano /etc/init/tty1.conf

and change the line

exec /sbin/getty 38400 tty1


exec /bin/login -f jeeves < /dev/tty1 > /dev/tty1 2>&1

After login on tty1, we need to get Ubuntu to clear the screen and start X by editing the profile:

nano ~/.bash_profile

And add these lines to the (usually empty or new) file:

case "`tty`" in
/dev/tty1) clear && startx &>/dev/null;;

Now we need to tell X to start XBMC by editing X's rc file for Jeeves' login:

nano ~/.xsessionrc

by adding the lines:

exec xbmc --standalone

XBMC boot screen

This step is OPTIONAL, to hide all the information about what is being loaded, we shall install a usplash boot screen. As a matter of fact, I removed that in the end as I like to see what's happening.

sudo apt-get install usplash libusplash-dev usplash-theme-xbmc-*

Once the splash screen installation has completed we need to select a splash screen:

sudo update-alternatives --config usplash-artwork.so

Next set the screen resolution of your TV in the usplash settings:

sudo nano /etc/usplash.conf

And add these lines (suiting the resultion of the TV or monitor):


To make the new splash screen active run:

sudo update-initramfs -u

Now reboot your computer:

sudo reboot

Configuring XMBC

When the computer restarts, you should see the splash screen you selected, and XBMC should boot up.

Now, go into XBMC’s Videos settings and select VDPAU for the render mode and edit the Sound settings:

Audio Output: Digital
AC3: Off
DTS: Off
Audio Capable Device: plughw:hdmi
Passthrough Output Device: hdmi
Downmix: On

Remote control

What would XBMC be without a remote control. So I bought the cheapest I could find, a Speelink SL-6399, at the time for £6.05. However, it turned out to be a bit tricky, see XBMC Formum

First, the SL-6399 appears only as USB HID device and not as an IR remote control lirc would handle. Instead the SL-6399 sends keyboard characters which I have recorded as SL-6399-keymap.txt. Fortunately. with the latest XBMC release one can map the special key sequences sent by the SL-6399 to XBMC actions in keyboard.xml, to be copied into $HOME/.xbmc/userdata/keymaps. Some obvious such as the cursor keys or the numbers work straight away, others are in common with MCE remotes and/or have to be added:

<p mod="ctrl,shift">Play</p><!-- Play -->
<s mod="ctrl,shift">Stop</s><!-- Stop -->
<p mod="ctrl">Pause</p><!-- Pause -->
<f mod="ctrl,shift">FastForward</f><!-- Fwd -->
<b mod="ctrl,shift">Rewind</b><!-- Rew -->
<f mod="ctrl">SkipNext</f><!-- Skip -->
<b mod="ctrl">SkipPrevious</b><!-- Replay -->
<t mod="ctrl">PreviousMenu</t><!-- TV used as escape -->
<e mod="ctrl">XBMC.ActivateWindow(MyVideos)</e><!-- Videos used as for MyVideos -->
<m mod="ctrl">XBMC.ActivateWindow(MyMusic)</m><!-- Music used as for MyMusic -->
<i mod="ctrl">XBMC.ActivateWindow(MyPictures)</i><!-- Pictures used as for MyPictures -->
<t mod="ctrl,shift">Fullscreen</t><!-- MyTV used as for Fullscreen -->

Created on December 27th, 2009.
Last Modified on Jamnuary 29th, 2010.