Thursday, August 20, 2009

XBMC reinstalled (Now XBMCbuntu)

I have decided to change my configuration. Instead of base it on a ubuntu desktop I will do a xbmcbuntu installation according to the official guide with the same name. The only reason is that this is what everybody else does. The performance will not be improved.

I will still need a gui but I will add it on top of the xbmc installation instead of the other way around. I think I will stick to gnome for the moment, but am working on a openbox setup as well. The biggest difference in the end will be that I will not run in GDM.
-------------------------------------------------------
XBMCbuntu installation on ION 330 (Asrock)
--------------------------------------------------------
-------------------------
0) Preparations
-------------------------
Flash BIOS => 1.50
Set shared memory to 512Mb
--------------------------
1) XBMCbuntu setup
--------------------------
Refer to the official wiki this is just my installation log.
http://xbmc.org/wiki/?title=XBMCbuntu
*I use a PPA installation for NVIDIA
*I install openbox instead of fluxbox/blackbox EDIT: I will probably switch back to flux)

a) Install minimal ubuntu
-install from 32-bit mini cd (or server CD??)
-don't create the xbmc user in this step (I create xbmcadmin /xbmc)
-Select autoinstall security updates
-optional: Create an extra partition for storage and format it
-add basic server. But Why should Basic Ubuntu Server be added? I didn't select anything at all before.
-add ssh

connect with SSH or type the rest of the commands in terminal.

b) Initial system config (add sources)
sudo nano /etc/apt/sources.list.d/xbmc.org.list

add these lines:
deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ jaunty main
deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ jaunty main
deb http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu/ jaunty main
deb-src http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu/ jaunty main
#deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main
#deb-src http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu jaunty main

save file and exit (CTRL-O CTRL-X)

Add keys
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 318C7509 91E7EE5E 64234534
(addons, live PPA, SVN PPA)

Update apt
sudo apt-get update

c) Install custom boot splash (optional)

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

sudo nano /etc/usplash.conf
add
xres=1920
yres=1080
sudo update-alternatives --config usplash-artwork.so
sudo update-initramfs -u

d) Install XBMC
If you want to install SVN directly
sudo nano /etc/apt/sources.list.d/xbmc.org.list
-and comment out the stable (first 2 lines) and uncomment the svn

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


e) Install "restricted drivers" for NVIDIA from 3rd party PPA
*I the nvidia-vdpau PPA. It has more alternatives than the two in the guide. e.g. downgrade => 180

sudo nano /etc/apt/sources.list
add
deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty main
Add key
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CEC06767

sudo apt-get update
sudo apt-get install linux-headers-generic nvidia-glx-185
*Version 180 seem to work better for the moment. Less frame drops. I am on 180 right now

sudo nvidia-xconfig -s --no-logo --force-generate

f) Test basic installation of XBMC
add simple window manager

sudo apt-get install fluxbox xterm

type startx in console
right-click select terminal & type xbmc

g) Install xbmc helpers

sudo apt-get install xbmc-live python-apt
enter pwd for xbmc user etc

sudo nano /boot/grub/menu.lst

Add
xbmc=nodiskmount,noredir loglevel=0
or
xbmc=noredir loglevel=0

to the end of the first option kernel line
depending on if you want to automount disks or not.
*I will use the first, manually mount my storage partition and later add gnome-mount to handle USB.

add safe mode by copying the first section and remove "quite splash quite"
and add "(safe mode)" to the title line. Don't enable mount in safe mode. That way you can boot without mounting and manually mount any fixed disks.

f) Updating alsa
installing from rep:
sudo apt-get install linux-sound-base alsa-base alsa-utils
*For the moment I am testing with this, supposed to be some upgrades lately.

installing the latest (1.0.20)
wget http://xbmc.org/wp-content/uploads/alsaup.sh
chmod +x alsaup.sh
sudo ./alsaup.sh -di

g) Additional settings and packages

sudo alsamixer
-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
sudo alsactl store
-store the settings

h) Optional: Install support for a remote
sudo apt-get install lirc
--------------------------------------------------------
--------------------------------------------------------
This should pretty much be a vanila XBMCbuntu installation
With the exception of openbox and the diskmount.

-----------------------------------
2) Upgrade to SVN (optional)
-----------------------------------
exit XBMC
sudo nano /etc/apt/sources.list.d/xbmc.org.list
-uncomment the svn line and comment the stable PPA

sudo apt-get update
sudo apt-get upgrade

-------------------------------------------------
3) Config
-------------------------------------------------
a) delete guisettings.xml (will erase all your settings)
sudo rm /home/xbmc/.xbmc/userdata/guisettings.xml

b) Enable 24hz, auto adjust refresh rate
add in screen section in /etc/X11/xorg.conf
Option "DynamicTwinView" "False"
Option "FlatPanelProperties" "Scaling = Native"

sudo sed -i '60i\ Option "DynamicTwinView" "False"' /etc/X11/xorg.conf
sudo sed -i '60i\ Option "FlatPanelProperties" "Scaling = Native"' /etc/X11/xorg.conf

check result
sudo nano /etc/X11/xorg.conf

c) Disable HW curser
Add in section device in /etc/X11/xorg.conf
Option "HWCursor" "False"

sudo sed -i '50i\ Option "HWCursor" "False"' /etc/X11/xorg.conf
check result
sudo nano /etc/X11/xorg.conf

d) reboot
sudo reboot


-------------------
4) Config in XBMC
-------------------
a) enable VDPAU and Auto adjust refresh rate
Change render method => VDPAU
Set "Auto adjust refresh rate" on

b) setup sound
Enable digital sound

Settings for SPDIF:
default
iec958

Setting for HDMI:
hdmi
hdmi

If mp3 is playing to fast, try with:
plug:hdmi
hdmi

14 comments:

  1. Hey Vikjon0. I just followed your guide but I'm having problems with skins. I download the transparency skin from the xbmc forums and drop it in my .xbmc skins folder and the option is greyed out. Any ideas?

    ReplyDelete
  2. No, I have not experienced that. Someone else had this problem and reported it was solved after a few reboot. I also read in the forum that its possible to get the directory structure wrong in the skin/ folder.

    ReplyDelete
  3. Another question. I can't reboot. Reboot or shutdown just leads to xbmc restarting. I have to ssh in and reboot, which usually ends up presenting a list of the 4 splash screens and then asking for my choice. Any ideas? Thanks btw.

    ReplyDelete
  4. Sounds like something is really wrong. The splash selection is this:
    sudo update-alternatives --config usplash-artwork.so
    Did you not select a splash? run the script above and enter 2 and press enter.

    This is the line that will give xbmc access to reboot shutdown
    sudo apt-get install xbmc-live python-apt


    This is the officfial guide that I followed:
    http://xbmc.org/wiki/?title=XBMCbuntu

    ReplyDelete
  5. Thanks. I followed your guide and the official guide. Didn't do much that was different. This is like the 5th time in 2 days I have reinstalled. Pain. Pain. Pain.

    I'll see what I can do. Thanks.

    ReplyDelete
  6. You shouldn't have to reinstall...make sure that you have selected a splash.

    When you installed Ubuntu, did you create a user with a name different from xbmc? The xbmc user should be created by xbmc-live python-apt did that happen? If not..it can be fixed.

    ReplyDelete
  7. Hey Vikjon. My bad. I copied and pasted wrong. Thanks for helping.

    ReplyDelete
  8. something is wrong with the link to the alsa thing...
    when i do "wget http://xbmc.org/wp-content/uploads/alsaup.sh" i get message: 404 file not found

    is there any otherway to get the alsa?

    ReplyDelete
  9. Hi there!
    Yes, there seem to be a problem with the link.

    There is another script on the ubuntu forum
    http://ubuntuforums.org/showthread.php?p=6589810
    I have not tried it but I am sure it is fine.

    or you could stick to the 1.0.18 seem to work fine for me.
    sudo apt-get install linux-sound-base alsa-base alsa-utils

    ReplyDelete
  10. ok thanx that worked.... a bit :)
    i used the 1.0.18

    Now i get another problem... i can no longer acces fluxbox. Oh and btw i would prefer to use another window manager (more like full ubuntu desktop) any hints on how i could get that to work?
    thanx in advance

    ReplyDelete
  11. If you start in safe mode and type starx fluxbox should start...does it not work?

    sudo apt-get install gnome-core

    will add the ubuntu desktop.

    ReplyDelete
  12. Hi
    I´ve followed your installation blog above and come to the place when I want to start the fluxbox desktop
    This is what I get when im typing startx:


    xbmcadmin@UbuntuXBMC:~$ startx
    xauth: error in locking authority file /home/xbmcadmin/.Xauthority
    xauth: error in locking authority file /home/xbmcadmin/.Xauthority
    xauth: error in locking authority file /home/xbmcadmin/.Xauthority
    xauth: error in locking authority file /home/xbmcadmin/.Xauthority

    X: user not authorized to run the X server, aborting.
    giving up.
    xinit: No such file or directory (errno 2): unable to connect to X server
    xinit: No such process (errno 3): Server error.
    xauth: error in locking authority file /home/xbmcadmin/.Xauthority
    xbmcadmin@UbuntuXBMC:~$

    Probably something wrong with the rights, but im not able to figure out where to look cause im kinda new to this

    ReplyDelete
  13. I am not sure how to troubleshoot that. If you created the xbmcadmin user in the install process it should have the correct rights. Are you sure that you installed all packages? You could try to
    sudo apt-get install xorg

    if that doesn't help try with openbox instead.
    sudo apt-get install openbox

    If that doesn't work I dont think I can help you

    ReplyDelete
  14. I reinstalled everything again and now it works
    like a charm :)
    One thing is for shure... dont be tired when dealing with this ;
    Thanks anyway for the install blog

    ReplyDelete