zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
51.08k stars 3.17k forks source link

Zed failed to open a window: NoSupportedDeviceFound #13441

Open lasypig opened 5 months ago

lasypig commented 5 months ago

Check for existing issues

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


notpeter commented 5 months ago

Hi @lasypig:

  1. Which Zed version / git hash you are trying to run?
  2. How did you install zed (built from source, pre-built package, etc)
  3. Are you using X11 or Wayland?

For reference, here are the current docs for Building Zed for Linux.

lasypig commented 5 months ago

Hi @lasypig:

  1. Which Zed version / git hash you are trying to run?
  2. How did you install zed (built from source, pre-built package, etc)
  3. Are you using X11 or Wayland?

For reference, here are the current docs for Building Zed for Linux.

  1. v0.141.2-pre
  2. pre-built package from release page
  3. 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?

Stanislav-Lapata commented 5 months ago

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

d3dat commented 5 months ago

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.

vulkaninfo.txt

jayvdb commented 5 months ago

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.

ReillyBrogan commented 5 months ago

To anyone experiencing this issue, please add the following information:

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.

parz3val commented 5 months ago

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
ewen-lbh commented 4 months ago

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)

j1elo commented 4 months ago

I come from the Linux announcement in HN, and got same issue.

Info:

(Here the commands I used, if others want to use them too for their reports) ```console $ 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
ReillyBrogan commented 4 months ago

@kvark , perhaps you might know what's going on here? Or what diagnostic information might be helpful for debugging this?

JimitSoni18 commented 4 months ago

+1 on Ubuntu 20.04, on versoin 0.143.6 installed using curl | sh from https://zed.dev/linux

MostafaMohamed2002 commented 4 months ago

same issue here kernal : 6.9.7-arch1-1 (64-bit) kde : 6.1.2 wayland

geraldhobbes commented 4 months ago

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

YuvrajSinghGitbub commented 4 months ago

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?

SergeyDjam commented 4 months ago

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

YuvrajSinghGitbub commented 4 months ago

It is working! I go zed working, on dedicated nvidia gpu, with smooth EVERYTHING. My system:

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:

Then launch zed as: VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json /usr/bin/zeditor .

ReillyBrogan commented 4 months ago

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

kvark commented 4 months ago

@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.

j1elo commented 4 months ago

please provide the output with RUST_LOG=blade_graphics=debug environment.

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:

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.

kvark commented 4 months ago

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:

  1. 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.
  2. 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.

mikayla-maki commented 4 months ago

@kvark As you’re volunteering here, I’ll defer to your interest in general.

As for how Zed prioritizes things, if we can get a hot fix for the dynamic rendering out quickly, that would be a nice fast win for a lot of people. That said, on the long term having a reliable OpenGL fallback (perhaps we can choose between vulkan and OpenGl at runtime?) would be even better. We want to make a web port at some point and the OpenGL backend will be essential for it.

j1elo commented 4 months ago

Doesn't Ubuntu-20.04 allow getting driver updates past year 2020? I.e. do you have the latest packages from "focal-updates" channel?

Some more info I've found out:

With this newer version of the package, zed now starts up correctly!

Full command output: ```console $ RUST_LOG='blade_graphics=debug' zed --foreground . [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::init] Enabling color space support [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::init] Adapter "Intel(R) Iris(R) Pro Graphics 6200 (BDW GT3)" [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::init] No ray tracing extensions are supported [2024-07-15T11:22:44+02:00 DEBUG blade_graphics::hal::init] Adapter AdapterCapabilities { api_version: 4202627, properties: PhysicalDeviceProperties { api_version: 4206870, driver_version: 100667395, vendor_id: 32902, device_id: 5666, device_type: INTEGRATED_GPU, device_name: Ok( "Intel(R) Iris(R) Pro Graphics 6200 (BDW GT3)", ), pipeline_cache_uuid: [ 233, 211, 99, 32, 243, 212, 47, 139, 207, 222, 5, 247, 97, 50, 192, 99, ], limits: PhysicalDeviceLimits { max_image_dimension1_d: 16384, max_image_dimension2_d: 16384, max_image_dimension3_d: 2048, max_image_dimension_cube: 16384, max_image_array_layers: 2048, max_texel_buffer_elements: 134217728, max_uniform_buffer_range: 134217728, max_storage_buffer_range: 1073741824, max_push_constants_size: 128, max_memory_allocation_count: 4294967295, max_sampler_allocation_count: 65536, buffer_image_granularity: 1, sparse_address_space_size: 0, max_bound_descriptor_sets: 32, max_per_stage_descriptor_samplers: 65535, max_per_stage_descriptor_uniform_buffers: 64, max_per_stage_descriptor_storage_buffers: 65535, max_per_stage_descriptor_sampled_images: 128, max_per_stage_descriptor_storage_images: 64, max_per_stage_descriptor_input_attachments: 64, max_per_stage_resources: 231, max_descriptor_set_samplers: 393210, max_descriptor_set_uniform_buffers: 384, max_descriptor_set_uniform_buffers_dynamic: 8, max_descriptor_set_storage_buffers: 393210, max_descriptor_set_storage_buffers_dynamic: 8, max_descriptor_set_sampled_images: 768, max_descriptor_set_storage_images: 384, max_descriptor_set_input_attachments: 256, max_vertex_input_attributes: 29, max_vertex_input_bindings: 31, max_vertex_input_attribute_offset: 2047, max_vertex_input_binding_stride: 2048, max_vertex_output_components: 128, max_tessellation_generation_level: 64, max_tessellation_patch_size: 32, max_tessellation_control_per_vertex_input_components: 128, max_tessellation_control_per_vertex_output_components: 128, max_tessellation_control_per_patch_output_components: 128, max_tessellation_control_total_output_components: 2048, max_tessellation_evaluation_input_components: 128, max_tessellation_evaluation_output_components: 128, max_geometry_shader_invocations: 32, max_geometry_input_components: 128, max_geometry_output_components: 128, max_geometry_output_vertices: 256, max_geometry_total_output_components: 1024, max_fragment_input_components: 116, max_fragment_output_attachments: 8, max_fragment_dual_src_attachments: 1, max_fragment_combined_output_resources: 65607, max_compute_shared_memory_size: 65536, max_compute_work_group_count: [ 65535, 65535, 65535, ], max_compute_work_group_invocations: 1024, max_compute_work_group_size: [ 1024, 1024, 1024, ], sub_pixel_precision_bits: 8, sub_texel_precision_bits: 8, mipmap_precision_bits: 8, max_draw_indexed_index_value: 4294967295, max_draw_indirect_count: 4294967295, max_sampler_lod_bias: 16.0, max_sampler_anisotropy: 16.0, max_viewports: 16, max_viewport_dimensions: [ 16384, 16384, ], viewport_bounds_range: [ -32768.0, 32767.0, ], viewport_sub_pixel_bits: 13, min_memory_map_alignment: 4096, min_texel_buffer_offset_alignment: 16, min_uniform_buffer_offset_alignment: 64, min_storage_buffer_offset_alignment: 4, min_texel_offset: -8, max_texel_offset: 7, min_texel_gather_offset: -32, max_texel_gather_offset: 31, min_interpolation_offset: -0.5, max_interpolation_offset: 0.4375, sub_pixel_interpolation_offset_bits: 4, max_framebuffer_width: 16384, max_framebuffer_height: 16384, max_framebuffer_layers: 2048, framebuffer_color_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, framebuffer_depth_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, framebuffer_stencil_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, framebuffer_no_attachments_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, max_color_attachments: 8, sampled_image_color_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, sampled_image_integer_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, sampled_image_depth_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, sampled_image_stencil_sample_counts: TYPE_1 | TYPE_2 | TYPE_4 | TYPE_8, storage_image_sample_counts: TYPE_1, max_sample_mask_words: 1, timestamp_compute_and_graphics: 1, timestamp_period: 80.0, max_clip_distances: 8, max_cull_distances: 8, max_combined_clip_and_cull_distances: 8, discrete_queue_priorities: 2, point_size_range: [ 0.125, 255.875, ], line_width_range: [ 0.0, 7.9921875, ], point_size_granularity: 0.125, line_width_granularity: 0.0078125, strict_lines: 0, standard_sample_locations: 1, optimal_buffer_copy_offset_alignment: 128, optimal_buffer_copy_row_pitch_alignment: 128, non_coherent_atom_size: 64, }, sparse_properties: PhysicalDeviceSparseProperties { residency_standard2_d_block_shape: 0, residency_standard2_d_multisample_block_shape: 0, residency_standard3_d_block_shape: 0, residency_aligned_mip_size: 0, residency_non_resident_strict: 0, }, }, queue_family_index: 0, layered: false, ray_tracing: false, buffer_marker: false, shader_info: false, full_screen_exclusive: false, bugs: SystemBugs { intel_unable_to_present: false, intel_fix_descriptor_pool_leak: false, }, } [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::init] Using surface present mode MAILBOX [2024-07-15T11:22:44+02:00 WARN blade_graphics::hal::init] Unable to forbid exclusive full screen [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::descriptor] Creating a descriptor pool for at most 16 sets [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::descriptor] Creating a descriptor pool for at most 16 sets [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating texture 0x557c26c85a10 of size 1024x1024x1 and format R8Unorm, name 'atlas', handle 0 [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26c86370 of size 65536, name 'chunk-0', handle 1 [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26ca3890 of size 4096, name 'chunk-0', handle 2 [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26c78a00 of size 4368, name 'chunk-1', handle 3 [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26cda6f0 of size 4096, name 'chunk-2', handle 4 [2024-07-15T11:22:44+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26ce1c40 of size 4368, name 'chunk-3', handle 5 [2024-07-15T11:22:45+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26dfea60 of size 21840, name 'chunk-4', handle 6 [2024-07-15T11:22:45+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26dd5d10 of size 21840, name 'chunk-5', handle 7 [2024-07-15T11:22:48+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c2661da40 of size 21952, name 'chunk-6', handle 8 [2024-07-15T11:22:48+02:00 INFO blade_graphics::hal::resource] Creating buffer 0x557c26e030c0 of size 21952, name 'chunk-7', handle 9 ```
NopeNopeGuy commented 4 months ago

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:

1. 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.

2. 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.

Having KHR_dynamic_rendering makes zed completely broken on legacy Nvidia Kepler based GPUs (and the older ones of course), I believe a OpenGL backend would increase compatibility as many legacy GPUs don't have full Vulkan 1.3 Support

kvark commented 4 months ago

With this newer version of the package, zed now starts up correctly!

That's great news! So we can run fine on Ubuntu-20, we should just make it more clear that a driver update is needed in this case.

Having KHR_dynamic_rendering makes zed completely broken on legacy Nvidia Kepler based GPUs (and the older ones of course), I believe a OpenGL backend would increase compatibility as many legacy GPUs don't have full Vulkan 1.3 Support

Is this because Nvidia doesn't release any Vulkan driver updates for this GPU? Otherwise, again as I mentioned, this extension is not bound to any HW capabilities, it is meant to be supported by all the GPUs in software.

j1elo commented 4 months ago

With this newer version of the package, zed now starts up correctly!

That's great news! So we can run fine on Ubuntu-20, we should just make it more clear that a driver update is needed in this case.

Well I think it would suffice to be explicit about the versions of dependencies that are mandatory.

As it is right now, VK_KHR_dynamic_rendering was generally introduced with Mesa 22.0, as commented in https://github.com/zed-industries/zed/issues/13441#issuecomment-2228057955. So that'd be a hard requirement for Zed and is a good idea to document it as such in installation instructions.

That alone ought to be enough for users to be conscious that they will run into problems if their Mesa version is older (as would generally happen with any software if dependencies are not satisfied!)

In general, having an exhaustive (as much as reasonably possible) list of dependencies is always a good thing, so I think this particular one would be a good thing to state somewhere (and avoid confusion and debugging for other users like me with older systems)

ReillyBrogan commented 4 months ago

So Mesa 22.0 was in Ubuntu 22.04, so that's currently the supported baseline for what distro versions can run Zed currently. Other distro releases with that version of Mesa:

No idea if that's an acceptable baseline or not, but one thing that's for certain is that the UX behind this is currently very poor. It would be better if an appropriate error message was at least printed to the terminal or a popup window shown if launched interactively. That way users at least know why it's not working for them.

Aiq0 commented 4 months ago

I solved it for my hyprland (arch) setup by:

killall -9 zed-editor
unset WAYLAND_DISPLAY; zeditor
SergeyDjam commented 4 months ago

v0.145.1 - ./zed Zed failed to open a window: NoSupportedDeviceFound. See https://zed.dev/docs/linux for troubleshooting steps. ???

vkcube Selected GPU 0: Intel(R) UHD Graphics 620 (KBL GT2), type: 1

vkcubepp Selected GPU 0: Intel(R) UHD Graphics 620 (KBL GT2), type: IntegratedGpu

lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:core-5.0-amd64:core-5.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:lsb-2.0-amd64:lsb-2.0-noarch:lsb-3.0-amd64:lsb-3.0-noarch:lsb-3.1-amd64:lsb-3.1-noarch:lsb-3.2-amd64:lsb-3.2-noarch:lsb-4.0-amd64:lsb-4.0-noarch:lsb-4.1-amd64:lsb-4.1-noarch:lsb-5.0-amd64:lsb-5.0-noarch Distributor ID: RosaDesktopFresh Description: ROSA Desktop Fresh R11.1 Release: 2016.1 Codename: Fresh

ReillyBrogan commented 4 months ago

v0.145.1 - ./zed Zed failed to open a window: NoSupportedDeviceFound. See https://zed.dev/docs/linux for troubleshooting steps. ???

vkcube Selected GPU 0: Intel(R) UHD Graphics 620 (KBL GT2), type: 1

vkcubepp Selected GPU 0: Intel(R) UHD Graphics 620 (KBL GT2), type: IntegratedGpu

lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:core-5.0-amd64:core-5.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:lsb-2.0-amd64:lsb-2.0-noarch:lsb-3.0-amd64:lsb-3.0-noarch:lsb-3.1-amd64:lsb-3.1-noarch:lsb-3.2-amd64:lsb-3.2-noarch:lsb-4.0-amd64:lsb-4.0-noarch:lsb-4.1-amd64:lsb-4.1-noarch:lsb-5.0-amd64:lsb-5.0-noarch Distributor ID: RosaDesktopFresh Description: ROSA Desktop Fresh R11.1 Release: 2016.1 Codename: Fresh

As mentioned earlier in this thread you need to use at least Mesa 22.0 for Zed to work. Your distro appears to be using 20.0 which is too old.

Side note, your distro version appears to be end-of-life and hasn't received any updates in more than 2 years. You should really not be using end-of-life versions of software like that.

NopeNopeGuy commented 4 months ago

Is this because Nvidia doesn't release any Vulkan driver updates for this GPU? Otherwise, again as I mentioned, this extension is not bound to any HW capabilities, it is meant to be supported by all the GPUs in software.

Yes, Nvidia has stopped providing feature updates for those GPUs (from what I have heard, implementing Vulkan 1.3 for kepler based GPUs was not feasible due to architectural limitations)

AnshulBadoni commented 4 months ago

I got the same issue in my Linux mint, I resolved it by installing vulkan drivers you can check it with vulkaninfo | grep "GPU id I have integrated graphics sudo apt install mesa-vulkan-drivers this resolved my issue.

sillybreakfast commented 3 months ago

i've got the same issue. i don't know all the technical details like a lot of you guys, but here's some select information from neofetch:

OS: EndeavourOS x86_64
Kernel: Linux 6.10.3-arch1-1
CPU: AMD Athlon Silver 3050U (2) @ 2.30 GHz
GPU: AMD Radeon Vega Series / Radeon Vega Mobile Series [Integrated]

i would like to note that i recently switched from linux mint to endeavourOS, and it worked fine on mint.

kvark commented 3 months ago

@sillybreakfast it would help to provide the following:

mladenkn commented 3 months ago

I have the same issue, I've installed with the recommended command curl -f https://zed.dev/install.sh | sh . I am using MX Linux.

juanma1331 commented 3 months ago

The same problem. System Info OS: Ubuntu 24.04 LTS GPU: NVIDIA GeForce GTX 780

Version of the vulkan drivers: ii libvulkan1:amd64 1.3.275.0-1build1 amd64 Vulkan loader library ii mesa-vulkan-drivers:amd64 24.0.9-0ubuntu0.1 amd64 Mesa Vulkan graphics drivers ii vulkan-tools 1.3.275.0+dfsg1-1 amd64 Miscellaneous Vulkan utilities

vkcube Yes, I can run it fine.

vulkaninfo_output.txt

output of zed with debug I could not make it work. I didn´t get any output.

kvark commented 3 months ago

@juanma1331 based on your vulkaninfo, this system should run just fine. Could you attach Zed log please? It can be reached with "zed: open log" command.

I see that running Zed executable under the Rust log environment isn't working trivially - Zed forks itself immediately. Perhaps you could check out https://github.com/kvark/blade directly and get these logs:

cd blade
RUST_LOG=blade_graphics=info cargo run --example bunnymark
juanma1331 commented 3 months ago

I started the installation using the command curl -f https://zed.dev/install.sh | sh. After the installation, I attempted to open Zed from the console using zed . within my project directory. A window appeared displaying the message:

Unsupported GPU

Zed uses Vulkan for rendering and requires a compatible GPU.

Currently, you are using a software-emulated GPU (llvmpipe (LLVM 17.0.6, 256 bits)), which will result in poor performance.

For troubleshooting, see: https://zed.dev/docs/linux

For some reason, Zed detected the emulated GPU instead of the actual one.

Next, I tried to force the use of the NVIDIA GPU with the command VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json zed, but I received the following error:

error opening [PathWithPosition { path: "/home/juanma/Desktop/juanma/projects/todos-app/issue.md", row: None, column: None }]: NoSupportedDeviceFound

I got the same error trying to force it using other methods.

The content of nvidia_icd.json is:

{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.2.175"
    }
}

Zed log content: Zed.log

Blade example log: [2024-08-27T06:46:38Z WARN blade_graphics::hal::init] Requested layer is not found: "VK_LAYER_KHRONOS_validation" [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] Enabling Vulkan Portability [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] Enabling color space support [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] Adapter: "NVIDIA GeForce GTX 780" [2024-08-27T06:46:38Z WARN blade_graphics::hal::init] Rejected for device extension "VK_KHR_dynamic_rendering" not supported. Please update the driver! [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] Adapter: "llvmpipe (LLVM 17.0.6, 256 bits)" [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] No ray tracing extensions are supported DeviceInformation { is_software_emulated: true, device_name: "llvmpipe (LLVM 17.0.6, 256 bits)", driver_name: "llvmpipe", driver_info: "Mesa 24.0.9-0ubuntu0.1 (LLVM 17.0.6)" } [2024-08-27T06:46:38Z INFO blade_graphics::hal::init] Using surface present mode MAILBOX [2024-08-27T06:46:38Z WARN blade_graphics::hal::init] Unable to forbid exclusive full screen [2024-08-27T06:46:38Z INFO blade_graphics::hal::resource] Creating texture 0x5c1f3a777180 of size 1x1x1 and format Rgba8Unorm, name 'texutre', handle 0 [2024-08-27T06:46:38Z INFO blade_graphics::hal::resource] Creating buffer 0x5c1f3a8ae630 of size 4, name 'staging', handle 1 [2024-08-27T06:46:38Z INFO blade_graphics::hal::resource] Creating buffer 0x5c1f3a7e3450 of size 32, name 'vertex', handle 2 [2024-08-27T06:46:38Z INFO blade_graphics::hal::descriptor] Creating a descriptor pool for at most 16 sets [2024-08-27T06:46:38Z INFO blade_graphics::hal::descriptor] Creating a descriptor pool for at most 16 sets [2024-08-27T06:46:38Z INFO blade_graphics::hal::resource] Destroying buffer 0x5c1f3a8ae630, handle 1 Avg frame time 5.313371ms Avg frame time 3.870528ms Avg frame time 3.9051604ms Avg frame time 3.904555ms Avg frame time 3.9258904ms Avg frame time 3.893389ms Avg frame time 3.9758544ms Avg frame time 3.9775193ms Avg frame time 3.9279242ms Avg frame time 3.9366806ms Avg frame time 3.957081ms Avg frame time 3.9697583ms Avg frame time 3.9944036ms Avg frame time 3.9505205ms Avg frame time 3.9337587ms Avg frame time 3.9478412ms Avg frame time 3.9392998ms Avg frame time 3.9630044ms Avg frame time 3.9366422ms Avg frame time 3.941885ms Avg frame time 3.9236045ms Avg frame time 3.9079485ms Avg frame time 3.966636ms Avg frame time 3.9201324ms Avg frame time 3.9475238ms Avg frame time 4.022937ms Avg frame time 3.8941934ms Avg frame time 3.88501ms Avg frame time 3.9391687ms Avg frame time 4.1402617ms Avg frame time 3.894999ms Avg frame time 3.9247577ms Avg frame time 3.995947ms Avg frame time 3.92196ms Avg frame time 3.916722ms Avg frame time 3.93521ms Avg frame time 3.9350562ms Avg frame time 3.95609ms Avg frame time 3.9376528ms Avg frame time 3.978061ms Avg frame time 3.8958979ms Avg frame time 3.9243574ms Avg frame time 3.9460719ms Avg frame time 3.9534597ms Avg frame time 3.9267483ms Avg frame time 3.911476ms Avg frame time 4.04109ms Avg frame time 3.998017ms Avg frame time 3.9390078ms Avg frame time 3.963958ms Avg frame time 3.9174466ms Avg frame time 3.9249825ms Avg frame time 3.970502ms Avg frame time 3.9369104ms Avg frame time 3.9316454ms Avg frame time 3.9282732ms Avg frame time 3.9442856ms Avg frame time 3.9625254ms Avg frame time 3.9816537ms [2024-08-27T06:47:02Z INFO blade_graphics::hal::resource] Destroying buffer 0x5c1f3a7e3450, handle 2 [2024-08-27T06:47:02Z INFO blade_graphics::hal::resource] Destroying texture 0x5c1f3a777180, handle 0

kvark commented 3 months ago

Ok, thank you @juanma1331, I see now that the vulkaninfo only lists support for "dynamic rendering" on the software implementation. Looks like NVidia isn't releasing a driver update for this GPU with newer Vulkan features.

l4b4r4b4b4 commented 2 months ago

the issue appeared after a kernel upgrade on fedora 40 KDE with vulkan. It resolved for me after debuggin vulkan configuration, rebuilding NVIDIA kernel modules.

  1. Update and Rebuild NVIDIA Kernel Modules Sometimes, kernel updates can cause issues with the NVIDIA driver. Rebuild the kernel modules:
sudo akmods --force
sudo dracut --force
  1. Check vulkan status
    vulkaninfo
  2. Check VK_ICD_FILENAMES env var
    echo $VK_ICD_FILENAMES
  3. Set it in .bashhrc if not set correctly.
Dzyanino commented 2 months ago

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 .

This almost worked for me Im using :

  • Plain Arch Linux
  • KDE plasma 6.1.5 (wayland)
  • kernel: 6.10.9-arch1-2 (64-bit)
  • nvidia: 560.35.03

Both vkcube and vulkaninfo works fine

A Zed window pops up but then stucks, before going all black

kdh8219 commented 1 month ago

Now it works without any additional actions!

screenshot-2024-10-16-11:43:03