Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Zed does not lunch with latest update #17776

Open
1 task done
bknightInfo opened this issue Sep 13, 2024 · 16 comments
Open
1 task done

[Linux] Zed does not lunch with latest update #17776

bknightInfo opened this issue Sep 13, 2024 · 16 comments
Labels
bug [core label] linux linux-x11 Linux X11 panic / crash [core label]

Comments

@bknightInfo
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

With the latest update Zed doesn't seem to working on Linux as it just won't run.
I am thinking its probably a bug with Wayland since no one else seems to be reporting it.

No real steps it just wont run

error: "payload": "called Result::unwrap() on an Err value: ERROR_INITIALIZATION_FAILED",

Environment

Zed Ver: 0.152.3
OS: Arch Linux Wayland
Memory: 32 GiB
Architecture: x86_64
CPU: AMD Ryzen 7 3700X
GPU: AMD Radeon RX 6700 XT

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log
[Zed.log](https://github.com/user-attachments/files/16987547/Zed.log)
@bknightInfo bknightInfo added admin read Pending admin review bug [core label] panic / crash [core label] triage Maintainer needs to classify the issue labels Sep 13, 2024
@imdj
Copy link

imdj commented Sep 13, 2024

Try launching it from command line with DRI_PRIME=1 zed . ?
This might be related to #17129 and #16863 where Zed is trying to use the integrated GPU

@Moshyfawn Moshyfawn added linux linux-x11 Linux X11 and removed triage Maintainer needs to classify the issue labels Sep 13, 2024
@judemvm
Copy link

judemvm commented Sep 14, 2024

Same problem on Zed version: 0.152.3, DRI_PRIME=1 doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPU

Zed version: 0.151.2 logs
2024-09-14T20:28:10.884101681+08:00 [INFO] ========== starting zed ==========
2024-09-14T20:28:10.919734227+08:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-09-14T20:28:10.919779505+08:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-09-14T20:28:10.924732773+08:00 [INFO] Try connect ibus
2024-09-14T20:28:10.92537796+08:00 [INFO] perform;
2024-09-14T20:28:10.925405849+08:00 [INFO] authenticate;
2024-09-14T20:28:10.925446058+08:00 [INFO] read_command;
2024-09-14T20:28:10.925585443+08:00 [INFO] Opening main db
2024-09-14T20:28:10.925990085+08:00 [INFO] new;
2024-09-14T20:28:10.92603838+08:00 [INFO] socket reader;
2024-09-14T20:28:10.926712426+08:00 [INFO] keep_updated;
2024-09-14T20:28:10.928804943+08:00 [INFO] Using git binary path: None
2024-09-14T20:28:10.964538441+08:00 [ERROR] theme not found: New Darcula
2024-09-14T20:28:10.964921839+08:00 [INFO] initializing context server client
2024-09-14T20:28:10.964999958+08:00 [INFO] Registering built-in prompt template: content_prompt
2024-09-14T20:28:10.965320982+08:00 [INFO] Registering built-in prompt template: edit_workflow
2024-09-14T20:28:10.96560777+08:00 [INFO] Registering built-in prompt template: step_resolution
2024-09-14T20:28:10.966032408+08:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-09-14T20:28:10.966264461+08:00 [INFO] No prompt template overrides directory found at /home/***/.local/share/zed/prompt_overrides. Using built-in prompts.
2024-09-14T20:28:10.966702806+08:00 [INFO] extensions updated. loading 9, reloading 0, unloading 0
2024-09-14T20:28:10.969391612+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-09-14T20:28:10.969482577+08:00 [INFO] Opening main db
2024-09-14T20:28:10.978234046+08:00 [INFO] perform;
2024-09-14T20:28:10.978271334+08:00 [INFO] authenticate;
2024-09-14T20:28:10.978309895+08:00 [INFO] read_command;
2024-09-14T20:28:10.978437695+08:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-09-14T20:28:10.978484974+08:00 [INFO] Creating colormap 50331651
2024-09-14T20:28:10.978533554+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.978854808+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.978919413+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.978968117+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979114369+08:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-09-14T20:28:10.979168412+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979221327+08:00 [INFO] socket reader;
2024-09-14T20:28:10.979277991+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979335949+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979385317+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979433953+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979488879+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:10.979562937+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.008964255+08:00 [INFO] Enabling color space support
2024-09-14T20:28:11.042956271+08:00 [INFO] Adapter: "Intel(R) UHD Graphics (CML GT2)"
2024-09-14T20:28:11.043575371+08:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux)
2024-09-14T20:28:11.04360708+08:00 [INFO] Adapter: "NVIDIA GeForce RTX 2060"
2024-09-14T20:28:11.047317502+08:00 [INFO] Ray tracing is supported
2024-09-14T20:28:11.179664151+08:00 [INFO] Using surface present mode FIFO_RELAXED
2024-09-14T20:28:11.179791425+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:28:11.194719848+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:28:11.194753808+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:28:11.194774767+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-09-14T20:28:11.229166131+08:00 [INFO] Refreshing at 6943 micros
2024-09-14T20:28:11.230324256+08:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "NVIDIA GeForce RTX 2060", driver_name: "NVIDIA", driver_info: "550.107.02" }
2024-09-14T20:28:11.239742557+08:00 [INFO] XConnected server on 31457290, transport version: 0.0, TRANSPORT_MAX: 20
2024-09-14T20:28:11.245618023+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.251478567+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.252512541+08:00 [INFO] Opening main db
2024-09-14T20:28:11.316630807+08:00 [WARN] GPU frame is out of date
2024-09-14T20:28:11.317909015+08:00 [INFO] Using surface present mode FIFO_RELAXED
2024-09-14T20:28:11.318032707+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:28:11.321718137+08:00 [WARN] Unknown request DestroyIcReply { input_method_id: 4, input_context_id: 16 }
2024-09-14T20:28:11.327607293+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.346914333+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.364410969+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:11.536379485+08:00 [INFO] set environment variables from shell:/usr/bin/zsh
2024-09-14T20:28:11.831380935+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:28:12.870330637+08:00 [WARN] GPU frame is out of date
2024-09-14T20:28:12.870503719+08:00 [WARN] Acquire failed because the surface is out of date
2024-09-14T20:28:12.87248624+08:00 [INFO] Using surface present mode FIFO_RELAXED
2024-09-14T20:28:12.872912812+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:28:12.887606994+08:00 [WARN] GPU frame is out of date
2024-09-14T20:28:12.887675273+08:00 [WARN] Acquire failed because the surface is out of date
2024-09-14T20:28:12.888677375+08:00 [INFO] Using surface present mode FIFO_RELAXED
2024-09-14T20:28:12.8888009+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:28:21.029600694+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:28:21.034466361+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:28:21.039786918+08:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-09-14T20:28:21.046694635+08:00 [INFO] Creating a descriptor pool for at most 256 sets
Zed version: 0.152.3 logs
2024-09-14T20:26:04.357931656+08:00 [INFO] ========== starting zed ==========
2024-09-14T20:26:04.39237664+08:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-09-14T20:26:04.392444013+08:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-09-14T20:26:04.399436872+08:00 [INFO] Try connect ibus
2024-09-14T20:26:04.399912905+08:00 [INFO] perform;
2024-09-14T20:26:04.399949273+08:00 [INFO] authenticate;
2024-09-14T20:26:04.40000224+08:00 [INFO] read_command;
2024-09-14T20:26:04.400143008+08:00 [INFO] Opening main db
2024-09-14T20:26:04.400561874+08:00 [INFO] new;
2024-09-14T20:26:04.400593746+08:00 [INFO] socket reader;
2024-09-14T20:26:04.401272773+08:00 [INFO] keep_updated;
2024-09-14T20:26:04.40257981+08:00 [INFO] Using git binary path: None
2024-09-14T20:26:04.437887904+08:00 [ERROR] theme not found: New Darcula
2024-09-14T20:26:04.438245195+08:00 [INFO] initializing context server client
2024-09-14T20:26:04.43832707+08:00 [INFO] Registering built-in prompt template: content_prompt
2024-09-14T20:26:04.438636193+08:00 [INFO] Registering built-in prompt template: edit_workflow
2024-09-14T20:26:04.438876264+08:00 [INFO] Registering built-in prompt template: step_resolution
2024-09-14T20:26:04.439303134+08:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-09-14T20:26:04.43957794+08:00 [INFO] No prompt template overrides directory found at /home/***/.local/share/zed/prompt_overrides. Using built-in prompts.
2024-09-14T20:26:04.440013292+08:00 [INFO] extensions updated. loading 9, reloading 0, unloading 0
2024-09-14T20:26:04.442655491+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-09-14T20:26:04.442732863+08:00 [INFO] Opening main db
2024-09-14T20:26:04.444203343+08:00 [INFO] perform;
2024-09-14T20:26:04.444264537+08:00 [INFO] authenticate;
2024-09-14T20:26:04.444330832+08:00 [INFO] read_command;
2024-09-14T20:26:04.444906728+08:00 [INFO] socket reader;
2024-09-14T20:26:04.450483368+08:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-09-14T20:26:04.450517142+08:00 [INFO] Creating colormap 44040195
2024-09-14T20:26:04.4508222+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.450877028+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.450913861+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.450939053+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.4510863+08:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-09-14T20:26:04.451116116+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.451144804+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.451168874+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.451192761+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.45121702+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.451241158+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.451288682+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:04.482763294+08:00 [INFO] Enabling color space support
2024-09-14T20:26:04.519113594+08:00 [INFO] Adapter: "Intel(R) UHD Graphics (CML GT2)"
2024-09-14T20:26:04.519726934+08:00 [INFO] Testing presentation capability on Linux/Intel
2024-09-14T20:26:04.526089486+08:00 [INFO] No ray tracing extensions are supported
2024-09-14T20:26:04.528857762+08:00 [INFO] Using surface present mode MAILBOX
2024-09-14T20:26:04.528942934+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:26:04.534299425+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:26:04.534349697+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-09-14T20:26:04.534380924+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-09-14T20:26:04.571522216+08:00 [INFO] Refreshing at 6943 micros
2024-09-14T20:26:04.572246904+08:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "Intel(R) UHD Graphics (CML GT2)", driver_name: "Intel open-source Mesa driver", driver_info: "Mesa 24.2.2 - kisak-mesa PPA" }
2024-09-14T20:26:04.573196605+08:00 [INFO] XConnected server on 31457289, transport version: 0.0, TRANSPORT_MAX: 20
2024-09-14T20:26:04.589832402+08:00 [INFO] Using surface present mode MAILBOX
2024-09-14T20:26:04.590093095+08:00 [WARN] Unable to forbid exclusive full screen
2024-09-14T20:26:10.157523739+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:10.157695609+08:00 [INFO] Opening main db
2024-09-14T20:26:10.159053057+08:00 [WARN] request completed with error: failed to connect to the server
2024-09-14T20:26:10.160078624+08:00 [INFO] Opening main db
2024-09-14T20:26:10.213375127+08:00 [ERROR] No path or contents found for buffer
2024-09-14T20:26:10.224958166+08:00 [WARN] request completed with error: failed to connect to the server

@svenihoney
Copy link

Same here, no internal/external GPU, NixOS, Wayland. With XWayland it works:
WAYLAND_DISPLAY= DISPLAY=:0 zed --foreground .
With native wayland I get the following log:

Wayland log
wl_display#1: error 2: no memory
warning: queue 0x60fef381c6d0 destroyed while proxies still attached:
  wl_registry#48 still attached
[2024-09-16T22:49:16+02:00 ERROR zed::reliability] {
  "thread": "main",
  "payload": "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED",
  "location_data": {
    "file": "/build/cargo-vendor-dir/blade-graphics-0.5.0/src/vulkan/init.rs",
    "line": 864
  },
  "backtrace": [
    "core::panicking::panic_fmt",
    "core::result::unwrap_failed",
    "blade_graphics::hal::init::<impl blade_graphics::hal::Context>::resize",
    "gpui::platform::blade::blade_renderer::BladeRenderer::update_transparency",
    "gpui::platform::linux::wayland::window::update_window",
    "gpui::app::AppContext::observe_global::{{closure}}",
    "gpui::app::AppContext::flush_effects",
    "gpui::window::Window::new::{{closure}}",
    "<gpui::platform::linux::wayland::client::WaylandClientStatePtr as wayland_client::event_queue::Dispatch<wayland_protocols::xdg::decoration::zv1::generated::client::zxdg_toplevel_decoration_v1::ZxdgToplevelDecorationV1,wayland_backend::sys::client::ObjectId>>::event",
    "wayland_client::event_queue::queue_callback",
    "<core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events",
    "<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run",
    "gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run",
    "gpui::app::App::run",
    "zed::main",
    "std::sys_common::backtrace::__rust_begin_short_backtrace",
    "std::rt::lang_start::{{closure}}",
    "std::rt::lang_start_internal",
    "main",
    "__libc_start_call_main",
    "__libc_start_main@@GLIBC_2.34",
    "_start"
  ],
  "app_version": "0.152.3",
  "release_channel": "Zed",
  "os_name": "Linux Wayland",
  "os_version": "nixos 24.11",
  "architecture": "x86_64",
  "panicked_on": 1726519756061,
  "installation_id": "a55a3a30-1ce2-4f98-91a2-3eefd7be0517",
  "session_id": "68f0a92e-ae5a-4670-a5db-3e44c0c548db"
}

System information

OS: NixOS 24.11.20240913.345c263 (Vicuna) x86_64
Kernel: Linux 6.10.7-zen1
Display (PHL 258B6QU): 1440x2560 @ 60 Hz in 25″ [External]
Display (LEN T27p-10): 3840x2160 @ 60 Hz in 27″ [External]
WM: Hyprland (Wayland)
CPU: AMD Ryzen 7 5800X (16) @ 3.80 GHz
GPU: AMD Radeon RX 6800 XT [Discrete]

@iamjdcollins
Copy link

Same problem on Zed version: 0.152.3, DRI_PRIME=1 doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPU

Zed version: 0.151.2 logs
Zed version: 0.152.3 logs

In your case I see a NVIDIA GPU. You might have success with what worked for me when using the NVIDIA 560 drivers.

I have found another solution that worked for me. Reading Arch documentation on the NVIDIA drivers there are two kernel settings mentioned. With current 560 drivers provided with Arch and these two kernel parameters zed is launching perfectly fine. I won't claim to fully understand the ramifications of these settings, but they do mention being required for Wayland compositors to work properly.

Reference: https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting

nvidia_drm.modeset=1
nvidia_drm.fbdev=1

@judemvm
Copy link

judemvm commented Sep 18, 2024

Same problem on Zed version: 0.152.3, DRI_PRIME=1 doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPU
Zed version: 0.151.2 logs
Zed version: 0.152.3 logs

In your case I see a NVIDIA GPU. You might have success with what worked for me when using the NVIDIA 560 drivers.

I have found another solution that worked for me. Reading Arch documentation on the NVIDIA drivers there are two kernel settings mentioned. With current 560 drivers provided with Arch and these two kernel parameters zed is launching perfectly fine. I won't claim to fully understand the ramifications of these settings, but they do mention being required for Wayland compositors to work properly.

Reference: https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting

nvidia_drm.modeset=1 nvidia_drm.fbdev=1

Thanks, but it didn't help, this is what's happening

  • Zed version: 0.151.2 - works, no problems:

    Screencast.from.09-18-2024.07.08.44.PM.webm
  • Zed version: >= 0.152.3 - "works", but I can't do anything bc GUI is not displayed:

    Screencast.from.09-18-2024.07.02.55.PM.webm

I found a solution for Zed version: >= 0.152.3 - #17129 (comment) but it's only works with integrated gpu.

@JosephTLyons JosephTLyons removed the admin read Pending admin review label Sep 18, 2024
@JohnRTitor
Copy link

JohnRTitor commented Sep 22, 2024

This does work
WAYLAND_DISPLAY= DISPLAY=:0 zeditor

This indeed works.
But looks like disabling use of integrated gpu and forcing the use of discrete GPU works in case of AMD.

On NixOS, you just need to run DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 zed to successfully launch zed under Wayland.

Zed Ver: 0.152.4
OS: NixOS Unstable 24.11
Memory: 16 GiB
Architecture: x86_64
CPU: AMD Ryzen 5 7600
GPU: AMD Radeon RX 6500 XT

@notpeter

This comment was marked as outdated.

@JohnRTitor
Copy link

JohnRTitor commented Sep 23, 2024

Of course not, zed still does not work with integrated graphics.

Forcing discrete graphics is a very inefficient and weird solution, especially for people who do not have them.

@notpeter
Copy link
Member

notpeter commented Sep 23, 2024

Could you paste your graphics card driver details/versions?

vulkaninfo --summary |sed -n -e '/Devices:/,$p'

@JohnRTitor
Copy link

I have both amdvlk and radv.

 vulkaninfo --summary |sed -n -e '/Devices:/,$p' 
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/zxhjnh2d440bhli0zck18s10hcq07qpp-mesa-24.2.2-drivers/lib/libvulkan_virtio.so. Skipping this driver.
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/zxhjnh2d440bhli0zck18s10hcq07qpp-mesa-24.2.2-drivers/lib/libvulkan_dzn.so. Skipping this driver.
Devices:
========
GPU0:
	apiVersion         = 1.3.280
	driverVersion      = 2.0.302
	vendorID           = 0x1002
	deviceID           = 0x743f
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = AMD Radeon RX 6500 XT
	driverID           = DRIVER_ID_AMD_PROPRIETARY
	driverName         = AMD proprietary driver
	driverInfo         = (AMD proprietary shader compiler)
	conformanceVersion = 1.3.5.2
	deviceUUID         = 00000000-0300-0000-0000-000000000000
	driverUUID         = 414d442d-4c49-4e55-582d-445256000000
GPU1:
	apiVersion         = 1.3.293
	driverVersion      = 2.0.318
	vendorID           = 0x1002
	deviceID           = 0x743f
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = AMD Radeon RX 6500 XT
	driverID           = DRIVER_ID_AMD_OPEN_SOURCE
	driverName         = AMD open-source driver
	driverInfo         = 2024.Q3.2 (LLPC)
	conformanceVersion = 1.3.5.2
	deviceUUID         = 00000000-0300-0000-0000-000000000000
	driverUUID         = 414d442d-4c49-4e55-582d-445256000000
GPU2:
	apiVersion         = 1.3.280
	driverVersion      = 2.0.302
	vendorID           = 0x1002
	deviceID           = 0x164e
	deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	deviceName         = AMD Radeon Graphics
	driverID           = DRIVER_ID_AMD_PROPRIETARY
	driverName         = AMD proprietary driver
	driverInfo         = (AMD proprietary shader compiler)
	conformanceVersion = 1.3.5.2
	deviceUUID         = 00000000-1200-0000-0000-000000000000
	driverUUID         = 414d442d-4c49-4e55-582d-445256000000
GPU3:
	apiVersion         = 1.3.293
	driverVersion      = 2.0.318
	vendorID           = 0x1002
	deviceID           = 0x164e
	deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	deviceName         = AMD Radeon Graphics
	driverID           = DRIVER_ID_AMD_OPEN_SOURCE
	driverName         = AMD open-source driver
	driverInfo         = 2024.Q3.2 (LLPC)
	conformanceVersion = 1.3.5.2
	deviceUUID         = 00000000-1200-0000-0000-000000000000
	driverUUID         = 414d442d-4c49-4e55-582d-445256000000

@notpeter
Copy link
Member

I know it's a PITA but would you be willing to test zed with only the open source driver (uninstall the proprietary driver, restart, then launch zed) and then again with only the proprietary driver (uninstall the open source, restart and relaunch zed) and see if either of those configurations works better than your current config with both drivers?

I seen multiple folks reporting the various environment variables for selecting drivers not behaving quite as expected (e.g. only disabling the proprietary shader compiler not the entire proprietary driver), but once they just had a single driver things behaved better.

@bknightInfo
Copy link
Author

My work arounds no longer work anymore so I will switch back unfortunately to vs code still its resolved
`╰▮~↕2▮◗ WAYLAND_DISPLAY= DISPLAY=:0 zeditor --foreground .
Authorization required, but no authorization protocol specified

thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:253:75:
called Result::unwrap() on an Err value: IoError(Custom { kind: Other, error: UnknownError })
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace`

@madr
Copy link

madr commented Oct 3, 2024

FWIW, this seems to be partly a Hyprland issue.

I use Sway as well as Labwc (both Wayland compositors) and have had no troubles with Zed.

To get Hyprland to start, I used the workaround mentioned above.

WAYLAND_DISPLAY= zeditor

System information

OS: Arch Linux 2024-10-03
Kernel: Linux 6.10.10-arch1-1
Display (0x1239): 1920x1080 @ 60 Hz in 12″ [Internal]
WM: Hyprland (Wayland)
CPU: ntel(R) Core(TM) i7-6600U CPU @ 2.60GHz
GPU: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)

@JohnRTitor
Copy link

To get Hyprland to start, I used the workaround mentioned above.

WAYLAND_DISPLAY= zeditor

This just makes it start in a XWayland session instead, not in native Wayland.

So the problem is we can't launch zed on Wayland-native on integrated GPUs.


To get Hyprland to start, I used the workaround mentioned above.

On another note, I can seem to start zed in native Wayland just fine after updating my system today (with the latest hyprland-git). @madr Could you try with latest hyprland-git (compile from source if possible) and get back?

@madr
Copy link

madr commented Oct 4, 2024

I'm sorry, but the problem seems to have gone away for me now due to a user error on my part.

I found out I had some unpurged junk from the flatpak version of Zed, and by removing that and rebooting the system zeditor starts just fine on Hyprland.

So sorry for the confusion.

@uriworkaccount
Copy link

I get the same problem on WSL, ubuntu 22

RUST_BACKTRACE=full WAYLAND_DISPLAY='' zed --foreground
MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Software caused connection abort
thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:253:75:
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: UnknownError })
stack backtrace:
   0:     0x56235150740b - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1b9dad2a88e955ff
   1:     0x56234e4ecd6b - core::fmt::write::h4b5a1270214bc4a7
   2:     0x5623515025b3 - std::io::Write::write_fmt::hd04af345a50c312d
   3:     0x562351508b7a - std::panicking::default_hook::{{closure}}::h96ab15e9936be7ed
   4:     0x5623515087c7 - std::panicking::default_hook::h3cacb9c27561ad33
   5:     0x5623515091d9 - std::panicking::rust_panic_with_hook::hfe205f6954b2c97b
   6:     0x5623515090e7 - std::panicking::begin_panic_handler::{{closure}}::h6cb44b3a50f28c44
   7:     0x5623515078d9 - std::sys::backtrace::__rust_end_short_backtrace::hf1c1f2a92799bb0e
   8:     0x562351508d74 - rust_begin_unwind
   9:     0x56234d4a3ba3 - core::panicking::panic_fmt::h3d8fc78294164da7
  10:     0x56234d4a4076 - core::result::unwrap_failed::hfa79a499befff387
  11:     0x56234f83d03b - gpui::platform::linux::x11::client::X11Client::new::h59a357ad411ae55d
  12:     0x56234f865ac4 - gpui::platform::current_platform::h96b487c79e0c602b
  13:     0x56234f7a0462 - gpui::app::App::new::h27fac0bae26d2f79
  14:     0x562352a2920c - zed::main::h8da14df5f3fb4fad
  15:     0x562352a38c83 - std::sys::backtrace::__rust_begin_short_backtrace::h519a7d001e55d3f7
  16:     0x5623528e79d9 - std::rt::lang_start::{{closure}}::h852a4999c8ab47b0
  17:     0x5623514f7815 - std::rt::lang_start_internal::h5e7c81cecd7f0954
  18:     0x562352a2eabc - main
  19:     0x7f1e7ef78d90 - <unknown>
  20:     0x7f1e7ef78e40 - __libc_start_main
  21:     0x56234d73e55e - _start
  22:                0x0 - <unknown>

if i try to run with

$ WAYLAND_DISPLAY= DISPLAY=:0 zed --foreground .
[2024-10-05T14:29:05+03:00 ERROR fs] No such file or directory (os error 2) about ["/home/uri/.config/github-copilot"]
WARNING: dzn is not a conformant Vulkan implementation, testing use only.

and i get unsupported GPU
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux linux-x11 Linux X11 panic / crash [core label]
Projects
None yet
Development

No branches or pull requests