{"record":{"id":"a22f6eae8b878763","repo":"zed-industries/zed","slug":"no-gpu-adapters-found","errorCode":null,"errorMessage":"No GPU adapters found","messagePattern":"No GPU adapters found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/gpui_wgpu/src/wgpu_context.rs","lineNumber":337,"sourceCode":"    /// Wayland compositor runs on the Intel GPU).\n    #[cfg(not(target_family = \"wasm\"))]\n    async fn select_adapter_and_device(\n        instance: &wgpu::Instance,\n        device_id_filter: Option<u32>,\n        surface: &wgpu::Surface<'_>,\n        compositor_gpu: Option<&CompositorGpuHint>,\n        reject_software: bool,\n    ) -> anyhow::Result<(\n        wgpu::Adapter,\n        wgpu::Device,\n        wgpu::Queue,\n        bool,\n        TextureFormat,\n    )> {\n        let mut adapters: Vec<_> = instance.enumerate_adapters(wgpu::Backends::all()).await;\n\n        if adapters.is_empty() {\n            anyhow::bail!(\"No GPU adapters found\");\n        }\n\n        if let Some(device_id) = device_id_filter {\n            log::info!(\"ZED_DEVICE_ID filter: {:#06x}\", device_id);\n        }\n\n        // Sort adapters into a single priority order. Tiers (from highest to lowest):\n        //\n        // 1. ZED_DEVICE_ID match — explicit user override\n        // 2. Compositor GPU match — the GPU the display server is rendering on\n        // 3. Device type (Discrete > Integrated > Other > Virtual > Cpu).\n        //    \"Other\" ranks above \"Virtual\" because OpenGL seems to count as \"Other\".\n        // 4. Backend — prefer Vulkan/Metal/Dx12 over GL/etc.\n        adapters.sort_by_key(|adapter| {\n            let info = adapter.get_info();\n\n            // Backends like OpenGL report device=0 for all adapters, so\n            // device-based matching is only meaningful when non-zero.","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui_wgpu/src/wgpu_context.rs#L319-L355","documentation":"Instance::enumerate_adapters over all backends returned an empty list — the process cannot see any GPU to talk to. wgpu found no Vulkan, OpenGL or Metal implementation, which points to missing drivers or an environment that blocks GPU access entirely, not a specific compatibility problem.","triggerScenarios":"Running with no GPU drivers installed; a container or VM without GPU passthrough or device nodes; a remote session without a graphics stack; sandbox confinement that hides /dev/dri.","commonSituations":"Minimal Docker or CI containers; fresh Linux installs missing mesa/vulkan runtimes; snap or flatpak packages missing GPU device permissions; a broken Vulkan ICD configuration.","solutions":["Install GPU drivers plus the Vulkan/GL runtimes (e.g. mesa-vulkan-drivers, libgl1-mesa-dri; verify with vulkaninfo)","For containers and VMs: enable GPU passthrough, or install a software adapter (lavapipe/llvmpipe) and allow software fallback","Check sandbox permissions (snap/flatpak GPU plugs) and run from a local graphical session","Inspect environment variables: a stale WGPU_BACKEND, DISPLAY or WAYLAND_DISPLAY can break enumeration"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"let adapters = instance.enumerate_adapters(Backends::all()).await;\nif adapters.is_empty() {\n    // exit with an actionable diagnostic listing backends and env vars,\n    // or retry with a software adapter (lavapipe/llvmpipe) when allowed\n}","preventionTips":["Install and verify the GPU stack (vulkaninfo) before shipping to minimal environments","Support software rendering fallback for headless and CI runs","Give users a clear 'no GPU found' message that lists the drivers to install"],"tags":["gpui","wgpu","gpu","drivers","linux","virtualization"],"backgroundTag":"no-gpu-adapter-found","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}