Ubuntu Linaro 12.11 with 2D/3D Mali-400 GPU Acceleration on ODROID-X Development Board

A few days ago, Hardkernel released the first version of Ubuntu 12.11 (Linaro) with Mali-400 GPU support for their ODROID boards (ODROID-X/X2, ODROID-U/U2). This is still WIP (Work in Progress), but this is one of the few boards together with Pandaboard, Origen and Snowball that can support 2D/3D GPU acceleration in Ubuntu Quantal. Since I have an ODROID-X development board, I decided to give it a try. There are different ways to install it. I chose the way that is most convenient for me (LCD display instead of HDMI), and likely to yield more performance (eMMC instead of SD Card). The current installation instructions to eMMC are extremely cumbersome and you have to go through 5 main steps:

  1. Install Android (yes, seriously) in the eMMC
  2. Install Ubuntu in the SD Card
  3. Install Ubuntu to the eMMC
  4. Upgrade Ubuntu to the latest version
  5. Install the Mali drivers

In this post I’m going to go through all those steps, and do some testing for eMMC and 2D/3D performance. If you just want to boot Ubuntu from SD, simply skip steps 1 and 3. For eMMC installation, I followed the “eMMC Ubuntu” guide on odroid forums, as well as the instructions on the release post to install Mali drivers, and enable 2D/3D acceleration in Ubuntu. Similar instructions are also available for ODROID-X2 and ODROID-U2.

You’ll need an 8GB SD Card or greater to complete all the steps.

Installing Android to ODROID-X

  • Insert the SD card in a Linux PC, and find your SD card device:

  • Download & extract the Android Installer, and write it to your SD card with dd or dd.sh script:


If you use Windows, do it with Win32DiskImager. Back in the times when I still used Windows and Win32DiskImager, I never had problems myself, but some people apparently have, and Hardkernel released an improved version of Win32DiskImager to verify the copy.

Then insert the SD card in your ODroid-X board, connect a Jumper on SD/MMC connector (JP2) to boot from SD card, and install the latest version of Android. During installation I had no display on the 10″ LCD display, and the board simply powered itself off after a while. Not sure this is normal, but after removing the Jumper, I could boot to Android (3-Jan-2013 build) from the eMMC.

Installing Ubuntu 12.11 for ODROID-X to the SD card

Now take the SD card back to your Linux computer to copy the Ubuntu image:

  • For LCD display:

  • For HDMI Display:


I’ll carry on with the LCD image since this is what I use, but the step for HDMI are the same, just replace the filename:


Inset the SD card in ODroid-X board, insert the Jumper in JP2 to boot from SD card to verify Ubuntu 12.10 boots correctly.

Install Ubuntu to ODROID-X eMMC Module

Once you’ve verified Ubuntu boots correctly from the SD Card, put the SD card back in your PC and copy odroidx_20130128-linaro-ubuntu-desktop_SD_with_LCD.img.xz to the rootfs. In my PC running Ubuntu 12.04, it will automount it to /media/rootfs:


Once umount is successfully (which means the data is fully written to the SD card), you can insert it back into your ODroid-X board to install Ubuntu 12.10 to your eMMC. First locate your eMMC device with:


The eMMC is the device with with boot0/boot1, as well as p1/p2/p3/p4. In my case, it’s mmcblk0. Once you know this, copy Ubuntu to the eMMC by using the following command in a terminal:


Once sync is complete, power off the board, remove the Jumper on JP2, and start Ubuntu.

Ubuntu Quantal in ODROID-X Board
Ubuntu Quantal in ODROID-X Board

Upgrading Ubuntu (15 Feb)

Before we can use Mali-400MP4 GPU in Ubuntu, you must install an update for Ubuntu (Feb 15, 2013):


If you are using the Wi-Fi module from Hardkernel (and probably others), run those 2 commands:

Installing Mali Drivers for ODROID-X Board

Mali-400MP4 drivers are not included in the image, most probably for legal reasons, and you have to accept an End-User-License-Agreement (EULA) during installation (dkpg). Let’s do this:


If you are outputting to an HDMI monitor, the installation should be complete at this stage. In my case I could only the 4 tux and nothing else showed up on the display. I could however access the command line via the serial console. After further reading, I found out I had to modify /usr/share/X11/xorg.conf.d/99-hkl_mali.conf to make it work with the LCD display as follows:

Ubuntu Linaro 12.11 Performance in ODROID-X

The first thing I’ve noticed is that Ubuntu feel snappy with this hardware, at least snappier than in my Atom netbook running Ubuntu 12.04, and it’s the first time I could see myself using this platform as a desktop replacement. Booting from power off takes 15 to 20 seconds. There are still some issues though. Once of them is that software-center is not working when run from the eMMC (SD card is OK). Even though this post is mainly about GPU support, I’ve compared startup times from eMMC and SD card with Libreoffice Writer, Software Center, and Firefox

Libreoffice Writer was not pre-installed, so I installed it first:

Firefox Software Center Libreoffice Writer
SD Card 5s 18s 11s
eMMC 3s Does not start 5s

Each program was started after a reboot. We can notice there’s a significant advantage of using eMMC instead of SD card when it comes to startup time.

I’ve also done several 2D/3D tests.

I started with es2gears, which comes in the provided Ubuntu image:

es2gears
EGL_VERSION = 1.4 Linux-r3p2-01rel0
vertex shader info:
fragment shader info:
info:
483 frames in 5.0 seconds = 96.561 FPS
427 frames in 5.0 seconds = 85.230 FPS
395 frames in 5.0 seconds = 78.827 FPS
394 frames in 5.0 seconds = 78.580 FPS
379 frames in 5.0 seconds = 75.664 FPS
373 frames in 5.0 seconds = 74.570 FPS
363 frames in 5.0 seconds = 72.585 FPS
352 frames in 5.0 seconds = 70.245 FPS
332 frames in 5.0 seconds = 66.387 FPS
317 frames in 5.0 seconds = 63.273 FPS
297 frames in 5.0 seconds = 59.341 FPS
298 frames in 5.0 seconds = 59.469 FPS
279 frames in 5.0 seconds = 55.722 FPS
280 frames in 5.0 seconds = 55.855 FPS
263 frames in 5.0 seconds = 52.505 FPS
260 frames in 5.0 seconds = 51.875 FPS
251 frames in 5.0 seconds = 50.090 FPS
237 frames in 5.0 seconds = 47.230 FPS

It appears to work, but the window background is transparent, and although the frame rate starts at 96.651, it just decreases which each iteration… Not sure what that means…

I’ve also installed glmark2-es2

sudo apt-get install glmark2-es2

glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board
glmark2-es2 2D/3D GPU Benchmark in ODROID-X Development Board

run it, and got a score of 54:

linaro@linaro-ubuntu-desktop:~$ glmark2-es2
=======================================================
glmark2 2012.08
=======================================================
OpenGL Information
GL_VENDOR:     ARM
GL_RENDERER:   Mali-400 MP
GL_VERSION:    OpenGL ES 2.0
=======================================================
[build] use-vbo=false: FPS: 52 FrameTime: 19.231 ms
[build] use-vbo=true: FPS: 54 FrameTime: 18.519 ms
[texture] texture-filter=nearest: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=linear: FPS: 57 FrameTime: 17.544 ms
[texture] texture-filter=mipmap: FPS: 57 FrameTime: 17.544 ms
[shading] shading=gouraud: FPS: 57 FrameTime: 17.544 ms
[shading] shading=blinn-phong-inf: FPS: 57 FrameTime: 17.544 ms
[shading] shading=phong: FPS: 54 FrameTime: 18.519 ms
[bump] bump-render=high-poly: FPS: 46 FrameTime: 21.739 ms
[bump] bump-render=normals: FPS: 58 FrameTime: 17.241 ms
[bump] bump-render=height: FPS: 57 FrameTime: 17.544 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 56 FrameTime: 17.857 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 56 FrameTime: 17.857 ms
[pulsar] light=false:quads=5:texture=false: FPS: 58 FrameTime: 17.241 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 40 FrameTime: 25.000 ms
[desktop] effect=shadow:windows=4: FPS: 53 FrameTime: 18.868 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 37 FrameTime: 27.027 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[ideas] speed=duration: FPS: 53 FrameTime: 18.868 ms
[jellyfish] <default>: FPS: 56 FrameTime: 17.857 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 57 FrameTime: 17.544 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 58 FrameTime: 17.241 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 57 FrameTime: 17.544 ms
=======================================================
glmark2 Score: 54
=======================================================

Some test failed. I’m not sure if it’s because those are not implemented yet, or simply not supported by Mali-400. One interesting point is that ODROID-U2 users reports that Xubuntu is twice as fast as Ubuntu in glmark2-es2, and the culprits appear to be Unity and Compiz.

I’ve done another test to check whether WebGL would work, and I’ve got between 0 to 1 fps on both Firefox and Chromium with WebGL Aquarium. A final comment, since many people still seem to be confused with GPU and video decoding. The Mali-400 does not handle video decoding, this is done normally done by the Video Processing Unit (VPU), and AFAIK this is not currently supported in Linux on ODROID boards.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
37 Comments
oldest
newest
onebir
onebir
11 years ago

Possibly stupid qn. 🙂 Can Ubuntu (or other Debian derivatives) on Arm processors install .deb files from the Ubuntu/Debian repos, or do packages for them have to be compiled specially?

Dr. Azrael Tod
11 years ago

@onebir
“Yes”
The Debian/Ubuntu-repos are pretty completely available for ARMHF. So binaries need to be compiled for this “different” (to x86/x64) Platform, but most software comes already compiled for this.
Ubuntu-PPAs are a different thing though… sometimes noone needed the special PPA and compilation for armhf/armel is not enabled.
Same goes for other binary distribution of software, you won’t be able to download some x86-flashplugin from Adobe and use it. If you have the code however, you could compile it yourself.

Ermis
Ermis
11 years ago

Debian has a repo containing their packets precompiled for ARM

armel for boards based on armv5 or higher

armhf for cortex-A8 or higher

the difference is the hardware floating point unit support which makes armhf faster for the boards that support it.

So yes you can just apt-get install any package present in the armel/armhf repo. I guess it’s something similar for Ubuntu or other Debian derivatives…

Ermis
Ermis
11 years ago

@Ermis
A minor correction, instead of Cortex-A8 i should have written armv7. Cortex-A8 is actually the first cpu based on this architecture.

Tim Michals
Tim Michals
11 years ago

Running Xubuntu on an atom also provides better performance.

onebir
onebir
11 years ago

Thanks folks. I’m a bit clearer now. I remembered a lot of packages had to be recompiled for Raspbian, but realise now that was because the Debian/Ubuntu armhf was for a later arm version…

(& I wonder how much the confusingness of Arm version naming has been in discouraging use of Arm processors outside of geekville… I just live in the suburbs 🙂 )

Armblock
Armblock
11 years ago

I could get about 140~150pts of glmark2-es2 score on the Fedora for ODROID-X2.
Mali400 driver on Fedora made almost twice performace over Ubuntu.

Anyway the eMMC gives the amazing user experience to ARM based platform.

Armblock
Armblock
11 years ago

@Armblock
Quake3 is also running well with the Mali400 driver in 1920×1080 Full HD resolution.
http://youtu.be/qkeVCttWkWE

The Cageybee
The Cageybee
11 years ago

Does the release of these drivers possibly help in getting mali linux acceleration on other chips?
I.e. a10, rk3066

sky770
sky770
11 years ago

@The Cageybee

🙂 Lima driver(for Mali 400) is on the way..

m][sko
11 years ago

Armblock :
@Armblock
Quake3 is also running well with the Mali400 driver in 1920×1080 Full HD resolution.
http://youtu.be/qkeVCttWkWE

sometimes it drop fps to 25fps 🙁

Klaus
Klaus
11 years ago

Hi,

I am stuck with no HDMI output after installing the image (with_HDMI) to an 8GB SD card. It seems to boot correctly one blue LED constantly on and the other blinking just like under Android – but nothing on the screen. When booting under Android I get the normal display…

Any idea what I could try and look for on the SD card…?

Thanks in advance

Klaus
Klaus
11 years ago

Yes, I am at step 2. I’ll try another monitor. You are probably right that it is my TV. Will report back as soon as I tried it. Thanks already!

Klaus
Klaus
11 years ago

Hi again, just checked it on another monitor and same result. At sep 2 the system seems to boot from the SD card: one blue led on, the other blinking – but no display – it actually does not even wake up (the display). Next I will try another SD card but if someone has another idea I would be happy.

Klaus
Klaus
11 years ago

Its me again, sorry!
I tried now several Monitors (HDMI) and SD cards and I can’t get it to work. I do step 2:
Download (several times) the HDMI version of the xz file
unzip it (>5GB) and “burn” it to an SD card.

As already said it gets quickly to the point of one blue LED on and the other one blinking. However,
I think it gets stuck at this point. The cooling device of the processor stays cold (not the case with Android). Android boots normal

Gé
11 years ago

remove the eMMC from the Odroid-X2 when booting from SD. Try to see if it makes a difference, might be a boot issue.

Klaus
Klaus
11 years ago

Hello, I got quite far now. I am able to boot with openSuse for odroidx and I can run version: odroidx_20121015-linaro-precise-ubuntu-desktop_with_HDMI.img.gz. Actually I am impressed with the performance of the later! I am not able to run version: odroidx_20130128-linaro-ubuntu-desktop_SD_with_HDMI.img.xz. No display…

Thank you for your feedback…

James
James
11 years ago

What is required to recompile the kernel, or more precisely… is there a reason it is compiled with “swap” disabled…

Also, I’ve noticed that my odroid-x will also not wake up the screen while booting, I must turn the screen on manually and then boot the odroid for it to wake up the HDMI port.

Dmitriy Beykun
Dmitriy Beykun
11 years ago

@Jean-Luc Aufranc (CNXSoft) > It seems AllWinner forgot to “lock” something so their drivers can also be used on other ARM SoC. Totally late answer, but no, it is not Allwinner. Mali-400 libs are done like that, they are universal, you can use r3p2 from hardkernel on any Mali-400 compatible device, if you will update your platform definition (config.h & mali_platform.c) to match r3p2 kernel drivers. Info about how to do can be gathered from hardkernel repo, just checkout r2p4 drivers in 3.0.y and r3p2 in 3.5.y branches. You will see what changed and you can grab any device r2pX… Read more »

daniele
daniele
11 years ago

this is my score o odroid with: Linux linaro-ubuntu-desktop 3.0.63-odroidu2 #12 SMP PREEMPT Wed Feb 13 05:57:57 UTC 2013 armv7l armv7l armv7l GNU/Linux – cpu-freq governor performance – mali drivers http://dn.odroid.com/MALI400_R3P2/20130222/mali_packages.tar.gz ======================================================= glmark2 2012.08 ======================================================= OpenGL Information GL_VENDOR: ARM GL_RENDERER: Mali-400 MP GL_VERSION: OpenGL ES 2.0 ======================================================= [build] use-vbo=false: FPS: 168 FrameTime: 5.952 ms [build] use-vbo=true: FPS: 157 FrameTime: 6.369 ms [texture] texture-filter=nearest: FPS: 139 FrameTime: 7.194 ms [texture] texture-filter=linear: FPS: 137 FrameTime: 7.299 ms [texture] texture-filter=mipmap: FPS: 137 FrameTime: 7.299 ms [shading] shading=gouraud: FPS: 158 FrameTime: 6.329 ms [shading] shading=blinn-phong-inf: FPS: 129 FrameTime: 7.752 ms [shading] shading=phong: FPS: 111… Read more »

daniele
daniele
11 years ago

For performance governor:

> apt-get install cpufrequtils
> cpufreq-set -g performance

Donno if needed but i also changed the file /etc/init.d/ondemand

i replaced:
> echo -n ondemand > $CPUFREQ
in:
> echo -n performance > $CPUFREQ

just to be sure the performance governor is applied at startup.

daniele
daniele
11 years ago

Well since i did these tests from my unstable linaro on microsd before passing to the emmc 🙂 i retried the tests. Consider in the sd i had a lot of self compiled drivers for X just to test the sixaxis (ps3 console). After passed to the emmc with standard installation I had: 1) at first run it gave result glmark2 Score: 75 not so good so…. so i was wondering for the reason… and… try to repeat the test in this manner (i do that from ssh console usually): – log as root > /etc/init.d/lightdm stop > export DISPLAY=:0.0… Read more »

Neagix
11 years ago

Hi there! I have published a similar guide for ODROID-U2, thanks for the great post!

rajashekar
rajashekar
10 years ago

Hi,

>> Klaus
>> I am stuck with no HDMI output after installing the image (with_HDMI) to an 8GB SD card. It seems to boot
>> correctly one blue LED constantly.

i am also stuck with same problem using linaro 12.11 HDMI image. when i was insert card into board, it display an error as “cannot display this video mode”.
i was tried with different sd cards, and also with android image, but still am getting same error.

But linaro 12.08 is working fine.

please can anybody help me, i have to work with linaro 12.11.

Advance Thanks,
Rajashekar.

rajashekar
rajashekar
10 years ago

Hi all,

previously problem is with my display configuration, after changing display configaration linaro 12.11 is working.

and i followed all the steps said above, when i am trying to play videos using gstreamer with xvimagesink, it is showing error
” xvimagesink.c(1443): gst_xvimagesink_get_xv_support (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
No port available” .

and xvinfo command output is :

X-Video Extension version 2.2
screen #0
no adaptors present

can anybody help me, how can i play video using xvimagesink.

Advance Thanks,
Rajashekar

rajashekar
rajashekar
10 years ago

Thanks for your reply,

Actually it seems, problem with renderer, because
i am using software decoder only(ffdec_vp8) i.e.,

$ gst-launch-0.10 filesrc location=2_part_015.ivf ! ivfparse ! ffdec_vp8 ! xvimagesink

with the above pipeline, upto decoding process it is working, but problem with xvimagesink.
I think it is unable to open 2D accelerator, may be i am wrong.

Adavance Thanks,
rajashekar.

caro
caro
10 years ago

hi, do you know if this ubuntu image will work on the samsung origen 4412 ?

xiaoliu
xiaoliu
10 years ago

@rajashekar
hi,
now ,I met the same problem with the 2D accelerator open ,sametime,the 3D accelerator open yet.
But I also get this:
xvinfo command output
X-Video Extension version 2.2
screen #0
no adaptors present
I want to know the ODROID support the X-video or not under linaro 12.11 or linux ?
now ,I am upgrating the kernel to odroid-3.8-y,but the kernel can not boot successfully yet
please tell me someting ,3Q.

Khadas VIM4 SBC