zed-industries/zed · critical

Adapter {:?} (backend={:?}, device={:#06x}) is not compatibl

Error message

Adapter {:?} (backend={:?}, device={:#06x}) is not compatible with the display surface for this window.

What it means

check_compatible_with_surface asks wgpu which texture formats an adapter supports for a window's surface. An empty format list means this GPU/backend combination cannot present to that surface at all — the classic hybrid-GPU failure where the selected adapter is not the one driving the display. The message includes the adapter name, backend and PCI device id to identify the offending GPU.

Source

Thrown at crates/gpui_wgpu/src/wgpu_context.rs:304

        ))
    }

    #[cfg(not(target_family = "wasm"))]
    pub fn instance(display: Box<dyn wgpu::wgt::WgpuHasDisplayHandle>) -> wgpu::Instance {
        wgpu::Instance::new(wgpu::InstanceDescriptor {
            backends: wgpu::Backends::VULKAN | wgpu::Backends::GL,
            flags: wgpu::InstanceFlags::default(),
            backend_options: wgpu::BackendOptions::default(),
            memory_budget_thresholds: wgpu::MemoryBudgetThresholds::default(),
            display: Some(display),
        })
    }

    pub fn check_compatible_with_surface(&self, surface: &wgpu::Surface<'_>) -> anyhow::Result<()> {
        let caps = surface.get_capabilities(&self.adapter);
        if caps.formats.is_empty() {
            let info = self.adapter.get_info();
            anyhow::bail!(
                "Adapter {:?} (backend={:?}, device={:#06x}) is not compatible with the \
                 display surface for this window.",
                info.name,
                info.backend,
                info.device,
            );
        }
        Ok(())
    }

    /// Select an adapter and create a device, testing that the surface can actually be configured.
    /// This is the only reliable way to determine compatibility on hybrid GPU systems, where
    /// adapters may report surface compatibility via get_capabilities() but fail when actually
    /// configuring (e.g., NVIDIA reporting Vulkan Wayland support but failing because the
    /// Wayland compositor runs on the Intel GPU).
    #[cfg(not(target_family = "wasm"))]
    async fn select_adapter_and_device(
        instance: &wgpu::Instance,

View on GitHub (pinned to f4178619ac)

Solutions

  1. Set ZED_DEVICE_ID (or the app's device hint) to the GPU actually driving the display, or clear an override that pins the wrong one
  2. Update GPU drivers and Mesa to current versions
  3. Do not force a mismatched backend via environment variables (WGPU_BACKEND and friends)
  4. Prefer the adapter matching the compositor GPU hint rather than the nominally fastest adapter
Defensive patterns

Strategy: fallback

Try / catch

for adapter in adapters {
    if ctx.check_compatible_with_surface(&surface).is_err() {
        continue; // skip this adapter, try the next candidate
    }
    // configure and use this adapter
}

Prevention

When it happens

Trigger: On dual-GPU laptops, picking the discrete adapter while the surface belongs to the integrated GPU's display connection; forcing a backend (e.g. Vulkan via env vars) that does not match the window system; VM or remote display where the adapter has no present path.

Common situations: NVIDIA plus Wayland mismatches; hybrid graphics with misbehaving drivers; virtio-gpu in VMs; hard-coded adapter choice that ignores the compositor GPU hint.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/e487109ada15315d. Report an issue: GitHub.