Gnome (on Xorg) crashes when disconnecting external monitor

Bug #1876802 reported by Gerco Grandia on 2020-05-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)

Bug Description

Working on a dell xps13 running Ubuntu 20.04, having a second display connected to my laptop.

When disconnecting the 2nd display, first the application windows move the built-in laptop display, but after one or two seconds the screen went gray, telling me that an error has occured and that you need to log in again.

I went through the journalctl, and noticed lots of messages as below:

Attempting to call back into JSAPI during the sweeping phase of GC. This is most likely caused by not destroying a Clutter actor or Gtk+ widget with ::destroy signals connected, but can also be caused by using the destroy(), dispose(), or remove() vfuncs. Because it would crash the application, it has been blocked and the JS callback not invoked.

Not sure if this is the actual cause though. After some googling I found bug report #1857660 in which it was suggested to uninstall a few gnome extensions. One of the mentioned extensions was indeed installed, but I removed (in the end) all of them, rebooted but still problem occurs. And is reproducable in a very simple way:
- Reboot & Login (with 2nd monitor attached)
- Open an app (not sure this is really needed to reproduce though)
- Disconnect the 2nd display and wait a second.
- Boom!

Useful to mention that the problem does not occur on Wayland, even with the extensions installed (but with Wayland I can't share my full screen, which I need for Slack :-( ).
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2018-07-30 (644 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
Package: gnome-shell 3.36.1-5ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
RelatedPackageVersions: mutter-common 3.36.1-3ubuntu3
Tags: focal
Uname: Linux 5.4.0-28-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker lpadmin plugdev sambashare sudo wireshark
_MarkForUpload: True

Gerco Grandia (gercograndia) wrote :
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

  apport-collect 1876802

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
tags: added: focal

apport information

tags: added: apport-collected
description: updated

apport information

apport information

apport information

apport information

apport information

Gerco Grandia (gercograndia) wrote :

A few additional remarks:
- This is not a fresh install, it is an upgrade from 19.10
- For reproducing the issue, just logging in (with Xorg) and disconnecting the display is sufficient.

Daniel van Vugt (vanvugt) wrote :

Please uninstall these extensions:

'<email address hidden>',
'<email address hidden>',
'<email address hidden>',
'<email address hidden>',
'<email address hidden>',
'<email address hidden>'

and then restart. If the crashes continue after that then please follow these instructions:

Gerco Grandia (gercograndia) wrote :

I already reproduced it with all extensions (apart from the two mock extensions) removed.

However, did it again, looked if there were some traces left of previously installed extensions on the file system (but no), rebooted & reproduced the error, but there is no corresponding crash file in /var/crash.

Looked at the workaround in bug report 994921 (basically added 'Crash' to the problem_types config and ran the procedure again. Also here no crash report.

Daniel van Vugt (vanvugt) wrote :

If looking in /var/crash failed then look at 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.

Gerco Grandia (gercograndia) wrote :

I did that as it was described in 994921, however nothing turned up.

However, I did a clean re-install of my system (was on the brink of it already, ran into some config issues when moving to focal and decided that this LTS was a good moment).

Now the problem seems to be gone (at least, it doesn't have a 100% reproduction rate anymore), so I guess we must conclude that this was a config issue on my system. Although it could very well still be a bug in the system of course.

I'll report back if I run into the same issue again.

Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu):
status: Incomplete → Expired
Gino Biondini (biondini) wrote :

I am dealing with exactly the same issue: I am running Gnome on a fresh install of Ubuntu 20.04 on a Lenovo Thinkpad X1 Carbon 7th gen. I have an external monitor (also a Lenovo), and when I connect it (through USB-C), everything works fine. However, when I disconnect it, the system freezes completely after a couple seconds, and I need to do a hard reboot each time.

Daniel van Vugt (vanvugt) wrote :

Next time the system freezes and after you reboot, please run:

  journalctl -b-1 > prevboot.txt

and attach the resulting text file here.

Please also try these steps again after that:

Changed in gnome-shell (Ubuntu):
status: Expired → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers