Archive:Install Ubuntu and XBMC on Asus EeeBox PC EB1501

From Official Kodi Wiki
Jump to navigation Jump to search

Asus EeeBox PC EB1501 - Ubuntu & xbmc

This is a tut on a couple of howtos but its dedicated to installing a miminal Ubuntu 9.10 and xbmc on the Asus EeeBox PC EB1501.

EB1501.png And.png Ubuntu logo.png And.png File:Xbmc.png

Things that where considered when buying a HTPC that led me to the Asus EeeBox PC EB1501:

  • NVIDIA® ION™ platform and Slot-load ODD.
  • Silent
  • Small
  • HDMI
  • Optical Output

credits

Most of this is already documented but this is now specific to EB1501 & Ubuntu 9.10

Thanks to the following people:

  • succo (xbmc.org)
  • soundcheck (ubuntuforums.org)
  • everyone (xbmc.org - wiki)

Install Ubuntu & xbmc

Get the most recent 9.10 image from here. Various posts recommend the 32-bit version.

  • The ISO can either be burned to CD (seems like a waste for 10 MB); alternatively, use UNetbootin to make a bootable USB drive from ISO.

After starting the computer with either the CD or the USB drive, select "Install" at boot prompt, then when prompted provide info about your location, language, keyboard layout, time zone. Disk partitioning will be basic, the full disk will be deleted and used.

When prompted to create an account, use xbmc and anything you want to for a password.

During the installation select "Basic Ubuntu server" as the only option, or optionally "OpenSSH server" if you want to have (secure) remote connections facilities.

Initial system configuration

run the following commands:

xbmc:$ sudo apt-get install python-software-properties -y
xbmc:$ sudo add-apt-repository ppa:team-xbmc
xbmc:$ sudo add-apt-repository ppa:nvidia-vdpau/ppa

Import the TeamXBMC key:

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

Now run and update:

xbmc:$ sudo apt-get update && sudo apt-get upgrade

Install XBMC

The core XBMC application and its related dependencies can be installed by typing:

xbmc:$ sudo apt-get install xbmc xinit x11-xserver-utils -y

This will take a considerable amount of time since lots of packages are due to be installed.

To install XBMC SVN Repo Installer and Launcher do the following:

xbmc:$ sudo apt-get install unzip -y
xbmc:$ cd /home/xbmc/.xbmc/plugins/programs
xbmc:$ wget http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip
xbmc:$ wget http://xbmc-launcher.googlecode.com/files/Launcher1.04.zip
xbmc:$ unzip -o SVN_Repo_Installer.zip
xbmc:$ unzip -o Launcher1.04.zip
xbmc:$ rm SVN_Repo_Installer.zip
xbmc:$ rm Launcher1.04.zip
xbmc:$ chown -R xbmc:xbmc "SVN Repo Installer"
xbmc:$ chown -R xbmc:xbmc Launcher

Install NVIDIA restricted drivers - NVIDIA-VDPAU repository

There are a lot of howtos and so on on this, I simply just use the NVIDIA-VDPAU repository: This will list all the available drivers:

xbmc:$ apt-cache search nvidia | grep ^nvidia

Looking at the listed versions from the command above enter the following command substituting 195 if you desire if there is a newer version:

xbmc:$ sudo apt-get install nvidia-glx-195 nvidia-settings mesa-utils libvdpau1 libvdpau-dev vdpauinfo pkg-config -y

Generate an xorg.conf file

You need a proper xorg.conf file; you can generate a new one automatically by using:

xbmc:$ sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf

You will need to add the following to xorg.conf to get a smother feel:

xbmc:$ sudo vi /etc/X11/xorg.conf

Then add the following to the Device Section:

Option "HWCursor" "False"        # Blinking Cursor Fix
Option "DynamicTwinView" "false" # Enable 1080p 24Hz

To Disable Composite for better H264 acceleration at the bottom of xorg.conf add the following:

Section "Extensions"
         Option         "Composite" "Disable" # Disable Composite for better H264 acceleration
EndSection

Load the NVIDIA kernel module The NVIDIA module can now either be loaded:

xbmc:$ sudo modprobe nvidia

Or you can reboot and it will be automatically loaded:

xbmc:$ sudo reboot

Install XBMC-live and Test XBMC

You do not need a window manager to run XBMC. In fact, your system will be much more lightweight without one. Instead, install the XBMC-live startup script.

Add the xmbc user to the required groups:

xbmc:$ sudo usermod --group audio,video,netdev,fuse,cdrom,plugdev xbmc

Install XBMC-live:

xbmc:$ sudo apt-get install xbmc-live -y

Now to test, logout of your administrative user and log back in as "xbmc". Then run:

xbmc:$ xinit xbmc-standalone

If everything has been setup correctly, you should be greeted by the XBMC interface. If not, a likely culprit is your X setup. Check the logfile /var/log/Xorg.0.log. A quick way to find fatal errors is with the command:

xbmc:$ grep EE /var/log/Xorg.0.log

Automated startup

Edit the following line in /etc/default/grub to appear as:

xbmc:$ sudo vi /etc/default/grub 

Change the cmd line default to look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,noredir loglevel=0"

Then update grub:

xbmc:$ sudo update-grub

Updating ALSA

There are a few issues with the current ALSA package shipped with Ubuntu, therefore it might be a good idea to upgrade.

xbmc:$ sudo apt-get install wget
xbmc:$ wget http://nfye.com/EB1501/AlsaUpgrade-1.0.21-4.sh -O alsaup.sh
xbmc:$ chmod +x alsaup.sh
xbmc:$ sudo ./alsaup.sh -di

This should download and update your ALSA to the latest version

By default the sound card will have several channels muted, others with low volumes, including the hdmi port.

xbmc:$ alsamixer

Adjust the channels you are interested in S/PDIF 1 for hdmi. Once done, save permanently with:

xbmc:$ sudo alsactl store

Custom Boot Splash

If you want to replace the standard Ubuntu boot screen with a custom, XBMC related one TeamXBMC provides the following in its repository:

xbmc:$ sudo vi /etc/usplash.conf 

Add the following dependent of you screen resolution:

# Usplash configuration file for 720p
xres=1366
yres=720

or

# Usplash configuration file for 1080p
xres=1920
yres=1080

To install the pulsating logo, as an example, type the following:

xbmc:$ sudo apt-get install usplash-theme-xbmc-* -y
xbmc:$ sudo update-alternatives --config usplash-artwork.so
xbmc:$ sudo update-initramfs -u

Resume from Sleep with Remote

After installing in order to be able to allow the remote to trigger resume from suspend, you must add USB0 to /proc/acpi/wakeup, you can do this by one of two ways:

xbmc:$ sudo vi /etc/rc.local 

And add the following just before the exit 0 line:

echo USB0>/proc/acpi/wakeup

OR

xbmc:$ sudo wget http://nfye.com/EB1501/set_wakup.conf -O /etc/init/set_wakup.conf

Disable extra TTYs in upstart

By default ubuntu has 7 consoles, this uses memory and delays startup time. The console-setup defines how many ttys are created.

xbmc:$ sudo vi /etc/default/console-setup

Change

ACTIVE_CONSOLES="/dev/tty[1-6]" 

to the number of consoles you want. Lets say, 2 ttys, then change it to:

ACTIVE_CONSOLES="/dev/tty[1-2]" 
xbmc:$ sudo rm -Rf /etc/init/tty3.conf /etc/init/tty4.conf /etc/init/tty5.conf /etc/init/tty6.conf

NOTE: Even though you've reduced the tty number, X is still on Alt-F7.

ASUS Remote Control

The EB1501 comes with a MCE USB IR Receiver- Spinel plusf0r ASUS (0471:206c)

EB1501-remote.png

You don not need to use lirc, but then you will not have full functionality with it, if you want full control then configure the IR receiver and use lirc.

MCE USB IR Receiver

To see where the remote is located located type:

xbmc:$ cat /proc/bus/input/devices

There will be a lot of output but you want to look at this section:

I: Bus=0003 Vendor=0471 Product=206c Version=0100 
N: Name="PHILIPS MCE USB IR Receiver- Spinel plusf0r ASUS" 
P: Phys=usb-0000:00:04.0-1/input0 
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-1/3-1:1.0/input/input3 
U: Uniq= 
H: Handlers=kbd mouse1 event3 
B: EV=120017 
B: KEY=c0000 400 0 0 70000 0 58000 8001f8 4000c004 e0beffdf 1cfffff ffffffff fffffffe 
B: REL=103 
B: MSC=10 
B: LED=1f 

Ok so this means the remote is located at event3, but it can change if the controller is plugged into another usb port. Make an udev rule to link the event device which has the vendor-id and product id of the remote to /dev/input/irremote. The vendor id is 0471 and device id is 0206c so edit the following:

xbmc:$ sudo vi /etc/udev/rules.d/10-local.rules 

And add the following:

KERNEL=="event*",ATTRS{idVendor}=="0471",ATTRS{idProduct}=="206c",SYMLINK="input/irremote" 

Now restart udev:

xbmc:$ sudo service udev restart 

Detach and reattach the remote check it creates a symlink /dev/input/irremote

Install lircd

xbmc:$ sudo apt-get install lirc -y

This will bring up a configuration and will ask you what kind of remote you have. Select custom and point it to /dev/input/irremote, Select None for IR Transmitter.

If you make a mistake you can always reconfigure lirc using the following command:

sudo dpkg-reconfigure lirc-modules-source 

Edit hardware.conf so that it loads the correct remote template

xbmc:$ sudo vi /etc/lirc/hardware.conf

Set the REMOTE_LIRCD_CONF line to look like this:

REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"

Restart lirc:

xbmc:$ sudo /etc/init.d/lirc restart 

Now try using irw

xbmc:$ irw

Press buttons on the remote and check that its working. If its working proceed to make the remote work with xbmc

xbmc:$ wget http://nfye.com/EB1501/lircmap.xml -O ~/.xbmc/userdata/Lircmap.xml

The commented out keys are not working.

Here is what your hardware.conf & lircd.cong should look like:

xbmc:$ cat /etc/lirc/hardware.conf 
# hardware.conf for eb1501 
# 
REMOTE="Windows Media Center Transceivers/Remotes (all)" 
REMOTE_MODULES="lirc_dev" 
REMOTE_DRIVER="devinput" 
REMOTE_DEVICE="/dev/input/irremote" 
REMOTE_SOCKET="" 
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput" 
REMOTE_LIRCD_ARGS="" 
TRANSMITTER="None" 
TRANSMITTER_MODULES="" 
TRANSMITTER_DRIVER="" 
TRANSMITTER_DEVICE="" 
TRANSMITTER_SOCKET="" 
TRANSMITTER_LIRCD_CONF="" 
TRANSMITTER_LIRCD_ARGS="" 
START_LIRCD="true" 
LOAD_MODULES="true" 
LIRCMD_CONF="" 
FORCE_NONINTERACTIVE_RECONFIGURATION="false" 
START_LIRCMD="" 
REMOTE_MODULES="" 
REMOTE_LIRCD_CONF=""
xbmc:$ cat /etc/lirc/lircd.conf 
# lircd.conf for eb1501 
# 
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"

Other

Disabling startup of a service

The procedure for disabling a service in Ubuntu is very simple: all you have to do is remove the symlinks from all the runlevel-specific directories, /etc/rc*.d, so that no links are pointing to the original /etc/init.d script for your service. That original script will be kept, so you can re-enable the startup/shutdown of the service whenever you feel like using it again. This example below shows how a service called "cups" was disabled on my system:

xbmc:$ sudo update-rc.d -f cups remove
Removing any system startup links for /etc/init.d/cups ...
 /etc/rc1.d/K80cups
 /etc/rc2.d/S50cups
 /etc/rc3.d/S50cups
 /etc/rc4.d/S50cups
 /etc/rc5.d/S50cups

Install build environment

If not already installed in previous steps, you may want to have a build environment in your system in order to allow the compilation of both custom applications and updated version of kernel modules and packages that are not available in Ubuntu repositories. The basic packages needed are installed by the following command:

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

Install XBMC build environment and SVN tools

If you want to walk on the bleeding edge and follow daily development of XBMC you have to install subversion and all XBMC build dependencies:

xbmc:$ sudo apt-get install subversion
xbmc:$ sudo apt-get build-dep xbmc

Change SSH Welcome Banner

Every time you connect to your htpc via ssh, you will receive the motd message and if you get tired of seeing it, you can change the message to something else.

Here’s the message that you should get:

   Linux xbmc 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64

   The programs included with the Ubuntu system are free software;
   the exact distribution terms for each program are described in the
   individual files in /usr/share/doc/*/copyright.

   Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
   applicable law.

   Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed

Changing this message requires editing the motd:

xbmc:$ sudo vi /etc/motd

Now add something funky like the following:

       ___.                   
___  __\_ |__   _____   ____  
\  \/  /| __ \ /     \_/ ___\ 
 >    < | \_\ \  Y Y  \  \___ 
/__/\_ \|___  /__|_|  /\___  >
      \/    \/      \/     \/ 
             http://xbmc.org/

Yea, that looks cool...

If you also wish to get rid of the "Last Login" (which I don’t recommend doing) information do the following:

xbmc:$ sudo vi /etc/ssh/sshd_config

And set

PrintLastLog yes

To

PrintLastLog no