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

[BUG] Compositor crash when using KVM and switching inputs with 2 monitors #1014

Open
gmpinder opened this issue Nov 26, 2024 · 2 comments
Open

Comments

@gmpinder
Copy link

Hey all,

I finally got around to running the debug version of the compiler (really don't suggest running it like this all the time it's so slow 😭 ) and I was able to reproduce the crash I was seeing in pop-os/cosmic-greeter#151. Here's my logs for today after reproducing the issue:

cosmic-comp-journal.log

Display info:

$ xrandr
Screen 0: minimum 16 x 16, current 5120 x 1440, maximum 32767 x 32767
DP-2 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440    143.91*+
   1920x1440    143.90
   1600x1200    143.89
   1440x1080    143.80
   1400x1050    143.89
   1280x1024    143.79
   1280x960     143.86
   1152x864     143.92
   1024x768     143.87
   800x600      143.83
   640x480      143.85
   320x240      142.05
   1920x1200    143.89
   1680x1050    143.88
   1440x900     143.86
   1280x800     143.84
   1152x720     143.77
   960x600      143.72
   928x580      143.50
   800x500      143.68
   768x480      143.69
   720x480      143.85
   640x400      143.37
   320x200      141.40
   2048x1152    143.88
   1920x1080    143.88
   1600x900     143.93
   1368x768     143.77
   1280x720     143.85
   1024x576     143.91
   864x486      143.63
   720x400      143.88
   640x350      143.57
DP-1 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440     59.91*+
   1920x1440     59.90
   1600x1200     59.87
   1440x1080     59.87
   1400x1050     59.86
   1280x1024     59.89
   1280x960      59.94
   1152x864      59.78
   1024x768      59.68
   800x600       59.86
   640x480       59.38
   320x240       59.52
   1920x1200     59.88
   1680x1050     59.85
   1440x900      59.89
   1280x800      59.81
   1152x720      59.75
   960x600       59.63
   928x580       59.88
   800x500       59.50
   768x480       59.38
   720x480       59.71
   640x400       59.20
   320x200       58.96
   2048x1152     59.90
   1920x1080     59.88
   1600x900      59.82
   1368x768      59.88
   1280x720      59.86
   1024x576      59.90
   864x486       59.45
   720x400       59.55
   640x350       59.77
$ sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: GA102 [GeForce RTX 3080 Ti]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:09:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:780-77f iomemory:7c0-7bf irq:80 memory:fb000000-fbffffff memory:7800000000-7bffffffff memory:7c00000000-7c01ffffff ioport:e000(size=128) memory:fc000000-fc07ffff

I super appreciate y'all fixing the greeter in this aspect. If this can be fixed, I'll be able to go back to daily driving Cosmic! If you need more information from me, please let me know and I'll try to get it for you.

@gmpinder
Copy link
Author

I should probably mention that, when switching, the 60Hz monitor takes a bit longer to connect than the 144Hz. Maybe that has something to do with this?

@gmpinder
Copy link
Author

Dig into the logs and found the panic

Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Testing color format: AB30
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Remaining intersected modifiers: {Invalid, Unrecognized(216172782120099861), Unrecognized(216172782120099860), Unrecognized(216172782120099859), Unrecognized(216172782120099858), Unrecognized(216172782120099857), Unrecognized(216172782120099856), Linear}
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Testing Formats: [DrmFormat { code: DrmFourcc(AB30), modifier: Invalid }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099861) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099860) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099859) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099858) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099857) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099856) }, DrmFormat { code: DrmFourcc(AB30), modifier: Linear }]
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Chosen format: DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099860) }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Initializing drm surface (crtc::Handle(70):plane::Handle(63)) with mode Mode { name: "2560x1440", clock: 538760, size: (2560, 1440), hsync: (2564, 2580, 2582), vsync: (1441, 1442, 1449), hskew: 0, vscan: 0, vrefresh: 144, mode_type: ModeTypeFlags(0x0) } and connectors [connector::Handle(110)]
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Testing color format: AB30
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Remaining intersected modifiers: {Invalid, Unrecognized(216172782120099861), Unrecognized(216172782120099860), Unrecognized(216172782120099859), Unrecognized(216172782120099858), Unrecognized(216172782120099857), Unrecognized(216172782120099856), Linear}
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Testing Formats: [DrmFormat { code: DrmFourcc(AB30), modifier: Invalid }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099861) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099860) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099859) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099858) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099857) }, DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099856) }, DrmFormat { code: DrmFourcc(AB30), modifier: Linear }]
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Chosen format: DrmFormat { code: DrmFourcc(AB30), modifier: Unrecognized(216172782120099860) }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Mapping output at Point<smithay::utils::geometry::Logical> { x: 0, y: 0 }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Mapping output at Point<smithay::utils::geometry::Logical> { x: 0, y: 0 }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Unmapping output
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Mapping output at Point<smithay::utils::geometry::Logical> { x: 0, y: 0 }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Creating new wl_output
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Udev event: type=change, devnum=Some(57856) devnode=Some("/dev/dri/card0")
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Device changed: #57856
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 3 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 3 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Preparing Commit
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: failed to test cursor plane::Handle(66) state
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Adding connector: DisplayPort
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Setting new mode: "2560x1440"
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: [GL] Buffer detailed info: Buffer object 5 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Preparing Commit
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Adding connector: DisplayPort
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Failed to destroy old mode property blob: No such file or directory (os error 2)
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Setting new mode: "2560x1440"
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Setting screen: AtomicModeReq { objects: [50, 53, 57, 106], count_props_per_object: [12, 12, 2, 1], props: [property::Handle(9), property::Handle(10), property::Handle(11), property::Handle(12), property::Handle(13), property::Handle(14), property::Handle(15), property::Handle(16), property::Handle(17), property::Handle(18), property::Handle(20), property::Handle(52), property::Handle(9), property::Handle(10), property::Handle(11), property::Handle(12), property::Handle(13), property::Handle(14), property::Handle(15), property::Handle(16), property::Handle(17), property::Handle(18), property::Handle(20), property::Handle(55), property::Handle(22), property::Handle(23), property::Handle(20)], values: [0, 0, 167772160, 94371840, 0, 0, 2560, 1440, 132, 126, 57, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18446744073709551615, 0, 65535, 1, 124, 57] }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Failed to destroy old mode property blob: No such file or directory (os error 2)
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Setting screen: AtomicModeReq { objects: [63, 66, 70, 110], count_props_per_object: [12, 12, 2, 1], props: [property::Handle(9), property::Handle(10), property::Handle(11), property::Handle(12), property::Handle(13), property::Handle(14), property::Handle(15), property::Handle(16), property::Handle(17), property::Handle(18), property::Handle(20), property::Handle(65), property::Handle(9), property::Handle(10), property::Handle(11), property::Handle(12), property::Handle(13), property::Handle(14), property::Handle(15), property::Handle(16), property::Handle(17), property::Handle(18), property::Handle(20), property::Handle(68), property::Handle(22), property::Handle(23), property::Handle(20)], values: [0, 0, 167772160, 94371840, 0, 0, 2560, 1440, 133, 142, 70, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18446744073709551615, 0, 65535, 1, 128, 70] }
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Udev event: type=change, devnum=Some(57856) devnode=Some("/dev/dri/card0")
Nov 26 14:49:45 jerry-desktop cosmic-comp[5789]: Device changed: #57856
Nov 26 14:49:46 jerry-desktop cosmic-comp[5789]: 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
                                                              at /src/cosmic-comp/vendor/backtrace/src/capture.rs:422:9
                                                    1: log_panics::Config::install_panic_hook::{{closure}}
                                                              at /src/cosmic-comp/vendor/log-panics/src/lib.rs:115:29
                                                    2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/alloc/src/boxed.rs:2077:9
                                                       std::panicking::rust_panic_with_hook
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:799:13
                                                    3: std::panicking::begin_panic_handler::{{closure}}
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:656:13
                                                    4: std::sys_common::backtrace::__rust_end_short_backtrace
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/sys_common/backtrace.rs:171:18
                                                    5: rust_begin_unwind
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:652:5
                                                    6: core::panicking::panic_fmt
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:72:14
                                                    7: core::panicking::panic
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/panicking.rs:146:5
                                                    8: core::option::unwrap_failed
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/option.rs:1985:5
                                                    9: core::option::Option<T>::unwrap
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/option.rs:935:21
                                                       cosmic_comp::shell::Workspaces::active
                                                              at /src/cosmic-comp/src/shell/mod.rs:974:19
                                                   10: cosmic_comp::input::<impl cosmic_comp::state::State>::surface_under
                                                              at /src/cosmic-comp/src/input/mod.rs:2014:47
                                                   11: cosmic_comp::shell::focus::update_pointer_focus
                                                              at /src/cosmic-comp/src/shell/focus/mod.rs:566:21
                                                   12: cosmic_comp::shell::focus::<impl cosmic_comp::state::Common>::refresh_focus
                                                              at /src/cosmic-comp/src/shell/focus/mod.rs:338:13
                                                   13: cosmic_comp::main::{{closure}}
                                                              at /src/cosmic-comp/src/main.rs:133:9
                                                   14: calloop::loop_logic::EventLoop<Data>::run
                                                              at /src/cosmic-comp/vendor/calloop/src/loop_logic.rs:588:13
                                                   15: cosmic_comp::main
                                                              at /src/cosmic-comp/src/main.rs:115:5
                                                   16: core::ops::function::FnOnce::call_once
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:250:5
                                                   17: std::sys_common::backtrace::__rust_begin_short_backtrace
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/sys_common/backtrace.rs:155:18
                                                   18: std::rt::lang_start::{{closure}}
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/rt.rs:159:18
                                                   19: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/core/src/ops/function.rs:284:13
                                                       std::panicking::try::do_call
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:559:40
                                                       std::panicking::try
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:523:19
                                                       std::panic::catch_unwind
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panic.rs:149:14
                                                       std::rt::lang_start_internal::{{closure}}
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/rt.rs:141:48
                                                       std::panicking::try::do_call
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:559:40
                                                       std::panicking::try
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panicking.rs:523:19
                                                       std::panic::catch_unwind
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/panic.rs:149:14
                                                       std::rt::lang_start_internal
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/rt.rs:141:20
                                                   20: std::rt::lang_start
                                                              at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library/std/src/rt.rs:158:17
                                                   21: main
                                                   22: __libc_start_call_main
                                                   23: __libc_start_main@GLIBC_2.2.5
                                                   24: _start
Nov 26 14:49:46 jerry-desktop cosmic-comp[5789]: [EGL] 0x3008 (BAD_DISPLAY) eglDestroySync: EGL_BAD_DISPLAY error: In eglDestroySync: Invalid EGLDisplay (0x55b52472bb40)
Nov 26 14:49:48 jerry-desktop cosmic-comp[9315]: Version: 0.1.0
Nov 26 14:49:48 jerry-desktop cosmic-comp[9315]: Cosmic starting up!
Nov 26 14:49:48 jerry-desktop cosmic-comp[9315]: Created new socket
Nov 26 14:49:48 jerry-desktop cosmic-comp[9315]: Listening on "wayland-1"

@gmpinder gmpinder changed the title Compositor crash when using KVM and switching outputs with 2 monitors [BUG] Compositor crash when using KVM and switching inputs with 2 monitors Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant