Archive:HOW-TO:Install XBMC on an ION based machine

This article is a mash up of HOW-TO threads found on the XBMC Forum. It is primarily geared towards Ubuntu Linux and ASRock ION330 users, however you may find it useful for other ION based systems too.

The initial article was based on the following threads:


 * HOW-TO install XBMC for Linux on Asrock ION 330 with full Ubuntu Desktop by vikjon0


 * HOW-TO to install XBMC on an ION machine with Ubuntu, a Step-by-Step Guide by medicineuk


 * My Asrock 330 ION Tweaks, Tips, Tricks, and Fixes! by X3lectric

At the time of writing, this article is for Ubuntu version 9.10 and upwards only. If you're installing/using an older version of Ubuntu it is recommended you upgrade (since they are unsupported).

Some basic Linux/Ubuntu knowledge is assumed.

If you find errors or have any new tips, please edit the page.

BIOS
If you are using an ASRock ION 330 then the following BIOS changes should be made
 * Change shared memory => 512
 * This will improve video performance.


 * Upgrade BIOS => 1.60 (or the latest version) (Download DOS version, unzip and put on USB => Smart Flash in BIOS)
 * This step is only necessary if you are encountering problems.


 * Remove the boot logo, if you wish to.
 * Enable "good night LED" if you want all light of on the box.

No other BIOS changes are necessary (ie no overclocking)

Installation
It is assumed at this point you have your hardware ready and waiting for the Operating System to be installed.

Install Ubuntu
There are two basic ways to install Ubuntu - the full Desktop version or the Minimal Install. The easiest method is to install Ubuntu Desktop. It is recommended to install Ubuntu 10.04 LTS (at the time of writing).

You will need to use the username and password combo of xbmc/xbmc. I.E. username is xbmc, password is xbmc.

Minimal Install
If you do the minimal install you will also need to issue the following command to enable the desktop: sudo apt-get install xorg gdm gnome-core network-manager-gnome gnome-system-tools gnome-utils x11-xserver-utils

After installation
After installation you need to install all updates either using the Update Manager or by using the commands: sudo apt-get update sudo apt-get upgrade

If you prefer to use the terminal you may install SSH for remote access: sudo apt-get install ssh

Microsoft MCE Remote
The Microsoft MCE Remote model 1039 does not work in XBMC without LIRC.

In terminal, use the following command: sudo apt-get install -y lirc Select Windows MCE Remote (new)

AsRock Remote
sudo apt-get install -y lirc
 * Install LIRC as above using
 * However select 'none' and 'none' for receiver and transmitter.


 * From the AsRock website download the driver appropriate for your Ubuntu version and kernel (see below).

Double-click on the '.deb' package to install. This time select "Nuvotron Transceivers/Remotes" for receiver, "none" for transmitter.

Kernel Version
It is recommended to use kernel 2.6.32-25 since newer versions can cause problems with the remote. You will have to edit your GRUB settings to change kernels.

Test Remote & LIRC
Type:  in terminal and press the Home button on your remote. This should return "Home" in terminal

Install XBMC
The installation of XBMC is a relatively easy part of the process. The easiest way is using the terminal.

For more information see HOW-TO install XBMC for Linux on Ubuntu, a Step-by-Step Guide

Add XBMC to the repository
For versions of Ubuntu greater than 9.10 you can use the add-apt-repository command: sudo apt-get install python-software-properties sudo add-apt-repository ppa:team-xbmc/ppa

This will not work in versions of Ubuntu older than 9.10, instead you can manually add the repositories either by using the "Software Sources" graphical tool and selecting "Other Sources" and clicking "Add", or by adding the repositories to /etc/apt/sources.list.d/xbmc-team.list. Both of these methods utilize the same apt lines: deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu YOUR_UBUNTU_VERSION_HERE main

If you wish to add the source repository, you can also add: deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu YOUR_UBUNTU_VERSION_HERE main

NOTE:: Be sure to change YOUR_UBUNTU_VERSION_HERE to the code name of your Ubuntu release, e.g. maverick, hardy, etc.

Download and Install XBMC
sudo apt-get update sudo apt-get install xbmc xbmc-standalone sudo apt-get install xbmc-skin-* sudo apt-get install xbmc-eventclients-* sudo apt-get install xbmc-scripts-*

And now XBMC is installed!

NVIDIA VDPAU Drivers
NOTE: This section needs to be updated for newer versions of Ubuntu.

In order to make 1080p videos work you need to install the Nvidia drivers.

Team-XBMC VDPAU
If you are using Ubuntu 10.04 or higher you can install from the Team-XBMC ppa: sudo apt-get install libvdpau1 nvidia-185-libvdpau

VDPAU for version 9.10
this has changed - needs updating! sudo apt-add-repository ppa:nvidia-vdpau/ppa sudo apt-get update sudo apt-get install linux-headers-generic nvidia-glx-185 sudo nvidia-xconfig -s --no-logo --force-generate

Policy kit to allow Power management
NOTE: This section may be redundant sudo apt-get install policykit

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

Additional policy settings
sudo apt-get install policykit-1 devicekit-power

sudo gedit /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla (use nano if using SSH)

Add: [Actions for xbmc user] Identity=unix-user:xbmc Action=org.freedesktop.devicekit.disks.*;org.freedesktop.devicekit.power.*;org.freedesktop.consolekit.system.*;org.freedesktop.hal.storage.mount-removable;org.freedesktop.hal.device.volume ResultActive=yes ResultAny=auth_admin ResultInactive=yes

XBMC Config

 * 1) Start XBMC in Gnome
 * 2) Change some settings;
 * Settings, appearance, screen: Fullscreen
 * 1) If you want to use sound over HDMI:
 * In latest version of XBMC just select HDMI in menu
 * If sound is playing too fast try with custom:
 * plug:hdmi or plughw:0,3

ALSA config
sudo alsamixer sudo alsactl store 0 sudo apt-get remove pulseaudio
 * Unmute and set volume (MM means muted and OO On)
 * Hit "m" to toggle mute on/off.
 * Do not forget to unmute HDMI if you are going to use that
 * Store Settings:
 * If any problem with store, remove pulse audio and try again

Wifi WPA2 in XBMC session (USB adaptor)

 * 1) Left click on network icon and select network & Connect
 * 2) Right click on network icon, edit connections, wireless, select network, Click Always allow, Check Available to all users, check remember authorization & enter password.
 * 3) Reboot and make sure that no dialog is necessary to connect wifi => Should work fine in the XBMC session.

There is a bug in karmic network-manager. When mking connection available for all users this just causes the connection to disappear set  in   section in
 * Workaround:

XBMC session
To boot directly into the XBMC session:


 * 1) Logout - F10 - select Session - XBMC
 * First time select "just this time" when function verified repeat and set to defalt session
 * 1) Return to login by exiting XBMC
 * 2) Back to Gnome
 * F10 - Select session - Gnome

HW cursor fix
sudo sed -i '40i\ Option "HWCursor" "False"' /etc/X11/xorg.conf

ENABLE 1080p 24Hz (screen section)
sudo sed -i '50i\ Option "DynamicTwinView" "False"' /etc/X11/xorg.conf sudo sed -i '50i\ Option "FlatPanelProperties" "Scaling = Native"' /etc/X11/xorg.conf

Make sure it ended up in the correct sections (I am not sure that this sed stuff is working): sudo gedit /etc/X11/xorg.conf (use nano if in SSH)