This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

EGL Error : Could not create the egl surface: error = 0x300b

Note: This was originally posted on 18th March 2013 at http://forums.arm.com

Hi,

I have a Cubieboard embedded system:

http://cubieboard.org/

      1G ARM cortex-A8 processor, NEON, VFPv3, 256KB L2 cache  Mali400, OpenGL ES GPU  512M/1GB DDR3 @480MHz  HDMI 1080p Output  10/100M Ethernet  4Gb Nand Flash  2 USB Host, 1 micro SD slot, 1 SATA, 1 ir  96 extend pin including I2C, SPI, RGB/LVDS, CSI/TS, FM-IN, ADC, CVBS, VGA, SPDIF-OUT, R-TP..  Running Android, Ubuntu and other Linux distributions


The cubieboard is based on the AllWinner A10 SoC and this is what is available as documentation:

http://linux-sunxi.org/A10
http://linux-sunxi.org/Mali400

It uses Mali-400 MP for graphics - and I'm trying to use the Qt5 graphics framework with it.

Following the second link and installing the mali-libs from sunxi I'm able to display the coloured triangle and obtain the es_info2 output as stated.

When attempting to run a Qt5 App using the EGLFS platform, I'm getting:

EGL Error : Could not create the egl surface: error = 0x300b

So far I've managed to translate this error 0x300b to EGL_BAD_NATIVE_WINDOW but haven't got a clue about what it means and to solve it.


If anyone has any idea of why the error is showing, and how to fix it - please let me know.

Thanks in advance!
  • Note: This was originally posted on 19th March 2013 at http://forums.arm.com

    Hi,

    if I had to guess based on the info so far, I'd say the surface manager (EGL) you have is incompatible with the windowing system you're using.

    For example, if you were trying to use Mali 400 libraries which support framebuffer from under X11 and Qt, then when you pass the X window handle to eglCreateWindowSurface() then EGL won't understand that since it would be expecting a framebuffer window handle.

    Could that be the cause? What windowing system are you trying to use with Qt5 - framebuffer or X11?

    Cheers, Pete
  • Note: This was originally posted on 4th May 2013 at http://forums.arm.com

    I have exact same problem and it freaks me out.

    I'm trying to develop on Odroid-U2 with Mali-400 and even examples from Mali SDK fails on eglCreateWindowSurface() with EGL_BAD_NATIVE_WINDOW.

    I did a gdb and it looks like this:

    (gdb) s
    MaliSDK::EGLRuntime::initializeEGL (requestedAPIVersion=MaliSDK::EGLRuntime::OPENGLES2) at src/EGLRuntime.cpp:287
    287      surface = eglCreateWindowSurface(display, config, (EGLNativeWindowType)(platform->window), windowAttributes);
    (gdb) print platform->window
    $8 = (fbdev_window *) 0x1c0e8
    (gdb) n
    288      if(surface == EGL_NO_SURFACE)
    (gdb) print surface
    $9 = (EGLSurface) 0x0
    (gdb) s
    290          EGLint error = eglGetError();
    (gdb) n
    291          LOGE("eglGetError(): %i (0x%.4x)\n", (int)error, (int)error);
    (gdb) n
    Error: eglGetError(): 12299 (0x300b)


    So the platform->window handles correct fbdev_window structure, is accepted by eglCreateWindowSurface, but Surface is not created.
    I'm using X11 with Mali drivers tied to framebuffer, the only difference with other platforms is that Mali-fbdev on ODROID-U2 uses /dev/fb6 instead of /dev/fb0.

    Can anyone help me? What does this function expect as native window?
  • Note: This was originally posted on 24th May 2013 at http://forums.arm.com

    There is a difference between X11, and what we call 'framebuffer', or fbdev_window.
    If you have setup the device to use the X windowing system, then instead of setting up EGL to pass in a window that is of type fbdev_window, but you would want to create an X11 window and pass that into EGL instead. (Note it will allow you to use fbdev with an X11 environment, but there is no guarantee what the output may do)
    Similarly, the reverse is true if you are running in fbdev mode, without X support. You will need to setup EGL to take in an fbdev_window instead of an X11 window.

    I hope that clarifies a few things, please feel free to contact us further if you need further assistance.
  • Note: This was originally posted on 28th July 2013 at http://forums.arm.com


    There is a difference between X11, and what we call 'framebuffer', or fbdev_window.
    If you have setup the device to use the X windowing system, then instead of setting up EGL to pass in a window that is of type fbdev_window, but you would want to create an X11 window and pass that into EGL instead. (Note it will allow you to use fbdev with an X11 environment, but there is no guarantee what the output may do)
    Similarly, the reverse is true if you are running in fbdev mode, without X support. You will need to setup EGL to take in an fbdev_window instead of an X11 window.

    I hope that clarifies a few things, please feel free to contact us further if you need further assistance.


    Hmm... well, I'm using Linaro Ubuntu 12.11 with the Cubieboard, it starts X by default but I've disabled it;

    I've managed to confirm that I have framebuffer going by installing fbi and displaying HD pictures with it
    on the console;

    I've compiled the sunxi-mali binaries using the following configure options:

    make config VERSION=r3p0 ABI=armhf EGL_TYPE=framebuffer

    at this point, I'm able to compile a test app for the mali libs and display a coloured triangle on the console

    Qt 5.1.0 (at the moment) builds successfully, I have qtbase, qtdeclarative, and several other (most of them) modules compiled successfully

    Creating a hello world app builds, but when running it on cubieboard, I get that error message:

    EGL Error : Could not create the egl surface: error = 0x300b error

    when running the app with the eglfs option (Qt5 configure summary says OK for it)
  • Note: This was originally posted on 5th August 2013 at http://forums.arm.com

    Following this recent guide: (deleted) and adding the configure option -opengl es2 I was able to build Qt 5.1.0 and run it on Cubieboard (A10) - still, this was with the mali X11 libraries, and eglfs off.

    I got about 30fps running the QtCinematicExperience Demo.

    With the framebuffer mali libraries I also managed to build Qt5 but haven't been able to run any App - either with linuxfb or directfb or directfbegl (I installed the directfb packages for the ubuntu distro).