Ubuntu on Ouya

[Update 2014-09-20]: The latest patches from Markus for the Jetson TK1 work also for Tegra3!

I was testing Markus Tavenrath’s EGL branch of the XBMC on my Ouya and noticed that OMX_UseEGLImage segfaults on Debian but doesn’t on Ubuntu. The segfault happens inside the NVIDIA’s OMX binary, so there is not much to debug. And with Ubuntu 13.10 I had rendering issues. Then I tried Debian Jessie just to discover it is already using X.Org Video ABI 15.

So here is the summary of my discoveries:

  • Debian Wheezy: Segfault in OMX_UseEGLImage with XBMC.
  • Debian Jessie: X.Org Video ABI 15, no driver.
  • Ubuntu 12.04: Old.
  • Ubuntu 12.10: Old.
  • Ubuntu 13.04: No obvious issues.
  • Ubuntu 13.10: X.Org Video ABI 14, rendering problems.
  • Ubuntu 14.04: X.Org Video ABI 15, no driver.
HW accelerated video and GLES2.

HW accelerated video and GLES2.

I noticed that Totem has moved to GStreamer 1.0 so it does not use NVIDIA’s GStreamer plugins. I changed Parole to use nvxvimagesink instead of the de-facto xvimagesink and it works well. I’ve uploaded the binary to my tmp.

Pulseaudio seemed to cause slow playback and extra CPU consumption so I just removed it.

My instructions for creating Ubuntu Raring rootfs for Ouya can be found from github. Do leave a comment if there is anything broken with the instructions!

46 thoughts on “Ubuntu on Ouya

  • March 24, 2014 at 2:00 pm

    Will give ago on weekend would be good to see ghow xbmc goes…could allow to run apps in background sickbeard, transmission etc.

    • March 24, 2014 at 2:05 pm

      XBMC isn’t usable yet. The UI works quite well, but the video playback doesn’t. There seem to be problems with audio/video sync and the playback is extremely slow. Videos without audio track plays better.

      I’m happy to give pointers, if there are OMX gurus around :)

  • March 28, 2014 at 12:27 am

    Am wondering with the new CM11 and rom development if we’ll start seeing liniu roms at least its starting to move along.\

    Gotta as tuomas some good bloody work.

  • April 14, 2014 at 6:52 pm

    If I understand correctly, the best supported installation would be debian jessie or ubuntu 14.04 ?

    Is it possible to use this kernel image to boot an existing debian jessie installation ? (I already have one that I run in a chroot on my Ouya)

    If yes then it would solve my problem.

    I tried to use your debian kernel image but it wants to boot from the second partition of my usb drive (the first one being the swap parition), but my debian is on the first partition.

    However, this installation doesn’t use a swap partition, so I’m guessing the kernel wants to boot on the first partition, which would work with my setup.

    If not, then I’ll either have to remake/reorder my partitions, or remake the kernel image.

    What do you think is the best/easiest way to solve my problem ?

    Also, do you plan updating this kernel image ?

    • April 14, 2014 at 7:08 pm

      Ubuntu 13.04 is currently the best. Jessie and 14.04 both have too recent X.Org and there is no Tegra driver for them. It is possible to use those but not with any hardware acceleration.

      Choosing the boot partition is a trivial change to kernel. My latest kernel boots from the first partition and the swap is just a file, not partition.

      What kinds of kernel updates you are looking for?

  • April 14, 2014 at 7:23 pm

    What do I need to do to change the boot partition ? Is it simpler to use the Ubuntu kernel ? I don’t care for graphics for now, I only want to run my Ouya as a server.

  • April 14, 2014 at 7:31 pm

    You can take the Ubuntu kernel. Changing the boot partition is actually the only change compared to the “older” Debian kernel.

  • April 14, 2014 at 8:08 pm

    Thanks a lot for the quick answer. I greatly appreciate the work you put into this.

    If I wanted to change the boot partition, I’m guessing I would need to recompile the kernel ? Considering that I’m a noob at kernel compiling, how hard of task would that be, starting from your work ?

    As for the updates, I was interested in making Bluetooth work. Because the kernel is almost the same from the debian installation, I’m guessing the issues noted in the September post are the same ? Or does hciconfig work now ?

  • April 14, 2014 at 8:51 pm

    Compiling kernel is quite easy as it already supports cross compilation well. I can provide the commands if you want to try it out. But as I said, the only difference between my -tk3 (“debian kernel”) and the -tk4 (“ubuntu kernel”) is the boot partition.

    I’ve tried couple of times to get the BT working but I haven’t succeeded on it. Others have, even with my kernel, so it should be possible.

    • April 14, 2014 at 9:14 pm

      I’d like to try it out, that would be a fun weekend project :)

      Just saying, could be a great subject for a blog post ! If not then just a quick reply here or on the email address I used to post would be perfect.

      Thank you very much again.

      • April 15, 2014 at 9:57 am

        The first thing is to get the cross compiler to your desktop Linux. In Ubuntu: apt-get install gcc-arm-linux-gnueabihf

        It seems that there is something wrong when getting the zip file from github, so you need to clone the source slowly with all the git history: git clone https://github.com/kulve/ouya_1_1-kernel.git

        • If you want to change e.g. the rootfs partition, look for “root=/dev/sda1″: vi arch/arm/configs/ouya_linux_defconfig
        • Choose my Ouya config: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- ouya_linux_defconfig
        • Optionally make other configuration changes: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
        • Compile the kernel and kernel modules: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules -j4
        • Install modules temporarily to /tmp: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/tmp/ouya/ modules_install

        Now you should have the kernel in arch/arm/boot/zImage and the modules in /tmp/ouya/lib/modules/3.1.10-tk4+/. You probably should e.g. tar the modules and copy that to the device. Using something like scp -r will follow links and actually copy the whole kernel source tree.

  • April 16, 2014 at 12:09 am

    I was thinking about booting from a disk image (containig linux file system) that would be stored on Ouya’s android filesystem. The reason is the usb connector on my ouya is quite wobbly now. Every slight touch on the usb disk that in turn moves the usb cable a bit breaks the usb connection which is fatal – the os just hangs. Any ideas how to do it? Maybe the romfs embedded into the android kernel (which is used for dualbooting) could do the initial mounting of the disk image….

    • April 16, 2014 at 12:33 pm

      Normal initrd images on PCs mounts a read-only RAM rootfs initially, then loads the needed kernel modules from there and finally mounts the real rootfs and chroots into it. Something similar could probably be used for your use case as well.

      I guess it’s not possible for the kernel to mount directly an image file or directory from some partition (Ouya’s /data/) as the rootfs so probably the initrd option is the only way to go.

      I don’t usually use the initrds so I can’t help in creating one.

  • April 27, 2014 at 5:14 pm

    I have a Tegra 3 based tablet, Asus TF300T, running Ubuntu 13.10 (dual-boot with Android 4.1)

    I’ve managed to somewhat fix the rendering problems (missing text) by disabling the RENDER (XRender) extension through /etc/X11/xorg.conf.d/
    I believe this should work for other Tegra 3 devices too.

    Some apps don’t work without XRender (like MATE’s Task manager and LXDE’s terminal app), but most apps are unaffected.

    Btw, Thanks a ton for your XBMC OpenMAX patches ! At last I got 1080p hardware decoding to work on Linux.
    Could never get it to work myself.

    • April 28, 2014 at 8:32 am

      Good to know the XRender issue.

      For me the XBMC works somewhat for videos without audio tracks. There’s still something wrong with seeking and that might be also related to the issue with audio tracks.

      • April 29, 2014 at 5:02 am

        Interesting. Audio works fine for me with PulseAudio backend.
        But there are some problems with video:
        1. Some videos play at full speed but there’s a lot of corruption and dropped frames.
        2. Some videos play too slowly, although audio plays fine.

        For example this trailer
        plays too slowly for me.

        What configure options do you use for XBMC ?

        The OMX decoder is working fine for me with gstreamer.

        • April 29, 2014 at 4:02 pm

          GStreamer is working very well for me too.

          What configure options do you mean, build time or something from the XBMC’s Settings menu?

          • April 29, 2014 at 5:21 pm

            Sorry, I wasn’t clear enough.
            I meant build time options, for the configure script.

            • April 29, 2014 at 5:50 pm

              This it what I’ve used:

              ./bootstrap && ./configure --prefix=/usr/local/xbmc --enable-openmax --enable-neon --enable-gles --disable-gl --disable-vdpau --disable-vaapi && make -j4

  • May 2, 2014 at 4:56 am

    I did some tinkering with old XBMC 11.0 Eden source code. By applying your NPOT fix, I could get OpenMAX to work. It’s far from perfect, but it works much better than your version.
    There’s no corruption or slow playback, but there are framesync issues in some videos (as if xbmc is trying to play them too fast). However, some videos (even 1080p ones) play fine.

    Had to modify configure script (change softfp to hard and mfpu to neon) to get it to build.

  • August 10, 2014 at 4:05 pm

    in case anybody is interested in booting linux form linux image (single file) stored directly on ouya’s flash (without connected usb disk, preserving ouya’s android filesystem intact) the solution exists here:


    to make it work on ouya you have to modiy the init script and change:


    next you have to copy your linux image to android’s “/sdcard” directory:
    adb push linux_root.img /sdcard/linux_root.img
    (that takes several tens of minutes depending on the image size)

    then you can boot the linux like that:
    fastboot boot zImage ramdisk.img.gz

    alternatively you can bundle the ramdisk image with the kernel via
    xperiaboottools (google it) to produce android kernel which can be
    autostarted via ouya dual boot. To do that:
    copy the whole content of the bbinitramfs project into “my_ramdisk” directory
    then create android kernel like this:
    ./repack-bootimg.pl zImage my_ramdisk kernelA2.img

    hope it helps.

  • August 11, 2014 at 11:23 am

    Thanks for the update!

  • September 20, 2014 at 9:37 pm

    I just tested that the latest XBMC patches from Markus for Jetson TK1 works also very well on the Ouya! I can provide instructions to compile it or maybe even a .deb if there’s interest for them.

    • September 25, 2014 at 9:43 pm

      Yes please (regarding the .deb)!! I want to test it ;)

      • September 27, 2014 at 12:31 pm

        Which version of Ubuntu are you running?

        • September 27, 2014 at 3:27 pm

          Raring, as per your instructions. Should I upgrade? Thank you.

          • September 28, 2014 at 4:06 pm

            I’m using Raring too. Unfortunately I’m not sure if Canonical provides packages for that anymore.

            You can get the Kodi (XBMC) tar ball from here: http://tuomas.kulve.fi/tmp/xbmc-13.99-git-56ccc8b.tar.gz2

            Extract it to /usr/local (it will create the xbmc subdirectory).

            You may need the following dependencies:

            sudo apt-get install gcc-4.4 libasn1-8-heimdal libasound2 libasyncns0 libavahi-client3 libavahi-common3 libbluetooth3 libbz2-1.0 libc6 libcap2 libcdio13 libcomerr2 libdbus-1-3 libegl1-mesa libflac8 libfreetype6 libfribidi0 libgcc1 libgcc-4.7-dev libgcrypt11 libgles2-mesa libgnutls26 libgpg-error0 libgssapi3-heimdal libgssapi-krb5-2 libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libjpeg-turbo8 libjson0 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 liblzo2-2 libmicrohttpd10 libmysqlclient18 libogg0 libp11-kit0 libpcre3 libpcrecpp0 libpulse0 libpython2.7 libroken18-heimdal libsasl2-2 libsmbclient libsndfile1 libsqlite3-0 libssh-4 libssl1.0.0 libstdc++6 libtag1-vanilla libtalloc2 libtasn1-3 libtdb1 libtinyxml2.6.2 libudev1 libva1 libvorbis0a libvorbisenc2 libwbclient0 libwind0-heimdal libwrap0 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxrandr2 libxrender1 libxslt1.1 libyajl2 zlib1g

            • September 28, 2014 at 7:48 pm

              Thanks a lot!!! It works really well. Additionally I had to install libnfs1, mesa-utils and libcurl3-gnutls.
              H264 and MPEG2 decoding works well. VC1 have problems. Also I tried to switch the refresh rate but the Ouya doesn’t detect correctly the refresh rates available on my TV.

              Thanks again!

              • September 29, 2014 at 2:37 pm

                Another question… Are you dual booting? If so, how?

                • September 29, 2014 at 2:41 pm

                  I’m not. Currently I’m just manually reading the Linux kernel image to RAM and starting it from there. At some point I need to follow up on those XDA threads to replace the kernel permanently.

                  • September 30, 2014 at 3:47 pm

                    Thanks again Tuomas. Where I can get the xbmc source code? Is there any special branch + patches or is master?

                  • October 1, 2014 at 5:37 pm

                    Hi Tuomas.
                    Finally I’ve my ouya dual booting with stock rom and raring.
                    I installed Boot Menu (from milaq on xda) and make an “android kernel image” with your zimage using bootimg_tools_7.8.13.zip
                    Here is the link for the generated image.

                    Regarding xbmc, as I said it works pretty well. I switched TV so now I’ve working passthrough (ac3 and dts, not hd) and refresh rate switching.

                    On some videos I get “pixelated” image (no matter the bitrate / codec), specially on panning scenes.


  • September 28, 2014 at 6:46 pm

    hi tuomas!
    I’m noob with linux, and need some advice, can you help me with bellow questions?
    I want to make headless low power little server with SMB, FTP, torrent server, bittorrent sync, maybe owncloud. I need to know if I can use Ouya for that with debian or ubuntu, and which of this will be more preferable and more simple in configuring?

    • September 28, 2014 at 7:02 pm

      Ouya is easily brickable and doesn’t contain any expansion connectors, so it’s not that good choice for a server. Certainly it can be used for such, even with the risks ands limitations. There’s not much difference between Ubuntu and Debian. Personally I prefer Debian.

      E.g. Olimex has cheap boards with SATA, they might be better for that kind of use cases. E.g.: https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2-4GB/open-source-hardware

      • September 28, 2014 at 9:10 pm

        Thanks, Ouya with one usb 1.8″ hdd 120gb without external power is enough for my needs.
        I understand that ouya is highly brickable, but I installed Ouya boot menu some months ago and try CM11 and Olin’s Ubuntu 12.04 after that, so the most dangerous things is over as I think.

        • September 29, 2014 at 11:18 am

          I think choosing between Ubuntu and Debian is a matter of opionion. For Ubuntu 14.04 LTS there probably are more instructions and forums about setting up stuff. I have worked more on Debian and I like how well Debian has handled security other updates at least for the common server applications.

          If you prefer a particular server application for Torrent etc. check which versions are available on which distro and what kind of documentation you find for each. Then pick you distro based on that.

      • May 21, 2015 at 1:56 am

        The OUYA does have a recovery mode so it could be used if any thing goes wrong
        This tells us that there is a way for a hardware reset if you have adb and a usb keyboard, has any one else heard of this or tried it

        I did something similar and managed to break mine at one point; luckily I know a few things which help -


        From what I can tell there is no hotkey to boot it into fastboot or recovery -- at least none that I could find after a few hours of trying just about every trick I could think of.

        A quick poke around the board revealed the 4-pin header at j3 to be a 3.3v uart, although I never did manage to find RX so it's just TX only. In other words, you can connect to it as serial and watch the console output as the device boots, but you can't actually send any commands this way. Ground is the pin closest to the edge of the board, TX is the 3rd pin from the edge.

        Further poking around and I was able to get the device into nvflash mode, but I wasn't able to actually perform any nvflash commands (there's a missing microswitch on the back side of the board near the u33 label which can be used at bootup to trigger the nvflash mode).


        This is a hack, an unintended sequence of events that results in recovery mode; what you need to do is crash the startup using sysrq.

        For this you'll need a usb keyboard with the sysrq key, this is usually the printscreen button if your keyboard isn't labeled. As the OUYA starts to boot, hold down the alt-sysrq keys and press i, wait a few seconds and then repeat. This key combination is kill-all-tasks; thanks to whoever left this enabled in the kernel. Each time you kill the tasks the init process will restart them, after about 5 or 6 times init will print a warning on the console that one of the processes marked critical has been restarted too many times -- this then triggers an automatic reboot into recovery mode.

        Unfortunately it's not always obvious when the ouya is in recovery mode. You might get screen with the ouya logo and a large red exclamation mark, or the screen might be entirely black; usually I got a black screen. Press the home button on the keyboard to bring up the recovery menu; it's actually a toggle so feel free to press the home button repeatedly until you see the menu since the timing isn't otherwise obvious.

        Once you get to the recovery menu, the select the second option to update from adb. Download the OTA update from the link at the end of this post, and run the command "adb sideload RC-OUYA-1.0.193-r1_ota.zip" this will reformat the system partition and reinstall the ouya software. You might also want to do a factory reset before rebooting.

        Links to download the OTA updates can be found on this xda thread: http://forum.xda-developers.com/showthread.php?t=2266629


        Figuring all this out was far more painful than it needed to be; this is the only android device I've seen that doesn't have an easy hotkey to get into the bootloader or recovery. There really ought to be an easy and documented way to wipe and reset everything or you will get people sending back consoles that they've broken.

        • May 21, 2015 at 8:22 am

          Unfortunately that’s not a “hardware reset”, it only works if your kernel boots up. But if you flash your own kernel that doesn’t boot, then it’s a permanent brick.

  • November 26, 2014 at 10:35 am

    is it possible for you to make a video to show how to doe this.

    • November 28, 2014 at 8:18 am

      Sorry, no video. But the instructions are quite detailed.

    • February 2, 2015 at 4:23 pm

      That’s very good to know, thanks!

  • May 21, 2015 at 1:45 am

    Who is maintaing this port?
    For some reason you have people use the android drivers when they can just use the FLOSS Ones instead https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx. The moddel you sugest the OUYA uses is under the 4330 am I right and that uses the brcmfmac driver (Open-source). Also How can unity run on OUYA as Unity needs over 2 GB of RAM. Also how can X.org work on 13.04 and not 14.04? IF IT is a change in a keranl modual why not supmint the changes up stream so 14.04 can use X? Also why not flash the image to the OUYA? I know it is some thing about the bootloader looking for some file and that boots the OUYA, am I right. If so is the file editable or is it built in, if it is build in as a ROM chip then it would be difficult, but if the file it reads for the OUYA is opensource we could just change it right so it boots up an Linux image instead, or so it goes to another boatloader (like grub) and boots the usb device allowing you to partetion the drive, install the custom bootlloader for the ouya that then talks to grub and boots Ubuntu. I

    Also how do packages work on the Ubuntu OUYA? Do you have to compile every thing from source or are there binnarys for it. Also does it support ppa’s and how can you tell what ppa’s will work on the ARM 6 builds of Ubuntu? So far not many people have done it. When I tried it with ADB it did not detect the OUYA at all, I have no idea why as I aint that deep into CIP yet. (and I never will(thank god).

    Also does the build of 14.04 have multiarch? I heard that makes running 32bit software less painfull on 64bit distros.

    Also useing a video is quite usefull as for some of us it makes MUCH more sence. For example when I softmoded my wii I had a hard time useing the guid, god but watching a how to video made it SO MUCH EASYIER. Also you asume everyone knows what you are doing are what chroot is (for example it is easy for people to think it is a chomre os thing, and it is used in chrome os rooting, if I remember right). Not everyone is a Linux wize and some people just want to put Linux on the 100 dollar ARM box they just bought because they heard they could in the kickstarter just ot find out the comany lied to them and did not give a shit about that part of their fanbase and when they start a petion they shoned that part of the community, and now they are forced into bankruptcy.

    • May 21, 2015 at 8:18 am

      You have a lot of questions and for most you can find answer easily with googling.

      I haven’t provided “easy instructions” for flashing your Ouya as most likely it would be a permanent brick then and you would blame me for destroying your 100 dollar ARM box (And no, the tricky parts are not open source and the open source parts are not the upstream parts).


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?