one of 3 monitors "frozen" when a window moves there

Bug #2035016 reported by Thomas Bechtold
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Fix Released
High
Daniel van Vugt

Bug Description

When I move a window to one of my 3 monitors (not the main display), the monitor freezes. That means that moving the mouse there doesn't work and the picture is frozen on that monitor (including the mouse pointer which is visible there).

The journal has those logs:

Sep 10 07:21:49 clown-t14 gnome-shell[5640]: meta_window_set_stack_position_no_sync: assertion 'window->stack_position >= 0' failed
Sep 10 07:21:49 clown-t14 systemd[5341]: Started vte-spawn-99883356-4f85-429c-a61b-60abac422222.scope - VTE child process 15895 launched by kgx process 7379.
Sep 10 07:22:00 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
Sep 10 07:22:04 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
Sep 10 07:22:04 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
Sep 10 07:22:04 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: Object .Gjs_ui_workspaceThumbnail_ThumbnailsBox (0x55b07b31e510), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: == Stack trace for context 0x55b0777837f0 ==
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #0 7ffe4d1d5260 b resource:///org/gnome/shell/ui/workspacesView.js:646 (276d81d44970 @ 33)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #1 7ffe4d1d53b0 b resource:///org/gnome/shell/ui/workspacesView.js:693 (276d81d44a10 @ 472)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #2 55b07789ddb8 i resource:///org/gnome/shell/ui/workspace.js:856 (276d81d040b0 @ 369)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #3 55b07789dd30 i resource:///org/gnome/shell/ui/workspace.js:808 (9aad18f9fb0 @ 17)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #4 55b07789dc98 i resource:///org/gnome/shell/ui/workspacesView.js:1014 (276d81d45420 @ 129)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #5 55b07789dc08 i resource:///org/gnome/shell/ui/overviewControls.js:699 (9aad188a100 @ 50)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #6 55b07789db80 i resource:///org/gnome/shell/ui/layout.js:372 (793307f55b0 @ 22)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #7 55b07789daf0 i resource:///org/gnome/shell/ui/overview.js:652 (9aad1885f10 @ 190)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #8 55b07789da70 i resource:///org/gnome/shell/ui/overview.js:635 (9aad1885ec0 @ 12)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #9 55b07789d9f0 i resource:///org/gnome/shell/ui/overviewControls.js:750 (9aad188a330 @ 55)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #10 7ffe4d1dc560 b resource:///org/gnome/shell/ui/environment.js:84 (7933077d560 @ 39)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #11 55b07789d968 i resource:///org/gnome/shell/ui/environment.js:250 (7933077da60 @ 14)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #12 55b07789d8d8 i resource:///org/gnome/shell/ui/init.js:21 (7933077d060 @ 48)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: == Stack trace for context 0x55b0777837f0 ==
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #0 7ffe4d1d53b0 b resource:///org/gnome/shell/ui/workspacesView.js:695 (276d81d44a10 @ 489)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #1 55b07789ddb8 i resource:///org/gnome/shell/ui/workspace.js:856 (276d81d040b0 @ 369)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #2 55b07789dd30 i resource:///org/gnome/shell/ui/workspace.js:808 (9aad18f9fb0 @ 17)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #3 55b07789dc98 i resource:///org/gnome/shell/ui/workspacesView.js:1014 (276d81d45420 @ 129)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #4 55b07789dc08 i resource:///org/gnome/shell/ui/overviewControls.js:699 (9aad188a100 @ 50)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #5 55b07789db80 i resource:///org/gnome/shell/ui/layout.js:372 (793307f55b0 @ 22)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #6 55b07789daf0 i resource:///org/gnome/shell/ui/overview.js:652 (9aad1885f10 @ 190)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #7 55b07789da70 i resource:///org/gnome/shell/ui/overview.js:635 (9aad1885ec0 @ 12)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #8 55b07789d9f0 i resource:///org/gnome/shell/ui/overviewControls.js:750 (9aad188a330 @ 55)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #9 7ffe4d1dc560 b resource:///org/gnome/shell/ui/environment.js:84 (7933077d560 @ 39)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #10 55b07789d968 i resource:///org/gnome/shell/ui/environment.js:250 (7933077da60 @ 14)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: #11 55b07789d8d8 i resource:///org/gnome/shell/ui/init.js:21 (7933077d060 @ 48)
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: Object .Gjs_ui_workspaceThumbnail_ThumbnailsBox (0x55b07b31e510), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: JS ERROR: TypeError: windowInfo is undefined
                                             vfunc_allocate@resource:///org/gnome/shell/ui/workspace.js:711:17
                                             vfunc_allocate@resource:///org/gnome/shell/ui/workspacesView.js:562:25
                                             vfunc_allocate@resource:///org/gnome/shell/ui/workspacesView.js:718:30
                                             removeWindow@resource:///org/gnome/shell/ui/workspace.js:856:29
                                             addWindow/<.destroyId<@resource:///org/gnome/shell/ui/workspace.js:808:22
                                             vfunc_hide@resource:///org/gnome/shell/ui/workspacesView.js:1014:38
                                             vfunc_unmap@resource:///org/gnome/shell/ui/overviewControls.js:699:38
                                             hideOverview@resource:///org/gnome/shell/ui/layout.js:372:28
                                             _hideDone@resource:///org/gnome/shell/ui/overview.js:652:32
                                             _animateNotVisible/<@resource:///org/gnome/shell/ui/overview.js:635:55
                                             onStopped@resource:///org/gnome/shell/ui/overviewControls.js:750:21
                                             _makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:84:22
                                             _easeActorProperty/<@resource:///org/gnome/shell/ui/environment.js:250:60
                                             @resource:///org/gnome/shell/ui/init.js:21:20
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
Sep 10 07:22:05 clown-t14 gnome-shell[5640]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: gnome-shell 45~rc-0ubuntu2
ProcVersionSignature: Ubuntu 6.3.0-7.7-generic 6.3.5
Uname: Linux 6.3.0-7-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.27.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sun Sep 10 07:22:44 2023
DisplayManager: gdm3
InstallationDate: Installed on 2023-05-10 (123 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230418)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/usr/bin/zsh
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions: mutter-common 45~rc-0ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to mantic on 2023-07-19 (52 days ago)

Revision history for this message
Thomas Bechtold (toabctl) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try adding this to /etc/environment as a workaround:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

and then reboot.

tags: added: amdgpu
tags: added: multimonitor
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also next time the problem happens please immediately run:

  journalctl -b0 > journal.txt

and attach the resulting text file here.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Thomas Bechtold (toabctl) wrote :
Revision history for this message
Thomas Bechtold (toabctl) wrote :

> Please try adding this to /etc/environment as a workaround:

> MUTTER_DEBUG_FORCE_KMS_MODE=simple

this seem to help. and it also helps for having the mouse pointer in firefox working again (I filled https://bugzilla.mozilla.org/show_bug.cgi?id=1852519 for that)

Does that have any negative impact (on performance)?

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

This happened to me with both Nvidia and AMD graphics.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

Now this happened again with MUTTER_DEBUG_FORCE_KMS_MODE=simple set.

I'm going to try to disable extensions instead...

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

The log in comment #6 suggests the cause is in gnome-shell's window management:

JS ERROR: TypeError: this.actor is null
_syncEnabled@resource:///org/gnome/shell/ui/windowManager.js:145:25
onStopped@resource:///org/gnome/shell/ui/windowManager.js:157:35
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:84:22
_easeActorProperty/<@resource:///org/gnome/shell/ui/environment.js:250:60
_destroyWindowDone@resource:///org/gnome/shell/ui/windowManager.js:1555:21
onStopped@resource:///org/gnome/shell/ui/windowManager.js:1523:39
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:84:22
_easeActor/<@resource:///org/gnome/shell/ui/environment.js:173:64
@resource:///org/gnome/shell/ui/init.js:21:20

But that might be a red herring because it wouldn't freeze the whole monitor. Please repeat comment #4 each time it happens so we can look for patterns.

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

Assuming the problem is a low level graphics freeze it may be related to this issue in progress:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441#note_1806246

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

I got it again now with
$HOME/.config/environment.d/debug.conf :

MUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING=1
MUTTER_DEBUG_FORCE_KMS_MODE=simple

Of course, all the triple buffering patches are still there. Haven't tried vanilla mutter/gnome-shell yet.

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

MUTTER_DEBUG_DISABLE_TRIPLE_BUFFERING is deprecated and is replaced by:

  MUTTER_DEBUG_TRIPLE_BUFFERING=never

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

Actually please try MUTTER_DEBUG_KMS_THREAD_TYPE=user instead of all the above.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

I have been running with MUTTER_DEBUG_TRIPLE_BUFFERING=never as my only debug option since last I wrote and haven't been able to reproduce it.

So I'll try the KMS_THREAD_TYPE now.

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

I think there are fixes in both mutter 45.0 main and upstream in the triple buffering branch (not yet in mantic) that might help with this. Certainly when I spent a whole day stress testing them with multiple monitors on Friday I could no longer reproduce any freeze.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

Still happens when I have only MUTTER_DEBUG_KMS_THREAD_TYPE=user.

TRIPLE_BUFFERING=never seems to be the only workaround.

Hope we can get a new snapshot in Mantic soon then!

Revision history for this message
Jeremy Bícha (jbicha) wrote :

We believe this issue is fixed or significantly improved with GNOME Shell 45.0, Mutter 45.0, and glib 2.78.0-2 which should land in mantic soon. Please file a new bug if you are still experiencing problems after upgrading to these new versions and restarting your computer.

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: Incomplete → Fix Committed
status: Fix Committed → Incomplete
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Hmm, actually I think some issues still remain. I will file a bug of my own later to try to provide more data.

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

Each time the problem happens please immediately run:

  journalctl -b0 > journal.txt

and attach the resulting text file here.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

It's very easy to reproduce for me, it happens very quickly every time when I put a fullscreen window on the second monitor. I can probably get a some logs later...

But perhaps wait until the updated mutter & gnome-shell are out of Proposed?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

The updated gnome-shell & mutter are out of proposed.

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

"Fullscreen" sounds like an important factor. Indeed to monitors without a panel, simply maximizing a window makes it fullscreen. Another potentially important factor is whether your machine has dual GPUs. This information helps me to narrow down where to look.

tags: added: triple-buffering
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Before we proceed, please ensure your system has been updated to libmutter >= 45.0 because I haven't personally been able to reproduce any freezes like this for a few weeks (using the latest upstream code which is now in 45.0).

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I have experienced this (or something very like this) a few times on my t14 amd gen 3, which does not have dual GPUs. I only updated to libmutter 45 this morning though.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

with latest mutter+gnome-shell (single GPU), this still happens. log attached.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

And it happened again after I unplugged and plugged my usb-c->display port cable . looks like this time there's more useful information in the logs.

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

Both of those logs contain the same warning from the kernel graphics code:

WARNING: CPU: 12 PID: 148 at drivers/gpu/drm/drm_mode_object.c:45 drm_mode_object_add+0x99/0xa0 [drm]

whose call trace seems to be related to DisplayPort, MST (multi-stream transport) and hotplugging.

We should assume until proven otherwise that Thomas' issue is originating in the kernel. Everyone else please report new bugs of your own so they can be investigated without confusion.

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

Although I might be assuming too much because if the bug happened 2 seconds before the log in comment #26 then there's nothing about it being logged. That's normal for freezes. In that case we need to enable full debug mode in /etc/environment:

  MUTTER_DEBUG=kms

reboot and then next time a freeze happens run:

  journalctl -b0 > journal.txt

and compress the resulting text file before attaching it here.

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

Everyone please also try this in /etc/environment by itself:

  MUTTER_DEBUG_KMS_THREAD_TYPE=user

and then reboot.

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

Interesting, thats 3 monitors on an Intel GPU. I can't see any errors that would lead to a freeze, but the second last CRTC to be used there (CRTC 182) does seem to have been using fullscreen direct scanout on its last frame. It also looks like mutter is intending to display the cursor on that CRTC for subsequent frames but no calls to the kernel were made to do so.

The common theme here seems to be fullscreen direct scanout was used before the freeze.

Will: Do you find that MUTTER_DEBUG_TRIPLE_BUFFERING=never solves it, like Ernst does?

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

I was distracted by https://gitlab.gnome.org/GNOME/mutter/-/issues/3035 so I haven't had time to test this as much...

Revision history for this message
William Grant (wgrant) wrote :

Here's another journal from the boot after the one before, with the same settings as before (I've set MUTTER_DEBUG_TRIPLE_BUFFERING=never but not yet rebooted).

My primary display should have multiple hangs in the last couple of minutes here. I unwisely fullscreened a YouTube video in Firefox, and recovered by replugging my docking station. This repeated a few times, with a LUKS unlock prompt sometimes stopping it from hanging until I dismissed the dialog, until I hit Esc to de-fullscreen the video and replugged one last time. I think my secondary display might also have hung at some point during this boot, but I forget.

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

I managed to finally reproduce this by accident:

1. Set up 3 monitors.

2. Fullscreen a window on one of them.

3. The monitor with the fullscreen window accidentally lost HDMI connection. When plugged back in it was frozen.

Changed in mutter (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 45.0-2ubuntu1

---------------
mutter (45.0-2ubuntu1) mantic; urgency=medium

  * Merge with Debian. Remaining changes:
    - Add x11-Add-support-for-fractional-scaling-using-Randr.patch
    - Add window-Add-ability-to-override-the-edge-constraints.patch
      + Make possible for extensions (such as Tiling Assistant) to override
        window constraints

mutter (45.0-2) experimental; urgency=medium

  [ Daniel van Vugt ]
  * Update triple buffering patch to fix freezing
    seen when running apps full screen (LP: #2035016)

  [ Jeremy Bícha ]
  * Cherry-pick patch to fix changing input language in modal popups

 -- Jeremy Bícha <email address hidden> Fri, 22 Sep 2023 11:27:59 -0400

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.