Skip to content

RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorExtensionNotPresent #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Jianing2002 opened this issue Feb 18, 2025 · 13 comments

Comments

@Jianing2002
Copy link

Hello,

I encountered an error while running the code from your repository. The error message is as follows:

RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorExtensionNotPresent

The error occurs after running 10 episodes on all policies. The error is triggered at the following line in the code:

self._renderer = sapien.SapienRenderer(**renderer_kwargs)

I have checked the following:
GPU driver is up-to-date.
Vulkan configuration files are present.
All dependencies are correctly installed.

However, the issue persists. Based on similar issues reported in other projects, it seems this might be related to the Vulkan renderer configuration.
Could you please provide some guidance on how to resolve this error? Any help would be greatly appreciated.
Thank you!

@xuanlinli17
Copy link
Collaborator

Try DISPLAY="" CUDA_VISIBLE_DEVICES=0 python {script}?

@Jianing2002
Copy link
Author

Try DISPLAY="" CUDA_VISIBLE_DEVICES=0 python {script}?

Thank you for your reply. Actually, I am using CUDA0 and still have this issue

@Liang-ZX
Copy link

Try DISPLAY="" CUDA_VISIBLE_DEVICES=0 python {script}?

CUDA_VISIBLE_DEVICES=0 works for me. But why other gpus cannot work?

@xuanlinli17
Copy link
Collaborator

If you have DISPLAY="" all gpus should work? It's a legacy issue of sapien2.x

@KevinGuo07
Copy link

Same problem here, I checked the vulkan and nvidia driver, both are ok, after setting
"
export VK_ICD_FILENAMES=""
export VK_LAYER_PATH=""
export MESA_NO_ACCEL=1
export SVULKAN2_DISABLE=1
export DISPLAY=""
export SAPIEN_RENDERER=cpu
export PYOPENGL_PLATFORM=egl
"
this problem still appears and seems to try display with renderer, how to figure this out?

@LukeLIN-web
Copy link

LukeLIN-web commented Apr 11, 2025

I also meet this RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorExtensionNotPresent after eval,

it is same with you . The error occurs after running 10 episodes on all policies

@LukeLIN-web
Copy link

LukeLIN-web commented Apr 26, 2025

If you have DISPLAY="" all gpus should work? It's a legacy issue of sapien2.x

When I use L4,
DISPLAY="" does not work for me . CUDA_VISIBLE_DEVICES=0 does not work for me as well .

When I use A6000.
I don't need DISPLAY="" or CUDA_VISIBLE_DEVICES=0 . I don't meet this problem,.

When I use H100.
DISPLAY="" does not work for me . CUDA_VISIBLE_DEVICES=0 does not work for me as well .

Chatgpt told me the problem might be Vulkan context / device maxmium 11.

  1. Properly close the environment after each episode
    At the end of every run_maniskill2_eval_single_episode call, manually close the environment by adding:
    model.visualize_epoch(predicted_actions, images, save_path=action_path)

    env.close()  # <- Add this line to release Vulkan resources
    return success == "success"

Put this line at the very end of run_maniskill2_eval_single_episode (after saving the video).

I tried this , but cannot work.

  1. Build the environment once and reuse it across episodes (use reset() instead of rebuilding)
    A more advanced solution is:

Build the environment once at the beginning.

Then use reset() to switch between different obj_episode_ids instead of rebuilding the environment every time.

This way, you avoid creating and destroying Vulkan devices repeatedly, saving a lot of resources.

However, your current setup (where each obj_episode_id may have different initialization options) naturally builds a new environment every time.
So for now, this is a more advanced solution you might consider later.

  1. Reduce Vulkan/GLFW requirements (disable ray tracing)
    If you have enable_raytracing=True set when building the environment, try setting it to False to reduce dependency on Vulkan extensions.
    Ray tracing requires special Vulkan extensions that may not be fully available on servers (especially headless servers with no physical display).

You can disable it with:

--enable-raytracing False
This will reduce Vulkan extension requirements and may avoid issues like ErrorExtensionNotPresent.

But bridge.sh doesn't have raytracing, so it doesn't work.

I still have not found how to fix it in H100.

@chinhsuanwu
Copy link

Solved it by following this doc

@LukeLIN-web
Copy link

LukeLIN-web commented Apr 30, 2025

Solved it by following this doc

Thank you , could you point out which commands are the solution?
My A6000 is ubuntu22.04, it shows E: Unable to locate package vulkan-utils, but don't have RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorExtensionNotPresent
Maybe this solution ? haosulab/SAPIEN#115

@chinhsuanwu
Copy link

use vulkan-tools instead

@LukeLIN-web
Copy link

LukeLIN-web commented May 1, 2025

use vulkan-tools instead

I installed this and in H100 and it seems make my simpler env totally broken. It hang when create env env = build_maniskill2_env( env_name, **additional_env_build_kwargs, **kwargs, )

And it seems broken some infra function, my libero enviroment also hang

    eval_libero()
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/draccus/argparsing.py", line 203, in wrapper_inner
    response = fn(cfg, *args, **kwargs)
    total_episodes, total_successes = run_task(
    success, replay_images, step = run_episode(
    obs, reward, done, info = env.step(action.tolist())  
    return self.env.step(action)
    obs, reward, done, info = super().step(action)
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/environments/base.py", line 395, in step
    self._update_observables()
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/environments/base.py", line 324, in _update_observables
    observable.update(timestep=self.model_timestep, obs_cache=self._obs_cache, force=force)
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/utils/observables.py", line 234, in update
    obs = np.array(self._filter(self._corrupter(self._sensor(obs_cache))))
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/environments/robot_env.py", line 404, in camera_rgb
    img = self.sim.render(
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/utils/binding_utils.py", line 1131, in render
    return self._render_context_offscreen.read_pixels(width, height, depth=depth, segmentation=segmentation)
  File "/home/user1/anaconda3/envs/vlaoft/lib/python3.10/site-packages/robosuite/utils/binding_utils.py", line 171, in read_pixels
    mujoco.mjr_readPixels(rgb=rgb_img, depth=depth_img, viewport=viewport, con=self.con)

@Boltzmachine
Copy link

This problem randomly occurs to me. Sometime it works sometimes it does not.

@Taokt
Copy link

Taokt commented Jun 5, 2025

Hello,  I encountered an error while running the code from your repository. The error message is as follows:  RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorExtensionNotPresent  The error occurs after running 10 episodes on all policies. The error is triggered at the following line in the code:  self._renderer = sapien.SapienRenderer(**renderer_kwargs)  I have checked the following: GPU driver is up-to-date. Vulkan configuration files are present. All dependencies are correctly installed.  However, the issue persists. Based on similar issues reported in other projects, it seems this might be related to the Vulkan renderer configuration. Could you please provide some guidance on how to resolve this error? Any help would be greatly appreciated. Thank you!

Check if you have libegl1 install, based on this post, rendering is actually supported by EGL, not GLX. For me I was having this error in Docker container, and I solved it by

apt install libegl1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants