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] Vulkan ERROR_INITIALIZATION_FAILED #8168

Open
1 task done
AA1999 opened this issue Feb 22, 2024 · 48 comments
Open
1 task done

[linux] Vulkan ERROR_INITIALIZATION_FAILED #8168

AA1999 opened this issue Feb 22, 2024 · 48 comments
Labels
bug [core label] linux open source Open source community projects, contributions, etc

Comments

@AA1999
Copy link

AA1999 commented Feb 22, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

After following the instructions for building zed on linux, I run cargo run --release and the resulting error:

[2024-02-22T00:31:22+03:30 ERROR fs] watch path does not exist: /home/arshia/.config/zed/settings.json
[2024-02-22T00:31:22+03:30 ERROR fs] watch path does not exist: /home/arshia/.config/zed/keymap.json
[2024-02-22T00:31:22+03:30 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-02-22T00:31:22+03:30 ERROR fs] watch path does not exist: /home/arshia/.config/zed/extensions/installed
[2024-02-22T00:31:22+03:30 ERROR util] crates/extension/src/extension_store.rs:183: No such file or directory (os error 2)
[2024-02-22T00:31:22+03:30 ERROR util] crates/zed/src/zed.rs:555: EOF while parsing a value at line 1 column 0
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED" at /home/arshia/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e9d93a4/blade-graphics/src/vulkan/init.rs:652:18
   0: Zed::init_panic_hook::{closure#0}
             at crates/zed/src/main.rs:594:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /usr/src/debug/rust/rustc-1.76.0-src/library/alloc/src/boxed.rs:2029:9
      std::panicking::rust_panic_with_hook
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /usr/src/debug/rust/rustc-1.76.0-src/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /usr/src/debug/rust/rustc-1.76.0-src/library/core/src/result.rs:1649:5
   7: <blade_graphics::hal::Context>::resize
   8: <gpui::platform::blade::blade_renderer::BladeRenderer>::new
             at crates/gpui/src/platform/blade/blade_renderer.rs:366:30
   9: <gpui::platform::linux::wayland::window::WaylandWindowInner>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:96:23
      <gpui::platform::linux::wayland::window::WaylandWindowState>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:144:31
      <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::open_window
             at crates/gpui/src/platform/linux/wayland/client.rs:183:36
  10: <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:214:9
  11: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:330:31
  12: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}
             at crates/gpui/src/app.rs:495:30
      <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}>
             at crates/gpui/src/app.rs:360:22
      <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app.rs:492:9
      <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app/async_context.rs:133:17
      <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:874:17
  13: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /usr/src/debug/rust/rustc-1.76.0-src/library/core/src/future/future.rs:124:9
      <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
      <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  14: <async_task::runnable::Runnable>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
      <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::run
             at crates/gpui/src/platform/linux/wayland/client.rs:123:17
  15: <gpui::app::App>::run::<Zed::main::{closure#3}>
             at crates/gpui/src/app.rs:143:9
      Zed::main
             at crates/zed/src/main.rs:123:5
  16: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /usr/src/debug/rust/rustc-1.76.0-src/library/core/src/ops/function.rs:250:5
      std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/sys_common/backtrace.rs:155:18
  17: std::rt::lang_start::<()>::{closure#0}
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/rt.rs:166:18
  18: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /usr/src/debug/rust/rustc-1.76.0-src/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /usr/src/debug/rust/rustc-1.76.0-src/library/std/src/rt.rs:148:20
  19: main
  20: <unknown>
  21: __libc_start_main
  22: _start

Steps to reproduce:

  1. clone the repository
  2. cd to the repo folder
  3. git submodule update --init --recursive
  4. rustup target add wasm32-wasi
  5. Install the dependencies in script/linux
  6. Run cargo run --release

Environment

OS: Arch Linux x86_64
Kernel: 6.7.5-arch1-1
DE: KDE Plasma 5.27.10
WM: KWin (Wayland)
CPU: Intel(R) Core(TM) i7-7700HQ (8) @ 3.80 GHz
GPU 1: NVIDIA GeForce GTX 1050 Ti Mobile

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

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

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

https://paste.ofcode.org/7WyGRWWXTSSnjWRvEtxCVb

@AA1999 AA1999 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Feb 22, 2024
@AA1999 AA1999 changed the title watch path does not exist: /home/arshia/.config/zed/settings.json [build error] watch path does not exist: /home/arshia/.config/zed/settings.json Feb 22, 2024
@Godskull
Copy link

same issue on

OS: Arch Linux x86_64
Kernel: 6.7.5-arch1-1
DE: KDE Plasma 5.27.10
WM: KWin
CPU: AMD Ryzen 7 5800HS with Radeon Graphics (16) @ 4.463GHz
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series

@abbygriffiths
Copy link

abbygriffiths commented Feb 25, 2024

I encountered a similar error while building on WSL:

OS: Debian GNU/Linux 12 (bookworm) on Windows 10 x86_64
DE: None
Kernel: 5.15.133.1-microsoft-standard-WSL2
Shell: bash 5.2.15
CPU: Intel i7-9750H (12) @ 2.592GHz
GPU: 809b:00:00.0 Microsoft Corporation Basic Render Driver

Log:

[2024-02-25T17:04:53+05:30 ERROR fs] watch path does not exist: /home/abirbhavg/.config/zed/settings.json
[2024-02-25T17:04:53+05:30 ERROR fs] watch path does not exist: /home/abirbhavg/.config/zed/keymap.json
[2024-02-25T17:04:54+05:30 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-02-25T17:04:55+05:30 ERROR util] crates/zed/src/zed.rs:554: EOF while parsing a value at line 1 column 0
[2024-02-25T17:04:55+05:30 ERROR fs] watch path does not exist: crates/zed/src/languages
[2024-02-25T17:04:55+05:30 ERROR blade_graphics::hal::init] Missing Vulkan entry points: LibraryLoadFailure(DlOpen { desc: "libvulkan.so.1: cannot open shared object file: No such file or directory" })
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: NotSupportedError" at crates/gpui/src/platform/linux/wayland/window.rs:88:14
   0: Zed::init_panic_hook::{closure#0}
             at crates/zed/src/main.rs:595:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2029:9
      std::panicking::rust_panic_with_hook
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
   7: <core::result::Result<blade_graphics::hal::Context, blade_graphics::NotSupportedError>>::unwrap
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1073:23
   8: <gpui::platform::linux::wayland::window::WaylandWindowInner>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:79:13
   9: <gpui::platform::linux::wayland::window::WaylandWindowState>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:144:31
  10: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::open_window
             at crates/gpui/src/platform/linux/wayland/client.rs:203:36
  11: <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:214:9
  12: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:330:31
  13: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}
             at crates/gpui/src/app.rs:495:30
  14: <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}>
             at crates/gpui/src/app.rs:360:22
  15: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app.rs:492:9
  16: <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app/async_context.rs:133:12
  17: <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:867:17
  18: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/future/future.rs:124:9
  19: <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/abirbhavg/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
  20: <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/abirbhavg/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  21: <async_task::runnable::Runnable>::run
             at /home/abirbhavg/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
  22: <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::run
             at crates/gpui/src/platform/linux/wayland/client.rs:143:17
  23: <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::run
             at crates/gpui/src/platform/linux/platform.rs:174:9
  24: <gpui::app::App>::run::<Zed::main::{closure#3}>
             at crates/gpui/src/app.rs:143:9
  25: Zed::main
             at crates/zed/src/main.rs:122:5
  26: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
  27: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:155:18
  28: std::rt::lang_start::<()>::{closure#0}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:166:18
  29: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20
  30: std::rt::lang_start::<()>
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:165:17
  31: main
  32: <unknown>
  33: __libc_start_main
  34: _start

The crashing was fixed when I installed libvulkan-dev and libvulkan1 and the application atleast launches, but the original "watch path error" still remains:

[2024-02-25T18:14:04+05:30 ERROR fs] watch path does not exist: /home/abirbhavg/.config/zed/keymap.json
[2024-02-25T18:14:05+05:30 ERROR util] crates/zed/src/zed.rs:554: EOF while parsing a value at line 1 column 0
[2024-02-25T18:14:05+05:30 ERROR fs] watch path does not exist: /home/abirbhavg/.config/zed/tasks.json

@Be1newinner
Copy link

I encountered a similar error while building on WSL:

OS: Ubuntu 22.04.4 LTS
Kernel: Linux 5.15.0-1049-intel-iotg
Shell: Version 3.44.0 for GNOME 42
CPU: 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz

Output after 1st compiling

Running `target/release/Zed`
[2024-02-27T01:16:22+05:30 ERROR fs] watch path does not exist: /home/be1newinner/.config/zed/settings.json
[2024-02-27T01:16:22+05:30 ERROR fs] watch path does not exist: /home/be1newinner/.config/zed/keymap.json
[2024-02-27T01:16:22+05:30 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-02-27T01:16:22+05:30 ERROR fs] watch path does not exist: /home/be1newinner/.config/zed/extensions/installed
[2024-02-27T01:16:22+05:30 ERROR util] crates/extension/src/extension_store.rs:195: No such file or directory (os error 2)
[2024-02-27T01:16:22+05:30 ERROR util] crates/zed/src/zed.rs:554: EOF while parsing a value at line 1 column 0
[2024-02-27T01:16:23+05:30 ERROR fs] watch path does not exist: /home/be1newinner/.config/zed/tasks.json

@JosephTLyons JosephTLyons added linux open source Open source community projects, contributions, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 26, 2024
@mabla0531
Copy link

The crashing was fixed when I installed libvulkan-dev and libvulkan1 and the application atleast launches...

This hasn't worked for me, I have troubleshot X11 in a thousand different ways, anyone know a workaround or specific cause?

PopOS 22.04
Linux 6.6.10-76060610-generic
GNOME 41.4
Nvidia 4050, driver 545

@AnthonyBerisha
Copy link

AnthonyBerisha commented Feb 28, 2024

Same here with cargo run --release

Finished release [optimized + debuginfo] target(s) in 5m 28s
Running `target/release/Zed`
[2024-02-28T10:55:34+01:00 ERROR fs] watch path does not exist: /home/tony/.config/zed/settings.json
[2024-02-28T10:55:34+01:00 ERROR fs] watch path does not exist: /home/tony/.config/zed/keymap.json
[2024-02-28T10:55:34+01:00 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-02-28T10:55:34+01:00 ERROR util] crates/zed/src/zed.rs:569: EOF while parsing a value at line 1 column 0
WARNING: radv is not a conformant Vulkan implementation, testing use only.

OS: Ubuntu 20.04.6 LTS x86_64
DE: Regolith (with X11)
Kernel: 5.15.0-97-generic
Shell: zsh 5.8 (x86_64-ubuntu-linux-gnu)
CPU: AMD Ryzen 7 3800X (16) @ 3.900GHz
GPU: AMD RX6750XT

Edit:
Managed to fix the watch patch errors by creating empty settings.json and keymap.json in the specified paths

I only have the EOF errors now

[2024-02-28T11:10:09+01:00 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-02-28T11:10:09+01:00 ERROR util] crates/zed/src/zed.rs:569: EOF while parsing a value at line 1 column 0

@burrbull
Copy link

burrbull commented Feb 28, 2024

I only have the EOF errors now

The minimal json file is

{}

But there is still an error with settings file writing. #8437

@yazeed1s
Copy link

yazeed1s commented Mar 1, 2024

@Godskull, @AA1999 Zed crashed immediately with the same errors. I run archlinux with 6.6.18-1 kernel, AMD Ryzen 7 PRO 6850U CPU and AMD ATI Radeon 680M GPU. However, after installing vulkan-amdgpu-pro and vulkan-devel I was able to fire up Zed, but the errors still presist.

Try to install vulkan in your machine and see if Zed still crashes.

I think script/linux is lacking what is needed to build or run Zed.

@Godskull
Copy link

Godskull commented Mar 1, 2024

@yazeed1s

Try to install vulkan in your machine and see if Zed still crashes.

i installed vulkan-devel i have nvidia card so i ran prime-run cargo run --release , prime-run because i have hybrid graphics and to use my nvidia graphics over my integrated graphics i need to add prime-run but , with or without prime-run i was getting these errors

[2024-03-01T17:58:01+05:30 ERROR util] crates/zed/src/zed.rs:569: invalid type: map, expected a sequence at line 1 column 0
[2024-03-01T17:58:02+05:30 ERROR util] crates/task/src/static_source.rs:126: Error("invalid type: map, expected a sequence", line: 1, column: 0)

and the editor was open and when i used mangohud to check the fps then the fps where fluctuating from 3 fps to 60 fps with a average frametime of 1400ms , going as high as 2600ms , in short the editor was unusable

@imerla1
Copy link

imerla1 commented Mar 2, 2024

same issue.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

cargo run --release

arning: [email protected]: Info: using '6fcd57ac53cd73adb717532c1f76b132a998e8c8' hash for ZED_COMMIT_SHA env var
Finished release [optimized + debuginfo] target(s) in 0.55s
Running target/release/Zed
[2024-03-02T16:26:53+04:00 ERROR fs] watch path does not exist: /home/geoi/.config/zed/settings.json
[2024-03-02T16:26:53+04:00 ERROR fs] watch path does not exist: /home/geoi/.config/zed/keymap.json
[2024-03-02T16:26:53+04:00 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-03-02T16:26:53+04:00 ERROR util] crates/zed/src/zed.rs:580: EOF while parsing a value at line 1 column 0
Thread "main" panicked with "called Result::unwrap() on an Err value: NotSupportedError" at crates/gpui/src/platform/linux/x11/window.rs:243:14
0: Zed::init_panic_hook::{closure#0}
at crates/zed/src/main.rs:624:29
1: <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call

@AA1999
Copy link
Author

AA1999 commented Mar 2, 2024

However, after installing vulkan-amdgpu-pro and vulkan-devel I was able to fire up Zed, but the errors still presist.

I already have vulkan-devel installed, but isn't vulkan-amdgpu-pro for AMD GPUs? Mine is NVIDIA

I did install vulkan-devel again anyway (just to be sure) but the error is the same:

[2024-03-02T19:12:25+03:30 ERROR fs] watch path does not exist: /home/arshia/.config/zed/settings.json
[2024-03-02T19:12:25+03:30 ERROR fs] watch path does not exist: /home/arshia/.config/zed/keymap.json
[2024-03-02T19:12:25+03:30 ERROR util] crates/settings/src/settings_file.rs:76: EOF while parsing a value at line 1 column 0
[2024-03-02T19:12:25+03:30 ERROR util] crates/zed/src/zed.rs:580: EOF while parsing a value at line 1 column 0
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED" at /home/arshia/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e9d93a4/blade-graphics/src/vulkan/init.rs:652:18
   0: Zed::init_panic_hook::{closure#0}
             at crates/zed/src/main.rs:624:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2029:9
      std::panicking::rust_panic_with_hook
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
   7: <blade_graphics::hal::Context>::resize
   8: <gpui::platform::blade::blade_renderer::BladeRenderer>::new
             at crates/gpui/src/platform/blade/blade_renderer.rs:366:30
   9: <gpui::platform::linux::wayland::window::WaylandWindowInner>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:97:23
      <gpui::platform::linux::wayland::window::WaylandWindowState>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:142:33
      <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::open_window
             at crates/gpui/src/platform/linux/wayland/client.rs:206:60
  10: <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:174:9
  11: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:329:31
  12: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}
             at crates/gpui/src/app.rs:495:30
      <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}>
             at crates/gpui/src/app.rs:360:22
      <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app.rs:492:9
      <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app/async_context.rs:133:17
      <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:872:17
  13: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/future/future.rs:124:9
      <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
      <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  14: <async_task::runnable::Runnable>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
      <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}
             at crates/gpui/src/platform/linux/platform.rs:80:21
      <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:327:61
      <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:187:32
      <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:138:21
      <calloop::sources::generic::Generic<calloop::sources::ping::eventfd::ArcAsFd> as calloop::sources::EventSource>::process_events::<<calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/generic.rs:290:9
      <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:127:9
      <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:184:9
      <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:326:9
  15: <calloop::loop_logic::EventLoop<()>>::dispatch_events
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:445:31
      <calloop::loop_logic::EventLoop<()>>::dispatch::<core::option::Option<core::time::Duration>>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:559:9
  16: <calloop::loop_logic::EventLoop<()>>::run::<<gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::run::{closure#0}, core::option::Option<core::time::Duration>>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:596:13
      <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::run
             at crates/gpui/src/platform/linux/platform.rs:126:9
  17: <gpui::app::App>::run::<Zed::main::{closure#3}>
             at crates/gpui/src/app.rs:143:9
      Zed::main
             at crates/zed/src/main.rs:122:5
  18: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:250:5
      std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:155:18
  19: std::rt::lang_start::<()>::{closure#0}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:166:18
  20: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13
      std::panicking::try::do_call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
      std::panicking::try
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
      std::panic::catch_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
      std::rt::lang_start_internal
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20
  21: main
  22: <unknown>
  23: __libc_start_main
  24: _start

Output of ls /usr/share/vulkan/icd.d/:

ls /usr/share/vulkan/icd.d/
nvidia_icd.json

@yazeed1s
Copy link

yazeed1s commented Mar 2, 2024

@AA1999 according to archwiki, you also need a vulkan driver. The available drivers for Nvidia & Intrl are:

1- Intel: vulkan-intel (or lib32-vulkan-intel)
2- NVIDIA: nvidia-utils (or lib32-nvidia-utils)

Install the drivers and see if it changes anything, in my case Zed does not crash after installing the drivers. But it's still generating the errors you are getting.

@AA1999
Copy link
Author

AA1999 commented Mar 2, 2024

nvidia-utils is also already installed.
Creating the json files with an empty {} fixes the error but shows this instead:

[2024-03-02T23:56:22+03:30 ERROR util] crates/zed/src/zed.rs:580: invalid type: map, expected a sequence at line 1 column 0
Thread "main" panicked with "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED" at /home/arshia/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e9d93a4/blade-graphics/src/vulkan/init.rs:652:18
   0: Zed::init_panic_hook::{closure#0}
             at crates/zed/src/main.rs:624:29
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2029:9
      std::panicking::rust_panic_with_hook
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:783:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
   4: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   5: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   6: core::result::unwrap_failed
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
   7: <blade_graphics::hal::Context>::resize
   8: <gpui::platform::blade::blade_renderer::BladeRenderer>::new
             at crates/gpui/src/platform/blade/blade_renderer.rs:366:30
   9: <gpui::platform::linux::wayland::window::WaylandWindowInner>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:97:23
      <gpui::platform::linux::wayland::window::WaylandWindowState>::new
             at crates/gpui/src/platform/linux/wayland/window.rs:142:33
      <gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::client::Client>::open_window
             at crates/gpui/src/platform/linux/wayland/client.rs:206:60
  10: <gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::open_window
             at crates/gpui/src/platform/linux/platform.rs:174:9
  11: <gpui::window::Window>::new
             at crates/gpui/src/window.rs:329:31
  12: <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}
             at crates/gpui/src/app.rs:495:30
      <gpui::app::AppContext>::update::<gpui::window::WindowHandle<workspace::Workspace>, <gpui::app::AppContext>::open_window<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>::{closure#0}>
             at crates/gpui/src/app.rs:360:22
      <gpui::app::AppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app.rs:492:9
      <gpui::app::async_context::AsyncAppContext>::open_window::<workspace::Workspace, <workspace::Workspace>::new_local::{closure#0}::{closure#0}::{closure#5}>
             at crates/gpui/src/app/async_context.rs:133:17
      <workspace::Workspace>::new_local::{closure#0}::{closure#0}
             at crates/workspace/src/workspace.rs:872:17
  13: <core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>> as core::future::future::Future>::poll
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/future/future.rs:124:9
      <<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>> as core::future::future::Future>::poll
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:455:26
      <async_task::raw::RawTask<<async_task::runnable::Builder<_>>::spawn_local::Checked<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>>>>, core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>, <gpui::executor::ForegroundExecutor>::spawn::inner<core::result::Result<(gpui::window::WindowHandle<workspace::Workspace>, alloc::vec::Vec<core::option::Option<core::result::Result<alloc::boxed::Box<dyn workspace::item::ItemHandle>, anyhow::Error>>>), anyhow::Error>>::{closure#0}, ()>>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/raw.rs:557:17
  14: <async_task::runnable::Runnable>::run
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/runnable.rs:781:18
      <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}
             at crates/gpui/src/platform/linux/platform.rs:80:21
      <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:327:61
      <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:187:32
      <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>::{closure#0}
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:138:21
      <calloop::sources::generic::Generic<calloop::sources::ping::eventfd::ArcAsFd> as calloop::sources::EventSource>::process_events::<<calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/generic.rs:290:9
      <calloop::sources::ping::eventfd::PingSource as calloop::sources::EventSource>::process_events::<<calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/ping/eventfd.rs:127:9
      <calloop::sources::channel::Channel<async_task::runnable::Runnable> as calloop::sources::EventSource>::process_events::<<core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events::{closure#0}>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/channel.rs:184:9
      <core::cell::RefCell<calloop::sources::DispatcherInner<calloop::sources::channel::Channel<async_task::runnable::Runnable>, <gpui::platform::linux::platform::LinuxPlatform>::new::{closure#0}>> as calloop::sources::EventDispatcher<()>>::process_events
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/sources/mod.rs:326:9
  15: <calloop::loop_logic::EventLoop<()>>::dispatch_events
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:445:31
      <calloop::loop_logic::EventLoop<()>>::dispatch::<core::option::Option<core::time::Duration>>
             at /home/arshia/.cargo/registry/src/index.crates.io-6f17d22bba15001f/calloop-0.12.4/src/loop_logic.rs:559:9
  16: <calloop::loop_logic::EventLoop<()>>::run::<<gpui::platform::linux::platform::LinuxPlatform as gpui::platform::Platform>::run::{closure#0}, core::option::Option<core::time::Duration>>

@kvark kvark changed the title [build error] watch path does not exist: /home/arshia/.config/zed/settings.json [linux] Vulkan ERROR_INITIALIZATION_FAILED Mar 6, 2024
@kvark
Copy link
Contributor

kvark commented Mar 6, 2024

For everybody having ERROR_INITIALIZATION_FAILED or NotSupportedError, could you please:

  • make sure Vulkan is installed. If you can run vkcube from vulkan-tools, there is a high chance you'll be able to run Zed.
  • share the log with RUST_LOG=blade_graphics=debug environment. This will tell us what is missing at init time.
  • provide your system info, mainly the GPU/OS. Attaching vulkaninfo output (as a file!) wouldn't hurt as well!

@skullcrushercmd
Copy link
Contributor

skullcrushercmd commented Mar 6, 2024

with the added changes, i get this on arch wayland

 Running `target/release/Zed`

thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:52:10:
called Result::unwrap() on an Err value: ClosedParseErr
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
[root@linuxtechi zed]# vkcube
Environment variable DISPLAY requires a valid value.
Exiting ...
[root@linuxtechi zed]#

@skullcrushercmd
Copy link
Contributor

tried it on x11, it at least opened with errors, tried fixing one of them and it did not start again even after reverting the change (adding some json file) so switched back to wayland and it does work to an extent, it opens but its unusable, no extensions, sign in doesnt work, and saving files or closing windows doesnt work

[skullcmd@linuxtechi zed]$ sudo cargo run --release
warning: [email protected]: Info: using '01e5e4224a3630e5bbd38462f63bc5487048fbd6' hash for ZED_COMMIT_SHA env var
Finished release [optimized + debuginfo] target(s) in 1.44s
Running target/release/Zed
[2024-03-06T03:16:19-05:00 ERROR util] crates/zed/src/zed.rs:619: invalid type: map, expected a sequence at line 1 column 0
[2024-03-06T03:16:20-05:00 ERROR fs] watch path does not exist: /root/.config/zed/tasks.json
[2024-03-06T03:16:24-05:00 ERROR util] crates/client/src/client.rs:1413: DBus error zbus error I/O error: No such file or directory (os error 2)
[2024-03-06T03:18:04-05:00 ERROR workspace::notifications] TODO didn't receive login redirect
Thread "main" panicked with "not implemented" at crates/gpui/src/platform/linux/x11/window.rs:410:9

@AA1999
Copy link
Author

AA1999 commented Mar 8, 2024

make sure Vulkan is installed. If you can run vkcube from vulkan-tools, there is a high chance you'll be able to run Zed.

I can run said command however I still get the same error

$ export RUST_LOG=blade_graphics=debug
$ cargo run --release

https://pastebin.com/SHh5BB9V
Output of vulkaninfo:
https://pastebin.com/xTVA1uXe

@romgrk
Copy link
Contributor

romgrk commented Mar 8, 2024

Did you test vkcube in the same mode (x11 vs wayland) as you tested zed? Probably vkcube-wayland on arch.

@AA1999
Copy link
Author

AA1999 commented Mar 8, 2024

Yeah it was ran at the same mode. Lemme try vkcube-wayland too
Huh interesting:

vkcube-wayland 
Selected GPU 0: NVIDIA GeForce GTX 1050 Ti, type: DiscreteGpu
zsh: segmentation fault (core dumped)  vkcube-wayland

@romgrk
Copy link
Contributor

romgrk commented Mar 8, 2024

This sounds to me like vkcube-wayland doesn't work, and therefore vulkan+wayland doesn't work in general on your machine, not specifically in blade/zed. Have you been testing zed in wayland or x11 mode? Does WAYLAND_DISPLAY='' cargo run works for you?

@aohanhongzhi
Copy link
Contributor

@kvark

image

@kvark
Copy link
Contributor

kvark commented May 13, 2024

@aohanhongzhi could you also do the following please:

  • post/attach nvidia-smi output
  • run vkcube-wayland and see if it works

@flukejones what do you make of this case?

@flukejones
Copy link
Contributor

Ancient versions of Ubuntu (20.04 is ridiculous) are not ideal and will be missing all sorts of improvements and features for the drivers, graphics stacks, firmware etc etc. It's unlikely to have all the vulkan features/extensions required. Either specify a minimum Ubuntu version such as only the last release (24.04), or support only Fedora (and possibly Arch). Fedora at least keeps pace with development of the underlying critical parts (kernel, drivers, firmware).

Ubuntu is not a nice distro to try and support when everything else is moving rapidly except that distro and I wish folks would stop recommending it. (which is based on years of supporting ASUS ROG laptops with software and kernel driver work). Sorry if this is more like a rant and not helpful - I get far too many people on my discord installing 2 year old distros on 6 month old hardware and wondering why things don't work. The same thing applies to development eventually. Windows and Mac at least offer a stable foundation, but we don't have that luxury on Linux thanks to fragmentation caused by distros moving at different speeds to upstream.

As for the actual issue, the logs just above... I see that vkcube sleected the Nvidia device. While Zed will select Intel (whcih is what we want, don't need 15w+ extra from dgpu).

❯ vkcube --help
Usage:
  vkcube	[--use_staging] [--validate] [--validate-checks-disabled]
	[--break] [--c <framecount>] [--suppress_popups]
	[--incremental_present] [--display_timing]
	[--gpu_number <index of physical device>]
	[--present_mode <present mode enum>]
	[--width <width>] [--height <height>]
	[--force_errors]
	<present_mode_enum>
		VK_PRESENT_MODE_IMMEDIATE_KHR = 0
		VK_PRESENT_MODE_MAILBOX_KHR = 1
		VK_PRESENT_MODE_FIFO_KHR = 2
		VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3

We would need to force vkcube to run on intel with the above, and check the present modes. That might hint at something. And grab vulkaninfo. But given where it is crashing in blade, it looks mostly to do with Intel driver capabilities being behind what blade expects and vkcube won't show that. It at least isn't to do with Nvidia from what I can see.

Does blade support opengl use with Zed? That might be a good fallback for these older hardware/distro scenarios. I've not kept up with the levels of vulkan support through the Linux ecosystem.

For the original post issue, I'm not sure. The rest of the issue seems to have a common theme:

  1. Intel® HD Graphics 630
  2. Intel® UHD Graphics 630
  3. Intel® UHD Graphics 620

These are supposed to support Vulkan 1.2 from what i can tell. So maybe outdated drivers?

So I don't think I can help further sorry.

@aohanhongzhi
Copy link
Contributor

aohanhongzhi commented May 14, 2024

so I need to install vkcube-wayland?

image

image

@kvark
Copy link
Contributor

kvark commented May 17, 2024

@flukejones thank you for the info!

But given where it is crashing in blade, it looks mostly to do with Intel driver capabilities being behind what blade expects and vkcube won't show that. It at least isn't to do with Nvidia from what I can see.

That's very unlikely. Blade checks for the features it enables, and it has good error reporting in the log.
Here though we just have Vulkan returning an error on swapchain creation. There should be no valid reason for it from Vulkan perspective: if the Intel physical device isn't able to present to a given VkSurfaceKHR, we should have gotten vkGetPhysicalDeviceSurfaceSupportKHR returning false (in a proper driver/system), but it doesn't for this case.
So I'm fairly sure this is a platform bug, not a Blade issue specifically.

Does blade support opengl use with Zed? That might be a good fallback for these older hardware/distro scenarios. I've not kept up with the levels of vulkan support through the Linux ecosystem.

The basics are in place - you can compile and run Zed on top of OpenGLES-3.1. But there is a few bugs (or just missing pieces) in the GLES backend of Blade that need to be resolved before Zed becomes usable on this path. I do see it as a good fallback for platforms not supporting Vulkan.

@aohanhongzhi
Could you try this please?

vkcube --gpu_number 0

@Pi-Cla
Copy link
Contributor

Pi-Cla commented May 26, 2024

Hi I encountered the same issue on openSUSE and solved it by installing proprietary drivers

Should something be added to the instructions for Linux to install proprietary drivers if you use an NVIDIA gpu?

@ibilux
Copy link

ibilux commented Jun 1, 2024

I solved this by installing vulkan-swrast package. but now zed have hight CPU usage (above 80%).

@aohanhongzhi
Copy link
Contributor

vkcube --gpu_number 0

image

@aohanhongzhi
Copy link
Contributor

I solved this by installing vulkan-swrast package. but now zed have hight CPU usage (above 80%).

I didn`t find it

image

@flukejones
Copy link
Contributor

vulkan-swrast is exactly what the package label says it is. A software implementation of Vulkan, which means it will run on the CPU.

In all seriousness y'all will be better served by moving to newer distros. At least Ubuntu 24.04, if not Fedora 40.

@kvark
Copy link
Contributor

kvark commented Jun 4, 2024

@aohanhongzhi ok, that's something. So Vulkan is just plain broken on adapter 0 for you. The only reason some stuff works is because it decides to choose the discreet GPU and avoids the adapter 0, which must be Intel. We currently have a small workaround in place to handle some of those broken platforms (and it is a platform bug), and we need to extend it slightly to support yours.

@Person-Who-Exists
Copy link

Person-Who-Exists commented Jun 9, 2024

If you have an NVIDIA GPU and installed arch with the proprietary only version in archinstall, you can follow Arch Linux NVIDIA setup - Github to properly install drivers. That worked for me at least.

@VesperQuartz
Copy link

Installing this fix my issue vulkan-radeon pacman -S vulkan-radeon

@AA1999
Copy link
Author

AA1999 commented Jul 3, 2024

Installing this fix my issue vulkan-radeon pacman -S vulkan-radeon

What would be the appropriate package for NVIDIA?
I have vulkan-nouveau installed but when I run zed (which is now in Arch repos and there's no need to compile anymore) it tries to start but will close after a few seconds with no error or message.
Running vkcube-wayland results in:

DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
Selected GPU 0: NVIDIA GeForce GTX 1050 Ti, type: DiscreteGpu
Could not find both graphics and present queues

After uninstalling vulkan-nouveau vkcube-wayland shows:

Selected GPU 0: NVIDIA GeForce GTX 1050 Ti, type: DiscreteGpu
Could not find both graphics and present queues

@Person-Who-Exists
Copy link

Person-Who-Exists commented Jul 6, 2024

If you have an NVIDIA GPU and installed arch with the proprietary only version in archinstall, you can follow Arch Linux NVIDIA setup - Github to properly install drivers. That worked for me at least.

Never mind, I am having the error again

@embed
Copy link

embed commented Sep 13, 2024

On EndeavourOS with KDE Plasma and Wayland. Installing vulkan-radeon solved my issue.

@richbowen
Copy link

Installing vulkan-intel did it for me.

@lebe-dev
Copy link

lebe-dev commented Oct 9, 2024

I've found a process with zed, killed him and launched again. It helped for me.

Env: ArchLinux, Wayland, Sway

@ryukinix
Copy link

I've been experiencing a similar issue in a mode old hardware (new one is working fine).

Env: Artix Linux, zed 0.164.2, nvidia

Someone in the thread said that vulkan 1.2 drivers are the minimum, which my GTX 760 supports. However, in the docs... It says that 1.3 is the minimum. When things changed?

@kvark
Copy link
Contributor

kvark commented Dec 10, 2024

We basically require this list of extensions (which hasn't changed since the start):

    vk::EXT_INLINE_UNIFORM_BLOCK_NAME,
    vk::KHR_TIMELINE_SEMAPHORE_NAME,
    vk::KHR_DESCRIPTOR_UPDATE_TEMPLATE_NAME,
    vk::KHR_DYNAMIC_RENDERING_NAME,

@cosmoscalibur
Copy link

I am using Manjaro and I installed Zed using official script. Version is 0.165.4.
I have an hybrid graphic card with NVIDIA RTX 2060 and AMD Radeon Graphics (RADV RENOIR). nvidia-utils (550.135) and vulkan-radeon (1:24.2.8-1) are installed. mhwd -li show video-linux in version 2024.05.06 and video-hybrid-amd-nvidia-prime in version 2023.03.23.
vkcube works fine, but vkcube-wayland show segmentation fault (core dumped).
When run Zed on Wayland, I get error ERROR_INITIALIZATION_FAILED. On X11, the first run is fine, but if Zed is closed, then open an invisible window. On Wayland, with WAYLAND_DISPLAY='', also open an invisible window, and the debug trace is similar to original wayland but add WARN blade_graphics::hal::init] Acquire failed because the surface is out of date.

vulkanfinfo.txt
zed-debug.txt

Changed VK_DRIVER_FILES to /usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json solve the issue. But when use /usr/share/vulkan/icd.d/nvidia_icd.json, the issue persists.

@CoderParth
Copy link

@AA1999
Hi there!
What about debug mode? Does it run on debug mode?
cargo run

Also, could you please share your log file? The link you have pasted does not work .

To make sure you have vulkan driver installed,
can you please try vulkaninfo on your terminal?

Also please try
vkcube --gpu_number 0
and
vkcube --gpu_number 1

In case everything is configured properly, both the commands should open up a window with a rotating cube on the display.

Can you also please try manually switching to your NVIDIA gpu?
For Arch, install prime package (if not already installed)
sudo pacman -S nvidia nvidia-utils nvidia-prime

Then:
sudo prime-select nvidia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux open source Open source community projects, contributions, etc
Projects
None yet
Development

No branches or pull requests