zed-industries/zed · critical

no compatible alpha modes

Error message

no compatible alpha modes

What it means

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.

Source

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

            }
        }

        anyhow::bail!("No GPU adapter found that can configure the display surface")
    }

    /// Try to use an adapter with a surface by creating a device and testing configuration.
    /// Returns the device and queue if successful, allowing them to be reused.
    #[cfg(not(target_family = "wasm"))]
    async fn try_adapter_with_surface(
        adapter: &wgpu::Adapter,
        surface: &wgpu::Surface<'_>,
    ) -> anyhow::Result<(wgpu::Device, wgpu::Queue, bool, TextureFormat)> {
        let caps = surface.get_capabilities(adapter);
        if caps.formats.is_empty() {
            anyhow::bail!("no compatible surface formats");
        }
        if caps.alpha_modes.is_empty() {
            anyhow::bail!("no compatible alpha modes");
        }

        let (device, queue, dual_source_blending, color_atlas_texture_format) =
            Self::create_device(adapter).await?;
        let error_scope = device.push_error_scope(wgpu::ErrorFilter::Validation);

        let test_config = wgpu::SurfaceConfiguration {
            usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
            format: caps.formats[0],
            width: 64,
            height: 64,
            present_mode: wgpu::PresentMode::Fifo,
            desired_maximum_frame_latency: 2,
            alpha_mode: caps.alpha_modes[0],
            view_formats: vec![],
        };

        surface.configure(&device, &test_config);

View on GitHub (pinned to f4178619ac)

Solutions

  1. Update GPU drivers / Vulkan runtime so the surface reports full capabilities
  2. Change or unset WGPU_BACKEND to pick a backend whose compositor integration works (e.g. GL on older X11 setups)
  3. Test in a native desktop session instead of X11 forwarding or RDP
  4. Check the adapter log lines ('Found N GPU adapter(s):' / 'Testing adapter:') to see whether every adapter fails the same way
Defensive patterns

Strategy: fallback

Validate before calling

let caps = surface.get_capabilities(&adapter);
if caps.alpha_modes.is_empty() {
    continue; // cannot pick an alpha_mode for SurfaceConfiguration
}

Try / catch

if let Err(e) = Self::try_adapter_with_surface(&adapter, surface).await {
    log::info!("adapter rejected: {e}");
    continue;
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


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