Open bknightInfo opened 2 months ago
Try launching it from command line with DRI_PRIME=1 zed .
?
This might be related to #17129 and #16863 where Zed is trying to use the integrated GPU
Same problem on Zed version: 0.152.3, DRI_PRIME=1
doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPU
Same here, no internal/external GPU, NixOS, Wayland. With XWayland it works:
WAYLAND_DISPLAY= DISPLAY=:0 zed --foreground .
With native wayland I get the following log:
OS: NixOS 24.11.20240913.345c263 (Vicuna) x86_64 Kernel: Linux 6.10.7-zen1 Display (PHL 258B6QU): 1440x2560 @ 60 Hz in 25″ [External] Display (LEN T27p-10): 3840x2160 @ 60 Hz in 27″ [External] WM: Hyprland (Wayland) CPU: AMD Ryzen 7 5800X (16) @ 3.80 GHz GPU: AMD Radeon RX 6800 XT [Discrete]
Same problem on Zed version: 0.152.3,
DRI_PRIME=1
doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPUZed version: 0.151.2 logs Zed version: 0.152.3 logs
In your case I see a NVIDIA GPU. You might have success with what worked for me when using the NVIDIA 560 drivers.
I have found another solution that worked for me. Reading Arch documentation on the NVIDIA drivers there are two kernel settings mentioned. With current 560 drivers provided with Arch and these two kernel parameters zed is launching perfectly fine. I won't claim to fully understand the ramifications of these settings, but they do mention being required for Wayland compositors to work properly.
Reference: https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
nvidia_drm.modeset=1 nvidia_drm.fbdev=1
Same problem on Zed version: 0.152.3,
DRI_PRIME=1
doesn't help and Idk why but Zed version 0.152.3 uses only integrated GPU, Zed version 0.151.2 use external GPU Zed version: 0.151.2 logs Zed version: 0.152.3 logsIn your case I see a NVIDIA GPU. You might have success with what worked for me when using the NVIDIA 560 drivers.
I have found another solution that worked for me. Reading Arch documentation on the NVIDIA drivers there are two kernel settings mentioned. With current 560 drivers provided with Arch and these two kernel parameters zed is launching perfectly fine. I won't claim to fully understand the ramifications of these settings, but they do mention being required for Wayland compositors to work properly.
Reference: https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
nvidia_drm.modeset=1 nvidia_drm.fbdev=1
Thanks, but it didn't help, this is what's happening
Zed version: 0.151.2 - works, no problems:
Zed version: >= 0.152.3 - "works", but I can't do anything bc GUI is not displayed:
I found a solution for Zed version: >= 0.152.3 - https://github.com/zed-industries/zed/issues/17129#issuecomment-2353282286 but it's only works with integrated gpu.
This does work
WAYLAND_DISPLAY= DISPLAY=:0 zeditor
This indeed works. But looks like disabling use of integrated gpu and forcing the use of discrete GPU works in case of AMD.
On NixOS, you just need to run DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 zed
to successfully launch zed under Wayland.
Zed Ver: 0.152.4 OS: NixOS Unstable 24.11 Memory: 16 GiB Architecture: x86_64 CPU: AMD Ryzen 5 7600 GPU: AMD Radeon RX 6500 XT
@bknightInfo Is it ok to close this issue?
Of course not, zed still does not work with integrated graphics.
Forcing discrete graphics is a very inefficient and weird solution, especially for people who do not have them.
Could you paste your graphics card driver details/versions?
vulkaninfo --summary |sed -n -e '/Devices:/,$p'
I have both amdvlk and radv.
vulkaninfo --summary |sed -n -e '/Devices:/,$p'
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/zxhjnh2d440bhli0zck18s10hcq07qpp-mesa-24.2.2-drivers/lib/libvulkan_virtio.so. Skipping this driver.
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/zxhjnh2d440bhli0zck18s10hcq07qpp-mesa-24.2.2-drivers/lib/libvulkan_dzn.so. Skipping this driver.
Devices:
========
GPU0:
apiVersion = 1.3.280
driverVersion = 2.0.302
vendorID = 0x1002
deviceID = 0x743f
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = AMD Radeon RX 6500 XT
driverID = DRIVER_ID_AMD_PROPRIETARY
driverName = AMD proprietary driver
driverInfo = (AMD proprietary shader compiler)
conformanceVersion = 1.3.5.2
deviceUUID = 00000000-0300-0000-0000-000000000000
driverUUID = 414d442d-4c49-4e55-582d-445256000000
GPU1:
apiVersion = 1.3.293
driverVersion = 2.0.318
vendorID = 0x1002
deviceID = 0x743f
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = AMD Radeon RX 6500 XT
driverID = DRIVER_ID_AMD_OPEN_SOURCE
driverName = AMD open-source driver
driverInfo = 2024.Q3.2 (LLPC)
conformanceVersion = 1.3.5.2
deviceUUID = 00000000-0300-0000-0000-000000000000
driverUUID = 414d442d-4c49-4e55-582d-445256000000
GPU2:
apiVersion = 1.3.280
driverVersion = 2.0.302
vendorID = 0x1002
deviceID = 0x164e
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = AMD Radeon Graphics
driverID = DRIVER_ID_AMD_PROPRIETARY
driverName = AMD proprietary driver
driverInfo = (AMD proprietary shader compiler)
conformanceVersion = 1.3.5.2
deviceUUID = 00000000-1200-0000-0000-000000000000
driverUUID = 414d442d-4c49-4e55-582d-445256000000
GPU3:
apiVersion = 1.3.293
driverVersion = 2.0.318
vendorID = 0x1002
deviceID = 0x164e
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = AMD Radeon Graphics
driverID = DRIVER_ID_AMD_OPEN_SOURCE
driverName = AMD open-source driver
driverInfo = 2024.Q3.2 (LLPC)
conformanceVersion = 1.3.5.2
deviceUUID = 00000000-1200-0000-0000-000000000000
driverUUID = 414d442d-4c49-4e55-582d-445256000000
I know it's a PITA but would you be willing to test zed with only the open source driver (uninstall the proprietary driver, restart, then launch zed) and then again with only the proprietary driver (uninstall the open source, restart and relaunch zed) and see if either of those configurations works better than your current config with both drivers?
I seen multiple folks reporting the various environment variables for selecting drivers not behaving quite as expected (e.g. only disabling the proprietary shader compiler not the entire proprietary driver), but once they just had a single driver things behaved better.
My work arounds no longer work anymore so I will switch back unfortunately to vs code still its resolved
`╰▮~↕2▮◗ WAYLAND_DISPLAY= DISPLAY=:0 zeditor --foreground .
Authorization required, but no authorization protocol specified
thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:253:75:
called Result::unwrap()
on an Err
value: IoError(Custom { kind: Other, error: UnknownError })
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace`
FWIW, this seems to be partly a Hyprland issue.
I use Sway as well as Labwc (both Wayland compositors) and have had no troubles with Zed.
To get Hyprland to start, I used the workaround mentioned above.
WAYLAND_DISPLAY= zeditor
OS: Arch Linux 2024-10-03 Kernel: Linux 6.10.10-arch1-1 Display (0x1239): 1920x1080 @ 60 Hz in 12″ [Internal] WM: Hyprland (Wayland) CPU: ntel(R) Core(TM) i7-6600U CPU @ 2.60GHz GPU: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
To get Hyprland to start, I used the workaround mentioned above.
WAYLAND_DISPLAY= zeditor
This just makes it start in a XWayland session instead, not in native Wayland.
So the problem is we can't launch zed on Wayland-native on integrated GPUs.
To get Hyprland to start, I used the workaround mentioned above.
On another note, I can seem to start zed in native Wayland just fine after updating my system today (with the latest hyprland-git
). @madr Could you try with latest hyprland-git
(compile from source if possible) and get back?
I'm sorry, but the problem seems to have gone away for me now due to a user error on my part.
I found out I had some unpurged junk from the flatpak version of Zed, and by removing that and rebooting the system zeditor
starts just fine on Hyprland.
So sorry for the confusion.
I get the same problem on WSL, ubuntu 22
RUST_BACKTRACE=full WAYLAND_DISPLAY='' zed --foreground
MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Software caused connection abort
thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:253:75:
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: UnknownError })
stack backtrace:
0: 0x56235150740b - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1b9dad2a88e955ff
1: 0x56234e4ecd6b - core::fmt::write::h4b5a1270214bc4a7
2: 0x5623515025b3 - std::io::Write::write_fmt::hd04af345a50c312d
3: 0x562351508b7a - std::panicking::default_hook::{{closure}}::h96ab15e9936be7ed
4: 0x5623515087c7 - std::panicking::default_hook::h3cacb9c27561ad33
5: 0x5623515091d9 - std::panicking::rust_panic_with_hook::hfe205f6954b2c97b
6: 0x5623515090e7 - std::panicking::begin_panic_handler::{{closure}}::h6cb44b3a50f28c44
7: 0x5623515078d9 - std::sys::backtrace::__rust_end_short_backtrace::hf1c1f2a92799bb0e
8: 0x562351508d74 - rust_begin_unwind
9: 0x56234d4a3ba3 - core::panicking::panic_fmt::h3d8fc78294164da7
10: 0x56234d4a4076 - core::result::unwrap_failed::hfa79a499befff387
11: 0x56234f83d03b - gpui::platform::linux::x11::client::X11Client::new::h59a357ad411ae55d
12: 0x56234f865ac4 - gpui::platform::current_platform::h96b487c79e0c602b
13: 0x56234f7a0462 - gpui::app::App::new::h27fac0bae26d2f79
14: 0x562352a2920c - zed::main::h8da14df5f3fb4fad
15: 0x562352a38c83 - std::sys::backtrace::__rust_begin_short_backtrace::h519a7d001e55d3f7
16: 0x5623528e79d9 - std::rt::lang_start::{{closure}}::h852a4999c8ab47b0
17: 0x5623514f7815 - std::rt::lang_start_internal::h5e7c81cecd7f0954
18: 0x562352a2eabc - main
19: 0x7f1e7ef78d90 - <unknown>
20: 0x7f1e7ef78e40 - __libc_start_main
21: 0x56234d73e55e - _start
22: 0x0 - <unknown>
if i try to run with
$ WAYLAND_DISPLAY= DISPLAY=:0 zed --foreground .
[2024-10-05T14:29:05+03:00 ERROR fs] No such file or directory (os error 2) about ["/home/uri/.config/github-copilot"]
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
and i get unsupported GPU
Check for existing issues
Describe the bug / provide steps to reproduce it
With the latest update Zed doesn't seem to working on Linux as it just won't run. I am thinking its probably a bug with Wayland since no one else seems to be reporting it.
No real steps it just wont run
error: "payload": "called
Result::unwrap()
on anErr
value: ERROR_INITIALIZATION_FAILED",Environment
Zed Ver: 0.152.3 OS: Arch Linux Wayland Memory: 32 GiB Architecture: x86_64 CPU: AMD Ryzen 7 3700X GPU: AMD Radeon RX 6700 XT
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.Zed.log