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
46.63k stars 2.65k forks source link

Zed appears as a black rectangle. #14191

Open barryrowlingson opened 1 month ago

barryrowlingson commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Running zed opens a new window, but its a black rectangle. The mouse cursor changes to an I-beam text cursor in what I guess are the right places, and I can resize it via edges and corners, but it remains a black rectangle.

Environment

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

vkcube detects my GPU as:

$ vkcube
Selected GPU 0: Quadro K4000, type: 2

vkcube also runs with these two --gpu_number settings:

$ vkcube --gpu_number 0 --c 50
Selected GPU 0: Quadro K4000, type: 2
$ vkcube --gpu_number 1 --c 50
Selected GPU 1: llvmpipe (LLVM 15.0.7, 256 bits), type: 4

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

No response

If applicable, attach your Zed.log file to this issue.

At a guess I think this is telling us that although vkcube uses my GPU (see above) zed is failing to use it.

Zed.log

2024-07-11T12:28:21+01:00 [WARN] Rejected for device extension "VK_KHR_dynamic_rendering" not supported
2024-07-11T12:28:21+01:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

(then lots of...)

2024-07-11T12:28:23+01:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 3 }
2024-07-11T12:28:26+01:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 4 }
2024-07-11T12:28:26+01:00 [INFO] Using surface present mode MAILBOX
2024-07-11T12:28:26+01:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T12:28:26+01:00 [INFO] Using surface present mode MAILBOX
2024-07-11T12:28:26+01:00 [WARN] Unable to forbid exclusive full screen
2024-07-11T12:28:26+01:00 [INFO] Using surface present mode MAILBOX

JaapBarnhoorn commented 1 month ago

I have the same issue using Ubuntu 20.04, upgraded to vulkan 1.3

Logs 2024-07-13T16:06:25+02:00 [INFO] ========== starting zed ========== 2024-07-13T16:06:25+02:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true 2024-07-13T16:06:25+02:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true 2024-07-13T16:06:25+02:00 [INFO] perform; 2024-07-13T16:06:25+02:00 [INFO] read_command; 2024-07-13T16:06:25+02:00 [INFO] read_command; 2024-07-13T16:06:25+02:00 [INFO] Opening main db 2024-07-13T16:06:25+02:00 [INFO] socket reader; 2024-07-13T16:06:25+02:00 [INFO] new; 2024-07-13T16:06:25+02:00 [INFO] keep_updated; 2024-07-13T16:06:25+02:00 [INFO] Using git binary path: None 2024-07-13T16:06:25+02:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0 2024-07-13T16:06:25+02:00 [INFO] activate is not implemented on Linux, ignoring the call 2024-07-13T16:06:25+02:00 [INFO] Opening main db 2024-07-13T16:06:25+02:00 [INFO] perform; 2024-07-13T16:06:25+02:00 [INFO] read_command; 2024-07-13T16:06:25+02:00 [INFO] read_command; 2024-07-13T16:06:25+02:00 [INFO] socket reader; 2024-07-13T16:06:25+02:00 [INFO] Using Visual { id: 84, colormap: 0, depth: 32 } 2024-07-13T16:06:25+02:00 [INFO] Creating colormap 60817411 2024-07-13T16:06:25+02:00 [INFO] building git repository, `.git` path in the worktree: ".git" 2024-07-13T16:06:25+02:00 [INFO] Enabling Vulkan Portability 2024-07-13T16:06:25+02:00 [INFO] Enabling color space support 2024-07-13T16:06:25+02:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)" 2024-07-13T16:06:25+02:00 [INFO] No ray tracing extensions are supported 2024-07-13T16:06:25+02:00 [INFO] Using surface present mode MAILBOX 2024-07-13T16:06:25+02:00 [WARN] Unable to forbid exclusive full screen 2024-07-13T16:06:25+02:00 [INFO] Creating a descriptor pool for at most 16 sets 2024-07-13T16:06:25+02:00 [INFO] Creating a descriptor pool for at most 16 sets 2024-07-13T16:06:25+02:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored } 2024-07-13T16:06:25+02:00 [INFO] Refreshing at 17250 micros 2024-07-13T16:06:25+02:00 [INFO] Using surface present mode MAILBOX 2024-07-13T16:06:25+02:00 [WARN] Unable to forbid exclusive full screen 2024-07-13T16:06:26+02:00 [INFO] Using surface present mode MAILBOX 2024-07-13T16:06:26+02:00 [WARN] Unable to forbid exclusive full screen 2024-07-13T16:06:26+02:00 [INFO] Opening main db 2024-07-13T16:06:26+02:00 [INFO] set environment variables from shell:/bin/bash, path:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/jbarnhoorn/.local/bin:/home/jbarnhoorn/bin:/home/jbarnhoorn/.local/share/pnpm:/opt/maven/bin:/home/{INSERT IT HERE}/.local/share/pnpm:/home/jbarnhoorn/.nvm/versions/node/v22.0.0/bin:/home/jbarnhoorn/.cargo/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/jbarnhoorn/.local/bin:/home/jbarnhoorn/bin:/opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 2024-07-13T16:06:26+02:00 [INFO] Using surface present mode MAILBOX 2024-07-13T16:06:26+02:00 [WARN] Unable to forbid exclusive full screen

I'm running it on a VDI (VMWare) with the only option to use llvmpipe as a "GPU". I see Zed is trying to use llvmpipe in your instance as well. Maybe try to have it pick your actual GPU. Maybe it's not picking your GPU because it does not support VK_KHR_dynamic_rendering