danyspin97 / wpaperd

Modern wallpaper daemon for Wayland
GNU General Public License v3.0
314 stars 24 forks source link

crashes when one of the monitors goes disabled #79

Open alembiq opened 3 months ago

alembiq commented 3 months ago

Thank you for making paperd, to me it's the best wallpaper solution from eight, I've tried on wayland.

I'm running Hyprland and it's clamshell configuration to disable notebook screen when I close my notebook.

                bindswitch --reload --locked lid:on output eDP-1 disable
                bindswitch --reload --locked lid:off output eDP-1 enable

with this configuration of wpaperd:

[any]
path = "/home/charles/nextcloud/Pictures/wallpapers"
duration = "30s"
mode = "center"
sorting = "random"
[eDP-1]
path = "/home/charles/nextcloud/Pictures/wallpapers/52204128092_76bb16feb4_k.jpg"

closing the notebook (disabling eDP-1 monitor) causes wpaperd to die :(

RUST_BACKTRACE=1 wpaperd
Message:  Received event for dead output
Location: /build/wpaperd-1.0.1-vendor.tar.gz/smithay-client-toolkit/src/output.rs:425

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 6 frames hidden ⋮
   7: core::panicking::panic_display::hd8c516c36ffd47b9
      at <unknown source file>:<unknown line>
   8: core::option::expect_failed::hcf48fdb9c93a315f
      at <unknown source file>:<unknown line>
   9: <smithay_client_toolkit::output::OutputState as wayland_client::event_queue::Dispatch<wayland_client::protocol::wl_output::WlOutput,smithay_client_toolkit::output::OutputData,D>>::event::h8c24136669462fe7
      at <unknown source file>:<unknown line>
  10: wayland_client::event_queue::queue_callback::hcd7bec9a51f1b873
      at <unknown source file>:<unknown line>
  11: wayland_client::event_queue::EventQueue<State>::dispatching_impl::h8ea4cda2a66ff432
      at <unknown source file>:<unknown line>
  12: <calloop_wayland_source::WaylandSource<D> as calloop::sources::EventSource>::process_events::h3a942e07393342b7
      at <unknown source file>:<unknown line>
  13: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events::hab8c0fdd334f74e9
      at <unknown source file>:<unknown line>
  14: calloop::loop_logic::EventLoop<Data>::dispatch::he645599faf9167d1
      at <unknown source file>:<unknown line>
  15: wpaperd::main::h4f030db9aa54e4f8
      at <unknown source file>:<unknown line>
  16: std::sys_common::backtrace::__rust_begin_short_backtrace::heb113d943399a168
      at <unknown source file>:<unknown line>
  17: std::rt::lang_start::{{closure}}::h40e1695541ca21c3
      at <unknown source file>:<unknown line>
  18: std::panicking::try::h9134436c64049e5f
      at <unknown source file>:<unknown line>
  19: std::rt::lang_start_internal::hf4417b67ea9bae52
      at <unknown source file>:<unknown line>
  20: main<unknown>
      at <unknown source file>:<unknown line>
  21: __libc_start_call_main<unknown>
      at <unknown source file>:<unknown line>
  22: __libc_start_main@@GLIBC_2.34<unknown>
      at <unknown source file>:<unknown line>
  23: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
danyspin97 commented 3 months ago

Hello and thank you for opening an issue!

What is happening here is that the toolkit that handles wayland event (smithay-client-toolkit) is receiving events after the output is declared as dead, making wpaperd crash. At a first glance I'd say that it might be a race condition in hyprland, sending events that shouldn't be sent. Otherwise it might be smithay not updating its status.

In case you are running version 1.0.1, can you please try with master version? In case it is still not working, can you please run wpaperd as the following and share the log?

$ WAYLAND_DEBUG=client` wpaperd 2> wpaperd-wayland.log

On 29 June 2024 17:29:23 CEST, "Karel Křemel" @.***> wrote:

Thank you for making paperd, to me it's the best wallpaper solution from eight, I've tried on wayland.

I'm running Hyprland and it's clamshell configuration to disable notebook screen when I close my notebook.

               bindswitch --reload --locked lid:on output eDP-1 disable
               bindswitch --reload --locked lid:off output eDP-1 enable

with this configuration of wpaperd:

[any]
path = "/home/charles/nextcloud/Pictures/wallpapers"
duration = "30s"
mode = "center"
sorting = "random"
[eDP-1]
path = "/home/charles/nextcloud/Pictures/wallpapers/52204128092_76bb16feb4_k.jpg"

closing the notebook (disabling eDP-1 monitor) causes wpaperd to die :(

RUST_BACKTRACE=1 wpaperd
Message:  Received event for dead output
Location: /build/wpaperd-1.0.1-vendor.tar.gz/smithay-client-toolkit/src/output.rs:425

 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                               ⋮ 6 frames hidden ⋮
  7: core::panicking::panic_display::hd8c516c36ffd47b9
     at <unknown source file>:<unknown line>
  8: core::option::expect_failed::hcf48fdb9c93a315f
     at <unknown source file>:<unknown line>
  9: <smithay_client_toolkit::output::OutputState as wayland_client::event_queue::Dispatch<wayland_client::protocol::wl_output::WlOutput,smithay_client_toolkit::output::OutputData,D>>::event::h8c24136669462fe7
     at <unknown source file>:<unknown line>
 10: wayland_client::event_queue::queue_callback::hcd7bec9a51f1b873
     at <unknown source file>:<unknown line>
 11: wayland_client::event_queue::EventQueue<State>::dispatching_impl::h8ea4cda2a66ff432
     at <unknown source file>:<unknown line>
 12: <calloop_wayland_source::WaylandSource<D> as calloop::sources::EventSource>::process_events::h3a942e07393342b7
     at <unknown source file>:<unknown line>
 13: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events::hab8c0fdd334f74e9
     at <unknown source file>:<unknown line>
 14: calloop::loop_logic::EventLoop<Data>::dispatch::he645599faf9167d1
     at <unknown source file>:<unknown line>
 15: wpaperd::main::h4f030db9aa54e4f8
     at <unknown source file>:<unknown line>
 16: std::sys_common::backtrace::__rust_begin_short_backtrace::heb113d943399a168
     at <unknown source file>:<unknown line>
 17: std::rt::lang_start::{{closure}}::h40e1695541ca21c3
     at <unknown source file>:<unknown line>
 18: std::panicking::try::h9134436c64049e5f
     at <unknown source file>:<unknown line>
 19: std::rt::lang_start_internal::hf4417b67ea9bae52
     at <unknown source file>:<unknown line>
 20: main<unknown>
     at <unknown source file>:<unknown line>
 21: __libc_start_call_main<unknown>
     at <unknown source file>:<unknown line>
 22: __libc_start_main@@GLIBC_2.34<unknown>
     at <unknown source file>:<unknown line>
 23: _start<unknown>
     at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

-- Reply to this email directly or view it on GitHub: https://github.com/danyspin97/wpaperd/issues/79 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

alembiq commented 3 months ago

my pleasure :) before i manage how to run master here is the log on current one wpaperd-wayland.log

alembiq commented 2 months ago

build from

commit 097c9114a67ca9545558f4bba60cbcd14e65a545 (HEAD -> main, origin/main, origin/HEAD)
Author: Danilo Spinella <danilo.spinella@suse.com>
Date:   Thu Jul 4 11:25:02 2024 +0200

logs: wpaperd-wayland.log

danyspin97 commented 2 months ago

Thank you @alembiq ! I will create an issue upstream as soon as possible.

alembiq commented 2 weeks ago

it seems that updating the smithay-client-toolkit to 0.19.2 should do the trick, see https://github.com/Smithay/client-toolkit/issues/468