[raspi] GNOME Shell 44.0 runs at 30 FPS unless the CPU is being stressed

Bug #2017097 reported by Daniel van Vugt
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Fix Released
Medium
Daniel van Vugt
Lunar
Fix Released
Medium
Daniel van Vugt

Bug Description

[ Impact ]

On a Raspberry Pi 400, GNOME Shell runs at 30 FPS unless the CPU is being stressed in which case it becomes a smooth 60 FPS. Seems like a frequency scaling issue.

[ Workaround ]

Add this to /etc/environment:

  MUTTER_DEBUG_TRIPLE_BUFFERING=always

[ Test Plan ]

1. Log into the default (Wayland) session on a Raspberry Pi 4/400.

2. Set the display resolution to 1920x1080 60Hz.

3. Drag a window around and ensure it appears smooth (60Hz).

[ Where problems could occur ]

Triple buffering affects all frame scheduling so any mistakes can cause high CPU usage, screen freezes and stutter. Try not to make mistakes.

[ Original bug ]

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: mutter (not installed)
ProcVersionSignature: Ubuntu 6.2.0-1004.5-raspi 6.2.6
Uname: Linux 6.2.0-1004-raspi aarch64
ApportVersion: 2.26.1-0ubuntu2
Architecture: arm64
CasperMD5CheckResult: unknown
Date: Thu Apr 20 15:13:51 2023
ImageMediaBuild: 20230417
SourcePackage: mutter
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
affects: linux (Ubuntu) → linux-raspi (Ubuntu)
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/2017097

tags: added: iso-testing
Revision history for this message
Juerg Haefliger (juergh) wrote :

How do you determine shell fps?

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

To get FPS in the system journal set environment:

  CLUTTER_SHOW_FPS=1

which will give you accurate FPS but not accurate render times because OpenGL is asynchronous. To get accurate render times too you will need to slow it down a little by adding:

  COGL_DEBUG=sync-frame

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

Think I found it. The new version of triple buffering in mutter 44.0 is too aggressive at scaling back to double buffering. So that's why 22.04 and 22.10 felt faster on Pi than 23.04 does right now.

The workaround is to add this to /etc/environment:

  MUTTER_DEBUG_TRIPLE_BUFFERING=always

tags: added: triple-buffering
tags: added: regression-release
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
no longer affects: linux-raspi (Ubuntu)
Changed in mutter (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

See also bug 2017137

description: updated
Changed in mutter (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed to https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441 but I am waiting till there is a 44.1 tag before rebasing, branching, and proposing a new triple buffering patch to salsa. I will also be away till Monday so it probably won't happen before then.

tags: added: fixed-upstream
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixed in mutter 44.1 which is now in Ubuntu 23.10

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu Lunar):
importance: Undecided → Medium
status: New → In Progress
summary: - [raspi] GNOME Shell runs at 30 FPS unless the CPU is being stressed
+ [raspi] GNOME Shell 44.0 runs at 30 FPS unless the CPU is being stressed
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted mutter into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/44.1-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-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. 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 Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified fixed (on Raspberry Pi 400) using mutter 44.1-0ubuntu1

tags: added: verification-done-lunar
removed: verification-needed-lunar
Changed in mutter (Ubuntu Lunar):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Dave Jones (waveform) wrote :

Also verified on a Pi 4 (mutter 44.1-0ubuntu1); video playback is smooth again!

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

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

---------------
mutter (44.1-0ubuntu1) lunar; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release (LP: #2020225, LP: #2012717, LP: #2013216,
    LP: #2015861, LP: #2017097)
  * debian/libmutter-12-0.symbols: Add new symbols
  * Drop 3 patches applied in new release

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1 (LP: #2017137)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:18:13 -0400

Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) 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.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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