Mouse cursor stutters over GUI elements that are animated

Bug #2023766 reported by Daniel van Vugt
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Fix Released
Medium
Daniel van Vugt
Jammy
Fix Released
Low
Daniel van Vugt
Lunar
Fix Released
Medium
Jeremy Bícha
Mantic
Fix Released
Medium
Daniel van Vugt

Bug Description

[ Impact ]

Mouse cursor stutters over GUI elements that are animated, such as GTK apps, web pages and shell elements.

[ Test Plan ]

1. Open Settings.
2. Move the cursor up/down over an empty area of the desktop.
3. Move the cursor up/down over the list pane on the left side of the Settings window.

Expect: No difference in cursor smoothness whether the window below is animating in response to movement or not.

[ Where problems could occur ]

In frame scheduling, so the risk is more stuttering or screen freezes.

[ Workaround ]

Add this to /etc/environment:
CLUTTER_PAINT=disable-dynamic-max-render-time

tags: added: triple-buffering
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
Changed in mutter (Ubuntu Lunar):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
tags: removed: triple-buffering
Changed in mutter (Ubuntu Mantic):
status: Fix Committed → In Progress
Changed in mutter (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Daniel van Vugt (vanvugt)
tags: added: jammy lunar
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There's a very similar fix in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3080 which applies to fullscreen direct scanout for bug 2016990. It looks like we should patch that at the same time as https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3074.

tags: added: dynamic-max-render-time
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I wonder if https://gitlab.gnome.org/GNOME/mutter/-/issues/2334 can be the upstream for this?

tags: added: fixed-in-mutter-45 fixed-upstream
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
Changed in mutter (Ubuntu Mantic):
status: In Progress → Fix Committed
description: updated
tags: added: fixed-in-mutter-44.3
removed: fixed-in-mutter-45
Changed in mutter (Ubuntu Lunar):
status: Triaged → Fix Committed
Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.2-3ubuntu1

---------------
mutter (44.2-3ubuntu1) 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 (44.2-3) experimental; urgency=medium

  * Cherry-pick patch to fix build test with mesa 23.1 (LP: #2025287)

mutter (44.2-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 (44.2-2) experimental; urgency=medium

  [ Daniel van Vugt ]
  * Cherry-pick 2 patches for stuttering fixes
    * Avoid cursor stuttering over some windows (LP: #2023766). This will also
      improve best-case input latency by roughly half a frame.
    * Avoid render stuttering in some fullscreen games (LP: #2016990).
  * Update Support-Dynamic-triple-double-buffering.patch
    * Fix a failure to resume from sleep (frozen black screen), which seems
      to be an old bug but only became likely in 44.1.
    * Fix a crash on resume from sleep (LP: #2020049).

 -- Jeremy Bícha <email address hidden> Wed, 28 Jun 2023 15:31:07 -0400

Changed in mutter (Ubuntu Mantic):
status: Fix Committed → Fix Released
summary: - Mouse cursor stutters but only over GUI elements that are animated
+ Mouse cursor stutters over GUI elements that are animated
description: updated
Changed in mutter (Ubuntu Lunar):
assignee: Daniel van Vugt (vanvugt) → Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu Jammy):
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu Lunar):
status: Triaged → In Progress
Changed in mutter (Ubuntu Lunar):
status: In Progress → Fix Committed
Revision history for this message
Robie Basak (racb) wrote :

Accepting into Jammy. I can see that the code changes appear already present in lunar-proposed. Please could you confirm the status of the fix in lunar-updates please, so we can avoid introducing a regression when users upgrade?

On test plans, I see both this bug and the other one will be individually tested, but what's the plan to ensure that other behaviour in mutter isn't regressed? https://wiki.ubuntu.com/DesktopTeam/TestPlans/Mutter exists, so would following that be appropriate, or do you want to do something else to verify this?

Changed in mutter (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Daniel, 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-0ubuntu2 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.

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

> On test plans, I see both this bug and the other one will be individually tested,
> but what's the plan to ensure that other behaviour in mutter isn't regressed?

Mutter and GNOME Shell are massive projects so the next bug is always somewhere you don't expect. I would not recommend focussing permanent test plans on any regressions that were found in 2023. Specifically addressing each one:

Bug 2026887: Caused by a narrow hardware/kernel combination. No more important than any other CPU model or kernel release.

Bug 2023759: Caused by a lack of testing remote desktop (upstream too). This could obviously be better tested but I argue the feature is too obscure to be a top-level test case we ask anyone to do on every update.

Bug 2023363: Caused by 16 milliseconds being too small a difference for most to notice.

Bug 2023766: Microstutters of a few milliseconds were a regression in 41.0 and went mostly unnoticed by everyone for several years because of how minor it is.

Bug 2017097: Caused by a combination of being too hard to notice for people who did test Raspi, and me being only one person too busy dealing with a rewrite of triple buffering caused by a last-minute upstream API redesign in 44.0.

Bug 2017137: Caused by a combination of being too hard to notice for people who did test Xorg, and me being only one person too busy dealing with a rewrite of triple buffering caused by a last-minute upstream API redesign in 44.0.

To find future regressions more effectively we need both more people testing proposed for longer, and more hardware/software combinations. Perhaps slower phasing too since such obscure bugs are so easy to miss by most people.

This isn't just a mutter issue. Almost every day I track obscure bugs back to the kernel caused by hardware combinations we simply can't expect to get tested exhaustively before every release.

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

Verified fixed on jammy in 42.9-0ubuntu2. Tested using the test plan at the top of the page and also a 1000Hz Microsoft Classic IntelliMouse. I actually don't think the bug was as visible in 42.x as it was in 44.x. The reason is likely because triple buffering in 42.x didn't rely on the problematic dynamic-max-render-time feature as much as newer releases do. Still, the fix was missing before and seems to be performing well in 42.9-0ubuntu2.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Changed in mutter (Ubuntu Jammy):
importance: Medium → Low
Revision history for this message
XA Hydra (xa-hydra) wrote :

Fixed for me too. Also fixes drag and drop issues in many apps in where I would have to make multiple attempts before it would randomly succeed.

Revision history for this message
XA Hydra (xa-hydra) wrote :

Package version tested was 42.9-0ubuntu2 (replacing 42.9-0ubuntu1). Tested in a session running many active applications (Firefox, multiple windows with video, totem, Various chat applications, etc.)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Daniel, 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-0ubuntu3 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.

tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified fixed on jammy in 42.9-0ubuntu3. Tested using the test plan at the top of the page and a 1000Hz Microsoft Classic IntelliMouse.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Daniel, 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-0ubuntu4 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.

tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified fixed on jammy in 42.9-0ubuntu4. Tested using the test plan at the top of the page and a 1000Hz mouse.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Łukasz Zemczak (sil2100) 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
Launchpad Janitor (janitor) wrote :

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

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

  * Add Revert-data-udev-Don-t-disable-KMS-modifiers-on-newer-i91.patch
    to fix rendering failures on older kernels (5.15) when run on newer
    hardware (Intel Alder Lake). (LP: #2026887)

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

  * Add clutter-frame-clock-Avoid-rapidly-toggling-dynamic-max-re.patch to
    avoid cursor stutter (LP: #2023766)
  * Add backends-x11-Return-zero-Hz-instead-of-nan-Hz-for-incompl.patch
    so that incomplete graphics mode definitions are reported as having a
    refresh rate of 0 Hz instead of -nan Hz. This also fixes the behaviour
    of the 'Revert Settings' button (LP: #2020782)

 -- Daniel van Vugt <email address hidden> Thu, 13 Jul 2023 08:15:36 -0400

Changed in mutter (Ubuntu Jammy):
status: Fix Committed → Fix Released
Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Fix Released
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.