Running nixos-unstable zed-editor on stable NixOS with GPU

Hi!

I generally run NixOS stable, but I wanted to pull in a newer version of the Zed editor to get some newer features (e.g., external agent history support). I’m using programs.zed-editor in home manager to install and manage it. I do not use flakes.

When I set package = pkgs.zed-editor in my home.nix, the version from stable nixpkgs (0.218.6) successfully launches using GPU acceleration and is passably responsive. However, when I install the version from unstable nixpkgs (0.225.13), Zed is not able to use GPU acceleration and falls back to llvm-pipe, which is quite laggy on my older Haswell-based machine.

At first, I was just doing package = unstable.zed-editor, so I figured it was probably an incompatibility between the unstable mesa libs and the stable mesa install (wouldn’t be the first time). However, when I tried building the package with dependencies from stable, it still didn’t work.

I tried this at first (the latest Zed package requires at least rustc 1.92 to build):

package = pkgs.callPackage <nixos-unstable/pkgs/by-name/ze/zed-editor/package.nix> { rustPlatform = unstable.rustPlatform; };

And when that still didn’t work, I rebuilt Rust using stable deps too just in case the differing glibc versions were somehow causing trouble:

package = pkgs.callPackage <nixos-unstable/pkgs/by-name/ze/zed-editor/package.nix> {
  rustPlatform = let
    rust_1_93 = pkgs.callPackage <nixos-unstable/pkgs/development/compilers/rust/1_93.nix> {
      pkgsBuildHost = pkgs.pkgsBuildHost // { inherit rust_1_93; };
    };
  in
    rust_1_93.packages.stable.rustPlatform;
};

I confirmed that this last one is linked to all of the same libraries as the version installed from stable. However, it reports llvm-pipe as the only available adapter.

Am I doing something wrong that would still be keeping it from working? Could it be a change in Zed itself?

Here’s the log from starting the version in stable, which successfully uses GPU acceleration:

2026-03-05T21:32:08-08:00 INFO  [zed] ========== starting zed version 0.218.6+stable, sha unknown ==========
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::x11::client] x11: compositor present: true, gtk_frame_extents_supported: true
MESA-INTEL: warning: Haswell Vulkan support is incomplete
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::x11::client] Using scale factor from GPUI_X11_SCALE_FACTOR: 2
2026-03-05T21:32:08-08:00 INFO  [zed_xim::x11rb] Try connect ibus
2026-03-05T21:32:08-08:00 INFO  [crashes] spawning crash handler process
2026-03-05T21:32:08-08:00 INFO  [sqlez::migrations] Found 9 foreign key relationships to check
2026-03-05T21:32:08-08:00 WARN  [zed::reliability] Minidump endpoint not set
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::platform] activate is not implemented on Linux, ignoring the call
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::x11::window] Using Visual { id: 192, colormap: 0, depth: 32 }
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::x11::window] Creating colormap 67108866
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::blade::blade_renderer] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8Unorm, alpha: Ignored }
2026-03-05T21:32:08-08:00 INFO  [crashes] connected to crash handler process after 100ms
2026-03-05T21:32:08-08:00 INFO  [crashes] crash handler registered
2026-03-05T21:32:08-08:00 INFO  [workspace] Rendered first frame
2026-03-05T21:32:08-08:00 INFO  [zed::zed] Using GPU: GpuSpecs { is_software_emulated: false, device_name: "Intel(R) Iris(R) Pro Graphics P5200 (HSW GT3)", driver_name: "Intel open-source Mesa driver", driver_info: "Mesa 25.2.6" }
2026-03-05T21:32:08-08:00 INFO  [extension_host] rebuilt extension index in 2.308715ms
2026-03-05T21:32:08-08:00 INFO  [crates/workspace/src/workspace.rs:3122] Couldn't find any enabled panel for the Left dock.
2026-03-05T21:32:08-08:00 INFO  [sqlez::migrations] Found 9 foreign key relationships to check
2026-03-05T21:32:08-08:00 INFO  [sqlez::migrations] Found 10 foreign key relationships to check
2026-03-05T21:32:08-08:00 INFO  [gpui::platform::linux::x11::client] Refreshing every 27ms
2026-03-05T21:32:08-08:00 INFO  [zed_xim::x11rb] XConnected server on 56623116, transport version: 0.0, TRANSPORT_MAX: 20
2026-03-05T21:32:08-08:00 INFO  [sqlez::migrations] Found 11 foreign key relationships to check
2026-03-05T21:32:08-08:00 INFO  [extension_host] installing extension html latest version
2026-03-05T21:32:09-08:00 INFO  [extension_host] rebuilt extension index in 3.09706ms
2026-03-05T21:32:09-08:00 INFO  [extension_host] extensions updated. loading 1, reloading 0, unloading 0

Here’s the log from the version in unstable, when built using all stable dependencies as in my last attempt mentioned above:

2026-03-05T22:01:26-08:00 INFO  [zed] ========== starting zed version 0.225.13+stable, sha unknown ==========
2026-03-05T22:01:26-08:00 INFO  [gpui::platform::linux::x11::client] x11: compositor present: true, gtk_frame_extents_supported: true
2026-03-05T22:01:26-08:00 INFO  [gpui::platform::linux::x11::client] Using scale factor from GPUI_X11_SCALE_FACTOR: 2
2026-03-05T22:01:26-08:00 INFO  [gpui::platform::linux::platform] Compositor GPU hint: vendor=0x8086, device=0x0d26 (from dev 226:1)
2026-03-05T22:01:26-08:00 INFO  [zed_xim::x11rb] Try connect ibus
2026-03-05T22:01:26-08:00 INFO  [crashes] spawning crash handler process
2026-03-05T22:01:26-08:00 INFO  [sqlez::migrations] Found 9 foreign key relationships to check
2026-03-05T22:01:26-08:00 WARN  [zed::reliability] Minidump endpoint not set
2026-03-05T22:01:26-08:00 INFO  [gpui::platform::linux::platform] activate is not implemented on Linux, ignoring the call
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::linux::x11::window] Using Visual { id: 192, colormap: 0, depth: 32 }
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::linux::x11::window] Creating colormap 79691778
2026-03-05T22:01:27-08:00 INFO  [crashes] connected to crash handler process after 100ms
2026-03-05T22:01:27-08:00 INFO  [crashes] crash handler registered
MESA-INTEL: warning: Haswell Vulkan support is incomplete
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::wgpu::wgpu_context] Found 1 GPU adapter(s):
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::wgpu::wgpu_context]   - llvmpipe (LLVM 21.1.7, 256 bits) (vendor=0x10005, device=0x0000, backend=Vulkan, type=Cpu)
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::wgpu::wgpu_context] Testing adapter: llvmpipe (LLVM 21.1.7, 256 bits) (Vulkan)...
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::wgpu::wgpu_context] Selected GPU (passed configuration test): llvmpipe (LLVM 21.1.7, 256 bits) (Vulkan)
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::wgpu::wgpu_context] Selected GPU adapter: "llvmpipe (LLVM 21.1.7, 256 bits)" (Vulkan)
2026-03-05T22:01:27-08:00 INFO  [crates/workspace/src/workspace.rs:3500] Couldn't find any enabled panel for the Left dock.
2026-03-05T22:01:27-08:00 INFO  [workspace] Rendered first frame
2026-03-05T22:01:27-08:00 INFO  [zed::zed] Using GPU: GpuSpecs { is_software_emulated: true, device_name: "llvmpipe (LLVM 21.1.7, 256 bits)", driver_name: "llvmpipe", driver_info: "Mesa 25.2.6 (LLVM 21.1.7)" }
2026-03-05T22:01:27-08:00 INFO  [gpui::platform::linux::x11::client] Refreshing every 27ms
2026-03-05T22:01:27-08:00 INFO  [zed_xim::x11rb] XConnected server on 56623118, transport version: 0.0, TRANSPORT_MAX: 20
2026-03-05T22:01:27-08:00 INFO  [extension_host] rebuilt extension index in 4.43593ms
2026-03-05T22:01:27-08:00 INFO  [sqlez::migrations] Found 10 foreign key relationships to check
2026-03-05T22:01:27-08:00 INFO  [sqlez::migrations] Found 10 foreign key relationships to check
2026-03-05T22:01:27-08:00 INFO  [sqlez::migrations] Found 11 foreign key relationships to check
2026-03-05T22:01:27-08:00 INFO  [extension_host] installing extension html latest version
2026-03-05T22:01:29-08:00 INFO  [extension_host] rebuilt extension index in 936.135µs
2026-03-05T22:01:29-08:00 INFO  [extension_host] extensions updated. loading 1, reloading 0, unloading 0

Any help or hints would be greatly appreciated.

Ah, looks like this might be Latest Zed with gpui can't open on Linux with Intel HD Graphics 4000 · Issue #50184 · zed-industries/zed · GitHub and have nothing to do with Nix at all.

Zed recently moved from blade to wgpu as their Linux rendering backend, so that’s probably it. We also have an opt-in OpenGL variant of zed-editor, you can try it with zed-editor.override { withGLES = true; }

Edit: it looks like we can retire this parameter now and just add libGL to zed-editor on Linux unconditionally, but you’ll still need to wait for Fix OpenGL initialization on Intel HD 4000 by reflectronic · Pull Request #50983 · zed-industries/zed · GitHub to land for your particular device

1 Like