Resizing two edge tiled windows is laggy

Bug #1985089 reported by Bruno Nova
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Medium
Jeremy Bícha

Bug Description

Impact
------
Mutter 42.9 includes a fix for tiled window resizing. Before the fix, window resizing could use very large amounts of memory and be laggy.

Test Case
---------
0. Install the updated mutter packages. Log out then log back in.
1. Open System Monitor. Tile it to the Left.
2. Open a Terminal. Tile it to the right.
3. Click the Resources tab in System Monitor.
3. Right-click the System Monitor in the headerbar and click Resize.
4. Move your mouse left and right to resize the window.
5. The memory should not dramatically spike higher as seen in the System Monitor's Resources tab.

What Could Go Wrong
-------------------
See the master mutter 42.9 bug LP: #1998286

Original Bug Report
-------------------
Just to report an issue that other people have reported to GNOME and in Reddit, that seems to also affect Ubuntu 22.04.

If you snap 2 windows side-by-side in Wayland and then try to resize them, it's very slow and uses a lot of memory.

Check here for more details:
- https://gitlab.gnome.org/GNOME/mutter/-/issues/2246
- https://old.reddit.com/r/gnome/comments/whjgel/resizing_two_tiled_windows_leaks_memory_and_is/

Bruno Nova (brunonova)
tags: added: jammy
tags: added: performance
Revision history for this message
xalt7x (xalt7x) wrote (last edit ):

There's already a merge request for this issue
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2579
Could we expect updated Mutter package with this patch?
---
For now I've backported https://launchpad.net/ubuntu/+source/mutter/42.4-2ubuntu1 and applied patch on top of it.
Temporal PPA - https://launchpad.net/~xalt7x/+archive/ubuntu/mutter-42.4-for-jammy.

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

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
xalt7x (xalt7x) wrote :

This bug is still present with Ubuntu's Mutter 42.5-0ubuntu1 package.
And aforementioned patch still applies and fixes the problem.
Dear maintainers, please consider including it in the next update.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "tiling--Skip-the-resize-effect-for-tiled-windows-during-user-grabs.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

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

I think we can wait for the discussions to be resolved and it for it to be merged upstream:

  https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2579

Then hopefully the fix will be included in mutter 42.6.

Changed in mutter (Ubuntu):
status: Confirmed → In Progress
Changed in mutter:
status: Unknown → New
Changed in mutter:
status: New → Fix Released
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-mutter-44 fixed-upstream
Revision history for this message
xalt7x (xalt7x) wrote (last edit ):

@vanvugt
As it was merged, can we expect this fix to land for 22.04?
Patches apply to Mutter 42.5 without issues.
I've just needed to slightly adapt an additional patch ("tiling: Remove unnecessary update_edge_constraints()") which needs to be applied after "tiling: Skip the resize effect for tiled windows during user grabs"

tags: added: fixed-in-mutter-42.8 fixed-in-mutter-43.3
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
description: updated
Changed in mutter (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Jeremy Bícha (jbicha)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Bruno, or anyone else affected,

Accepted mutter into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/42.9-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mutter (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (mutter/42.9-0ubuntu1)

All autopkgtests for the newly accepted mutter (42.9-0ubuntu1) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

mutter/42.9-0ubuntu1 (arm64, s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#mutter

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

The autopkgtest regressions have been resolved. See LP: #1998286 comment 10 for some comments about it.

I installed mutter 42.9-0ubuntu1 on Ubuntu 22.04 LTS with about 6 GB of RAM. Before the update, my memory went from about 20% to 50% with the test case and stayed there. After the update, memory went up to about 35% with the test case. This is a significant improvement in used memory; therefore I consider this bugfix verified.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It's my understanding that this should be released together with gnome-shell 42.9-0ubuntu2 which is currently in jammy-proposed.

gnome-shell 42.9 is https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2023913 and has been in jammy-proposed for 5 days, and is still pending verification.

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

This bug was fixed in the package mutter - 42.9-0ubuntu1

---------------
mutter (42.9-0ubuntu1) jammy; urgency=medium

  * New upstream release (LP: #1998286)
    - Fix high memory and lagginess when resizing side-by-side
      tiled windows (LP: #1985089)
  * Cherry-pick patch to fix dialog for enabling or disabling
    accessibility features with keyboard shortcuts
  * debian/libmutter-10-0.symbols: Add symbol from patch

 -- Jeremy Bícha <email address hidden> Wed, 14 Jun 2023 15:25:14 -0400

Changed in mutter (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for mutter has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This feels unusably laggy still on an up to date jammy system. Are we sure we have all the fixes?

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.