XBMC April-9 Installer
These are instructions for installing and using the experimental pre-compiled builds of XBMC Media Center software on the CuBox, this article is meant for novice and non-advance end-users.
Note! For instructions on compiling and developing XBMC on and for the CuBox see the Building XBMC article which is only meant for developers and advanced/expert-users.
Contents |
Installing XBMC on CuBox
April-9 2012 Snapshot
Notice that the installer wipes everything from CuBox internal storage and re-flashes micro-SD and SPI flash.
- Download installer from
http://dl.dropbox.com/u/72661517/cubox-xbmc-instaler-snapshot-090412-patch1.zip md5sum e2203efce0030b7824ce540517dc18fahttp://dl.dropbox.com/u/72661517/cubox-xbmc-instaler-snapshot-090412.zip
Mirror: http://lundman.net/ftp/cubox/cubox-xbmc-instaler-snapshot-090412-patch1.zip
Torrent Magnets: magnet:?xt=urn:btih:71BEAF0601D218E1E727A3622A111FFABFD9F696&dn=cubox-xbmc-instaler-snapshot-090412-patch1.zip&tr=udp%3a//tracker.openbittorrent.com%3a80/announce magnet:?xt=urn:btih:36C48944998FE381DD94BF9A486083B223A9F029&dn=cubox-xbmc-instaler-snapshot-090412.zip&tr=udp%3a//tracker.openbittorrent.com/announce
- Unzip it into a USB thumb drive (either fat32 or ext2/3 formatted usb stick)
- Make sure to keep the whole directory structure, including the main 'boot' directory when unzipping
- Plug the usb stick on the upper USB port of CuBox, then power CuBox on
- Plug the network interface and make sure CuBox has internet access (used to retrieve ntp date from clock.redhat.com)
- Connect to the console and wait. The procedure should take around 10minutes total and once finished CuBox led will start blinking.
- Unplug the USB thumb drive and power-off then power-on
- CuBox should boot for XBMC
- Log in: Username: root, Password: cubox
Installer Details
The installer does the following -
- Wipes out u-boot from SPI flash and reflashes it with /boot/u-boot.bin image. If you want to keep your u-boot then remove that file from the usb-stick.
- Boots Linux kernel and initrd
- initrd sends dhcp requests to get IP address of eth0
- initrd looks for available mass storage devices in the system (/dev/sda in the usb-stick case) and mount it
- initrd calls /boot/install.sh script inside the usb-stick to start the installation
- install.sh ntpdate update the internal clock from clock.redhat.com
- wipes all partitions on SD card and creates two partitions - first ext3 20MB in size and second ext4 includes the rest of the SD card
- copies over uImage and boot.scr from /boot/images to the first partition
- untars /boot/images/modules.tar.* and /boot/images/rootfs.tar* to the ext4 volume
Enabling dirty regions (a.k.a. dirty textures) for XBMC
This dirty region (a.k.a. dirty texture) feature in XBMC is designed to improve XBMC's GUI renderer performance on the GPU by only drawing when something like a texture changes on the screen, that region is then marked as dirty by XBMC's GUI library and only that region is redraw region on the screen.
This feature is however still a little buggy and therefor not enabled by default in XBMC, but all users of XBMC on the CuBox can try enabling the hidden "dirty regions" (a.k.a. "dirty textures") rendering feature advanced setting themselves manually.
- http://wiki.xbmc.org/index.php?title=HOW-TO:Enable_dirty_regions
- http://xbmc.org/theuni/2011/06/19/working-with-dirty-regions/
- http://wiki.xbmc.org/index.php?title=Advancedsettings.xml#.3Calgorithmdirtyregions.3E
Dirty regions are any parts of the screen that have changed since the last frame. By not re-rendering what hasn't changed, big speed gains can be seen. Because all GPUs work differently, only Mode 3, combined with nofliptimeout=0, is guaranteed to be safe for everyone, but current timing issues with nofliptimeout keep this from being the default. Note that with "dirty regions" your system CPU usage might go up a little (because it is doing the dirty regions calculations) but your GPU usage will be much lower, and since it is the GPU and not CPU that is the bottleneck in XBMC for embedded systems your GUI performance will be better even though the CPU usage is higher.
| value | result | description |
|---|---|---|
| 0 | Off | The entire viewport is always rendered, which is the same as having the dirty regions feature disabled. This is the default mode. |
| 1 | Union | All dirty regions are grouped into the smallest possible rectangle. This is typically the fastest mode for slower GPUs due to only making one pass. |
| 2 | Cost reduction | Each dirty region is presented separately, in as many passes as there are regions. |
| 3 | Whole Screen | The entire screen is rendered if there are any dirty regions. This, combined with nofliptimeout is a safe default for drivers that clear buffer contents (manifests as blinking or vibrating images) |
To enable dirty regions manually you need to create a "advancedsettings.xml" text file youself and put the XML <algorithmdirtyregions> enabling tags in there and copying to your "/userdata/" folder.
Example:
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
</gui>
You could also try to enable the <nofliptimeout> feature but that is even more experimental so know that it can cause even more GUI rendering issues in XBMC
Example:
<gui>
<nofliptimeout>1000</nofliptimeout>
</gui>
To have both of these enabled your "advancedsettings.xml" then the finished file should look something like this:
<advancedsettings>
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
<nofliptimeout>1000</nofliptimeout>
</gui>
</advancedsettings>
Getting IR (infrared) remotes working on the CuBox
For getting IR (infrared) remote controls working on the CuBox, please see the LIRC (Linux Infrared Remote Control) for the integrated IR receiver article in this wiki.
Preventing the "black screen after a while" syndrome
You might suffer from your screen turning black after a certain amount of time. If this is the case, verify if that is because of the DPMS.
Testing if DPMS is involved
Connect to your CuBox console and type :
DISPLAY=:0 xset dpms force on
If the screen turns back ON then you need to prevent DPMS from trying to save energy by turning of your monitor.
Configure DPMS
DPMS settings are found in the /etc/X11/xorg.conf file. Add to this file :
Section "ServerFlags" Option "BlankTime" "0" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "0" EndSection
Then restart your CuBox, your screen should not turn black because of DPMS anymmore.
Sources and references
- XBMC and DPMS (Display Power Management Service) topic on the forums
Sound over HDMI/SPDIF
The libmad package is missing from the installer. A pre compiled version is available on launchpad here
Download and install libmad.
In the CuBox home directory, create a file called .asoundrc
and insert the following lines into the file
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
#periods 128
#rate 44100
rate 48000
}
bindings {
0 0
1 1
}
}
Now configure XBMC.
In the sound settings set:
Audio Output: Optical/Coax Speaker Configuration: 5.1 Boost Volume level: Off Dolby Digital: On DTS Capable: On Audio Output Device: Custom Custom Audio Device: plug:dmixer Passthrough Output Device: Custom Custom Passthrough Device: plug:dmixer
HDMI and SPDIF seem to be on the same device and it dose not matter if the Audio Output is set to Optical/Coax or HDMI. The sound comes out of both.
Set the speaker configuration to match your set up.
Now restart CuBox.
Building XBMC from source code
All the details of building / compiling XBMC from source is availalable in the Building XBMC article.
See also
- Building XBMC - Developers and advanced/expert-users instructions for compiling and developing XBMC on and for the CuBox.
- LIRC (Linux Infrared Remote Control) for the integrated IR receiver
- Tvheadend on CuBox - TV server / PVR backend with support for television signal tuning as input sources.