Tag Archives: Ubuntu

Playing with the Odroid-U2

Picked up one of Hardkernel’s Odroid-U2 dev boxes, figured a quad-core arm box for less than $100 shipped was worth kicking around a bit. After a week-ish of playing with it I thought it worth posting my findings with various OS variants. For reference, I am using Class 10 microSDHC cards (anything less is painfully slow) and a wired connection while I wait on my USB wifi dongle to show up.

I don’t really have a specific use case for the box, but the main categories I’m poking at are media playback (using XBMC, Plex, Netflix), gaming, and general web/app usage. One big downside for general usage across all the Android builds is that the user interface is only moderately okay if you’re not using a touch screen. Swiping through pages is great using fingers, not so much via a normal mouse…

Stock Android
The first thing I tried was the latest official Android build (dated 25th April, 2013). It’s using version 4.1.2_r1 as it’s base with some custom bits as follows:

  • Right mouse click as the back button
  • Power button on the navigation bar
  • No status bar
  • Mounts SD card as internal storage
  • Working(-ish) USB bluetooth support

Overall it’s a very solid build, however trying to use Netflix or Plex to view videos resulted in a black screen with audio. According to the official forums, it’s a known issue with their 4.1 builds and their advice is to revert back to the 4.0.* based builds instead. I didn’t try going that route since I already had my eye on the CM nightlies. Running XBMC was generally okay here but the UI lagged and there were some visual glitches during playback (mostly menu overlays). Although my cheap BT dongle was seen and I was able to pair my phone with the Odroid, I couldn’t ever get my Moga gaming controller to pair properly so I couldn’t do any real game testing. I’m assuming this was more to do with the dongle and not the build since I saw folks on the forums able to use BT controllers without issues.

CyanogenMod
My next try with Android was CyanogenMod nightlies. It’s based on version 4.2.2 and is overall a better option (IMO) than stock. Media playback Just Works, had no issues with Netflix, Plex was able to do playback of some high bitrate 1080p h264 streams without any glitches. XBMC here has been almost flawless with only minor hiccups during playback. This is certainly the faster of the two Android builds, and the kernel allows overclocking to 2Ghz to give it a boost if you’re so inclined (I wasn’t). However, there are a few gotchas involved through the install and usage.

First, the procedures outlined on the CM wiki to install weren’t entirely complete. After installing the initial image as directed I was unable to reboot into recovery mode. Took a bit of digging, but I grabbed the odroidu2-recovery.zip file they list for the windows install instructions and unzip’d to the root of the vfat partition before rebooting. This seems to only be needed for the initial install, subsequent reboot-to-recovery attempts from an installed CM nightly worked just like it should.

The next big gotcha was with the way CM mounts the sd card. It’s fstab file is setup to treat the eMMC card as the internal sd and the micro sd as external which is great if you’re using eMMC, not so much if you aren’t. Fixing it requires editing /system/etc/vold.fstab and swapping the entries, I’ve got a copy here you can just copy over to fix things. You’ll have to do that after each update since the file is replaced during the flash.

The last thing worth mentioning isn’t really a problem but, since the CM build treats this as a tablet and stays close to ASOP, you get the normal tablet interface. So you’ll need to grab your own power widgets (I use secure settings) and deal with the normal status navigation bar. For the latter I just set up a tasker profile to enable the “Expanded Desktop” option (via secure settings) when XBMC is running to get true full screen.

Linux
For this I used the Ubuntu 12.11 Fully Loaded community image from the odroid forums. It’s a great image with several full desktop environments to chose from, very fast and usable. Using it out of the box on a TV screen requires tweaking DPI or font sizes to be able to read anything, but once that’s done it’s pretty straightforward. The only thing really worth mentioning as a downside is viewing YouTube videos in the Chromium browser is painful since there’s no hardware acceleration of the webm codec. Using Firefox with the provided greasemonkey scripts will allow you to chose the h264 versions of the videos which do work at up to 1080p res without issue.

I think you could use this as a desktop replacement as long as you kept your home directory on either a secondary device (USB drive?) or NFS volume, but flashing wipes EVERYTHING so you wouldn’t want to keep a local home directory. The image also includes various emulators and games, but I haven’t had a chance to try those so I can’t speak to how those worked.

In summary, this little beast draws almost no power and has enough horsepower to do quite a bit. I’m looking forward to support maturing in Android and Linux to take full advantage of the hw, but the potential for usage here is huge.

XBMC suspend/resume in Maverick

Few updates to my previous post:

  1. The format for the proc interface changed slightly (but significantly) from “disabled” to “*disabled”, scripts must be updated accordingly.
  2. One more step is required, details are in this post, but the short version is that you’ll need to enable wakup for the device at the sysfs level in addition to proc. I used the simple udev rule posted there and all works.

CR-48 and Linux Connectivity

Was one of the luck ones that got a not-so-shiny (matte black actually) ChromeOS netbook from Google this past Friday. The only thing I’ll say here about ChromeOS is that it’s exactly what you’d expect from a browser-based environment.

With the specs on the netbook, my second task (after playing with ChromeOS) was to get a proper full OS installed. Following the instructions on the chromium wiki was pretty boring and worked perfectly. My first install was Meego which, tho very fast, didn’t have nearly the application choices I wanted so I moved on to Ubuntu Netbook Remix.

After the initial configuration I noticed a few rather crucial kernel modules missing from the chrome kernel; namely ppp* and tun. Without those there was no chance at either VPN or mobile broadband usage which limits the usefulness pretty drastically in my case. Luckily the chromium developer docs are pretty easy to follow and I was able to build the needed modules after determining which board (x86-mario) I was building for. Here’s my working result, built against kernel 2.6.32.23+drm33.10 (chromeos version 0.9.128.12 beta). Dropped those in the proper directory, ran depmod -a and now have working vpn (cisco vpnc and openvpn) as well as the built-in verizon broadband.

Quick aside, the broadband is a bit tweaky and has a few caveats. The module doesn’t seem to reinit proper after a suspend/resume cycle and you have to enable within Chrome before it’ll work on the Linux side. I might get around to tracking those down at some point, but I think my next task will be trying to get the touchpad working with all the multi-finger goodness.

Enabling suspend/resume with XBMC in Ubuntu 9.10

Had issues after upgrading to Karmic with suspend/resume on my media box (Shuttle SN78S) where the system would suspend and then immediately resume (xbmc forum thread). After ruling out the nvidia blob as the culprit (my usual suspect), I did a bit more digging and found people able to make it work by disabling usb autosuspend but that didn’t make a difference at all for me. I did find some older documentation pointing to an oddity with the ehci driver and acpi wakeup causing this issue so I disabled it (via /proc/acpi/wakeup) and was able to suspend successfully. Wakeup via WOL succeeded as well, but not being able to resume via remote is a showstopper for me so I poked a bit more and enabled wakeup only for the USB device my remote sensor was attached to and voila!

To determine the USB device:

root@host:~#lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1784:0008 TopSeed Technology Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In this case it’s easy as my remote sensor is the only device attached and it’s on bus 004.


root@host:~#cat /proc/acpi/wakeup |grep ^USB
USB0 S3 disabled pci:0000:00:02.0
USB1 S3 enabled pci:0000:00:04.0
USBB S3 disabled pci:0000:00:04.1
USB2 S3 disabled pci:0000:00:02.1

Now I have both the USB1 and USBB devices that show up on 04, but USB1 is the first so that was the one I enabled via:
echo "USB1" > /proc/acpi/wakeup

To make it persistent I added the following to /etc/rc.local (the ethtool command enables WOL and isn’t needed unless you want to wake your machine over the network):

# Enable wakeup for the remote
status=`cat /proc/acpi/wakeup | grep "USB1" | awk {'print $3}'`
if [ "$status" = "disabled" ]; then
echo "USB1" > /proc/acpi/wakeup
fi

/usr/sbin/ethtool -s eth0 wol g > /dev/null

The only other step I took was to work around the standard lirc borkage by disabling lirc and unloading the modules. This requires two files:
/etc/pm/config.d/01lirc_module

SUSPEND_MODULES="lirc_mceusb lirc_dev"

/etc/pm/sleep.d/10-lirc (must be executable, requires installing curl – apt-get install curl)

#!/bin/sh
# Disconnect XBMC from lirc and stop the daemon

case "$1" in
hibernate|suspend)
service lirc stop
;;
thaw|resume)
service lirc start
;;
*) exit $NA
;;
esac

As of 9.11 alpha 2, XBMC uses ConsoleKit in the Karmic packages so you need to make sure your session gets auth’d properly or you’ll end up with permission denied messages in the xbmc logs when it tries to suspend. If you’re using GDM or KDM it should Just Work. In my case I’m just starting x on tty1 for my xbmc user so I had to update my .xsession file to launch xbmc like so:
ck-launch-session /usr/bin/xbmc --standalone

Edit: As of 9.11 alpha2, XBMC takes care of connecting/disconnecting from the LIRC daemon so no need to do it in the lirc script. Also added info about the new ConsoleKit integration in alpha2.
Edit2: Maverick requires a few other tweaks to work properly, updates are here.

Updated Gaim Edgy packages

I upgraded the Gaim packages in my Edgy repo to the latest (beta 4) release today. Because I stupidly didn’t sync with the upstream Ubuntu packages, you’ll have to remove the gaim-otr plugin and re-install. The plugins I have are gaim-otr, gaim-encryption and gaim-libnotify. I’m prolly gonna go ahead and do a quick Xchat-gnome package cause the new version has a few sweet features like themable icons and irc command tab completion.

Note: I’ve removed all the launchpad and automatic bug reporting patches from all my packages. I don’t want any spurious bug reports going upstream to the Ubuntu folks.

Switch to our mobile site