Nvidia Wayland sessions sometimes flood the log with "clutter_frame_clock_notify_presented: code should not be reached"

Bug #1967707 reported by Daniel van Vugt
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Status tracked in Oracular
Noble
Fix Committed
Medium
Daniel van Vugt
Oracular
Fix Released
Medium
Daniel van Vugt

Bug Description

[ Impact ]

Nvidia Wayland sessions sometimes flood the log with "clutter_frame_clock_notify_presented: code should not be reached"

This is almost harmless except that it wastes disk space and the high frequency of messages (one per frame) impacts desktop performance.

[ Test Plan ]

0. Start with either an Nvidia-only desktop providing that bug 2060268 is NOT fixed yet; or an Nvidia desktop which also has an integrated GPU enabled such that Nvidia is configured as the primary (boot) GPU in the BIOS and a monitor is plugged into EACH GPU.

1. Log into a Wayland session.

2. Run:

   journalctl -f /usr/bin/gnome-shell

   and verify there is not a flood of messages with each screen redraw.

[ Where problems could occur ]

Wayland multi-GPU startup is the code affected here so any configuration expecting to use multiple GPUs simultaneously in a Wayland session may be affected.

While bug 2060268 is unresolved even single GPU Nvidia systems will be affected due to the phantom GPU resulting from that bug.

[ Original description ]

Nvidia Wayland sessions sometimes flood the log with:

[ 13.105877] computer gnome-shell[1264]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached
[ 13.106163] computer gnome-shell[1264]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached
[ 13.112490] computer gnome-shell[1264]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached
[ 13.125302] computer gnome-shell[1264]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached
[ 13.142242] computer gnome-shell[1264]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached

I've been seeing the issue for months although it only seems to happen *after* something has gone wrong in mutter. Not by default.

tags: added: jammy nvidia nvidia-wayland wayland-session
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

It appears the main cause of this is presently bug 1959888 when you log in with a secondary monitor on a secondary (Nvidia) GPU. So the log messages stop once you have that fix. Although I would still like to understand it better because that's the second bug I've seen trigger the same messages.

Changed in mutter (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
no longer affects: nvidia-graphics-drivers-510 (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
summary: Nvidia Wayland sessions sometimes flood the log with
- [clutter_frame_clock_notify_presented: code should not be reached]
+ "clutter_frame_clock_notify_presented: code should not be reached"
Changed in mutter (Ubuntu):
status: In Progress → Triaged
Changed in mutter:
status: Unknown → New
Revision history for this message
LittleBigBrain (braingateway) wrote :

flooded with ` gnome-shell[3217]: (../clutter/clutter/clutter-frame-clock.c:332):clutter_frame_clock_notify_presented: code should not be reached`

Then flooded with:
> Page flip discarded: drmModeAtomicCommit: Invalid argument
> Failed to post KMS update: drmModeAtomicCommit: Invalid argument

Then external screen freeze but internal LCD works fine.

Revision history for this message
LittleBigBrain (braingateway) wrote (last edit ):

maybe related:
> [drm:__nv_drm_gem_nvkms_map.part.0 [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to map NvKmsKapiMemory Failed to map NvKmsKapiMemory 0x0000000062c80dd4

Mutter 42.5

https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1999830

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

Comment #3 is bug 1968040, not this one.

Bug 1999830 may also help to reproduce the issue.

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

The upstream bug https://gitlab.gnome.org/GNOME/mutter/-/issues/2489 also shows there are other ways to trigger this warning.

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

This should fix most cases of the log flood:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3115

tags: added: logspam
Changed in mutter (Ubuntu):
status: Triaged → In Progress
no longer affects: mutter
Revision history for this message
zagglez (zagglez) wrote :

Ubuntu 24.04, two monitors, wayland, nvidia 535

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

This is happening in 24.04/24.10 now due to bug 2060268, so please see the workarounds in that bug.

Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-mutter-47 fixed-upstream
Changed in mutter (Ubuntu):
milestone: none → ubuntu-24.10
tags: added: performance
description: updated
Changed in mutter (Ubuntu Noble):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → Medium
no longer affects: mutter (Ubuntu Noble)
Changed in mutter (Ubuntu Noble):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Daniel van Vugt (vanvugt)
milestone: none → ubuntu-24.04.1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 46.2-1ubuntu2

---------------
mutter (46.2-1ubuntu2) oracular; urgency=medium

  [ Marco Trevisan ]
  * Add place-Always-center-initial-setup.patch to always center the
    initial setup window (LP: #2016013)

  [ Daniel van Vugt ]
  * Add backends-Handle-null-views-instead-of-creating-dummy-view.patch
    to prevent "clutter_frame_clock_notify_presented: code should not be
    reached" log spam in some Nvidia Wayland sessions (LP: #1967707)
  * Add backends-Restore-support-for-X11-cursor-themes.patch to restore
    support for X11 cursor themes, which was lost in Mutter 46.0
    (LP: #2062377, LP: #2063869)

 -- Daniel van Vugt <email address hidden> Tue, 25 Jun 2024 15:26:37 +0800

Changed in mutter (Ubuntu Oracular):
status: Fix Committed → Fix Released
Changed in mutter (Ubuntu Noble):
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

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

Verified fixed in 46.2-1ubuntu0.24.04.1 using the test plan in the bug description.

tags: added: verification-done-noble
removed: verification-needed-noble
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.