marcelohdez / dim

Native Wayland screen dimming tool
GNU General Public License v3.0
20 stars 1 forks source link

single_pixel_buffer_manager_v1 error on new Hyprland v0.41 #7

Open Proximus888 opened 2 weeks ago

Proximus888 commented 2 weeks ago

I have tested it with 2 installations of dim-screen (AUR and Cargo) but it gets the same result. I don't know if the error comes because Hyprland now forks wl-roots.

Hyprland version: v0.41.1-52 Dim version: 0.2.2

When running dim I get this error:

Bash:

$ dim
thread 'main' panicked at src/dim.rs:87:18:
wp_single_pixel_buffer_manager_v1 not available!: NotPresent
stack backtrace:
   0:     0x583c2b7ac83f - <unknown>
   1:     0x583c2b6ac393 - <unknown>
   2:     0x583c2b7826a2 - <unknown>
   3:     0x583c2b7ae23a - <unknown>
   4:     0x583c2b7ad9a7 - <unknown>
   5:     0x583c2b7aec57 - <unknown>
   6:     0x583c2b7ae562 - <unknown>
   7:     0x583c2b7ae4b9 - <unknown>
   8:     0x583c2b7ae4a6 - <unknown>
   9:     0x583c2b62df72 - <unknown>
  10:     0x583c2b62e385 - <unknown>
  11:     0x583c2b6b8c0a - <unknown>
  12:     0x583c2b645e50 - <unknown>
  13:     0x583c2b63d256 - <unknown>
  14:     0x583c2b646e03 - <unknown>
  15:     0x7f8301b3cc88 - <unknown>
  16:     0x7f8301b3cd4c - __libc_start_main
  17:     0x583c2b636535 - <unknown>
  18:                0x0 - <unknown>
Aborted (core dumped)

ZSH:

❯ dim
thread 'main' panicked at src/dim.rs:87:18:
wp_single_pixel_buffer_manager_v1 not available!: NotPresent
stack backtrace:
   0:     0x5e1dad41e83f - <unknown>
   1:     0x5e1dad31e393 - <unknown>
   2:     0x5e1dad3f46a2 - <unknown>
   3:     0x5e1dad42023a - <unknown>
   4:     0x5e1dad41f9a7 - <unknown>
   5:     0x5e1dad420c57 - <unknown>
   6:     0x5e1dad420562 - <unknown>
   7:     0x5e1dad4204b9 - <unknown>
   8:     0x5e1dad4204a6 - <unknown>
   9:     0x5e1dad29ff72 - <unknown>
  10:     0x5e1dad2a0385 - <unknown>
  11:     0x5e1dad32ac0a - <unknown>
  12:     0x5e1dad2b7e50 - <unknown>
  13:     0x5e1dad2af256 - <unknown>
  14:     0x5e1dad2b8e03 - <unknown>
  15:     0x79ea9dfc4c88 - <unknown>
  16:     0x79ea9dfc4d4c - __libc_start_main
  17:     0x5e1dad2a8535 - <unknown>
  18:                0x0 - <unknown>
zsh: IOT instruction (core dumped)  dim
marcelohdez commented 2 weeks ago

Hm, very weird indeed. I also did not realize how bad panic messages are without debug symbols so I will stop removing those for future versions 😅.

However, the line causing it: https://github.com/marcelohdez/dim/blob/2e305d8ebd8c6d9d68b80db7d5b30808fa55496b/src/dim.rs#L86-L87 is literally just binding to the global, I don't think there's anything I can do from my side.

Tried on Hyprland v0.39 (and something like v0.36 when I was initially developing dim) and it worked then, so this does seem like an upstream regression, idk if it's a Smithay toolkit fix or a Hyprland fix :/

I will keep this open until it is fixed, and will make issue(s) upstream; Here is the output of

$ RUST_BACKTRACE=full dim

on dim master, in hyprland-git (from Fedora COPR, version 0.41.1^19.git4a8b13e-1.fc40) for future reference:

thread 'main' panicked at src/dim.rs:87:18:
wp_single_pixel_buffer_manager_v1 not available!: NotPresent
stack backtrace:
   0:     0x564264baf7ff - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbe715776571fedde
   1:     0x564264abd68b - core::fmt::write::h55d03372cad3f739
   2:     0x564264b875a2 - std::io::Write::write_fmt::h1eac210b8171e7b1
   3:     0x564264bb1129 - std::sys_common::backtrace::print::hd8fbafa492b96d86
   4:     0x564264bb094e - std::panicking::default_hook::{{closure}}::h084093d99dd18eed
   5:     0x564264bb1b3f - std::panicking::rust_panic_with_hook::h95efcd38fabde594
   6:     0x564264bb1492 - std::panicking::begin_panic_handler::{{closure}}::h7f8d0d9063260d01
   7:     0x564264bb13e9 - std::sys_common::backtrace::__rust_end_short_backtrace::h82e94e56eb6c7552
   8:     0x564264bb13d6 - rust_begin_unwind
   9:     0x564264a1a3d2 - core::panicking::panic_fmt::h1bf964dabb6fd750
  10:     0x564264a1a7e5 - core::result::unwrap_failed::hc8a7b968958d675c
  11:     0x564264a45485 - dim::main::hccadf6ec8d9fd3f6
  12:     0x564264a2acb3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h031c71a5210c4725
  13:     0x564264a465ef - main
  14:     0x7fda5c92d088 - __libc_start_call_main
  15:     0x7fda5c92d14b - __libc_start_main_impl
  16:     0x564264a22ca5 - _start
  17:                0x0 - <unknown>