User:Zepp

From ArchWiki

Introduction

Be aware this is work in progress. Currently Im only using this page to convey my thoughts and ideas toward the xbmc wiki located at XBMC on Arch Linux (Unofficial) The goal here is to build a dedicated media centre without the overhead of display managers and windows managers using xbmc and arch.

Base installation

The base install of archlinux is beyond the scope of this page. You will need to have working network before continuing to the package installation section. Please refer to the Archlinux wiki's for help.

Beginners Guide

Official Install Guide

Compiling xbmc from source requires about 1.2GB of space. 5-10GB root partition should be more than ample unless you plan to install extra packages. It is useful to create a seperate partiton to store your media incase you would like to reinstall a complete fresh system.

Add user 'xbmc'

Add user xbmc and add to necessary groups for xbmc to work. You can choose your own username but be aware that any config file refering to xbmc will need to be changed to reflect your choice.

# useradd -m -G users,audio,optical,disk,storage,video,power -s /bin/bash xbmc

Set password

# passwd xbmc

Packages installation

Openssh (optional)

Useful to install so remaining installation can be performed remotely. Also useful for file transfers and performing future system maintainance. Please refer to openssh wiki for advanced options and whats happening here. OpenSSH wiki

Install ssh

# pacman -S openssh

Add the following line to you /etc/hosts

sshd: ALL

Start the sshd daemon

# /etc/rc.d/sshd start

Add sshd to your daemons line in /etc/rc.conf

# DAEMONS=( ... ... sshd)

Sudo

# pacman -S sudo

Enabling sudo for Users

To add a user as a sudo user (a "sudoer"), type "visudo" as root. This will open the file /etc/sudoers in a special session of vi. If you don't know how to use vi, you can type for example the following:

EDITOR=nano visudo

(Do not edit /etc/sudoers directly with an editor). To give the user full root privileges when he/she precedes a command with "sudo", add the following line:

xbmc   ALL=(ALL) ALL

Enabling Tab-Completion for sudo Users

Add the following line to your ~/.bashrc

complete -cf sudo

Audio

To install alsa

# pacman -Sy alsa-lib alsa-utils

Add alsa to your daemons line in /etc/rc.conf

# DAEMONS=( ... ... alsa ...)

At this point, alsa needs it required modules loaded to operate correctly. The simplest way it to reboot

# reboot

Following the reboot, we can now setup our levels and un-mute required channels.

# alsamixer

The alsa daemon needs a config file initialise so it wont complain during startp and to save our current settings. Create config file and save with

# alsactl store

Xorg + Support

# pacman -Sy xorg-server xorg-utils hal mesa 

Add hal to your daemons line in /etc/rc.conf

DAEMONS=( ... ... hal)

Note: Its important to install mesa before using the binary Nvidia install. Otherwise xbmc-svn will complain when you try to make the package.

Video drivers

Too many options for too many cards. Arch wiki and google is your friend. Currently, xbmc has great support for series 8 and higher Nvidia cards and hardware accelerated playabck through Nvidia's VDPAU. I highly recommend using Nvidia based cards as this can tremedously reduce CPU usage for certain formats such as H.264 and allows the use of very modest hardware. The nvidia drivers must be installed before the compile of xbmc otherwise VDPAU acceleration will not be enabled or present.

Nvidia - http://wiki.archlinux.org/index.php/NVIDIA

ATI - http://wiki.archlinux.org/index.php/ATI

Intel - http://wiki.archlinux.org/index.php/Intel_Graphics

There are many options available to tweak you xorg.conf file for better perfomance. These tweaks are probablly beyond the scope of this guide but there are some necessary options required in your /etc/X11/xorg.conf file to allow xbmc to run. Following is using Nvidia's binary install.

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


Generate a Nvidia xorg.conf with some performance tweaks ( late model Nvidia )

# nvidia-xconfig --force-generate --no-logo --no-twinview --no-composite --depth=24 --no-dynamic-twinview --no-flip --exact-mode-timings-dvi

Reenable Zapp

Section "ServerFlags"
     Option      "DontZap"   "off"
EndSection

Native Scaling

Section "Screen"
   ...
   ...
   Option         "FlatPanelProperties" "Scaling = Native"
   ..
EndSection

Remote Control (optional)

This package is optional if you dont have a remote or plan to use a keyboard and or mouse.

# pacman -S lirc

Add lircd to your daemons line in /etc/rc.conf

DAEMONS=( ... ... lircd)

Lirc needs to be configured to support your remote. The lircd.conf file for your remote can normally be found on the lirc site at http://lirc.sourceforge.net/remotes/ Currently xbmc supports the mceusb remotes right out of the box. If you have one of these remotes, Go ahead and download the lircd.conf.mceusb

# wget http://lirc.sourceforge.net/remotes/mceusb/lircd.conf.mceusb

Then copy/rename it to /etc

# cp lircd.conf.mceusb /etc/lircd.conf

For more advanced options Refer to the Arch Lirc Wiki

Install xbmc

# mkdir Builds
# cd Builds
# wget https://aur.archlinux.org/packages/xbmc-svn/xbmc-svn.tar.gz
# tar zxvf xbmc-svn.tar.gz
# cd xbmc-svn
# makepkg -s

Now its time for a coffee or any other vise you may have. Depending on you system speed this could take quiet some time.

Now install xbmc

# sudo pacman -U xbmc

Configuration

Power button

To allow the computer to be shutdown via the powerbutton Install acpid

# pacman -S acpid

If you are using the hal daemon as per this guide, The acpid daemon will automatically be loaded with hal.

If you are not using hal add the acpid daemon to /etc/rc.conf file

DAEMON=( ... ... acpid ...)

Then create the file /etc/acpi/events/power with the contents

# /etc/acpi/events/power
# This is called when the user presses the power button
event=button/power (PWR.||PBTN)
action=/sbin/poweroff

Policy Kit

Auto Start X