XBMC
References
Install
The reference instructions are found on XBMC website.
Since Ubuntu Karmic
Since Ubuntu Karmic, there is no need to add the XBMC Repository nor the PPA Keys. To install XBMC:
sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install xbmc xbmc-standalone
sudo apt-get update
Older version of Ubuntu
To install through command-line:
- Add XBMC repository
sudo su
echo "# XBMC Repositories" >>/etc/apt/sources.list
echo >>/etc/apt/sources.list
echo "deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main" >>/etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main" >>/etc/apt/sources.list
- Add repository authentication key:
gpg --keyserver keyserver.ubuntu.com --recv 91E7EE5E # Get the key from keyserver. If not available see below
gpg --export --armor 91E7EE5E | sudo apt-key add - # Add the key to apt key list
# If Ubuntu keyserver is down, one can also the MIT one
gpg --keyserver pgpkeys.mit.edu --recv 91E7EE5E
gpg --export --armor 91E7EE5E | sudo apt-key add -
- Install XBMC
sudo apt-get update
sudo apt-get install xbmc xbmc-standalone
XBMC key is usually available here, but sometimes this server is down. If so copy [{{#filelink: xbmc-key.gpg}} the file below], and copy-paste after typing the command cat | sudo apt-key add -
(end with <ctrl-D>).
{{#fileanchor: xbmc-key.gpg}}
-----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.0.10 mI0ESXWBBAEEAM5zE6qzPJ0Xn8KQQCB14OD9EyCieF5yjpt7PlLDUXkojjguVGgZ+skcklbF my0eIOWYvMNmMIstqDoGYZQQGE3Sc4Dq2M0msc28uIrey2aBtYvKHXLaZ+JG42TU2q5CDLfN vUxIOyWD2Yr4zq/sjg44pUodrUZGRPUFR50T0lPHABEBAAG0IExhdW5jaHBhZCBQUEEgZm9y IFhCTUMgZm9yIExpbnV4iEYEEBECAAYFAknyZLgACgkQTJjLBcbOX94S7wCeKFyFk3v15Uy3 T17wvmCPaVIdE5YAni9juCXYgBGdXyZQYqgc5oh6/dXfiLYEEwECACAFAkl1gQQCGwMGCwkI BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRBtl1xHkefuXnryBAChrSStywXdJOrmjKqq4BrZ2Isk BYqak7pD0JDaGy9HatChgJH/D30AhU74C9ReqkXvw8UohuVhQUH0lKBZWVzisSjJo4lmT/un qqNeFpUivvz8RzPQf0S+zE2MHjDPIwjiz6ns97VdQtc2upbW6zd3BitE70P7gpCqvOyOFCnc ow== =Mur8 -----END PGP PUBLIC KEY BLOCK-----
Remote and Keyboard Control
Links and References
Some handy links:
- Also contain keymapping when watching videos, listening to musics...
Keymapping specific to the installation are in file Keymap.xml (System folder).
An excellent page on Gyration remote in MythTV: http://www.mythtv.org/wiki/Gyration-based_MCE_Remotes
Tools
Here a list of tools and software that can be handy when setting up a remote/keyboard and troubleshooting issues:
- xev
- Print content of X events. Drawback is that it is fully dependent on X, and does not show event that X doesn't see, and also some events are not correctly reported because they are already fully (like the Power key) or partially (like VolUp or VolDown keys) intercepted by the graphical environment (Gnome...)
- showkey
- Examine the codes sent by the keyboard. This is a pure console program (so does not work properly under X because keys will already be pre-processed by X), but in a tty console (like those opened with Ctrl-Alt-F1) it shows all events that the kernel sees.
- lirc (package), irrecord, irw
- Provides infra-red remote control support. However it can also support multimedia keyboard. irw can be used to print the events generated by lirc. irrecord can be used to create new /etc/lirc/lircd.conf files.
- evrouter
- evtest
- keytouch, keytouch-editor, getscancode
- Creates keyboard file for new keyboard. At launch, the program asks to which USB event (as listed in /dev/input/by-id/) to connect to, and can detect keys pressed on the remote/keyboard and assign an action to that key.
- dmesg
- acpi_listen
- ACPI event listener. Print events generated by the ACPI daemon. I could not make it work (Ubuntu 9.10 Karmic)...
- evtest (package linEAKD)
- Linux support for Easy Access and Internet Keyboard. Launch this with evtest /dev/input/event7 or evtest /dev/input/event8 to get the code / scancode corresponding to any button on the remote. This is the code to be used in the lircd.conf file.
- dmesg
- Prints the kernel messages. Might show interesting messages regarding input devices (unrecognized keys...)
Files
Log files where interesting information might be found:
- Xorg.log
- That file is located at /var/log/Xorg.0.log (and similar). For instance it shows the input devices that were recognized, and how they are handled by X:
(II) config/hal: Adding input device Gyration Gyration RF Technology Receiver (**) Gyration Gyration RF Technology Receiver: always reports core events (**) Gyration Gyration RF Technology Receiver: Device: "/dev/input/event6" (II) Gyration Gyration RF Technology Receiver: Found 1 mouse buttons (II) Gyration Gyration RF Technology Receiver: Found scroll wheel(s) (II) Gyration Gyration RF Technology Receiver: Found keys (II) Gyration Gyration RF Technology Receiver: Configuring as keyboard (II) Gyration Gyration RF Technology Receiver: Adding scrollwheel support (**) Gyration Gyration RF Technology Receiver: YAxisMapping: buttons 4 and 5 (**) Gyration Gyration RF Technology Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 (II) XINPUT: Adding extended input device "Gyration Gyration RF Technology Receiver" (type: KEYBOARD) (**) Option "xkb_rules" "evdev" (**) Option "xkb_model" "pc105" (**) Option "xkb_layout" "be" (**) Option "xkb_options" "lv3:ralt_switch" (EE) Gyration Gyration RF Technology Receiver: failed to initialize for relative axes.
Troubleshooting Gyration Remote 3101
- Captured all keycodes / keysyms in X using
xev
. Not all buttons are seen by X (like LiveTV or Guide), other are captured by Ubuntu (like VolUp and VolDown). - Captured all keycodes / scancodes seen by the kernel with
showkey -k
andshowkey -s
(in a console TTY, i.e. not X). - All buttons have a keycode but the one that don't send RF signals (Connect, Setup, Input, Red, Green, Teletext, Yellow and Blue).
- Some of these buttons have no scancode (LiveTV, Guide, ChanUp, ChanDown and DVD).
- Tried
xbindkeys
andxbindkeys-config
(see [1]) → it does not work!!! Keys that are invisible to X remains invisible!!! - Tried acpi_listen, but it just doesn't produce anything to me...
- Installed lirc. Works very well!!! Hourray! Almost all keys work in XBMC, except Power, LiveTV, Home, and DVD. Note that keys Connect, Setup, Input, Red, Green, T, Yellow, Blue does not send RF codes and so are not meant to be used on PC.
- Installed keytouch and keytouch-editor. There are 2 !!! devices for the remote:
- /dev/input/event7, which according to links in /dev/input/by-id is USB kbd event. Most buttons on the remote are obtained through this event, except the key listed below.
- /dev/input/event8, which is USB mouse event. The following buttons are obtained: Power, LiveTV, Left Click, Right Click, Home, DVD. Note that the key Power doesn't have a scancode, only a keycode.
- Installed linEAKD. Run evtest to get the lirc keycode/scancode for both devices (i.e. /dev/input/event7 and /dev/input/event8):
- sudo evtest /dev/input/event7
- sudo evtest /dev/input/event8 - It confirms that Power button does not have a scancode, only a keycode (142, SLEEP).
- Configured lirc to connect to 2 remotes simultaneously [2]:
#Assuming that lircd is not running...
sudo /usr/sbin/lircd --output=/var/run/lirc/lircd1 --pidfile=/var/run/lirc/lircd1.pid --driver=devinput --device=/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd --listen
sudo /usr/sbin/lircd --output=/var/run/lirc/lircd --driver=devinput --device=/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse --pidfile=/var/run/lirc/lircd.pid --connect=localhost:8765
irw #Should show event for all buttons (except those without an RF code)
Setting up the Gyration Remote 3101
The procedure below was done on Ubuntu 9.10 Karmic Koala.
- Tried to setup lirc as described at [3] and [4].
- I selected Windows media center remote, and no transmitter, but actually I should have started from a blank remote control file.
- file /etc/lirc/lircd.conf as defined here.
- Fix: In the original file, Power was reported as 0x0074, when on my system the keycode is 0x008E. Changing the settings doesn't make the button to work better though...
- file /etc/lirc/hardware.conf (REMOTE_DEVICE must match name at
ls -l /dev/input/by-id
): - Restart the lirc daemon and test it. Every button works except Power, LiveTV and DVD !
- Add the definition of the gyration remote in XBMC (file /usr/share/xbmc/system/Lircmap.xml):
- To work-around the Power that does not work, I edited the remote action file to show the shutdown menu when pressing the Back button in the Home window (file /usr/share/xbmc/system/keymaps/remote.xml):
<Home> <remote> <!-- ... --> <back>XBMC.ActivateWindow(shutdownmenu)</back> </remote> </Home>
sudo apt-get install lirc
#Chosen Remote Control REMOTE="GYRATION REMOTE 3101" REMOTE_MODULES="" REMOTE_DRIVER="devinput" REMOTE_DEVICE="/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" REMOTE_SOCKET="" REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" #Enable lircd START_LIRCD="true"
sudo /etc/init.d/lirc restart
irw
<remote device="gyration">
<play>Play</play>
<pause>Pause</pause>
<stop>Stop</stop>
<forward>Forward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Enter</select>
<pageplus>ChanUp</pageplus>
<pageminus>ChanDown</pageminus>
<back>Back</back>
<menu>Home</menu>
<title>Guide</title>
<info>More</info>
<skipplus>Skip</skipplus>
<skipminus>Replay</skipminus>
<!-- <display>Teletext</display> -->
<!-- <start>Home</start> -->
<record>RecTV</record>
<volumeplus>VolUp</volumeplus>
<volumeminus>VolDown</volumeminus>
<mute>Mute</mute>
<power>Power</power>
<!-- <myvideo>Videos</myvideo> -->
<!-- <mymusic>Music</mymusic> -->
<!-- <mypictures>Pictures</mypictures> -->
<!-- <mytv>TV</mytv> -->
<one>One</one>
<two>Two</two>
<three>Three</three>
<four>Four</four>
<five>Five</five>
<six>Six</six>
<seven>Seven</seven>
<eight>Eight</eight>
<nine>Nine</nine>
<zero>Zero</zero>
<!-- <star>StarHash</star> -->
<hash>StarHash</hash>
<clear>Clear</clear>
<enter>Enter</enter>
<!-- <red>Red</red> -->
<!-- <green>Green</green> -->
<!-- <yellow>Yellow</yellow> -->
<!-- <blue>Blue</blue> -->
</remote>
So in summary, to get the Gyration Remote 3101 to work in XBMC:
- Install lirc
- Edit file /etc/lirc/lircd.conf and hardware.conf
- In XBMC, edit the button mapping file /usr/share/xbmc/system/Lircmap.xml (this file maps the remote name & button name as reported by LIRC to a XBMC command).
- Edit the command mapping file /usr/share/xbmc/system/keymaps/remote.xml (this file maps the XBMC command in the previous file to real commands in XBMC).
Troubleshoot
My XBMC bugs on Delicious.
Freeze on Eeebuntu NBR 3.01
- Eeebuntu NBR 3.01 - Ubuntu Jaunty 9.04 - Array Kernel 2.6.28-15 - XBMC v 9.04.1-jaunty1.
- Freezes seems to be specific to Eeebuntu NBR 3, as reported here: [5], [6], [7]
- Possible work-arounds:
- Try stable platform as suggested in 2nd bug report above: Intrepid + intel xserver from xorg-edgers ppa + 2.6.28 kernel from jaunty + libpulse-dev + compiling XBMC from the SVN (slower GL than Ubuntu 9.04 though).
- Try Eeebuntu NBR 2.0
- Tried. The autoscan completes. But there are hick-ups reading the DVD (scene skip, roll-back). Need further testing to identify the causes. Rendering is not 100% smooth.
DVD Play-back hick-ups
- Alien 4
- This is a multi-angle DVD. When playing the Special Edition, the chapter 3 is played twice, then not possible to go backward (before 00:06:00) + misc. hick-ups. There is no problem with the Theatrical Cut.
- Confirmed on Minimoy Samsung NC10 - Eeebuntu NBR 2.0 - XBMC v9.04.1-jaunty1.
- Confirmed on Dell Latitude 620 - WinXP SP4 - XBMC 9.04.1 repack 2.
- → Media problem, not a XBMC bug. Windows readers also fail reading the DVD correctly (PowerDVD 4.0 on W2K can't even play the movie, WinDVD 4.0 on WXP performs a bit better, but with jumps/hickups).
- This is a multi-angle DVD. When playing the Special Edition, the chapter 3 is played twice, then not possible to go backward (before 00:06:00) + misc. hick-ups. There is no problem with the Theatrical Cut.
- First launch of XBMC, Source on samba share takes long time to connect (20 sec).
- Confirmed on Dell Latitude 620 - WinXP SP4
- Sometimes the XBMC navigation menu shows up when moving the mouse, although the current title is a DVD menu.
- Moreover the frustrating part is that when this menu is shown, it is not possible to click on the DVD Menu Item