Skip to content

Crash in Zed: NVIDIA GeForce RTX 4070 Laptop GPU (driver 590.48.01) #295

@nathansizemore

Description

@nathansizemore

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_validation was 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_block
  • VK_KHR_timeline_semaphore
  • VK_KHR_descriptor_update_template
  • VK_KHR_dynamic_rendering
  • VK_KHR_swapchain
  • VK_KHR_deferred_host_operations
  • VK_KHR_acceleration_structure
  • VK_KHR_ray_query
  • VK_AMD_buffer_marker
  • VK_KHR_external_memory
  • VK_KHR_external_memory_fd

Feature Chain (pNext) at vkCreateDevice

  • VkPhysicalDeviceRayQueryFeaturesKHR::rayQuery = 1
  • VkPhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructure = 1
  • VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress = 1
  • VkPhysicalDeviceDescriptorIndexingFeatures:
    • shaderSampledImageArrayNonUniformIndexing = 1
    • shaderStorageBufferArrayNonUniformIndexing = 1
    • descriptorBindingPartiallyBound = 1
    • (most other descriptor indexing fields = 0)
  • VkPhysicalDeviceDynamicRenderingFeatures::dynamicRendering = 1
  • VkPhysicalDeviceTimelineSemaphoreFeatures::timelineSemaphore = 1
  • VkPhysicalDeviceInlineUniformBlockFeatures::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_structure
  • VK_KHR_ray_query
  • VK_KHR_deferred_host_operations
  • VkPhysicalDeviceRayQueryFeaturesKHR
  • VkPhysicalDeviceAccelerationStructureFeaturesKHR
  • VkPhysicalDeviceBufferDeviceAddressFeaturesKHR

With these disabled, the NVIDIA ICD no longer returns VK_ERROR_INITIALIZATION_FAILED during vkCreateDevice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions