-
Notifications
You must be signed in to change notification settings - Fork 100
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
Crash when disconnecting/reconnecting monitor #906
Comments
I am also experiencing this and is bad enough for me to need to use another DE for a while. Since switching with a KVM causes this to wipe my entire desktop and all apps close every time I switch computers. The error occurs when I re-connect with the KVM. The first 1:27:28 timestamps is me switching to my other machine. I waited 20 seconds or so and connected back, which is when the 1:27:49 logs with the error occurs.
|
I am hitting a bug where cosmic-comp will lock up when I reconnect a monitor, possibly related, AMD stuff can be disregarded most likely. but I can pull the card out for more testing if needed.
I also often hit the error |
Same here: $ journalctl --since "2024-11-13 21:19:49" --until "2024-11-13 21:20:05"
Nov 13 21:19:50 sisyphus .cosmic-comp-wrapped[2139]: thread 'main' panicked at 'called `Option::unwrap()` on a `None` value': src/shell/mod.rs:974
0: <backtrace::capture::Backtrace as core::default::Default>::default
1: log_panics::Config::install_panic_hook::{{closure}}
2: std::panicking::rust_panic_with_hook
3: std::panicking::begin_panic_handler::{{closure}}
4: std::sys::backtrace::__rust_end_short_backtrace
5: rust_begin_unwind
6: core::panicking::panic_fmt
7: core::panicking::panic
8: core::option::unwrap_failed
9: cosmic_comp::shell::Workspaces::active
10: cosmic_comp::input::<impl cosmic_comp::state::State>::surface_under
11: cosmic_comp::shell::focus::<impl cosmic_comp::state::Common>::refresh_focus
12: calloop::loop_logic::EventLoop<Data>::run
13: cosmic_comp::main
14: std::sys::backtrace::__rust_begin_short_backtrace
15: main
16: __libc_start_call_main
17: __libc_start_main_alias_2
18: _start
Nov 13 21:19:50 sisyphus .cosmic-comp-wrapped[2139]: thread 'surface-DP-1' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }': src/backend/kms/surface/mod.rs:1124
0: <backtrace::capture::Backtrace as core::default::Default>::default
1: log_panics::Config::install_panic_hook::{{closure}}
2: std::panicking::rust_panic_with_hook
3: std::panicking::begin_panic_handler::{{closure}}
4: std::sys::backtrace::__rust_end_short_backtrace
5: rust_begin_unwind
6: core::panicking::panic_fmt
7: core::result::unwrap_failed
8: cosmic_comp::backend::kms::surface::SurfaceThreadState::redraw
9: <core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events
10: cosmic_comp::backend::kms::surface::surface_thread
11: std::sys::backtrace::__rust_begin_short_backtrace
12: core::ops::function::FnOnce::call_once{{vtable.shim}}
13: std::sys::pal::unix::thread::Thread::new::thread_start
14: start_thread
15: __GI___clone3
Nov 13 21:19:50 sisyphus .xdg-desktop-po[2723]: Error reading events from display: Broken pipe
Nov 13 21:19:50 sisyphus cosmic-session[2122]: Io error: Broken pipe (os error 32)
Nov 13 21:19:50 sisyphus systemd[2100]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 21:19:50 sisyphus systemd[2100]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Nov 13 21:19:50 sisyphus cosmic-session[2122]: process ' COSMIC_SESSION_SOCK=12 cosmic-comp ' failed with code 101
Nov 13 21:19:50 sisyphus pipewire[2382]: mod.x11-bell: X11 I/O error handler called on display :1
Nov 13 21:19:50 sisyphus pipewire[2382]: mod.x11-bell: X11 display (:1) has encountered a fatal I/O error
Nov 13 21:19:50 sisyphus systemd[2100]: cosmic-launcher.scope: Consumed 41min 35.720s CPU time, 653.5M memory peak.
Nov 13 21:19:50 sisyphus systemd[2100]: app-cosmic-google-chrome-30911.scope: Consumed 3min 23.597s CPU time, 1.4G memory peak.
Nov 13 21:19:50 sisyphus cosmic-session[2122]: cosmic-comp exited with error code 101
$ neofetch --backend off
cjshearer@sisyphus
------------------
OS: NixOS 24.11.20241109.76612b1 (Vicuna) x86_64
Host: ASUSTeK COMPUTER INC. TUF Z390-PLUS GAMING (WI-FI)
Kernel: 6.6.60
Uptime: 13 hours, 32 mins
Packages: 1303 (nix-system), 693 (nix-user)
Shell: bash 5.2.26
Resolution: 5120x1440
DE: COSMIC (Wayland)
Theme: Adwaita-dark [GTK2/3]
Icons: Adwaita-dark [GTK2/3]
Terminal: .cosmic-term-wr
CPU: Intel i9-9900KF (16) @ 5.000GHz
GPU: AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT
Memory: 7393MiB / 64221MiB |
I think this is a duplicate of #679, which might trace back to #57. This is also being tracked in pop-os/cosmic-epoch#84. |
I get a similar error when trying to "wake up" my computer after sleep.
System is NixOs using the stable branch. Cosmic versions are
|
Same here on Pop_OS! 24.04 alpha 4 |
Should be fixed by #1057 |
@Drakulix Please note that I just updated and am still able to reproduce this issue and #1043 . I've tried it maybe 5-6 times in a row, with terminal open on the laptop screen and browser on the external monitor, and I lose both every single time I unplug HDMI. I have attached my software versions as well as the journal log from the crash (starting around timestamp 0932). Dec 13 09:32:03 pop-os cosmic-comp[2537]: thread 'main' panicked at 'called |
How have you updated your install? I am not sure that version is live anywhere, but the Pop!_OS staging repo. These logs are unfortunately not very helpful, as they don't contain full backtraces. A debug build of cosmic-comp would produce proper ones. |
@Drakulix the COSMIC alpha apt repo appears to be pushing nightly builds; today's update version has the commit hash matching #1057 merging to I've just updated, if I continue to see the issue I'll see about getting a stacktrace from a debug build.
|
Not nightlies, but explicitly released builds: pop-os/repo-release#425 The last update was merged 17 hours ago and contained the fix, so it is possible some of your are already running the up to date version. |
Found and fixed a second occurrence of a similar bug: 2e1f6a4 |
I unfortunately still get that issue with 2e1f6a4. I've built it with debugging symbols and tried to bisect the relevant parts, maybe this cosmic-reconnect-crash-log.txt log helps (I think the relevant stacktrace is on line 1015), it looks pretty similar as the log from @zsilet. What I find interesting, is that cosmic-panel crashes first, maybe related, maybe a similar issue as this within cosmic-panel. |
No, that is a different one and helpful. Will take a look. |
I still see to see unwrap panics in |
I've found the issue in my case(pop-os/cosmic-epoch#84 (comment)).
I think it may be done like this commit. However, I’m not sure what exactly Anyway, I found that this resolves the issue. I’m not very good at English, so I got help from ChatGPT. I’ve read through it and made some revisions, but I apologize if the sentences sound awkward. |
I can confirm I am no longer seeing the sleep/wake variant of this issue. |
I am pretty confident the last variant of this issue has now been resolved with 7ac204e. Thanks @hayandev for debugging this. The missing piece was, that this only happens, when the last output is disconnected (even if just temporarily), which is why I wasn't able to reproduce this earlier. I bunch of this code was refactored when focus-follows-cursor was introduced, which caused some subtle regressions, which only surfaced after some other fixes to output hotplug. At last that logic should be sound now. |
Closing for now. Please comment if you can still reproduce on latest master (preferably with reproducing steps and/or a stack trace). I'll re-open this issue should we find another cause. |
Thank you @Drakulix , verified working with the latest update. |
Working for me too on
|
Can confirm my crash is also fixed. Thank you very much, this was the last blocker to me trying out Cosmic full time! |
Distro: Arch Linux
Version: cosmic-comp 1.0.0.alpha.2-1
When reconnecting the monitor (happens when turning monitor back on according to timestamp) cosmic-comp crashes, taking all open programs with it.
Logs:
The text was updated successfully, but these errors were encountered: