question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: Unable to initialize EGL

See original GitHub issue

Hi team, thank you for maintaining this project.

My iGibson installation went fine, but I am facing an issue that seems common among many iGibson beginners.

(igib) ➜  ~ python -m igibson.examples.environments.env_nonint_example

 _   _____  _  _
(_) / ____|(_)| |
 _ | |  __  _ | |__   ___   ___   _ __
| || | |_ || || '_ \ / __| / _ \ | '_ \
| || |__| || || |_) |\__ \| (_) || | | |
|_| \_____||_||_.__/ |___/ \___/ |_| |_|

********************************************************************************
Description:
    Creates an iGibson environment from a config file with a turtlebot in Rs (not interactive).
    It steps the environment 100 times with random actions sampled from the action space,
    using the Gym interface, resetting it 10 times.
    ********************************************************************************
INFO:igibson.render.mesh_renderer.get_available_devices:Command '['/home/mukul/iGibson/igibson/render/mesh_renderer/build/test_device', '0']' returned non-zero exit status 1.
INFO:igibson.render.mesh_renderer.get_available_devices:Device 0 is not available for rendering
WARNING:igibson.render.mesh_renderer.mesh_renderer_cpu:Device index is larger than number of devices, falling back to use 0
WARNING:igibson.render.mesh_renderer.mesh_renderer_cpu:If you have trouble using EGL, please visit our trouble shooting guideat http://svl.stanford.edu/igibson/docs/issues.html
libEGL warning: DRI2: failed to create dri screen
libEGL warning: DRI2: failed to create dri screen
ERROR: Unable to initialize EGL

I went through all the closed issues related to this, but nothing helped. I also went through the troubleshooting guide and things seemed fine to me. Here are the outputs of some commands I ran to check the EGL installation:

  • (igib) ➜  ~ ldconfig -p | grep EGL
      libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.0
      libEGL_mesa.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
      libEGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL.so.1
      libEGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libEGL.so
    
  • (igib) ➜  ~ nvidia-smi
    Thu Mar 31 15:28:55 2022       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA GeForce ...  On   | 00000000:01:00.0  On |                  N/A |
    | 41%   39C    P8    20W / 215W |    331MiB /  8192MiB |      2%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    
  • Reinstalling after USE_GLAD set to FALSE didn’t work either.

  • (base) ➜  ~ ./iGibson/igibson/render/mesh_renderer/build/query_devices
    2
    
    (base) ➜  ~ ./iGibson/igibson/render/mesh_renderer/build/test_device 0
    libEGL warning: DRI2: failed to create dri screen
    libEGL warning: DRI2: failed to create dri screen
    INFO: Unable to initialize EGL
    
    
    (base) ➜  ~ ./iGibson/igibson/render/mesh_renderer/build/test_device 1
    INFO: Loaded EGL 1.5 after reload.
    INFO: GL_VENDOR=Mesa/X.org
    INFO: GL_RENDERER=llvmpipe (LLVM 12.0.0, 256 bits)
    INFO: GL_VERSION=3.1 Mesa 21.2.6
    INFO: GL_SHADING_LANGUAGE_VERSION=1.40
    

Please let me know if I can share any more information that could be helpful in debugging this.

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mukulkhannacommented, Apr 12, 2022

I was able to resolve this issue by downgrading my NVIDIA GPU driver from 510 to 470 😄 Therefore, closing this.

0reactions
JasonLiu324commented, Jul 30, 2022

@WJJLBJ Hi, I encountered the same issue as you mentioned about the egl problem when using ubuntu 18.04. But then I found in Google that there is not ligegl-dev for ubuntu18.04, so I upgraded the system to 20.04. Then it finally works. And I also recommend you to install ros-noetic because ros would help you fix many egl dependency issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to initialize EGL · Issue #2 · StanfordVL/iGibson - GitHub
Hi, everything installed as requried however when running demo.py the above error is thrown. Additionally I have noticed that there is no pytest ......
Read more >
eglInitialize failed - EGL - Khronos Forums
Hi Community, I am trying to run a testing code for EGL, but it failed in initialization. Here is my testing code.
Read more >
Troubleshooting — iGibson 2.2.1 documentation - GitHub Pages
Unable to initialize EGL · Is nvidia driver properly installed? · Is libegl1 installed? · Are openGL libraries visible? · There...
Read more >
eglInitialize failed with EGL_NOT_INITIALIZED - Stack Overflow
I'm unfamiliar to EGL and really confused about this error, and here's the information of my machine: 5 NVIDIA GeForce GPU with CUDA...
Read more >
"Failed to create / initialize EGL display"? Can't open anything ...
I believe the editor and the engine uses different graphics libraries, though I'm not sure how the requirements differ between the two. This ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found