zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed is Not Launching On Fedora Linux

Open IshanAsati opened this issue 1 year ago • 13 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

I open zed and then i can see it in the taskbar for like a split second then it crashes, I also cant launch with the terminal I don't know how to recreate it tbh

Environment

System Details Report


Report details

  • Date generated: 2024-09-02 11:07:59

Hardware Information:

  • Hardware Model: Lenovo IdeaPad Gaming 3 15ARH05
  • Memory: 16.0 GiB
  • Processor: AMD Ryzen™ 5 4600H with Radeon™ Graphics × 12
  • Graphics: AMD Radeon™ Graphics
  • Graphics 1: NVIDIA GeForce GTX 1650
  • Disk Capacity: (null)

Software Information:

  • Firmware Version: FCCN21WW
  • OS Name: Fedora Linux 40 (Workstation Edition)
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 46
  • Windowing System: Wayland
  • Kernel Version: Linux 6.10.6-200.fc40.x86_64

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

Zed.log

IshanAsati avatar Sep 02 '24 05:09 IshanAsati

It is interesting you report this -- I have been using Zed on Fedora and it was working fine until today. Now, the official and preview releases both crash on launch. I presume it was due to all the updates I installed this morning. Unfortunately, I do not know what updated as I just hit the good 'ol sudo dnf update -y

EDIT: including the panic log

{"thread":"main","payload":"called `Result::unwrap()` on an `Err` value: ERROR_SURFACE_LOST_KHR","location_data":{"file":"/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/ac25c77/blade-graphics/src/vulkan/init.rs","line":822},"backtrace":["core::panicking::panic_fmt","core::result::unwrap_failed","blade_graphics::hal::init::<impl blade_graphics::hal::Context>::resize","gpui::platform::linux::wayland::window::WaylandWindowStatePtr::set_size_and_scale","<gpui::platform::linux::wayland::client::WaylandClientStatePtr as wayland_client::event_queue::Dispatch<wayland_protocols::wp::fractional_scale::v1::generated::client::wp_fractional_scale_v1::WpFractionalScaleV1,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_alias_1","_start"],"app_version":"0.150.4","release_channel":"Zed","os_name":"Linux Wayland","os_version":"fedora 40","architecture":"x86_64","panicked_on":1725381858630,"installation_id":"2a2e9441-3858-4997-bece-57378b527a78","session_id":"d7d970aa-eb4a-4e8c-a735-c2210be1ef7b"}

ramipellumbi avatar Sep 03 '24 16:09 ramipellumbi

Same story as @ramipellumbi. When I run zed --foreground, I get the same output as this comment. It looks like this issue has to do with a graphics driver update.

jacobwhall avatar Sep 03 '24 19:09 jacobwhall

Same story as @ramipellumbi. When I run zed --foreground, I get the same output as this comment. It looks like this issue has to do with a graphics driver update.

From that same thread -- I am working around it for now via: https://github.com/zed-industries/zed/issues/17129#issuecomment-2323817322

ramipellumbi avatar Sep 03 '24 19:09 ramipellumbi

happens to me today wayland, with intel mesa driver.

update: actually not, I though zed gpu selection based on nvidia prime provided

deng232 avatar Sep 08 '24 20:09 deng232

Not working on Fedora 40 ZED :(

snapfast avatar Sep 13 '24 18:09 snapfast

xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1661:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1662:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1663:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1664:1: unrecognized keysym "dead_hamza" on left-hand side
xkbcommon: ERROR: /usr/share/X11/locale/en_US.UTF-8/Compose:1665:1: unrecognized keysym "dead_hamza" on left-hand side
wl_surface#22: error 0: DRM Syncobj surface object already created for surface 22
[2024-09-14T00:27:35+05:30 ERROR zed::reliability] {
  "thread": "main",
  "payload": "called `Result::unwrap()` on an `Err` value: ERROR_SURFACE_LOST_KHR",
  "location_data": {
    "file": "/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e142a3a/blade-graphics/src/vulkan/init.rs",
    "line": 930
  },
  "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::new",
    "gpui::platform::linux::wayland::window::WaylandWindow::new",
    "<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::open_window",
    "gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::open_window",
    "gpui::window::Window::new",
    "workspace::Workspace::new_local::{{closure}}::{{closure}}",
    "async_task::raw::RawTask<F,T,S,M>::run",
    "<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_alias_1",
    "_start"
  ],
  "app_version": "0.152.3",
  "release_channel": "Zed",
  "os_name": "Linux Wayland",
  "os_version": "fedora 40",
  "architecture": "x86_64",
  "panicked_on": 1726253855252,
  "installation_id": "56858ff5-4a92-4ea3-be00-44e094d9ca02",
  "session_id": "38a9dd39-f0e5-445b-82a4-a8f0546f53fb"
}


Error when running zed --foreground

snapfast avatar Sep 13 '24 18:09 snapfast

@IshanAsati Which version of the Nvidia driver are you using?

  1. Running export DRI_PRIME=1 before running zed from the command line (which will default to using your AMD CPU integrated graphics before launch)

  2. Attempt to apply the NVidia kernel driver settings mentioned here (not sure exactly how to do this in Fedora, but it should be possible):

  • https://github.com/zed-industries/zed/issues/17859#issuecomment-2357305247

See also:

  • https://github.com/zed-industries/zed/issues/17129

notpeter avatar Sep 18 '24 14:09 notpeter

This issue still exists on Fedora 40, utilizing DRI_PRIME=1 does not help. We have to be able to utilize the iGPU because the Nvidia GPU is occupied by the LLM ...

akseg73 avatar Sep 22 '24 13:09 akseg73

Found it, to utilize iGPU you have to say DRI_PRIME=0 not 1 as is suggested by someone sel

akseg73 avatar Sep 22 '24 14:09 akseg73

I'm running into this same issue also. Running from the terminal after export DRI_PRIME=1 functions as a workaround, but I have no idea how I'd make it work when launched normally, and I'd prefer not to have to launch GUI applications from the terminal.

tobico avatar Oct 01 '24 03:10 tobico

I'm running into this same issue also. Running from the terminal after export DRI_PRIME=1 functions as a workaround, but I have no idea how I'd make it work when launched normally, and I'd prefer not to have to launch GUI applications from the terminal.

You can edit the desktop shortcut to include that in the environment. For example:

$ cat ~/.local/share/applications/dev.zed.Zed.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=Zed
GenericName=Text Editor
Comment=A high-performance, multiplayer code editor.
TryExec=/home/peter/.local/zed.app/libexec/zed-editor
StartupNotify=true
Exec=/home/peter/.local/zed.app/libexec/zed-editor %U
Icon=/home/peter/.local/zed.app/share/icons/hicolor/512x512/apps/zed.png
Categories=Utility;TextEditor;Development;IDE;
Keywords=zed;
MimeType=text/plain;application/x-zerosize;inode/directory;x-scheme-handler/zed;
Actions=NewWorkspace;

[Desktop Action NewWorkspace]
Exec=/home/peter/.local/zed.app/libexec/zed-editor --new %U
Name=Open a new workspace

Just edit the Exec line:

Exec=env DRI_PRIME=1 /home/peter/.local/zed.app/libexec/zed-editor %U

reference

notpeter avatar Oct 01 '24 03:10 notpeter

I really don't understand, they made a Code editor and it doesn't work on Linux. What ? Why ?

snapfast avatar Oct 01 '24 14:10 snapfast

Just edit the Exec line:

Exec=env DRI_PRIME=1 /home/peter/.local/zed.app/libexec/zed-editor %U

For anyone else facing this issue, I found that after editing my desktop file as described, I also had to run sudo update-desktop-database before Zed would launch correctly.

tobico avatar Oct 09 '24 23:10 tobico

For Fedora 40 users: Going to Fedora 41 and switching to GNOME XOrg fixed it for me.

SilenLoc avatar Nov 14 '24 11:11 SilenLoc

@IshanAsati Have you been able to try the suggestions presented in this thread?

notpeter avatar Nov 14 '24 14:11 notpeter

Switching to fedora 41 would probably work but I've switched to windows because of instability issues and software support.

IshanAsati avatar Nov 14 '24 14:11 IshanAsati

For Fedora 40 users: Going to Fedora 41 and switching to GNOME XOrg fixed it for me.

Also seems to be working fine now with Fedora 41 on Wayland. No need to go back to Xorg.

tobico avatar Nov 15 '24 07:11 tobico