Gnome Shell crashes when disconnecting external monitor

Bug #1973802 reported by Ralf Sternberg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Ubuntu 22.04, gnome-shell 42.0-2ubuntu1

When unplugging an external monitor connected via USB-C to my Thinkpad P14s, the entire UI session crashes. While the external monitor is plugged in, it is configured as the primary display. Here are the gnome-shell logs of the latest incident, I suppose the relevant part is `assertion 'window->stack_position >= 0' failed`.

May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212959: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212959 does not exist.
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2524]: XWAYLAND: mode -1x-1 is not available
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212963: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212963 does not exist.
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212964: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212964 does not exist.
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212965: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212965 does not exist.
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212966: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212966 does not exist.
May 17 09:56:49 snaut gnome-shell[2048]: Could not create transient scope for PID 212967: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 212967 does not exist.
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
May 17 09:56:49 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213085: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213085 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213089: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213089 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213090: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213090 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213092: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213092 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213093: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213093 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Could not create transient scope for PID 213094: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 213094 does not exist.
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
May 17 09:56:51 snaut gnome-shell[2048]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
May 17 09:56:51 snaut gnome-shell[2048]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
May 17 09:56:51 snaut gnome-shell[2048]: GNOME Shell crashed with signal 11
May 17 09:56:51 snaut gnome-shell[2048]: == Stack trace for context 0x555f01f484b0 ==
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: Error getting buffer
May 17 09:57:03 snaut gnome-shell[2524]: (EE) failed to write to Xwayland fd: Broken pipe
May 17 09:57:05 snaut gnome-shell[213521]: Running GNOME Shell (using mutter 42.0) as a Wayland display server

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report. This looks like bug 1871262 but actually I'm not convinced that bug report is accurate. If the assertion failure is non-fatal then cause of the crash might actually be something different slightly after that...

Please try following:
https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

tags: added: jammy
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
tags: added: multimonitor
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

Actually I should be asking that same question in bug 1871262.

Revision history for this message
Ralf Sternberg (ralf-sternberg) wrote :

Thanks. I've found the corresponding crash log and tried to attach it here, but the upload fails (always end up on a site saying "Uh oh :(". Might be the file size (76M), even a gzipped version (55M) did not succeed.

Using `ubuntu_bug` as recommended in https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment did not seem to do anything (perhaps running into that same problem).

Any ideas?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Try 'apport-cli' if 'ubuntu-bug' fails.

After the upload attempt also look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

Revision history for this message
Ralf Sternberg (ralf-sternberg) wrote :

So `ubuntu-bug <crash-file>` fails and an error UI pops up, asking to send an error report (which I did). After that, `apport-cli` tells me that there are no pending crash reports.

Strangely, there are no recent items on https://errors.ubuntu.com/user/<my whoopsie ID>, only some that are several days, some several months old.

Trying to attach the crash log here failed again. I've opened https://bugs.launchpad.net/launchpad/+bug/1974066 for that.

Seems I'm running out of options, sorry.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like you forgot to pass the crash file as a parameter to 'apport-cli'?

As mentioned in the instructions, please don't attach crash files to bug reports:
https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

Revision history for this message
Ralf Sternberg (ralf-sternberg) wrote :

Right. Now I call `apport-cli` with the crash file as parameter. As soon as I press "S", the program terminates immediately. No browser window is being opened.

$ apport-cli _usr_bin_gnome-shell.1000.crash

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (79.5 MB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): S
$

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I've seen that problem before too. That should be reported to the 'apport' package. It might be related to bug 1972115.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you don't get any results in https://errors.ubuntu.com/user/YOUR_ID then either:

 * Wait. Because that page does report no results initially and then quietly refreshes after a few seconds

 * Remove any .upload files from /var/crash and then you might have more success uploading it again using either 'ubuntu-bug' or 'apport-cli'.

But I know the aforementioned tools can be unreliable sometimes. If you suspect the tools are buggy then please report a bug in https://bugs.launchpad.net/ubuntu/+source/apport/+filebug

Revision history for this message
Ralf Sternberg (ralf-sternberg) wrote :

It just happened again and this time it seems a report has been uploaded:
https://errors.ubuntu.com/oops/f18abe5a-d79a-11ec-9ae6-fa163e55efd0

Disconnected the external monitor, the desktop is visible on the laptop screen, and two seconds later, the UI session crashes.

The timestamp shown on https://errors.ubuntu.com/user/YOUR_ID is a bit off, however, there weren't any other incidents so this must be the one.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. The oops report in comment #10 is bug 1933186 so we should move this bug there.

Revision history for this message
Ralf Sternberg (ralf-sternberg) wrote :

👍 Thanks for your patience!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.