Search Unity

"Auto Graphics API for Linux" is broken or at least misleading

Discussion in 'Linux Editor' started by blah, Apr 3, 2016.

  1. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    "Auto Graphics API for Linux" is broken or at least misleading, because it seems to result in "Use OpenGL Core and if the GPU driver doesn't have the necessary OpenGL feature level, crash."
    It leads to predictably instant-crashing with X-related errors on my Intel Skylake GPU which has a moderate but not exciting OpenGL "3.3 (Core Profile)" support according to glxinfo.
    Forcing the OpenGL2 legacy backend makes it launch just fine.

    If this is instead a driver issue, then it might be worth informing bugzilla.freedesktop.org over it..
     
  2. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    I attached the full glxinfo output of the affected Intel GPU
     

    Attached Files:

  3. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    What does the crash look like? Is it failing to create an opengl core context, or is it crashing for some other reason?
     
  4. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    Player.log attached. It shows some crash backtrace things that will hopefully answer your question
     

    Attached Files:

  5. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    Hm, we're trying to create a glx context, your driver is calling into X, then xcb is hard-aborting because it thinks it received some requests out of sequence. It'll take more investigation to determine whether the driver is at fault or we are, and to nail down the proper fix or workaround.

    Does running in glcore mode with -force-gfx-direct produce the same behavior?
     
  6. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    Yes, -force-gfx-redirect seems to lead to a windowed mode startup but then the same crash (also Assertion `!xcb_xlib_threads_sequence_lost' failed. in the Player.log)

    For what it's worth, I tested another machine which is a laptop, also with Intel Skylake-generation graphics (i5-6200U) and Fedora Linux 23, and it shows the same issue as my Desktop with Intel Skylake-generation graphics (i7-6700) and Fedora 23 where I initially tested this on. So whatever it is, it seems to reproduce more or less consistently on at least Intel Skylake graphics machines (haven't tested other Intel generations) and Fedora 23 x86_64 with the Gnome 3 Window Manager. (in case that helps you possibly reproducing this issue if you want to try that)
     
  7. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    967
    Did you run with -force-gfx-redirect or -force-gfx-direct ? -force-gfx-direct is the correct argument.
     
  8. blah

    blah

    Joined:
    Mar 21, 2016
    Posts:
    23
    Just to make sure I tried again, and still the same:

     
  9. sueythelaw

    sueythelaw

    Joined:
    Sep 26, 2013
    Posts:
    15
    Hello, I have the same problem here, the application closes at launch with a "SIGABRT" signal.

    The only way to make it work is starting the application with "-force-opengl" but it causes the application to look really bad.
     
  10. jirkamarsik

    jirkamarsik

    Joined:
    Oct 27, 2015
    Posts:
    1
    I ran into the same issue. I have Intel HD 3000, whose official Linux drivers cap at OpenGL 3.1 (just below the Unity requirements for the OpenGL Core backend). If I generate a standalone Linux binary in Unity 5.4.0b15, it only works when launched with the `-force-opengl` option or when I put OpenGL2 above OpenGLCore in the Graphical APIs part of Player settings.

    This does not seem to be a problem specific to the experimental Linux editor. The current version of Stephen's Sausage Roll on Steam, for example, crashes on startup as well, unless I use `-force-opengl`.

    Is the intended behavior of standalone Linux builds running on machines with older GPUs to crash on startup when not using the `-force-opengl` option (I have seen people on this forum being told to use `-force-opengl` but I did not find any open issue in the bug tracker)? Is support for the OpenGL2 backend being discontinued?

    If this is not intended behavior and since it is not tied to the Linux Editor, should we post a new issue? The only relevant issues on the tracker have already been marked as solved in previous versions:

    https://issuetracker.unity3d.com/is...0-fails-with-unsupported-opengl-version-error
    https://issuetracker.unity3d.com/is...-startup-after-screen-dialog-in-32bit-machine
     
  11. agoode8008

    agoode8008

    Joined:
    May 14, 2016
    Posts:
    1
    There is some sort of race condition.

    For Stephen's Sausage Roll, if I run it with gdb and put a breakpoint on glXCreateContextAttribsARB (even if I just continue immediately), the game works correctly. If I run with gdb without any breakpoints, the game fails with the X error (which I found is BadMatch).
     
  12. Who-am-I

    Who-am-I

    Joined:
    Mar 29, 2014
    Posts:
    72
    Facing same problem