Zed failed to open a window: NoSupportedDeviceFound
Check for existing issues
- [x] Completed
Describe the bug / provide steps to reproduce it
./libexec/zed-editor
Zed failed to open a window: NoSupportedDeviceFound
Environment
ubuntu 20.04
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.
Zed.log
Hi @lasypig:
- Which Zed version / git hash you are trying to run?
- How did you install zed (built from source, pre-built package, etc)
- Are you using X11 or Wayland?
For reference, here are the current docs for Building Zed for Linux.
Hi @lasypig:
- Which Zed version / git hash you are trying to run?
- How did you install zed (built from source, pre-built package, etc)
- Are you using X11 or Wayland?
For reference, here are the current docs for Building Zed for Linux.
- v0.141.2-pre
- pre-built package from release page
- x11
I will try to build zed on my ubuntu.
I built zed myself, but problem still exists:
cargo run
warning: `/home/wangxb/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: `/home/wangxb/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s
Running `target/debug/zed`
Zed failed to open a window: NoSupportedDeviceFound
After searching error string, NoSupportedDeviceFound was found in blade library. Does blade not support integrated graphics?
I have the same issue
System Info
$ uname -a
Linux lerssett 6.9.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 21 Jun 2024 19:49:19 +0000 x86_64 GNU/Linux
$ sb_release -a
LSB Version: 2.0
Distributor ID: EndeavourOS
Description: EndeavourOS Linux
Release: rolling
Codename: rolling
$ lspci -k | grep -A 2 -E "(VGA|3D)"
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device 3283
Kernel driver in use: nouveau
Software
$ pacman -Q | rg mesa
lib32-mesa 1:24.1.2-1
mesa 1:24.1.2-1
mesa-utils 9.0.0-4
vulkan-mesa-layers 1:24.1.2-1
$ pacman -Q | rg nouveau
lib32-vulkan-nouveau 1:24.1.2-1
vulkan-nouveau 1:24.1.2-1
xf86-video-nouveau 1.0.17-3
$ pacman -Q | rg zed
zed 0.140.5-1
When I run command vkcube-wayland, I get error
vkEnumeratePhysicalDevices reported zero accessible devices.
Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.
but it works fine with env var NVK_I_WANT_A_BROKEN_VULKAN_DRIVER=1
Zed output without that env var is
$ /usr/lib/zed/zed-editor
[2024-06-26T16:47:25+02:00 ERROR zed::reliability] {
"thread": "main",
"payload": "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED",
"location_data": {
"file": "/build/.cargo/git/checkouts/blade-ea462a0faa3f9995/33fd513/blade-graphics/src/vulkan/init.rs",
"line": 379
},
"backtrace": [
"__libc_start_main"
],
"app_version": "0.140.5",
"release_channel": "Zed",
"os_name": "Linux Wayland",
"os_version": "endeavouros unknown",
"architecture": "x86_64",
"panicked_on": 1719413245132,
"installation_id": "fc128855-9a2d-43c3-835e-1eb6a4361b5e",
"session_id": "2c47a610-15e2-42b6-9cba-49301796ad93"
}
fish: Job 1, '/usr/lib/zed/zed-editor' terminated by signal SIGABRT (Abort)
with env var
$ NVK_I_WANT_A_BROKEN_VULKAN_DRIVER=1 /usr/lib/zed/zed-editor
WARNING: NVK is not a conformant Vulkan implementation, testing use only.
Zed failed to open a window: NoSupportedDeviceFound
fish: Job 1, 'NVK_I_WANT_A_BROKEN_VULKAN_DRIV…' terminated by signal SIGSEGV (Address boundary error)
vulkaninfo
$ vulkaninfo
ERROR: [Loader Message] Code 0 : setup_loader_term_phys_devs: Failed to detect any valid GPUs in the current config
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools-1.3.269/vulkaninfo/./vulkaninfo.h:237:vkEnumeratePhysicalDevices failed with ERROR_INITIALIZATION_FAILED
NVK_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vulkaninfo
https://gist.github.com/Stanislav-Lapata/0d188cc028d123640a7ae92d3e90d601
I have the same issue.
$ ./zed-editor
Zed failed to open a window: NoSupportedDeviceFound
$ uname -a
Linux lenovo 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation TigerLake GT2 [Iris Xe Graphics] (rev 01)
Subsystem: Lenovo Iris Xe Graphics
Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce MX450] (rev a1)
Subsystem: Lenovo TU117M [GeForce MX450]
Kernel driver in use: nouveau
vkcube works properly, vulkaninfo output is attached.
On OpenSUSE after running scripts/linux , I saw a similar error.
When I run vkcube-wayland, I saw
vkcube-wayland
vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_surface extension.
Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.
I needed to install libvulkan_nouveau. If you have a different GPU, you may need to install libvulkan_intel, libvulkan_lvp or libvulkan_radeon.
Then zed runs, can be used, but then crashes randomly, and I dont see where the log is.
To anyone experiencing this issue, please add the following information:
- DE used and version of it
- X11 or Wayland session
- Hardware configuration
- Driver version used (if Intel/AMD please provide the kernel version plus the Mesalib version, if Nvidia please provide the kernel version + Nvidia version)
- Whether you are using a distro package, the official release binaries, or building it yourself
For our part we've had a couple of reports of this with the Solus package, both users affected are using hybrid Intel/Nvidia GPUs and it appears that Vulkan initialization is failing with the Intel GPU but succeeding with the Nvidia one. If anyone is having this issue with a similar configuration please try the following to isolate the issue:
To force it to use the Intel GPU:
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json /path/to/zed
For Nvidia
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/10_nvidia.json /path/to/zed
These paths may be different depending on your distribution.
I had the same issue and was able to fix by installing https://archlinux.org/packages/?name=vulkan-nouveau
Linux lyminox-83ef 6.9.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 x86_64 GNU/Linux
01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1)
Subsystem: Lenovo Device 3d0a
Kernel driver in use: nouveau
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev 0a)
Subsystem: Lenovo Device 3d0a
Kernel driver in use: amdgpu
If anyone with an AMD GPU and Arch stumbles upon this, I had the same issue and fixed it by installing vulkan-radeon (see https://wiki.archlinux.org/title/Vulkan)
I come from the Linux announcement in HN, and got same issue.
Info:
- Zed version:
0.143.6 - Zed install method: absolutely safe
curl | shfrom https://zed.dev/linux - Display session:
X11 - Distro:
Linux Mint 20.3(Ubuntu 20.04) - Desktop Environment:
Cinnamon 5.2.7 - GPU:
Intel Iris Pro 6200(driver:i915) - Kernel:
5.15.0-107 - mesa-vulkan-drivers:
21.2.6(distro package) vkcube: works properly.vulkaninfo: vulkaninfo.txt
(Here the commands I used, if others want to use them too for their reports)
$ zed --version
Zed 0.143.6 – /home/work/.local/zed.app/libexec/zed-editor
$ echo "$XDG_SESSION_TYPE"
x11
$ lsb_release -d
Description: Linux Mint 20.3
$ cinnamon --version
Cinnamon 5.2.7
$ lspci -v -mm -k | sed -r -n '/Class:.*(VGA|3D)/,/^$/p'
Class: VGA compatible controller
Vendor: Intel Corporation
Device: Iris Pro Graphics 6200
SVendor: ASRock Incorporation
SDevice: Iris Pro Graphics 6200
Rev: 0a
Driver: i915
Module: i915
$ uname -r
5.15.0-107-generic
$ apt-cache policy mesa-vulkan-drivers | grep 'Installed:'
Installed: 21.2.6-0ubuntu0.1~20.04.2
mesa-vulkan-drivers provides /usr/share/vulkan/icd.d/intel_icd.x86_64.json, so I tried with it but didn't change anything:
$ VK_ICD_FILENAMES='/usr/share/vulkan/icd.d/intel_icd.x86_64.json' zed .
error opening [PathLikeWithPosition { path_like: "/home/work/tmp", row: None, column: None }]: NoSupportedDeviceFound
@kvark , perhaps you might know what's going on here? Or what diagnostic information might be helpful for debugging this?
+1 on Ubuntu 20.04, on versoin 0.143.6 installed using curl | sh from https://zed.dev/linux
same issue here kernal : 6.9.7-arch1-1 (64-bit) kde : 6.1.2 wayland
Running Zed inside a VM failed:
/usr/bin/zed --foreground
[2024-07-11T12:54:04+02:00 ERROR zed::reliability] {
"thread": "main",
"payload": "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED",
"location_data": {
"file": "/builddir/build/BUILD/zed-0.142.1-pre/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/21a56f7/blade-graphics/src/vulkan/init.rs",
"line": 384
},
...
As workaround, VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json /usr/bin/zed solved the issue for me, see also https://github.com/zed-industries/zed/issues/14076#issuecomment-2221843854 and https://wiki.archlinux.org/title/Vulkan#Software_rendering
Thanks @geraldhobbes for the advice! Then afterwards I ran it as normal and it worked, but it useed the integrated graphics and I see very high cpu usage and sluggishness. Following https://wiki.archlinux.org/title/Vulkan#Troubleshooting, as I have a dedicated nvidia gpu, I tried to to open zed as VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json /usr/bin/zeditor but seeing the same old error.
So, can this be a nvidia problem?
Me too Zed version: 0.143.7 Zed install method: local rpmbuild from tar.gz version Display session: X11 Distro: R11 (ROSA Linux 2016.1) Desktop Environment: KDE4 GPU: GPU: Intel UHD Graphics 620 @ 1,15 GHz [Integrated] Kernel: 5.13.9 mesa-vulkan-drivers: 21.2.6 (distro package) vkcube: works
rpm -qa | grep mesa mesa-20.1.10-1-rosa2016.1.x86_64 mesa-demos-8.4.0-2-rosa2016.1.x86_64
rpm -qa | grep vulkan lib64vulkan1-1.2.198.0-2-rosa2016.1.x86_64 vulkan-1.2.198.0-2-rosa2016.1.x86_64 lib64vulkan-drivers-20.1.10-1-rosa2016.1.x86_64
It is working! I go zed working, on dedicated nvidia gpu, with smooth EVERYTHING. My system:
- EndeavourOS (arch linux)
- KDE plasma 6.1.2 (wayland)
- kernel: 6.6 lts
- nvidia: 555.58.02 (with nvidia optimus layer installed)
First I set a kernel parameter as mentioned by kde. For more info I suggest you to check here. The tl;dr of how I did it:
sudo modprobe nvidia_drm modset=1- then
sudo mkinitcpio -P
Then launch zed as: VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json /usr/bin/zeditor .
So, can this be a nvidia problem?
It's unlikely to be a problem on the Nvidia side, especially if other Vulkan applications work on your system. Most likely this is an issue in the library Zed is using for graphics
@ReillyBrogan just catching up here. Looks like the issue was originally about Vulkan just not being set up on the affected platforms?
If vkcube and vulkaninfo work, please provide the output with RUST_LOG=blade_graphics=debug environment.
Blade doesn't require any HW capabilities beyond Vulkan-1.0, but it does expect a not so ancient driver.
There is also a platform issue with Intel + Nvidia where Intel would sometimes not being able to create a Vulkan surface. You'd not see it on vkcube by default as it's trying to pick Nvidia, unless told otherwise. But Zed/Blade isn't trying to blindly pick the most powerful GPU and instead follows the preference set up by the platform, so it may hit the bug. We have detection in place but it's really hard to make it very specific to avoid regressing healthy platforms.
please provide the output with
RUST_LOG=blade_graphics=debugenvironment.
For my case, https://github.com/zed-industries/zed/issues/13441#issuecomment-2221587930, this adds very useful information:
$ RUST_LOG='blade_graphics=debug' zed --foreground .
[2024-07-13T12:24:58+02:00 WARN blade_graphics::hal::init] Rejected for device extension "VK_KHR_dynamic_rendering" not supported
[2024-07-13T12:24:58+02:00 WARN blade_graphics::hal::init] Rejected for device extension "VK_EXT_inline_uniform_block" not supported
error opening [PathLikeWithPosition { path_like: "/home/work/tmp", row: None, column: None }]: NoSupportedDeviceFound
$ RUST_LOG='blade_graphics=debug' VK_ICD_FILENAMES='/usr/share/vulkan/icd.d/intel_icd.x86_64.json' zed --foreground .
[2024-07-13T12:26:17+02:00 WARN blade_graphics::hal::init] Rejected for device extension "VK_KHR_dynamic_rendering" not supported
error opening [PathLikeWithPosition { path_like: "/home/work/tmp", row: None, column: None }]: NoSupportedDeviceFound
Defaults matter! I suggest having blade_graphics=warning as default (or warn, whatever it is). Warnings and errors are never useful hidden away.
With this info I was able to check information on the VK_KHR_dynamic_rendering extension:
- https://vulkan.gpuinfo.org/listdevicescoverage.php?extension=VK_KHR_dynamic_rendering
Seems that it is a fairly recent thing, that appeared in 2021. In my mind it makes sense that my system doesn't support it, being as it is an Ubuntu 20.04 LTS. Some day I should get into upgrading to the 24.04 LTS...
For now, as an OSS maintainer myself, I'd understand if you consider that 4 years is too long. It's all just a matter of how old systems you're willing to officially support.
When the extension was developed, the assumption was that it'd just be a small driver update for all vendors to support it (regardless of the hardware capabilities), and that the users would benefit across the board. Doesn't Ubuntu-20.04 allow getting driver updates past year 2020? I.e. do you have the latest packages from "focal-updates" channel?
@mikayla-maki we have the following choices there:
- I can implement a code path that works around the lack of "KHR_dynamic_rendering" in Blade. That's going to be a bit messy and unfortunate, but it's possible.
- We can get OpenGL ES backend working to the point where we can reliably use it as a fallback for cases like this.
My preference would be (2) because having a strong fallback is great regardless of how good Vulkan support is.