habitat-sim: [WSL2 Ubuntu18.04 Cuda11.1] unable to fine EGL device for CUDA device 0
❓ Questions and Help
May I ask a simple question, I have tried many times but the following error still exists, for both the normal version and headless version with conda install. In wsl2, I can use my Nvidia 1060 GPU normally for pytorch. The test sample in cuda-toolkits can also pass.
(base) root@DESKTOP:~/ExternalLib/habitat-sim-stable# python examples/example.py
sim_cfg.physics_config_file = ./data/default.phys_scene_config.json
==== Initialized Sensor Spec: =====
Sensor uuid: color_sensor
Sensor type: SensorType.COLOR
Sensor position: [0. 1.5 0. ]
===================================
Test scenes not downloaded locally, downloading and extracting now...
Downloaded and extracted test scenes data.
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1216 14:17:32.518131 19962 AssetAttributesManager.cpp:122] Asset attributes (capsule3DSolid : capsule3DSolid_hemiRings_4_cylRings_1_segments_12_halfLen_0.75_useTexCoords_false_useTangents_false) created and registered.
I1216 14:17:32.518218 19962 AssetAttributesManager.cpp:122] Asset attributes (capsule3DWireframe : capsule3DWireframe_hemiRings_8_cylRings_1_segments_16_halfLen_1) created and registered.
I1216 14:17:32.518257 19962 AssetAttributesManager.cpp:122] Asset attributes (coneSolid : coneSolid_segments_12_halfLen_1.25_rings_1_useTexCoords_false_useTangents_false_capEnd_true) created and registered.
I1216 14:17:32.518306 19962 AssetAttributesManager.cpp:122] Asset attributes (coneWireframe : coneWireframe_segments_32_halfLen_1.25) created and registered.
I1216 14:17:32.518321 19962 AssetAttributesManager.cpp:122] Asset attributes (cubeSolid : cubeSolid) created and registered.
I1216 14:17:32.518332 19962 AssetAttributesManager.cpp:122] Asset attributes (cubeWireframe : cubeWireframe) created and registered.
I1216 14:17:32.518368 19962 AssetAttributesManager.cpp:122] Asset attributes (cylinderSolid : cylinderSolid_rings_1_segments_12_halfLen_1_useTexCoords_false_useTangents_false_capEnds_true) created and registered.
I1216 14:17:32.518424 19962 AssetAttributesManager.cpp:122] Asset attributes (cylinderWireframe : cylinderWireframe_rings_1_segments_32_halfLen_1) created and registered.
I1216 14:17:32.518462 19962 AssetAttributesManager.cpp:122] Asset attributes (icosphereSolid : icosphereSolid_subdivs_1) created and registered.
I1216 14:17:32.518476 19962 AssetAttributesManager.cpp:122] Asset attributes (icosphereWireframe : icosphereWireframe_subdivs_1) created and registered.
I1216 14:17:32.518496 19962 AssetAttributesManager.cpp:122] Asset attributes (uvSphereSolid : uvSphereSolid_rings_8_segments_16_useTexCoords_false_useTangents_false) created and registered.
I1216 14:17:32.518565 19962 AssetAttributesManager.cpp:122] Asset attributes (uvSphereWireframe : uvSphereWireframe_rings_16_segments_32) created and registered.
I1216 14:17:32.518600 19962 AssetAttributesManager.cpp:108] AssetAttributesManager::buildCtorFuncPtrMaps : Built default primitive asset templates : 12
W1216 14:17:32.519341 19962 ObjectAttributesManager.cpp:326] Cannot find ./data/objects or ./data/objects.phys_properties.json. Aborting parse.
I1216 14:17:32.519376 19962 PhysicsAttributesManager.cpp:39] File (./data/default.phys_scene_config.json) Based physics manager attributes created and registered.
I1216 14:17:32.519459 19962 StageAttributesManager.cpp:79] File (data/scene_datasets/habitat-test-scenes/skokloster-castle.glb) Based stage attributes created and registered.
I1216 14:17:32.519491 19962 Simulator.cpp:145] Loading navmesh from data/scene_datasets/habitat-test-scenes/skokloster-castle.navmesh
I1216 14:17:32.519577 19962 Simulator.cpp:147] Loaded.
I1216 14:17:32.519611 19962 SceneGraph.h:93] Created DrawableGroup:
Platform::WindowlessEglApplication::tryCreateContext(): unable to find EGL device for CUDA device 0
WindowlessContext: Unable to create windowless context
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (7 by maintainers)
@vincent341 you might need to align your NVIDIA driver version with your nvidia-gl library.
The output above might not be the same with you, because I’m dealing with a container.
I had the same issue when I used the libnvidia-gl package provided by Ubuntu repository. I strongly advice to use the package from NVIDIA repository, and specify the exact version.
For my case, I use this command to fix my issue.
sudo apt-get install libnvidia-gl-418=418.87.00-0ubuntu1 libnvidia-compute-418=418.87.00-0ubuntu1 libnvidia-common-418=418.87.00-0ubuntu1
Use this command to check the available packages on your repository.
apt-cache search libnvidia-gl; apt-cache madison libnvidia-gl-418
I hope this helps.
If this is a machine with an attached display, the non-headless build may work. That piggybacks off the display server instead of going through Nvidia’s custom EGL libs. I am not sure if WSL2 exposes the display server properly or not, but it is worth a shot.