-
Notifications
You must be signed in to change notification settings - Fork 71
Description
First reported with zed here.
Been tracing and debugging since reporting, and have a summary here. Basically with this icd and raytracing params present it crashes. If we disable raytracing (patching local blade checkout), things start just fine.
- The immediate failure is in NVIDIA’s Vulkan ICD: vkCreateDevice returns VK_ERROR_INITIALIZATION_FAILED only when the ray‑tracing stack is enabled.
- There are no validation errors, so the API usage is spec‑valid.
- That makes this very likely a driver bug, but it is triggered by Blade enabling RT features/extensions at device creation.
NVIDIA Crash Details (Hyprland + NVIDIA dGPU default)
Summary
Zed crashes on startup because Vulkan vkCreateDevice fails inside the NVIDIA ICD with VK_ERROR_INITIALIZATION_FAILED. The failure happens during GPU context initialization in blade_graphics and is not accompanied by any Vulkan validation layer errors (no VUIDs emitted).
Environment
- Zed build:
0.224.0+dev.4389ebb6f48562eb8432cfd85cca81e7b43dc88f - OS: Arch Linux (rolling)
- Session: Wayland (Hyprland)
- GPU: NVIDIA GeForce RTX 4070 Laptop GPU (device_id
0x2860) - Driver: NVIDIA
590.48.01
Crash Site
- Panic message:
Unable to init GPU context - Path:
crates/gpui/src/platform/linux/wayland/client.rs->BladeContext::new()->blade_graphics::Context::init(...) - Vulkan error reported by
blade_graphics:Platform(Init(ERROR_INITIALIZATION_FAILED))
Vulkan Validation Results
VK_LAYER_KHRONOS_validationwas enabled.- No validation errors or VUIDs were emitted before the failure.
API Dump Findings
The API dump layer captured the exact vkCreateDevice call and showed it returned VK_ERROR_INITIALIZATION_FAILED.
Enabled Device Extensions
VK_EXT_inline_uniform_blockVK_KHR_timeline_semaphoreVK_KHR_descriptor_update_templateVK_KHR_dynamic_renderingVK_KHR_swapchainVK_KHR_deferred_host_operationsVK_KHR_acceleration_structureVK_KHR_ray_queryVK_AMD_buffer_markerVK_KHR_external_memoryVK_KHR_external_memory_fd
Feature Chain (pNext) at vkCreateDevice
VkPhysicalDeviceRayQueryFeaturesKHR::rayQuery = 1VkPhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructure = 1VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress = 1VkPhysicalDeviceDescriptorIndexingFeatures:shaderSampledImageArrayNonUniformIndexing = 1shaderStorageBufferArrayNonUniformIndexing = 1descriptorBindingPartiallyBound = 1- (most other descriptor indexing fields =
0)
VkPhysicalDeviceDynamicRenderingFeatures::dynamicRendering = 1VkPhysicalDeviceTimelineSemaphoreFeatures::timelineSemaphore = 1VkPhysicalDeviceInlineUniformBlockFeatures::inlineUniformBlock = 1
Trigger Isolation (Confirmed)
Disabling the ray tracing stack via BLADE_DISABLE_RAY_TRACING=1 allows Zed to launch successfully. This isolates the failure to the ray tracing extensions and feature chain:
VK_KHR_acceleration_structureVK_KHR_ray_queryVK_KHR_deferred_host_operationsVkPhysicalDeviceRayQueryFeaturesKHRVkPhysicalDeviceAccelerationStructureFeaturesKHRVkPhysicalDeviceBufferDeviceAddressFeaturesKHR
With these disabled, the NVIDIA ICD no longer returns VK_ERROR_INITIALIZATION_FAILED during vkCreateDevice.