omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

M3 (asahi/Borealis): Zed aborts on launch — kernel "cannot allocate 4096 KiB of GPU memory", client sees lost device

Open alfarhan opened this issue 1 month ago • 4 comments

What happened

After installing Zed via omarchy-install-editor-zed, Zed 1.26.2 aborts ~1 second after every launch (reproduced twice, 18 s apart, no project open). At the moment of each crash the kernel logs:

asahi 292400000.gpu: M3: cannot allocate 4096 KiB of GPU memory
asahi: GPU work of a client failed (ENOMEM, reported at m3/m3_submit.rs:101); the client sees a lost device

Zed (wgpu, Vulkan backend on Borealis) then logs:

ERROR [gpui_wgpu::wgpu_context] wgpu device lost: reason=Unknown, message=Device is lost
ERROR [crashes] thread 'main' panicked at .../wgpu/src/backend/wgpu_core.rs:1387:17:
Error in Device::poll: Validation Error
Caused by:
  Parent device is lost

and aborts (SIGABRT, captured by systemd-coredump). System RAM was not exhausted (3.7 GiB available, no OOM kill) — the failure is a 4 MiB allocation inside the M3 GPU driver. No other cannot allocate lines appear this boot; Hyprland and other apps keep running.

Zed selected: Apple M3 (G15G C0) Vulkan, driver_name: "Borealis", driver_info: "Mesa 26.3.0-devel (git-a196911147), Borealis, derived from Honeykrisp".

Expected

Zed renders normally on the M3 Vulkan adapter.

Steps to reproduce

  1. M3 MacBook Air (Mac15,12) on linux-aurora
  2. omarchy-install-editor-zed
  3. Launch Zed — it aborts right after the first frame

System

  • Omarchy 4.5.0rc3-1, Hyprland 0.56.2, Arch Linux ARM (aarch64)
  • linux-aurora 7.2.11.aurora14-1 (asahi kernel switches: asahi.m3_unlocked_wait=1 asahi.m3_timeout_nohang=1 resume-after-fault=0)
  • mesa-aurora / vulkan-aurora 1:26.3.0_devel.20261031.231483.a1969111475-1
  • zed 1.26.2-1, omazed 2.2.0-3

Filed by Claude Opus 5.5 via Claude Code.

alfarhan avatar Nov 03 '26 21:11 alfarhan

Codex High read the report, the current Zed installer, and the repository’s platform guidance. No reproduction or tests were run on matching M3 hardware, and no fix has been verified.

My initial assessment is a hardware compatibility bug, but the second classifier, deepseek-v4p1-flash, returned no usable classification. The classification remains unsettled, so I have left the issue open without adding labels, pending maintainer review. Codex High was the only model to complete this review.

omarchybot avatar Nov 18 '26 19:11 omarchybot

The classification is now settled as a hardware compatibility bug, with bug and compatibility applied. Codex High (GPT-6) checked the current Zed installer and related reports. Your logs show Zed selecting the M3/Borealis device before losing it, but do not establish why the GPU allocation failed. I have not reproduced the crash on M3 hardware; no tests ran and no fix has been verified. Codex High was the only diagnostic reviewer in this pass; no second opinion was requested while awaiting more evidence.

Please confirm whether this still happens with your current packages. If it does, please add:

  • omarchy-debug --print output and the current Zed, kernel, Mesa and Vulkan package versions.
  • The Zed log and kernel messages from the same fresh failed launch. Zed's graphics-reporting guide documents ZED_LOG=wgpu=info zed --foreground; substitute zeditor if that is your installed CLI. Please say whether this direct launch fails the same way as the desktop launcher.
  • If vkcube is already installed, whether it also fails with the GPU allocation error.

This is waiting on those reporter results before the cause or a fix can be established.

omarchybot avatar Nov 23 '26 04:11 omarchybot

I reproduced this with my currently installed packages on a 13-inch M3 MacBook Air.

Both the desktop launcher and a direct ZED_LOG=wgpu=info zed --foreground launch failed. On the direct launch, Zed selected the M3/Borealis Vulkan adapter and rendered its first frame. The kernel then logged:

asahi 292400000.gpu: M3: cannot allocate 4096 KiB of GPU memory
asahi: GPU work of a client failed (ENOMEM, reported at m3/m3_submit.rs:101); the client sees a lost device

Zed logged wgpu device lost and Device::poll: Validation Error / Parent device is lost, then aborted with SIGABRT. The zed wrapper returned exit code 0 despite the editor crash. The system had approximately 4.1 GiB of available RAM after the previous desktop-launch crash; I found no OOM kill.

Installed packages:

  • Zed 1.29.3-1
  • linux-aurora 7.2.11.aurora14-1
  • mesa-aurora and vulkan-aurora 1:26.3.0_devel.20261031.231483.a1969111475-1

The three kernel switches listed in the original report are absent from my current command line. vkcube is not installed, so I haven’t tested it.

Herdr Desktop 0.1.15 also crashed following the same GPU allocation and device-loss messages. Its core shows a SIGSEGV in libwayland-client during Vulkan swapchain cleanup through libvulkan_asahi.so. An earlier Herdr core has the same cleanup stack, but its trigger is unconfirmed. Herdr’s crash also resembles the sequence reported in #19193.

Happy to try further tests or provide additional logs if that would help debug this.

neilsmith avatar Nov 24 '26 21:11 neilsmith

@neilsmith, your reproduction shows that neither the desktop launcher nor the original three kernel switches is required for this failure. It also reproduces with Zed 1.29.3 on the same reported kernel/Mesa builds. The Herdr result and #19193 make a shared M3 graphics-stack problem plausible, but the matching allocation messages do not establish the underlying cause or that these are duplicates.

For the next check, please attach omarchy-debug --print output and the complete timestamped Zed and kernel logs from the first Zed launch after a fresh boot. Please note whether that first launch already fails or whether the failure begins only after other applications have run or crashed. That comparison would help distinguish an immediate launch failure from graphics state accumulating during the session; the excerpts so far do not distinguish them.

GPT-6 in Codex (reasoning effort not exposed) checked your new report, #19193, and the current Zed installer and GPU setup. I have not reproduced this on matching M3 hardware; no tests ran and no fix was verified. This was the only diagnostic review in this pass; no second opinion was requested while awaiting those reporter results.

omarchybot avatar Nov 25 '26 06:11 omarchybot