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

nightly(flake) wezterm on wayland is broken again #679

Closed
kachick opened this issue Jul 15, 2024 · 15 comments · Fixed by #684
Closed

nightly(flake) wezterm on wayland is broken again #679

kachick opened this issue Jul 15, 2024 · 15 comments · Fixed by #684
Labels
bug Something isn't working

Comments

@kachick
Copy link
Owner

kachick commented Jul 15, 2024

Looks like appeared since #676

wez/wezterm#5604
wez/wezterm#5103

Run, but disable IME

  config.enable_wayland = false
  config.use_ime = true

Don't run

  config.enable_wayland = true
  config.use_ime = true
@kachick kachick added the bug Something isn't working label Jul 15, 2024
@kachick kachick added this to 🛸 Jul 15, 2024
@github-project-automation github-project-automation bot moved this to 🙋‍♂ in 🛸 Jul 15, 2024
@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

Looks like appeared since #676

Or more before... 🤔

@Yappaholic
Copy link

Don't run

  config.enable_wayland = true
  config.use_ime = true

I have no trouble running ime with wayland, did you install nightly wezterm like this?
wez/wezterm#3547 (comment)

@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

Yes, at least I wish I'm going on that method... 😅

dotfiles/flake.nix

Lines 18 to 19 in a31b2c0

# https://github.com/wez/wezterm/pull/3547#issuecomment-1915820504
wezterm-flake.url = "github:wez/wezterm?dir=nix";

# Using latest to avoid stable release and wayland problems https://github.com/wez/wezterm/issues/5340
inputs.wezterm-flake.packages.${pkgs.system}.default

@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

Are you using same wezterm ref as me?

dotfiles/flake.lock

Lines 660 to 661 in a31b2c0

"repo": "wezterm",
"rev": "b20c61926ea086cfca6a411e38b215c3045bb12c",

@Yappaholic
Copy link

Are you using same wezterm ref as me?

No, mine is this

"repo": "wezterm",
"rev": "69686f4564ea460111936dee3179ecf8c80e9930",

@Yappaholic
Copy link

I've updated flake and compiling now, should probably take 2 years, I'll update if it breaks ime for me

@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

wez/wezterm@69686f4

Thanks for sharing.
That is a version from 2 weeks ago, even though it's a nightly version. (I don't know why wezterm does not release stable version in this 5 months...)

@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

I may have to stop updating wezterm flake instead of the current cycle and auto-merging 🤔

@Yappaholic
Copy link

I don't know why wezterm does not release stable version in this 5 months

Probably because there isn't one(or that's what I assume).
It depends if it's bad or good, but not having updated and fixed version in nixpkgs can give some new nix users headaches

@Yappaholic
Copy link

Yappaholic commented Jul 15, 2024

I may have to stop updating wezterm flake instead of the current cycle and auto-merging 🤔

It could be and option to make it a flake module for home-manager or system flake and just update it individually whenever you feel like it. Or you can go to 15 min home builds every time you update flake.nix(at least it's that bad for me)

@kachick
Copy link
Owner Author

kachick commented Jul 15, 2024

Yes... I'm also tracking NixOS/nixpkgs#314871 for a nixpkgs side solution

@Yappaholic
Copy link

So, everything compiled and I still don't have an error
Here's the rev:

"repo": "wezterm",
"rev": "c9116830c27baf0c547a1524d33363fd5e42295a",

Wayland and IME both enabled, so can't tell much. The fault can also be on the compositor side, I'm on Hyprland 0.42

My suggestion is that you try to update flakes and recompile and/or search for any IME caveats in your compositor of choice

Yes... I'm also tracking NixOS/nixpkgs#314871 for a nixpkgs side solution

I think for now it's not worth it and you should stick with the flake because even on unstable updating nixpkgs can take some time, that's why I almost stopped using wezterm altogether until found out about flake

@kachick
Copy link
Owner Author

kachick commented Jul 16, 2024

Updated in #683, but the behavior looks not changed
I don't know how to dig into KDE logs, but got some wezterm error logs here

> wezterm --config 'enable_wayland=true'
12:15:29.957  ERROR  env_bootstrap > panic at window/src/os/wayland/connection.rs:207:51 - 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: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::screens
   9: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::screens
  10: mlua::lua::Lua::create_function::{{closure}}
  11: mlua::lua::Lua::create_callback::call_callback
  12: luaD_precall
  13: luaV_execute
  14: luaD_rawrunprotected
  15: lua_resume
  16: <mlua::thread::AsyncThread<R> as core::future::future::Future>::poll
  17: config::lua::emit_event::{{closure}}
  18: wezterm_gui::async_run_terminal_gui::{{closure}}
  19: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  20: async_task::raw::RawTask<F,T,S,M>::run
  21: window::spawn::SpawnQueue::run
  22: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
  23: wezterm_gui::run_terminal_gui
  24: wezterm_gui::main
  25: std::sys_common::backtrace::__rust_begin_short_backtrace
  26: std::rt::lang_start::{{closure}}
  27: std::rt::lang_start_internal
  28: main
  29: __libc_start_call_main
  30: __libc_start_main@@GLIBC_2.34
  31: _start

thread 'main' panicked at window/src/os/wayland/connection.rs:207:51:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

https://github.com/wez/wezterm/blob/c9116830c27baf0c547a1524d33363fd5e42295a/window/src/connection.rs#L57

These threads looks not completely related

wez/wezterm#5518 (comment)
wez/wezterm#3050
wez/wezterm#2559

Enabling trace

> RUST_BACKTRACE=1 wezterm --config 'enable_wayland=true'
12:34:50.493  ERROR  env_bootstrap > panic at window/src/os/wayland/connection.rs:207:51 - 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: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::screens
   9: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::screens
  10: mlua::lua::Lua::create_function::{{closure}}
  11: mlua::lua::Lua::create_callback::call_callback
  12: luaD_precall
  13: luaV_execute
  14: luaD_rawrunprotected
  15: lua_resume
  16: <mlua::thread::AsyncThread<R> as core::future::future::Future>::poll
  17: config::lua::emit_event::{{closure}}
  18: wezterm_gui::async_run_terminal_gui::{{closure}}
  19: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  20: async_task::raw::RawTask<F,T,S,M>::run
  21: window::spawn::SpawnQueue::run
  22: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
  23: wezterm_gui::run_terminal_gui
  24: wezterm_gui::main
  25: std::sys_common::backtrace::__rust_begin_short_backtrace
  26: std::rt::lang_start::{{closure}}
  27: std::rt::lang_start_internal
  28: main
  29: __libc_start_call_main
  30: __libc_start_main@@GLIBC_2.34
  31: _start

thread 'main' panicked at window/src/os/wayland/connection.rs:207:51:
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: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::screens
   5: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::screens
   6: mlua::lua::Lua::create_function::{{closure}}
   7: mlua::lua::Lua::create_callback::call_callback
   8: luaD_precall
   9: luaV_execute
  10: luaD_rawrunprotected
  11: lua_resume
  12: <mlua::thread::AsyncThread<R> as core::future::future::Future>::poll
  13: config::lua::emit_event::{{closure}}
  14: wezterm_gui::async_run_terminal_gui::{{closure}}
  15: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  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
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
101! RUST_BACKTRACE=full wezterm --config 'enable_wayland=true'
12:36:22.310  ERROR  env_bootstrap > panic at window/src/os/wayland/connection.rs:207:51 - 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: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::screens
   9: <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::screens
  10: mlua::lua::Lua::create_function::{{closure}}
  11: mlua::lua::Lua::create_callback::call_callback
  12: luaD_precall
  13: luaV_execute
  14: luaD_rawrunprotected
  15: lua_resume
  16: <mlua::thread::AsyncThread<R> as core::future::future::Future>::poll
  17: config::lua::emit_event::{{closure}}
  18: wezterm_gui::async_run_terminal_gui::{{closure}}
  19: <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll
  20: async_task::raw::RawTask<F,T,S,M>::run
  21: window::spawn::SpawnQueue::run
  22: <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop
  23: wezterm_gui::run_terminal_gui
  24: wezterm_gui::main
  25: std::sys_common::backtrace::__rust_begin_short_backtrace
  26: std::rt::lang_start::{{closure}}
  27: std::rt::lang_start_internal
  28: main
  29: __libc_start_call_main
  30: __libc_start_main@@GLIBC_2.34
  31: _start

thread 'main' panicked at window/src/os/wayland/connection.rs:207:51:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x5558f90c0105 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad
   1:     0x5558f90f0a9b - core::fmt::write::hc090a2ffd6b28c4a
   2:     0x5558f90ba8af - std::io::Write::write_fmt::h8898bac6ff039a23
   3:     0x5558f90bfede - std::sys_common::backtrace::print::ha96650907276675e
   4:     0x5558f90c18d9 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0
   5:     0x5558f90c161d - std::panicking::default_hook::h207342be97478370
   6:     0x5558f7652e94 - env_bootstrap::register_panic_hook::{{closure}}::h1600460a3d79c1fd
   7:     0x5558f90c1ea6 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c
   8:     0x5558f90c1c1b - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c
   9:     0x5558f90c05c9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996
  10:     0x5558f90c1987 - rust_begin_unwind
  11:     0x5558f725e8c3 - core::panicking::panic_fmt::hdc63834ffaaefae5
  12:     0x5558f725e96c - core::panicking::panic::h75b3c9209f97d725
  13:     0x5558f725e869 - core::option::unwrap_failed::h4b4353bf890a85df
  14:     0x5558f825e485 - <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::screens::h9d4b44e21ac144b5
  15:     0x5558f82a8c2e - <window::os::x_and_wayland::Connection as window::connection::ConnectionOps>::screens::h10f881edd505be1c
  16:     0x5558f7631c8a - mlua::lua::Lua::create_function::{{closure}}::hcdd41c1c8608436c
  17:     0x5558f8f82ab8 - mlua::lua::Lua::create_callback::call_callback::hb54f1ce4a08f26e0
  18:     0x5558f8fa86ab - luaD_precall
  19:     0x5558f8fc17c1 - luaV_execute
  20:     0x5558f8fa781b - luaD_rawrunprotected
  21:     0x5558f8fa8b75 - lua_resume
  22:     0x5558f761ab51 - <mlua::thread::AsyncThread<R> as core::future::future::Future>::poll::h04207ee33c9d105a
  23:     0x5558f757b1f4 - config::lua::emit_event::{{closure}}::h5527c0b4575a2736
  24:     0x5558f758d9a8 - wezterm_gui::async_run_terminal_gui::{{closure}}::h17beb7546ca38a9e
  25:     0x5558f754f5a6 - <async_task::runnable::Builder<M>::spawn_local::Checked<F> as core::future::future::Future>::poll::hba55fb80f8faae2b
  26:     0x5558f72712fa - async_task::raw::RawTask<F,T,S,M>::run::hb020c59ce6fab253
  27:     0x5558f81a94bc - window::spawn::SpawnQueue::run::he392dbeed83732af
  28:     0x5558f825d108 - <window::os::wayland::connection::WaylandConnection as window::connection::ConnectionOps>::run_message_loop::h1f42944f51895c2b
  29:     0x5558f74d21eb - wezterm_gui::run_terminal_gui::hd94939c0f4ec56a1
  30:     0x5558f74d3efe - wezterm_gui::main::h447bae9c866caf79
  31:     0x5558f73c7cf3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hab523bfbce8553d3
  32:     0x5558f7444039 - std::rt::lang_start::{{closure}}::h17c12a6d8a162444
  33:     0x5558f90b0ac0 - std::rt::lang_start_internal::h3ed4fe7b2f419135
  34:     0x5558f74dd795 - main
  35:     0x7f7dab83314e - __libc_start_call_main
  36:     0x7f7dab833209 - __libc_start_main@@GLIBC_2.34
  37:     0x5558f725f095 - _start
  38:                0x0 - <unknown>

@kachick
Copy link
Owner Author

kachick commented Jul 16, 2024

wez/wezterm#4777 (comment)

env WAYLAND_DISPLAY=1 wezterm --config 'enable_wayland=true'

Looks fixed 😂

Succeeded only when first 2 execution... 🤔

@kachick
Copy link
Owner Author

kachick commented Jul 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants