Instructions to get OpenGL ES acceleration on BeagleBone Black running Debian

4,471 views
Skip to first unread message

Juozapas Adomaitis

unread,
Oct 14, 2015, 2:45:41 PM10/14/15
to BeagleBoard
Hello,

I have been researching the possibility to run Qt Quick 2
applications directly on BeagleBoard Black rev. C with the
display connected to HDMI. In the process I have put together
instructions to get OpenGL ES acceleration working (which is a
required by Qt Quick 2). I am posting them here in the hope that
they can be useful to someone.

Regarding my experiments, the HDMI port worked with 2 monitors
out of 4 I have tried - disappointing. Qt Quick 2 was impossibly
slow using software rendering under X in 24bpp mode. I couldn't
get it to run in 16bpp mode; it displayed this error:
   Cant find EGLConfig, returning null config
   Unable to find an X11 visual which matches EGL config 0
   Could not initialize OpenGL
It worked ok in fullscreen mode (EGLFS) after installing the
drivers.

==================================================
3 steps to get hardware OpenGL ES acceleration on BeagleBone
Black running Debian (tested 2015-10 on wheezy, jessie and sid).

Note that after following the steps you will be able to run a
single fullscreen OpenGL ES application (e.g. Qt Quick 2 in EGLFS
mode) and nothing else, meaning:
* 3D acceleration in X server doesn't work on BBB and apparently
  won't work anytime in the future
* Wayland can run with accelerating compositing (window drawing
  handled by the GPU chip), but starting OpenGL applications
  won't work. For this to work the graphics driver must have
  built-in Wayland support, exposing the EGL_EXT_platform_wayland
  EGL extension. Robert Nelson mentioned on IRC that TI is
  working on this and progress can be followed here:

1. First pick a kernel version from this list of kernel modules
   for the GPU (the packages are from the
   $ apt-cache search ti-sgx-es8-modules
   Then install the kernel together with the modules. For
   example, if you picked ti-sgx-es8-modules-3.14.54-ti-r77, run:
   $ apt-get install -y {ti-sgx-es8-modules,linux-image,linux-firmware-image}-3.14.54-ti-r77
2. On an x86 Linux computer run this (an x86 host is needed
   because an x86 binary installer from TI will be unpacked):
   $ cd ti-linux-kernel-dev
   $ ./sgx_create_package.sh
   $ scp deploy/GFX_*_es8.x.tar.gz <address_to_your_bbb>:/tmp/
3. Now install the utilities on your BBB and reboot:
   $ cd /
   $ sudo tar zxf /tmp/GFX_*_es8.x.tar.gz
   $ sudo /opt/gfxinstall/sgx-install.sh

Qt Quick 2 fullscreen programs can be launched from the terminal
or within Wayland by exporting these variables:
$ export QT_QPA_PLATFORM=eglfs
$ export QT_QPA_EVDEV_KEYBOARD_PARAMETERS="grab=1"
$ export QT_QPA_EVDEV_MOUSE_PARAMETERS="grab=1"

Wayland with accelerated compositing (but without the possibility
to launch windowed OpenGL programs) can be run like this:
$ weston-launch -- --backend=fbdev-backend.so --use-gl

mural...@gmail.com

unread,
Oct 20, 2015, 9:15:57 AM10/20/15
to BeagleBoard
Hi Juozapas ,

I'm really excited to see that you can get the OpenGL ES working on the beagleboneblack.
I have a beagleboneblack connected to a LCD touch panel and I have the SGX modules installed(followed instructins from Robert nelson's page).
I'm trying to run QT  dashboard example project. But the program errors out with the message that the 
program : Could not initialize egl display. I could not find answers related to this issue. 

Did you happen to come across similar issue? I would appreciate if you can share some information.

Thanks,
Murali

Juozapas Adomaitis

unread,
Oct 21, 2015, 8:46:16 AM10/21/15
to BeagleBoard, mural...@gmail.com
Hi, Murali,

As I wrote in my instructions, there is only one way to run a Qt Quick 2 application directly on BeagleBone Black. Namely as a single fullscreen application using the EGLFS platform. So make sure the graphical environment is not started (no X or Wayland), and run this in a console:
$ export QT_QPA_PLATFORM=eglfs
$ export QT_QPA_EVDEV_KEYBOARD_PARAMETERS="grab=1"
$ export QT_QPA_EVDEV_MOUSE_PARAMETERS="grab=1"
$ /path/to/the/dashboard/example

If this doesn't work, your OpenGL ES drivers are probably not installed correctly and you should try following my instructions to install them.

Jean-Sebastien Stoezel

unread,
Apr 18, 2016, 10:12:39 AM4/18/16
to BeagleBoard
Hi Juozapas:

Thank you for sharing your experience. I have been cross compiling widget based applications with LinuxFB for the BeagleBone and I would like to switch to Qt Quick2. I am guessing that since you got Qt Quick to run on the BBB you may also know how to compile Qt Quick.

So far, whenever I compile for eglfs I get an error message along the lines: "openGL is not configured or available for this platform". I have googled around and I have people reporting the same issue, though I have yet to find a solution for this.

Would it be possible for you to share how you got to compile Qt with Qt Quick and eglfs?

Regards,
JS
Reply all
Reply to author
Forward
0 new messages