Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wezterm crashes while using WebGPU backend with NVIDIA 560 drivers #6050

Closed
buraksirma opened this issue Aug 27, 2024 · 13 comments
Closed

Wezterm crashes while using WebGPU backend with NVIDIA 560 drivers #6050

buraksirma opened this issue Aug 27, 2024 · 13 comments
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. Wayland

Comments

@buraksirma
Copy link

buraksirma commented Aug 27, 2024

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Hyrpland

WezTerm version

20240812-215703-30345b36

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I'm not sure if it's related to nvidia driver updates but today I started my pc and saw wezterm getting closed automatically around 30~ seconds after its start. Reverting backend to the OpenGL fixed the issue on my side.

OS: EndeavourOs
WM: Hyprland (Wayland)
Nvidia Driver Version: NVIDIA 560.35.03

To Reproduce

No response

Configuration

no config

Expected Behavior

No response

Logs

21:07:52.512  WARN   window::os::wayland::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
21:07:52.651  WARN   wezterm_gui::termwindow::resize > cannot resize window to match Some(RowsAndCols { rows: 78, cols: 143 }) because window_state is MAXIMIZED
fish: Job 1, 'wezterm' terminated by signal SIGSEGV (Address boundary error)

Anything else?

No response

@buraksirma buraksirma added the bug Something isn't working label Aug 27, 2024
@buraksirma buraksirma changed the title Wezterm shuts down automatically while using WebGL backend with NVIDIA 560 drivers. Wezterm shuts down automatically while using WebGPU backend with NVIDIA 560 drivers. Aug 28, 2024
@buraksirma buraksirma changed the title Wezterm shuts down automatically while using WebGPU backend with NVIDIA 560 drivers. Wezterm crashes while using WebGPU backend with NVIDIA 560 drivers. Aug 28, 2024
@buraksirma buraksirma changed the title Wezterm crashes while using WebGPU backend with NVIDIA 560 drivers. Wezterm crashes while using WebGPU backend with NVIDIA 560 drivers Aug 28, 2024
@nezia1
Copy link

nezia1 commented Aug 29, 2024

Having a similar issue on NixOS, using mutter as my compositor. My nvidia driver version is 560.35.03.

ERROR: wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)

That's what I have in my logs. When I launch it from the CLI, I get a SIGV (Address Boundary Error). I assume it has to do with wayland / Nvidia / explicit sync, but I'm not too sure how to troubleshoot it.

@TraceLD
Copy link

TraceLD commented Aug 29, 2024

Having a similar issue on NixOS, using mutter as my compositor. My nvidia driver version is 560.35.03.

ERROR: wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)

That's what I have in my logs. When I launch it from the CLI, I get a SIGV (Address Boundary Error). I assume it has to do with wayland / Nvidia / explicit sync, but I'm not too sure how to troubleshoot it.

Seems the same issue as I'm having in #6060 , gdb gives the following backtrace:

Thread 1 "wezterm-gui" received signal SIGSEGV, Segmentation fault.
0x00007fffedc10857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
(gdb) bt
#0  0x00007fffedc10857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#1  0x00007fffee0279e9 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#2  0x00007fffee00d380 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#3  0x00007fffedf4b78e in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#4  0x00007fffd6de3714 in DispatchWaitForFences (device=0x55555f6093a0, fenceCount=1, pFences=0x7fffffff5ab0, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.275/layers/vulkan/generated/layer_chassis_dispatch.cpp:799
#5  0x00007fffd6cb8c63 in vulkan_layer_chassis::WaitForFences (device=0x55555f6093a0, fenceCount=1, pFences=0x7fffffff5ab0, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.275/layers/vulkan/generated/chassis.cpp:1824
#6  0x0000555556eaa784 in ash::device::Device::wait_for_fences (self=0x55555f5e9148, fences=..., wait_all=true, timeout=18446744073709551615)
    at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ash-0.37.3+1.3.251/src/device.rs:2399
#7  0x0000555556f378e4 in wgpu_hal::vulkan::instance::{impl#5}::acquire_texture (self=0x55555f3f03e8, timeout=...) at src/vulkan/instance.rs:911
#8  0x0000555556cd5745 in wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::surface_get_current_texture<wgpu_core::identity::IdentityManagerFactory, wgpu_hal::vulkan::Api> (self=0x55555f1a41a0, surface_id=..., texture_id_in=()) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-0.18.1/src/present.rs:162
#9  0x0000555556a115ac in wgpu::backend::direct::{impl#7}::surface_get_current_texture (self=0x55555f1a41a0, surface=0x7fffffff7468, surface_data=0x55555f1bae50)
    at src/backend/direct.rs:799
#10 0x0000555556a2ad86 in wgpu::context::{impl#5}::surface_get_current_texture<wgpu::backend::direct::Context> (self=0x55555f1a41a0, surface=0x55555ccf01e8, surface_data=...)
    at src/context.rs:2212
#11 0x0000555556a38ffd in wgpu::Surface::get_current_texture (self=0x55555ccf01c8) at src/lib.rs:4948
#12 0x00005555563b4744 in wezterm_gui::termwindow::TermWindow::call_draw_webgpu (self=0x55555d0ee188) at wezterm-gui/src/termwindow/render/draw.rs:26
#13 0x00005555563b45e8 in wezterm_gui::termwindow::TermWindow::call_draw (self=0x55555d0ee188, frame=0x7fffffff96a8) at wezterm-gui/src/termwindow/render/draw.rs:16
#14 0x00005555563bb900 in wezterm_gui::termwindow::TermWindow::paint_impl (self=0x55555d0ee188, frame=0x7fffffff96a8) at wezterm-gui/src/termwindow/render/paint.rs:108
#15 0x00005555563de0e1 in wezterm_gui::termwindow::TermWindow::do_paint_webgpu_impl (self=0x55555d0ee188) at wezterm-gui/src/termwindow/mod.rs:1100
#16 0x00005555563ddee8 in wezterm_gui::termwindow::TermWindow::do_paint_webgpu (self=0x55
555d0ee188) at wezterm-gui/src/termwindow/mod.rs:1084
#17 0x00005555563dc36d in wezterm_gui::termwindow::TermWindow::dispatch_window_event (self=0x55555d0ee188, event=..., window=0x55555d0f0548) at wezterm-gui/src/termwindow/mod.rs:1002
#18 0x0000555556097665 in wezterm_gui::termwindow::{impl#4}::new_window::{async_fn#0}::{closure#7} (event=..., window=0x55555d0f0548) at wezterm-gui/src/termwindow/mod.rs:823
#19 0x000055555828db92 in alloc::boxed::{impl#49}::call_mut<(window::WindowEvent, &window::os::x_and_wayland::Window), dyn core::ops::function::FnMut<(window::WindowEvent, &window::os::x_and_wayland::Window), Output=()>, alloc::alloc::Global> (self=0x55555d0f0558, args=...) at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/alloc/src/boxed.rs:2070
#20 0x0000555558178c93 in window::WindowEventSender::dispatch (self=0x55555d0f0548, event=...) at window/src/lib.rs:241
#21 0x00005555581add6f in window::os::wayland::window::WaylandWindowInner::do_paint (self=0x55555d0f04f8) at window/src/os/wayland/window.rs:1056
#22 0x00005555581ade6b in window::os::wayland::window::WaylandWindowInner::next_frame_is_ready (self=0x55555d0f04f8) at window/src/os/wayland/window.rs:1071
#23 0x0000555558158b3e in window::os::wayland::window::{impl#4}::frame::{closure#0} (inner=0x55555d0f04f8) at window/src/os/wayland/window.rs:1303
#24 0x00005555581db6c0 in window::os::wayland::connection::{impl#0}::with_window_inner::{async_block#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}> ()
    at window/src/os/wayland/connection.rs:151
#25 0x00005555583e4060 in async_task::raw::RawTask<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, (), promise::spawn::spawn_into_main_thread::{closure_env#0}<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, ()>, ()>::run<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, (), promise::spawn::spawn_into_main_thread::{closure_env#0}<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, ()>, ()> (ptr=0x55555fe659f0) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/raw.rs:557
#26 0x0000555559f234cf in async_task::runnable::Runnable<()>::run<()> (self=...) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/runnable.rs:781
#27 0x00005555581905ab in window::spawn::schedule_with_pri::{closure#0} () at window/src/spawn.rs:40
#28 0x00005555582c2db1 in core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::{closure_env#0}, ()> ()
    at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250
#29 0x00005555593a52db in alloc::boxed::{impl#48}::call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> (self=..., args=())
    at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/alloc/src/boxed.rs:2063
#30 0x0000555558181365 in window::spawn::SpawnQueue::run_impl (self=0x55555cdaa0b0) at window/src/spawn.rs:169
#31 0x000055555817fb2a in window::spawn::SpawnQueue::run (self=0x55555cdaa0b0) at window/src/spawn.rs:63
#32 0x00005555581c1698 in window::os::wayland::connection::WaylandConnection::run_message_loop_impl (self=0x55555cc8dee0) at window/src/os/wayland/connection.rs:78
#33 0x00005555581c25e3 in window::os::wayland::connection::{impl#1}::run_message_loop (self=0x55555cc8dee0) at window/src/os/wayland/connection.rs:171
#34 0x00005555582ecf18 in window::os::x_and_wayland::{impl#1}::run_message_loop (self=0x55555cc00330) at window/src/os/x_and_wayland.rs:150
#35 0x0000555555ff3979 in wezterm_gui::frontend::GuiFrontEnd::run_forever (self=0x55555cdc1720) at wezterm-gui/src/frontend.rs:324
#36 0x00005555560fa263 in wezterm_gui::run_terminal_gui (opts=..., default_domain_name=...) at wezterm-gui/src/main.rs:790
#37 0x0000555556103734 in wezterm_gui::run () at wezterm-gui/src/main.rs:1255
#38 0x00005555560fab91 in wezterm_gui::main () at wezterm-gui/src/main.rs:836

@nezia1
Copy link

nezia1 commented Aug 29, 2024

Having a similar issue on NixOS, using mutter as my compositor. My nvidia driver version is 560.35.03.

ERROR: wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)

That's what I have in my logs. When I launch it from the CLI, I get a SIGV (Address Boundary Error). I assume it has to do with wayland / Nvidia / explicit sync, but I'm not too sure how to troubleshoot it.

Seems the same issue as I'm having in #6060 , gdb gives the following backtrace:

Thread 1 "wezterm-gui" received signal SIGSEGV, Segmentation fault.
0x00007fffedc10857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
(gdb) bt
#0  0x00007fffedc10857 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#1  0x00007fffee0279e9 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#2  0x00007fffee00d380 in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#3  0x00007fffedf4b78e in ?? () from /usr/lib/libnvidia-glcore.so.560.35.03
#4  0x00007fffd6de3714 in DispatchWaitForFences (device=0x55555f6093a0, fenceCount=1, pFences=0x7fffffff5ab0, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.275/layers/vulkan/generated/layer_chassis_dispatch.cpp:799
#5  0x00007fffd6cb8c63 in vulkan_layer_chassis::WaitForFences (device=0x55555f6093a0, fenceCount=1, pFences=0x7fffffff5ab0, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.275/layers/vulkan/generated/chassis.cpp:1824
#6  0x0000555556eaa784 in ash::device::Device::wait_for_fences (self=0x55555f5e9148, fences=..., wait_all=true, timeout=18446744073709551615)
    at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ash-0.37.3+1.3.251/src/device.rs:2399
#7  0x0000555556f378e4 in wgpu_hal::vulkan::instance::{impl#5}::acquire_texture (self=0x55555f3f03e8, timeout=...) at src/vulkan/instance.rs:911
#8  0x0000555556cd5745 in wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::surface_get_current_texture<wgpu_core::identity::IdentityManagerFactory, wgpu_hal::vulkan::Api> (self=0x55555f1a41a0, surface_id=..., texture_id_in=()) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-0.18.1/src/present.rs:162
#9  0x0000555556a115ac in wgpu::backend::direct::{impl#7}::surface_get_current_texture (self=0x55555f1a41a0, surface=0x7fffffff7468, surface_data=0x55555f1bae50)
    at src/backend/direct.rs:799
#10 0x0000555556a2ad86 in wgpu::context::{impl#5}::surface_get_current_texture<wgpu::backend::direct::Context> (self=0x55555f1a41a0, surface=0x55555ccf01e8, surface_data=...)
    at src/context.rs:2212
#11 0x0000555556a38ffd in wgpu::Surface::get_current_texture (self=0x55555ccf01c8) at src/lib.rs:4948
#12 0x00005555563b4744 in wezterm_gui::termwindow::TermWindow::call_draw_webgpu (self=0x55555d0ee188) at wezterm-gui/src/termwindow/render/draw.rs:26
#13 0x00005555563b45e8 in wezterm_gui::termwindow::TermWindow::call_draw (self=0x55555d0ee188, frame=0x7fffffff96a8) at wezterm-gui/src/termwindow/render/draw.rs:16
#14 0x00005555563bb900 in wezterm_gui::termwindow::TermWindow::paint_impl (self=0x55555d0ee188, frame=0x7fffffff96a8) at wezterm-gui/src/termwindow/render/paint.rs:108
#15 0x00005555563de0e1 in wezterm_gui::termwindow::TermWindow::do_paint_webgpu_impl (self=0x55555d0ee188) at wezterm-gui/src/termwindow/mod.rs:1100
#16 0x00005555563ddee8 in wezterm_gui::termwindow::TermWindow::do_paint_webgpu (self=0x55
555d0ee188) at wezterm-gui/src/termwindow/mod.rs:1084
#17 0x00005555563dc36d in wezterm_gui::termwindow::TermWindow::dispatch_window_event (self=0x55555d0ee188, event=..., window=0x55555d0f0548) at wezterm-gui/src/termwindow/mod.rs:1002
#18 0x0000555556097665 in wezterm_gui::termwindow::{impl#4}::new_window::{async_fn#0}::{closure#7} (event=..., window=0x55555d0f0548) at wezterm-gui/src/termwindow/mod.rs:823
#19 0x000055555828db92 in alloc::boxed::{impl#49}::call_mut<(window::WindowEvent, &window::os::x_and_wayland::Window), dyn core::ops::function::FnMut<(window::WindowEvent, &window::os::x_and_wayland::Window), Output=()>, alloc::alloc::Global> (self=0x55555d0f0558, args=...) at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/alloc/src/boxed.rs:2070
#20 0x0000555558178c93 in window::WindowEventSender::dispatch (self=0x55555d0f0548, event=...) at window/src/lib.rs:241
#21 0x00005555581add6f in window::os::wayland::window::WaylandWindowInner::do_paint (self=0x55555d0f04f8) at window/src/os/wayland/window.rs:1056
#22 0x00005555581ade6b in window::os::wayland::window::WaylandWindowInner::next_frame_is_ready (self=0x55555d0f04f8) at window/src/os/wayland/window.rs:1071
#23 0x0000555558158b3e in window::os::wayland::window::{impl#4}::frame::{closure#0} (inner=0x55555d0f04f8) at window/src/os/wayland/window.rs:1303
#24 0x00005555581db6c0 in window::os::wayland::connection::{impl#0}::with_window_inner::{async_block#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}> ()
    at window/src/os/wayland/connection.rs:151
#25 0x00005555583e4060 in async_task::raw::RawTask<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, (), promise::spawn::spawn_into_main_thread::{closure_env#0}<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, ()>, ()>::run<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, (), promise::spawn::spawn_into_main_thread::{closure_env#0}<window::os::wayland::connection::{impl#0}::with_window_inner::{async_block_env#0}<(), window::os::wayland::window::{impl#4}::frame::{closure_env#0}>, ()>, ()> (ptr=0x55555fe659f0) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/raw.rs:557
#26 0x0000555559f234cf in async_task::runnable::Runnable<()>::run<()> (self=...) at /home/lukasz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.1/src/runnable.rs:781
#27 0x00005555581905ab in window::spawn::schedule_with_pri::{closure#0} () at window/src/spawn.rs:40
#28 0x00005555582c2db1 in core::ops::function::FnOnce::call_once<window::spawn::schedule_with_pri::{closure_env#0}, ()> ()
    at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250
#29 0x00005555593a52db in alloc::boxed::{impl#48}::call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> (self=..., args=())
    at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/alloc/src/boxed.rs:2063
#30 0x0000555558181365 in window::spawn::SpawnQueue::run_impl (self=0x55555cdaa0b0) at window/src/spawn.rs:169
#31 0x000055555817fb2a in window::spawn::SpawnQueue::run (self=0x55555cdaa0b0) at window/src/spawn.rs:63
#32 0x00005555581c1698 in window::os::wayland::connection::WaylandConnection::run_message_loop_impl (self=0x55555cc8dee0) at window/src/os/wayland/connection.rs:78
#33 0x00005555581c25e3 in window::os::wayland::connection::{impl#1}::run_message_loop (self=0x55555cc8dee0) at window/src/os/wayland/connection.rs:171
#34 0x00005555582ecf18 in window::os::x_and_wayland::{impl#1}::run_message_loop (self=0x55555cc00330) at window/src/os/x_and_wayland.rs:150
#35 0x0000555555ff3979 in wezterm_gui::frontend::GuiFrontEnd::run_forever (self=0x55555cdc1720) at wezterm-gui/src/frontend.rs:324
#36 0x00005555560fa263 in wezterm_gui::run_terminal_gui (opts=..., default_domain_name=...) at wezterm-gui/src/main.rs:790
#37 0x0000555556103734 in wezterm_gui::run () at wezterm-gui/src/main.rs:1255
#38 0x00005555560fab91 in wezterm_gui::main () at wezterm-gui/src/main.rs:836

Nvidia drivers being a huge headache again... I can't isolate the issue as well as I want to since wezterm's rendering is also currently broken in nixpkgs . There is definitely something wrong with the latest Nvidia drivers (very likely related to explicit sync, as it seemed to be a common error I get whenever enabling wayland in the config).

config.enable_wayland = false seems to be the only way to make it work for now.

EDIT: It seems to be also happening on my amdgpu laptop. Here's the wezterm crash log I'm getting:

wezterm
wp_linux_drm_syncobj_surface_v1#71: error 2: Explicit Sync only supported on dmabuf buffers
17:20:40.706  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_present_modes: ERROR_SURFACE_LOST_KHR
17:20:40.706  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_formats: ERROR_SURFACE_LOST_KHR
17:20:40.723  ERROR  env_bootstrap             > panic at /build/cargo-vendor-dir/wgpu-0.18.0/src/backend/direct.rs:778:18 - !?
   0: env_bootstrap::register_panic_hook::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: wgpu::backend::direct::Context::handle_error_fatal
   7: <wgpu::backend::direct::Context as wgpu::context::Context>::surface_configure
   8: <T as wgpu::context::DynContext>::surface_configure
   9: wgpu::Surface::configure
  10: wezterm_gui::termwindow::webgpu::WebGpuState::resize
  11: wezterm_gui::termwindow::TermWindow::dispatch_window_event
  12: wezterm_gui::termwindow::TermWindow::new_window::{{closure}}::{{closure}}
  13: window::WindowEventSender::dispatch
  14: window::os::wayland::window::WaylandWindowInner::do_paint
  15: window::os::wayland::connection::WaylandConnection::with_window_inner::{{closure}}
  16: async_task::raw::RawTask<F,T,S,M>::run
  17: window::spawn::SpawnQueue::run
  18: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
  19: wezterm_gui::run_terminal_gui
  20: wezterm_gui::main
  21: std::sys_common::backtrace::__rust_begin_short_backtrace
  22: std::rt::lang_start::{{closure}}
  23: std::panicking::try
  24: std::rt::lang_start_internal
  25: main
  26: __libc_start_call_main
  27: __libc_start_main@@GLIBC_2.34
  28: _start

thread 'main' panicked at /build/cargo-vendor-dir/wgpu-0.18.0/src/backend/direct.rs:778:18:
Error in Surface::configure: Validation Error

Caused by:
    Requested format Bgra8UnormSrgb is not in list of supported formats: []

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
panicked at /build/rustc-1.80.1-src/library/std/src/thread/local.rs:260:26:
thread panicked while processing panic. aborting.
fish: Job 1, 'wezterm' terminated by signal SIGABRT (Abort)

This is happening with

config.enable_wayland = true
config.front_end = "WebGpu"

I'm unsure if this is expected behavior, as I'm using my laptop's integrated graphics with those (AMD 7040 series).

@TraceLD
Copy link

TraceLD commented Aug 29, 2024

It looks like a wgpu 0.18 incompatibility with the new explicit sync. Can't really report it to wgpu since they probably won't even take a look given it's a 1 year old version. wezterm would have to be updated to use newest wgpu before reporting.

@TraceLD
Copy link

TraceLD commented Aug 29, 2024

Extra comment: last time older wgpu versions were broken with new NVIDIA drivers, NVIDIA patched it without apps needing to update wgpu, so might be worth reporting to NVIDIA.

@nezia1
Copy link

nezia1 commented Aug 29, 2024

It looks like a wgpu 0.18 incompatibility with the new explicit sync. Can't really report it to wgpu since they probably won't even take a look given it's a 1 year old version. wezterm would have to be updated to use newest wgpu before reporting.

So one of the fixes we could look into would be updating the version of wgpu wezterm uses? I assume this might imply breaking other things however..

@TraceLD
Copy link

TraceLD commented Aug 30, 2024

It looks like a wgpu 0.18 incompatibility with the new explicit sync. Can't really report it to wgpu since they probably won't even take a look given it's a 1 year old version. wezterm would have to be updated to use newest wgpu before reporting.

So one of the fixes we could look into would be updating the version of wgpu wezterm uses? I assume this might imply breaking other things however..

Yep, I've just done testing based off #5814 (branch wgpu-020) and the issue does not occur on that version of wgpu. I'm sure there are some other issues with that branch but runs fine for me so I'm probably gonna run it until main catches up and/or NVIDIA patch it.

@wez any chance that PR could progress given that wgpu 0.18 is now fundamentally borked on NVIDIA 560 on Wayland? I would help personally but I'm not familiar with wezterm/wgpu internals. I am getting the same issue as you were getting if I run it under XWayland (transparent window) but runs completely fine under native Wayland.

@quangIO
Copy link

quangIO commented Aug 30, 2024

On KDE wayland + NVidia, I received the error when using WebGpu frontend

wp_linux_drm_syncobj_surface_v1#38: error 4: explicit sync is used, but no acquire point is set
12:32:24.564  ERROR  wezterm_gui > running message loop: error during event_q.dispatch protocol_error=Some(ProtocolError { code: 4, object_id: 38, object_interface: "wp_linux_drm_syncobj_surface_v1", message: "" }): Protocol error (os error 71); terminating
warning: queue 0x5f2bc301e8a0 destroyed while proxies still attached:

The workaround for me is using

enable_wayland = true,
front_end = "OpenGL",

@dniminenn
Copy link

On KDE wayland + NVidia, I received the error when using WebGpu frontend

wp_linux_drm_syncobj_surface_v1#38: error 4: explicit sync is used, but no acquire point is set
12:32:24.564  ERROR  wezterm_gui > running message loop: error during event_q.dispatch protocol_error=Some(ProtocolError { code: 4, object_id: 38, object_interface: "wp_linux_drm_syncobj_surface_v1", message: "" }): Protocol error (os error 71); terminating
warning: queue 0x5f2bc301e8a0 destroyed while proxies still attached:

The workaround for me is using

enable_wayland = true,
front_end = "OpenGL",

Thank you! This solved my issue.

@nezia1
Copy link

nezia1 commented Sep 4, 2024

It looks like a wgpu 0.18 incompatibility with the new explicit sync. Can't really report it to wgpu since they probably won't even take a look given it's a 1 year old version. wezterm would have to be updated to use newest wgpu before reporting.
So one of the fixes we could look into would be updating the version of wgpu wezterm uses? I assume this might imply breaking other things however..

Yep, I've just done testing based off #5814 (branch wgpu-020) and the issue does not occur on that version of wgpu. I'm sure there are some other issues with that branch but runs fine for me so I'm probably gonna run it until main catches up and/or NVIDIA patch it.

@wez any chance that PR could progress given that wgpu 0.18 is now fundamentally borked on NVIDIA 560 on Wayland? I would help personally but I'm not familiar with wezterm/wgpu internals. I am getting the same issue as you were getting if I run it under XWayland (transparent window) but runs completely fine under native Wayland.

Does that branch work for you? Trying to run it, I'm getting:

❱ RUST_BACKTRACE=1 nix run "github:wez/wezterm?dir=nix&ref=04f113b46bcd6534e00a0150a89845290f594e13"
Fontconfig error: "/etc/fonts/fonts.conf", line 5: not well-formed (invalid token)
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
17:05:07.121  ERROR  env_bootstrap > panic at /build/cargo-vendor-dir/wgpu-hal-0.21.1/src/gles/egl.rs:850:88 - called `Option::unwrap()` on a `None` value
   0: env_bootstrap::register_panic_hook::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::panicking::panic
   7: core::option::unwrap_failed
   8: <wgpu_hal::gles::egl::Instance as wgpu_hal::Instance>::init
   9: wgpu_core::instance::Instance::new
  10: wgpu_core::global::Global::new
  11: wgpu::Instance::new
  12: wezterm_gui::termwindow::TermWindow::new_window::{{closure}}
  13: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  14: async_task::raw::RawTask<F,T,S,M>::run
  15: window::spawn::SpawnQueue::run
  16: <window::os::x11::connection::XConnection as window::connection::ConnectionOps>::run_message_loop
  17: wezterm_gui::run_terminal_gui
  18: wezterm_gui::main
  19: std::sys_common::backtrace::__rust_begin_short_backtrace
  20: std::rt::lang_start::{{closure}}
  21: std::rt::lang_start_internal
  22: main
  23: __libc_start_call_main
  24: __libc_start_main@@GLIBC_2.34
  25: _start

thread 'main' panicked at /build/cargo-vendor-dir/wgpu-hal-0.21.1/src/gles/egl.rs:850:88:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: core::option::unwrap_failed
   4: <wgpu_hal::gles::egl::Instance as wgpu_hal::Instance>::init
   5: wgpu_core::instance::Instance::new
   6: wgpu_core::global::Global::new
   7: wgpu::Instance::new
   8: wezterm_gui::termwindow::TermWindow::new_window::{{closure}}
   9: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  10: async_task::raw::RawTask<F,T,S,M>::run
  11: window::spawn::SpawnQueue::run
  12: <window::os::x11::connection::XConnection as window::connection::ConnectionOps>::run_message_loop
  13: wezterm_gui::run_terminal_gui
  14: wezterm_gui::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I'm also using the nix flake so that might be related.

@wez
Copy link
Owner

wez commented Sep 15, 2024

FWIW, I just pushed 09ac8c5 to main which upgrades wgpu to 22.1.

@wez wez added the Wayland label Sep 15, 2024
@houdinihacker
Copy link

I can confirm works for me with the latest main (9bf30b8), many thanks

@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Sep 15, 2024
@wez wez closed this as completed Sep 15, 2024
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. Wayland
Projects
None yet
Development

No branches or pull requests

7 participants