{"record":{"id":"1e5991c0ccdfb0c7","repo":"zed-industries/zed","slug":"no-compatible-alpha-modes","errorCode":null,"errorMessage":"no compatible alpha modes","messagePattern":"no compatible alpha modes","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/gpui_wgpu/src/wgpu_context.rs","lineNumber":469,"sourceCode":"            }\n        }\n\n        anyhow::bail!(\"No GPU adapter found that can configure the display surface\")\n    }\n\n    /// Try to use an adapter with a surface by creating a device and testing configuration.\n    /// Returns the device and queue if successful, allowing them to be reused.\n    #[cfg(not(target_family = \"wasm\"))]\n    async fn try_adapter_with_surface(\n        adapter: &wgpu::Adapter,\n        surface: &wgpu::Surface<'_>,\n    ) -> anyhow::Result<(wgpu::Device, wgpu::Queue, bool, TextureFormat)> {\n        let caps = surface.get_capabilities(adapter);\n        if caps.formats.is_empty() {\n            anyhow::bail!(\"no compatible surface formats\");\n        }\n        if caps.alpha_modes.is_empty() {\n            anyhow::bail!(\"no compatible alpha modes\");\n        }\n\n        let (device, queue, dual_source_blending, color_atlas_texture_format) =\n            Self::create_device(adapter).await?;\n        let error_scope = device.push_error_scope(wgpu::ErrorFilter::Validation);\n\n        let test_config = wgpu::SurfaceConfiguration {\n            usage: wgpu::TextureUsages::RENDER_ATTACHMENT,\n            format: caps.formats[0],\n            width: 64,\n            height: 64,\n            present_mode: wgpu::PresentMode::Fifo,\n            desired_maximum_frame_latency: 2,\n            alpha_mode: caps.alpha_modes[0],\n            view_formats: vec![],\n        };\n\n        surface.configure(&device, &test_config);","sourceCodeStart":451,"sourceCodeEnd":487,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui_wgpu/src/wgpu_context.rs#L451-L487","documentation":"Same wgpu capability probe as the formats check, but for caps.alpha_modes: the adapter reports no compositing alpha mode (Opaque, PreMultiplied, PostMultiplied) it supports for this surface. Since SurfaceConfiguration requires an alpha_mode, GPUI rejects the adapter when the list is empty.","triggerScenarios":"surface.get_capabilities(adapter) returning an alpha_modes vec with zero entries — typically the same adapter/compositor mismatches that empty the formats list (Vulkan on forwarded X11, broken compositor integration, old driver stacks reporting partial capabilities).","commonSituations":"Remote desktop sessions, Wayland compositors with incomplete Vulkan support, VMs with emulated GPUs, or drivers that expose the adapter but not surface presentation on that backend.","solutions":["Update GPU drivers / Vulkan runtime so the surface reports full capabilities","Change or unset WGPU_BACKEND to pick a backend whose compositor integration works (e.g. GL on older X11 setups)","Test in a native desktop session instead of X11 forwarding or RDP","Check the adapter log lines ('Found N GPU adapter(s):' / 'Testing adapter:') to see whether every adapter fails the same way"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"let caps = surface.get_capabilities(&adapter);\nif caps.alpha_modes.is_empty() {\n    continue; // cannot pick an alpha_mode for SurfaceConfiguration\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = Self::try_adapter_with_surface(&adapter, surface).await {\n    log::info!(\"adapter rejected: {e}\");\n    continue;\n}","preventionTips":["Check every capability vec (formats, alpha_modes, present_modes) before configuring","Prefer adapters whose backend matches the compositor (Vulkan/Metal/Dx12 priority) to reduce empty-capability cases","In test environments, force a software adapter rather than relying on forwarded displays"],"tags":["wgpu","gpu","surface","alpha-mode","adapter","gpui"],"backgroundTag":"gpu-surface-unsupported","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"}