Crash on linux: Aquire image error ERROR_SURFACE_LOST_KHR #32174
Replies: 51 comments
-
|
@lemtea8 does |
Beta Was this translation helpful? Give feedback.
-
My computer can also run Godot Engine (uses Vulkan 1.3) quite smoothly, which I think is a pretty complex Vulkan program. |
Beta Was this translation helpful? Give feedback.
-
|
After installing Zed from script, I got the zed.log. Based on the info, I think the problem is that my system is set to nvidia GPU only, but Zed decides to use integrated graphics(which won't work), and eventually caused the crash. 2024-07-13T00:17:36+08:00 [INFO] ========== starting zed ==========
2024-07-13T00:17:36+08:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-07-13T00:17:36+08:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-07-13T00:17:36+08:00 [INFO] Try connect fcitx5
2024-07-13T00:17:36+08:00 [INFO] perform;
2024-07-13T00:17:36+08:00 [INFO] read_command;
2024-07-13T00:17:36+08:00 [INFO] Opening main db
2024-07-13T00:17:36+08:00 [INFO] read_command;
2024-07-13T00:17:36+08:00 [INFO] socket reader;
2024-07-13T00:17:36+08:00 [INFO] new;
2024-07-13T00:17:36+08:00 [INFO] Using git binary path: None
2024-07-13T00:17:36+08:00 [INFO] keep_updated;
2024-07-13T00:17:36+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-07-13T00:17:36+08:00 [INFO] Opening main db
2024-07-13T00:17:36+08:00 [INFO] XConnected server on 50383156, transport version: 0.0, TRANSPORT_MAX: 20
2024-07-13T00:17:36+08:00 [INFO] installing extension html latest version
2024-07-13T00:17:36+08:00 [INFO] perform;
2024-07-13T00:17:36+08:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-07-13T00:17:36+08:00 [INFO] Creating colormap 83886083
2024-07-13T00:17:36+08:00 [INFO] read_command;
2024-07-13T00:17:36+08:00 [INFO] read_command;
2024-07-13T00:17:36+08:00 [INFO] socket reader;
2024-07-13T00:17:36+08:00 [INFO] set environment variables from shell:/usr/bin/zsh, path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
2024-07-13T00:17:36+08:00 [INFO] Enabling Vulkan Portability
2024-07-13T00:17:36+08:00 [INFO] Enabling color space support
2024-07-13T00:17:36+08:00 [INFO] Adapter "Intel(R) UHD Graphics 630 (CFL GT2)"
2024-07-13T00:17:36+08:00 [INFO] No ray tracing extensions are supported
2024-07-13T00:17:36+08:00 [INFO] Using surface present mode MAILBOX
2024-07-13T00:17:36+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-13T00:17:36+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-13T00:17:36+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-13T00:17:36+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-07-13T00:17:36+08:00 [INFO] Refreshing at 6944 micros
2024-07-13T00:17:36+08:00 [INFO] Using surface present mode MAILBOX
2024-07-13T00:17:36+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-13T00:17:36+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-13T00:17:36+08:00 [ERROR] {
"thread": "main",
"payload": "Aquire image error ERROR_SURFACE_LOST_KHR",
"location_data": {
"file": "/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/21a56f7/blade-graphics/src/vulkan/init.rs",
"line": 954
},
"backtrace": [
"core::panicking::panic_fmt",
"blade_graphics::hal::init::<impl blade_graphics::hal::Context>::acquire_frame",
"gpui::platform::blade::blade_renderer::BladeRenderer::draw",
"<gpui::platform::linux::x11::window::X11Window as gpui::platform::PlatformWindow>::draw",
"gpui::window::Window::new::{{closure}}::{{closure}}",
"gpui::window::Window::new::{{closure}}",
"<core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events",
"<gpui::platform::linux::x11::client::X11Client 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.143.6",
"release_channel": "Zed",
"os_name": "Linux X11",
"os_version": "fedora 38",
"architecture": "x86_64",
"panicked_on": 1720714776649,
"installation_id": "f17907b8-d58f-4445-853e-f9e797ee5c22",
"session_id": "0361f0a0-9a74-4cb5-8379-85646fb13040"
} |
Beta Was this translation helpful? Give feedback.
-
|
@lemtea8 Can you try setting Would be good to know if there's something we/blade need to test for that we're not yet. |
Beta Was this translation helpful? Give feedback.
-
|
@lemtea8 could you try the following cat /etc/prime-discreteAnd |
Beta Was this translation helpful? Give feedback.
-
Both VULKAN_DEVICE_INDEX 0 and 1 crashed, it seems whatever I set it always uses integrated graphics. Zed.log (upper part is VULKAN_DEVICE_INDEX=0 and lower part is 1): 2024-07-16T22:02:56+08:00 [INFO] ========== starting zed ==========
2024-07-16T22:02:56+08:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-07-16T22:02:56+08:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-07-16T22:02:56+08:00 [INFO] Try connect fcitx5
2024-07-16T22:02:56+08:00 [INFO] perform;
2024-07-16T22:02:56+08:00 [INFO] read_command;
2024-07-16T22:02:56+08:00 [INFO] read_command;
2024-07-16T22:02:56+08:00 [INFO] Opening main db
2024-07-16T22:02:56+08:00 [INFO] socket reader;
2024-07-16T22:02:56+08:00 [INFO] new;
2024-07-16T22:02:56+08:00 [INFO] keep_updated;
2024-07-16T22:02:56+08:00 [INFO] Using git binary path: None
2024-07-16T22:02:56+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-07-16T22:02:56+08:00 [INFO] Opening main db
2024-07-16T22:02:56+08:00 [INFO] installing extension html latest version
2024-07-16T22:02:56+08:00 [INFO] XConnected server on 50331657, transport version: 0.0, TRANSPORT_MAX: 20
2024-07-16T22:02:56+08:00 [INFO] perform;
2024-07-16T22:02:56+08:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-07-16T22:02:56+08:00 [INFO] Creating colormap 83886083
2024-07-16T22:02:56+08:00 [INFO] read_command;
2024-07-16T22:02:56+08:00 [INFO] read_command;
2024-07-16T22:02:56+08:00 [INFO] socket reader;
2024-07-16T22:02:56+08:00 [INFO] Enabling Vulkan Portability
2024-07-16T22:02:56+08:00 [INFO] Enabling color space support
2024-07-16T22:02:56+08:00 [INFO] Adapter "Intel(R) UHD Graphics 630 (CFL GT2)"
2024-07-16T22:02:56+08:00 [INFO] No ray tracing extensions are supported
2024-07-16T22:02:56+08:00 [INFO] Using surface present mode MAILBOX
2024-07-16T22:02:56+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-16T22:02:56+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-16T22:02:56+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-16T22:02:56+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-07-16T22:02:56+08:00 [INFO] set environment variables from shell:/usr/bin/zsh, path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/user/.local/bin:/home/user/Android/Sdk/platform-tools
2024-07-16T22:02:56+08:00 [INFO] Refreshing at 6944 micros
2024-07-16T22:02:56+08:00 [INFO] Using surface present mode MAILBOX
2024-07-16T22:02:56+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-16T22:02:57+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-16T22:02:57+08:00 [ERROR] {
"thread": "main",
"payload": "Aquire image error ERROR_SURFACE_LOST_KHR",
"location_data": {
"file": "/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/21a56f7/blade-graphics/src/vulkan/init.rs",
"line": 954
},
"backtrace": [
"core::panicking::panic_fmt",
"blade_graphics::hal::init::<impl blade_graphics::hal::Context>::acquire_frame",
"gpui::platform::blade::blade_renderer::BladeRenderer::draw",
"<gpui::platform::linux::x11::window::X11Window as gpui::platform::PlatformWindow>::draw",
"gpui::window::Window::new::{{closure}}::{{closure}}",
"gpui::window::Window::new::{{closure}}",
"<core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events",
"<gpui::platform::linux::x11::client::X11Client 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.143.7",
"release_channel": "Zed",
"os_name": "Linux X11",
"os_version": "fedora 38",
"architecture": "x86_64",
"panicked_on": 1721138577040,
"installation_id": "f17907b8-d58f-4445-853e-f9e797ee5c22",
"session_id": "3c8d7319-5024-4dd2-aff2-fa94bd3d2611"
}
2024-07-16T22:03:11+08:00 [INFO] ========== starting zed ==========
2024-07-16T22:03:11+08:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2024-07-16T22:03:11+08:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2024-07-16T22:03:11+08:00 [INFO] Try connect fcitx5
2024-07-16T22:03:11+08:00 [INFO] perform;
2024-07-16T22:03:11+08:00 [INFO] read_command;
2024-07-16T22:03:11+08:00 [INFO] read_command;
2024-07-16T22:03:11+08:00 [INFO] socket reader;
2024-07-16T22:03:11+08:00 [INFO] Opening main db
2024-07-16T22:03:11+08:00 [INFO] new;
2024-07-16T22:03:11+08:00 [INFO] keep_updated;
2024-07-16T22:03:11+08:00 [INFO] Using git binary path: None
2024-07-16T22:03:11+08:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-07-16T22:03:11+08:00 [INFO] Opening main db
2024-07-16T22:03:11+08:00 [INFO] XConnected server on 50331658, transport version: 0.0, TRANSPORT_MAX: 20
2024-07-16T22:03:11+08:00 [INFO] installing extension html latest version
2024-07-16T22:03:11+08:00 [INFO] perform;
2024-07-16T22:03:11+08:00 [INFO] read_command;
2024-07-16T22:03:11+08:00 [INFO] read_command;
2024-07-16T22:03:11+08:00 [INFO] Using Visual { id: 35, colormap: 0, depth: 32 }
2024-07-16T22:03:11+08:00 [INFO] Creating colormap 85983235
2024-07-16T22:03:11+08:00 [INFO] socket reader;
2024-07-16T22:03:11+08:00 [INFO] set environment variables from shell:/usr/bin/zsh, path:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/user/.local/bin:/home/user/Android/Sdk/platform-tools
2024-07-16T22:03:11+08:00 [INFO] Enabling Vulkan Portability
2024-07-16T22:03:11+08:00 [INFO] Enabling color space support
2024-07-16T22:03:11+08:00 [INFO] Adapter "Intel(R) UHD Graphics 630 (CFL GT2)"
2024-07-16T22:03:11+08:00 [INFO] No ray tracing extensions are supported
2024-07-16T22:03:11+08:00 [INFO] Using surface present mode MAILBOX
2024-07-16T22:03:11+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-16T22:03:11+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-16T22:03:11+08:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-07-16T22:03:11+08:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-07-16T22:03:12+08:00 [INFO] Refreshing at 6944 micros
2024-07-16T22:03:12+08:00 [INFO] Using surface present mode MAILBOX
2024-07-16T22:03:12+08:00 [WARN] Unable to forbid exclusive full screen
2024-07-16T22:03:12+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-16T22:03:12+08:00 [ERROR] {
"thread": "main",
"payload": "Aquire image error ERROR_SURFACE_LOST_KHR",
"location_data": {
"file": "/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/21a56f7/blade-graphics/src/vulkan/init.rs",
"line": 954
},
"backtrace": [
"core::panicking::panic_fmt",
"blade_graphics::hal::init::<impl blade_graphics::hal::Context>::acquire_frame",
"gpui::platform::blade::blade_renderer::BladeRenderer::draw",
"<gpui::platform::linux::x11::window::X11Window as gpui::platform::PlatformWindow>::draw",
"gpui::window::Window::new::{{closure}}::{{closure}}",
"gpui::window::Window::new::{{closure}}",
"<core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events",
"<gpui::platform::linux::x11::client::X11Client 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.143.7",
"release_channel": "Zed",
"os_name": "Linux X11",
"os_version": "fedora 38",
"architecture": "x86_64",
"panicked_on": 1721138592103,
"installation_id": "f17907b8-d58f-4445-853e-f9e797ee5c22",
"session_id": "19977648-2ac9-47b2-97da-76e910bc6f79"
}
|
Beta Was this translation helpful? Give feedback.
-
|
@kvark There is no file which path is /etc/prime-discrete, as I uses envycontrol.
|
Beta Was this translation helpful? Give feedback.
-
|
That's great, thank you! So you are affected by this platform issue (it's not a Blade implementation problem, strictly speaking), and Intel isn't able to present. I haven't heard of envycontrol, will look into it. |
Beta Was this translation helpful? Give feedback.
-
|
I'm still trying to understand what our options are:
|
Beta Was this translation helpful? Give feedback.
-
|
@kvark Just so I understand it the problem is that the surface creation fails in a few different way (probably due to a platform issue on the Intel side?). This can be fixed by:
There's obviously some trade-offs here, but my sense is:
So maybe a sensible plan would be:
|
Beta Was this translation helpful? Give feedback.
-
|
I've implemented (3) in kvark/blade#144 |
Beta Was this translation helpful? Give feedback.
-
|
I've pulled kvark/blade#144 into zed main. Can anyone seeing this issue try zed main and see if it has improved things? |
Beta Was this translation helpful? Give feedback.
-
FWIW I think this update broke zed nighly on my ubuntu 24.04 with intel and nvidia graphics. |
Beta Was this translation helpful? Give feedback.
-
|
@tepavcevic What happens after that in the logs? It looks like it's working as expected up to that point |
Beta Was this translation helpful? Give feedback.
-
|
Reverting the change before preview out of an abundance of caution #15095 |
Beta Was this translation helpful? Give feedback.
-
|
... I am running into this issue with zed 0.162.5 on a Dell XPS and a NVIDIA GeForce RTX 4050. |
Beta Was this translation helpful? Give feedback.
-
Similar on an older Dell XPS 15 with a NVIDIA GeForce GTX 1650 Ti. But for me starting it like this, as mentioned in some linked issue, works: |
Beta Was this translation helpful? Give feedback.
-
|
There seems to be a recent related discussion on #20853 |
Beta Was this translation helpful? Give feedback.
-
|
@j-fu your case is particularly interesting though. We've seen the surface creation failing on those Nvidia optimus configurations. We've seen presentation failing with an error. But your case shows that it all seemingly succeeds, so even with the most detailed workaround checks on our side, it still believes that Intel is fine to present. But you apparently get a blank window. It would help to get the |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, great that you are looking into this!
The output of vulkaninfo and the Zed.log are in this gist. |
Beta Was this translation helpful? Give feedback.
-
|
@j-fu I filed https://gitlab.freedesktop.org/mesa/mesa/-/issues/12212 upstream about your case. There is a few fields that are left as . If you can fill them out (by editing the description), or provide the info here (for me to copy it there), that would help devs to investigate. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! I added this to the gist for the moment. I could sign up there if deemed helpful. |
Beta Was this translation helpful? Give feedback.
-
|
In case it's helpful to anyone, I found a successful workaround on my system that allows Zed to start without crashing, even though looking at the logs the graphics driver it's using doesn't actually change. Setting Running on: |
Beta Was this translation helpful? Give feedback.
-
|
Oh thanks, this is indeed very helpful! With I can see the zed window the first time in my life :) Ah and for the other icd files on my system: just do nothing, return to the shell prompt. returns to the shell prompt and says shows a blank black window in the window manager frame and says |
Beta Was this translation helpful? Give feedback.
-
|
I had the same problem on Ubuntu.
|
Beta Was this translation helpful? Give feedback.
-
|
Hello, I've checked a few things and here’s what I have: This works fine, with the cube spinning without issues: But this one shows distorted movement: I've tried searching and installing various packages, but I can’t remember exactly which ones, and nothing has solved the problem so far. Any help would be greatly appreciated! Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
@miguelforero19 same problem here!! its like zed its pointing somehow to the gpu_number 1 instead of 0...I cant find any way of solve this yet.... |
Beta Was this translation helpful? Give feedback.
-
|
@miguelforero19 @Master-Y0da I had the same issue but realized the file |
Beta Was this translation helpful? Give feedback.
-
|
@bigbrett Have you tried the steps listed in https://zed.dev/docs/linux#troubleshooting ? That should contain all the stuff we know about debugging this (and if there's stuff someone knows that isn't in there, PRs welcome!) |
Beta Was this translation helpful? Give feedback.
-
|
@ConradIrwin deleted my prior comment when I should have edited, my bad. Issue was |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Check for existing issues
Describe the bug / provide steps to reproduce it
Zed instantly crashes on KDE plasma.
Message from
zed --foreground(There's also XIMClientError but I assume it didn't cause the crash):Environment
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.8.9-100.fc38.x86_64 (64-bit)
Graphics Platform: X11
Graphics Processor: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
If applicable, attach your
~/Library/Logs/Zed/Zed.logfile to this issue.There is no Zed.log found.
Beta Was this translation helpful? Give feedback.
All reactions