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
47.75k stars 2.79k forks source link

doesn't launch on arch/kde plasma #14076

Open ralyodio opened 2 months ago

ralyodio commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

$ zed .
error opening [PathLikeWithPosition { path_like: "/home/ettinger/src/skatespot.com/skatespot-web", row: None, column: None }]: NoSupportedDeviceFound

Environment

arch linux kde

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.

Zed.log


SomeoneToIgnore commented 2 months ago

NoSupportedDeviceFound error makes this to look like a duplicate of

brielov commented 2 months ago

Just tested it on a fresh archlinux installation with kde plasma and got the same issue.

shaaanuu commented 2 months ago

arch+openbox.... same problem

ralyodio commented 2 months ago

my guess is it's a wayland issue

shaaanuu commented 2 months ago

mine is x11

sschuberth commented 2 months ago

Not sure if it's related as I'm on Fedora 40, not Arch Linux, but I'm also running KDE / Wayland and just nothing happens when launching zed (installed from the nightly RPM). strace zed gives:

execve("/usr/bin/zed", ["zed"], 0x7fffe5137070 /* 90 vars */) = 0
brk(NULL)                               = 0x5595ea285000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=133695, ...}) = 0
mmap(NULL, 133695, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f85f4cf7000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=190552, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f85f4cf5000
mmap(NULL, 184776, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f85f4cc7000
mmap(0x7f85f4ccb000, 147456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f85f4ccb000
mmap(0x7f85f4cef000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7f85f4cef000
mmap(0x7f85f4cf3000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2c000) = 0x7f85f4cf3000
mmap(0x7f85f4cf4000, 456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f85f4cf4000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\242\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
fstat(3, {st_mode=S_IFREG|0755, st_size=2440240, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2034544, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f85f4ad6000
mmap(0x7f85f4afe000, 1495040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7f85f4afe000
mmap(0x7f85f4c6b000, 319488, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x7f85f4c6b000
mmap(0x7f85f4cb9000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e2000) = 0x7f85f4cb9000
mmap(0x7f85f4cbf000, 31600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f85f4cbf000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f85f4ad3000
arch_prctl(ARCH_SET_FS, 0x7f85f4ad3840) = 0
set_tid_address(0x7f85f4ad3b10)         = 425387
set_robust_list(0x7f85f4ad3b20, 24)     = 0
rseq(0x7f85f4ad4160, 0x20, 0, 0x53053053) = 0
mprotect(0x7f85f4cb9000, 16384, PROT_READ) = 0
mprotect(0x7f85f4cf3000, 4096, PROT_READ) = 0
mprotect(0x5595bdff4000, 32768, PROT_READ) = 0
mprotect(0x7f85f4d51000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f85f4cf7000, 133695)          = 0
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f85f4b16d00}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
getrandom("\x22\xa3\xda\x6f\xdc\x1a\xe4\xb0", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5595ea285000
brk(0x5595ea2a6000)                     = 0x5595ea2a6000
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "5595bdf07000-5595bdf14000 r--p 0"..., 1024) = 1024
read(3, "so.6\n7f85f4cbf000-7f85f4cc7000 r"..., 1024) = 1024
read(3, "d51000-7f85f4d53000 r--p 0003300"..., 1024) = 369
close(3)                                = 0
sched_getaffinity(425387, 32, [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]) = 8
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x5595bdfba060, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f85f4b16d00}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x5595bdfba060, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f85f4b16d00}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f85f4d15000
mprotect(0x7f85f4d15000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0x7f85f4d16000, ss_flags=0, ss_size=8192}, NULL) = 0
readlink("/proc/self/exe", "/usr/bin/zed", 256) = 12
readlink("/usr", 0x7ffe57c061b0, 1023)  = -1 EINVAL (Invalid argument)
readlink("/usr/libexec", 0x7ffe57c061b0, 1023) = -1 EINVAL (Invalid argument)
readlink("/usr/libexec/zed-editor", 0x7ffe57c061b0, 1023) = -1 EINVAL (Invalid argument)
getcwd("/home/sebastian/Development/GitHub/eclipse-apoapsis/ort-server", 512) = 63
socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
mkdir("/tmp/.tmp8yF6CI", 0777)          = 0
bind(3, {sa_family=AF_UNIX, sun_path="/tmp/.tmp8yF6CI/socket"}, 110) = 0
listen(3, 10)                           = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f85f4b6a490, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f85f4b16d00}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f85f4800000
mprotect(0x7f85f4801000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f85f4a00990, parent_tid=0x7f85f4a00990, exit_signal=0, stack=0x7f85f4800000, stack_size=0x1ffe80, tls=0x7f85f4a006c0} => {parent_tid=[425388]}, 88) = 425388
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4
connect(4, {sa_family=AF_UNIX, sun_path="/home/sebastian/.local/share/zed/zed-nightly.sock"}, 52) = 0
write(4, "zed-cli:///tmp/.tmp8yF6CI/socket", 32) = 32
close(4)                                = 0
futex(0x7f85f4a00990, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, 425388, NULL, FUTEX_BITSET_MATCH_ANY) = ?
+++ exited with 0 +++
burakcyildiz commented 2 months ago

Not sure if related to the initial post, but I have a similar issue on Arch / KDE Plasma 6 as well. The main difference is that it opens fine if I run zed in console, but it does not open if I use the .desktop file. In the latter case, a zed-editor process starts fine just like the console invocation, but no window pops up. I have tested on Wayland, and vkcube works fine

This issue happens for me for both the packaged Arch version, as well as the installer script from https://zed.dev/install.sh.

Can provide more info (or open a separate issue) if needed

Small update: The .desktop file opens the app fine on an X11 session. So my issue seems to be somehow related to Wayland. However, as I mentioned above, vkcube works fine, and the app starts fine if I invoke the zed command directly from the terminal. Very curious

m1guer commented 2 months ago

if you are using some radeon as graphic is recommended install vulkan-radeon. https://github.com/zed-industries/zed/issues/13441#issuecomment-2215489926

brielov commented 2 months ago

I'm using a hybrid laptop with a ryzen 7 and a nvidia 3050. I think I've only installed nouveau drivers using arch install

brielov commented 2 months ago

I'm using a hybrid laptop with a ryzen 7 and a nvidia 3050. I think I've only installed nouveau drivers using arch install

Yep, vulkan-radeon did the trick

pranithk commented 2 months ago

Same issue on ubuntu It does launch the process in the background. Just the window is not opening I think

pranith.karampuri@PP-3MQF273 - ~ 
06:59:42 :) ⚡ zed .
error opening [PathLikeWithPosition { path_like: "/home/pranith.karampuri", row: None, column: None }]: NoSupportedDeviceFound

pranith.karampuri@PP-3MQF273 - ~ 
07:01:46 :( ⚡ ps aux | grep zed
pranith+    6923 71.1  2.1 13959584 689124 ?     Ssl  07:00   1:21 /home/pranith.karampuri/.local/zed.app/libexec/zed-editor zed-cli:///tmp/.tmp94l18A/socket
pranith+    6985  0.7  0.2 791744 75752 ?        Sl   07:00   0:00 /home/pranith.karampuri/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node /home/pranith.karampuri/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js --stdio
pranith+    7604  0.0  0.0   8908   720 pts/0    S+   07:02   0:00 grep zed
burakcyildiz commented 2 months ago

I have figured my issue out, so I will just do a small write-up in case someone else has the same issue and wants to resolve it (the issue being zed opening fine from the command line but not through a .desktop file):

I have an AMD GPU and have multiple vulkan drivers installed for it (the AMDGPU pro drivers and mesa - aka, vulkan-radeon). To enforce the mesa drivers by default, I have this line in my .zshrc file:

export VK_DRIVER_FILES=/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json

Under an X session, this file is loaded on startup, even if a terminal session is not opened. Under Wayland, it is only read if the command is being invoked from a terminal session (hence it works fine if I call zed from the terminal). If they are not set properly, the desktop session tries to open zed using the AMDGPU pro drivers instead of mesa, and fails

There are two solutions that works for this situation based on my tests:

Obviously, this problem would not occur for people who use only the mesa drivers with an AMD GPU, so it is only a problem for this specific configuration

Please Note: This problem and solution is not related to the topic of this issue. I just wanted to give closure to the problem I typed above in the thread, and hopefully help other people with the same problem that potentially stumble upon this thread thinking it's related

zelfroster commented 1 month ago

Same issue on ubuntu It does launch the process in the background. Just the window is not opening I think

pranith.karampuri@PP-3MQF273 - ~ 
06:59:42 :) ⚡ zed .
error opening [PathLikeWithPosition { path_like: "/home/pranith.karampuri", row: None, column: None }]: NoSupportedDeviceFound

pranith.karampuri@PP-3MQF273 - ~ 
07:01:46 :( ⚡ ps aux | grep zed
pranith+    6923 71.1  2.1 13959584 689124 ?     Ssl  07:00   1:21 /home/pranith.karampuri/.local/zed.app/libexec/zed-editor zed-cli:///tmp/.tmp94l18A/socket
pranith+    6985  0.7  0.2 791744 75752 ?        Sl   07:00   0:00 /home/pranith.karampuri/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node /home/pranith.karampuri/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js --stdio
pranith+    7604  0.0  0.0   8908   720 pts/0    S+   07:02   0:00 grep zed

Install vulkan driver according to your graphics card and distro. On Arch, I was getting same error. Then installed amdvlk but got this error

  in ~ ❯ zed .                                  
error opening [PathWithPosition { path: "/home/zel", row: None, column: None }]: VulkanError(ERROR_INCOMPATIBLE_DRIVER)

  in ~ ❯ ps aux | grep zed    
zel        52671 47.7  2.9 5640536 457208 ?      Ssl  11:15   1:39 /home/zel/.local/zed.app/libexec/zed-editor zed-cli:///tmp/.tmphU77tH/socket
zel        52984  0.2  0.5 1182024 86960 ?       Sl   11:15   0:00 /home/zel/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node /home/zel/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js --stdio
zel        54978  0.0  0.0   6392  3936 pts/0    S+   11:18   0:00 grep zed

After that, I uninstalled amdvlk and installed vulkan-radeon and It worked.

sschuberth commented 1 month ago

Actually, for me it now "just works" on Fedora 40 with the latest nightly build.