habitat-sim: Failed to get EGL display

When I try executing following command: habitat-viewer /path/to/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb I get following error:

EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with core OpenGL context, falling back to compatibility context
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with OpenGL context

Can you help me solve it? Thanks

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

For me the issue is no longer appearing after changing to a fresh Ubuntu 22 installation

Apologize for the late reply, I was away.

No need, I am grateful for all the help.

Attempt 1

I am trying to install via Conda and cloned the habitat-sim repo so I can test with the files such as ./examples/viewer.py.

When doing either of these commands:

python examples/viewer.py --scene /path/to/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
habitat-viewer /path/to/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb

It returns the same error as before:

EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with core OpenGL context, falling back to compatibility context
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with OpenGL context

I don’t understand how I can run ./build/viewer .../skokloster-castle.glb when I am not building from source, but maybe I am having a brainfart.

Attempt 2

I was thinking that it might be that my libEGL is in a different location, as is suggested in the common build issues. The default appears to be /usr/lib/x86_64-linux-gnu/nvidia-opengl/libEGL.so and mine is:

/lib/x86_64-linux-gnu/libEGL_nvidia.so.0

I tried solving this by adding -DEGL_LIBRARY=/lib/x86_64-linux-gnu/libEGL_nvidia.so.0 at the end of this line and then running LD_LIBRARY_PATH=lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH} python examples/viewer.py. That gave the same error as before:

EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with core OpenGL context, falling back to compatibility context
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with OpenGL context

Also, I am on Ubuntu 20.04.

I have the same issue.

When I add MAGNUM_LOG=verbose and MAGNUM_GPU_VALIDATION=ON, there is one extra line at the top:

Platform::GlfwApplication: virtual DPI scaling 1
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with core OpenGL context, falling back to compatibility context
EGL: Failed to get EGL display: Success
Platform::GlfwApplication::tryCreate(): cannot create a window with OpenGL context

I installed libglvnd-dev. The drivers appear to be properly installed and up-to-date:

image

The issue only appears for the interactive testing. The non-interactive testing works well and (when adding the --save_png flag) the images are as expected.