144Hz/120Hz monitor but mutter seems to cap rendering at 60FPS

Bug #1763892 reported by Knut Sindre Åbjørsbråten on 2018-04-14
100
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Medium
mutter (Ubuntu)
Medium
Daniel van Vugt
Nominated for Bionic by Daniel van Vugt
Cosmic
Medium
Daniel van Vugt

Bug Description

Monitor is set to 144hz, but on Wayland it visually fails to go above 60Hz. I have confirmed the monitor is running at 144Hz during the Wayland session, and that is also the setting in the Settings control panel.

Using the additional NVidia drivers installed using the Ubuntu software control panel.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libwayland-bin (not installed)
ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
Uname: Linux 4.13.0-38-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.8
Architecture: amd64
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sat Apr 14 08:43:29 2018
DistUpgraded: Fresh install
DistroCodename: artful
DistroVariant: ubuntu
GraphicsCard:
 NVIDIA Corporation GP104 [GeForce GTX 1070] [10de:1b81] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Micro-Star International Co., Ltd. [MSI] GP104 [GeForce GTX 1070] [1462:3301]
InstallationDate: Installed on 2018-03-30 (14 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20180105.1)
MachineType: System manufacturer System Product Name
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-38-generic.efi.signed root=UUID=4f8fe8e2-8445-4034-bae3-dc8afb789c64 ro quiet splash vt.handoff=7
SourcePackage: wayland
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/11/2018
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0610
dmi.board.asset.tag: Default string
dmi.board.name: PRIME Z370-P
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0610:bd01/11/2018:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnPRIMEZ370-P:rvrRevX.0x:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.8-0ubuntu0~17.10.1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.8-0ubuntu0~17.10.1
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

Seems I make a mistake here - I confused my laptop installation with this one on my desktop machine. This one is not running the NVidia drivers.

Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report. It's been a known issue for a while: https://bugzilla.gnome.org/show_bug.cgi?id=781296

affects: wayland (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Launchpad Janitor (janitor) wrote :

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in mutter:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in mutter (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
tags: added: performance
Changed in mutter (Ubuntu):
status: Triaged → In Progress
Daniel van Vugt (vanvugt) wrote :

Workaround:

1. Add a line to /etc/environment like:
     CLUTTER_DEFAULT_FPS=144
   or whatever your monitor's real refresh rate is.

2. Reboot.

Daniel van Vugt (vanvugt) wrote :

When this bug was first reported in 17.10 it was a Wayland-only bug and the fix for that is awaiting review:
https://gitlab.gnome.org/GNOME/mutter/merge_requests/171

However since 18.04, a patch was introduced to Ubuntu/Debian that seems to be affecting Xorg sessions now too. So I think that also needs removing to fix this bug: clutter-Smooth-out-master-clock-to-smooth-visuals.patch

summary: - 144Hz/120Hz monitor but Wayland sessions seem to cap rendering at 60FPS
+ 144Hz/120Hz monitor but mutter seems to cap rendering at 60FPS
description: updated
Daniel van Vugt (vanvugt) wrote :

Verified on a 120Hz display that Xorg sessions only need clutter-Smooth-out-master-clock-to-smooth-visuals.patch removed to fix this.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.30.1-4

---------------
mutter (3.30.1-4) unstable; urgency=medium

  [ Andrea Azzarone ]
  * d/p/x11-close-display-in-an-idle-function.patch:
    - close the x11 display in an idle function. This fixes a crash when running
      'gnome-shell --replace'.

  [ Daniel van Vugt]
  * Drop clutter-Smooth-out-master-clock-to-smooth-visuals.patch: It was
    abandoned upstream, but also seems to be limiting refresh rates in
    Xorg sessions to 60Hz when previously they were unlimited (LP: #1763892).

 -- Andrea Azzarone <email address hidden> Mon, 12 Nov 2018 11:53:37 +0000

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Daniel van Vugt (vanvugt) wrote :

Hmm, that's not quite right. The Xorg fix has landed, but the Wayland fix has not. Both require changes to mutter.

Changed in mutter (Ubuntu):
status: Fix Released → In Progress
Iain Lane (laney) wrote :

Can we please use a different bug for Wayland?

We are proposing taking the version of mutter from disco for an SRU, and it has the above patch.

Could you please also write an SRU template for this bug?

Changed in mutter (Ubuntu Cosmic):
status: New → In Progress
assignee: nobody → Daniel van Vugt (vanvugt)
Iain Lane (laney) wrote :

I should say:

> We are proposing taking the version of mutter from disco for an SRU, and it has the above patch.

For that this bug needs to be considered to be fixed in the development release, and fixed by the SRU.

If we split it into "wayland" and "Xorg" halves, we could do that.

I know the bug was initially reported as a Wayland bug though, so it is slightly annoying to do that. Hopefully you will be OK with overlooking that, and making this the Xorg bug.

Daniel van Vugt (vanvugt) wrote :

Yeah this bug started out as just being about Wayland so I don't feel comfortable making this bug just about the Xorg case now.

There is a solution though. Just add the Wayland fix in:

  https://gitlab.gnome.org/GNOME/mutter/merge_requests/171

It may require some backporting to 3.30 as of recently, but I am happy to do so.

Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu Cosmic):
status: In Progress → Triaged
tags: added: bionic cosmic disco
removed: artful
Iain Lane (laney) wrote :

That fix doesn't appear to be merged upstream.

Why are you not comfortable about what I proposed?

I will remove the change from the SRU, then.

Daniel van Vugt (vanvugt) wrote :

Yes, removing the change from the SRU would resolve the problem, weirdly. Though without fixing the bug.

Changed in mutter (Ubuntu Cosmic):
importance: Undecided → Medium
dreamcat4 (dreamcat4) wrote :

Hi there. Sorry but I'm a bit confused as to which branches will be getting this fix and which ones will not be. Specifically I as wondering if a fix might be back-ported to 18.04. Because I need to stay on LTS release for the canonical kernel live patching service. Otherwise I really would not mind upgrading. Not using wayland over here just xorg. Here is my mutter version. And my Ubuntu software updater says 'no new updates'...

 $ sudo apt search mutter | grep -i mutter

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gir1.2-mutter-2/bionic-updates,now 3.28.3-2~ubuntu18.04.2 amd64 [installed]
  GObject introspection data for Mutter
libmutter-2-0/bionic-updates,now 3.28.3-2~ubuntu18.04.2 amd64 [installed]
  window manager library from the Mutter window manager
libmutter-2-dev/bionic-updates,now 3.28.3-2~ubuntu18.04.2 amd64 [installed,automatic]
  Development files for the Mutter window manager
mutter/bionic-updates,now 3.28.3-2~ubuntu18.04.2 amd64 [installed]
mutter-common/bionic-updates,bionic-updates,now 3.28.3-2~ubuntu18.04.2 all [installed]
  shared files for the Mutter window manager

Daniel van Vugt (vanvugt) wrote :

Yes I certainly aim to get the fix into 18.04 eventually. This counts as a hardware enablement bug so it shouldn't be a problem. The only delay is that we need to ensure the fix(es) are in 19.04 and 18.10 first.

If you're only using Xorg then you only need one of the fixes, which is to drop clutter-Smooth-out-master-clock-to-smooth-visuals.patch from the mutter source. If you know how to do that then great, otherwise you will need to wait for the official update, sorry.

P.S. Can someone please accept the above nomination for bionic?

Daniel van Vugt (vanvugt) wrote :

mutter (3.30.2-2) unstable; urgency=medium

  [ Daniel van Vugt ]
  * Add Sync-to-the-hardware-refresh-rate-not-just-60.00Hz.patch to render at
    the full monitor refresh rate (LP: #1763892).

  [ Jeremy Bicha ]
  * debian/libmutter-3-0.symbols: Mark a Wacom symbol as linux-any

  [ Patrice Duroux ]
  * add back lost NEWS (Closes: #914942)

 -- Iain Lane <email address hidden> Thu, 29 Nov 2018 17:29:57 +0000

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Justin (hundredseven) on 2018-12-01
Changed in mutter (Ubuntu Cosmic):
status: Triaged → Fix Released
Changed in mutter (Ubuntu Cosmic):
status: Fix Released → Triaged
Changed in mutter:
status: Confirmed → Fix Released
Daniel van Vugt (vanvugt) wrote :

I've generated a fresh patch for 3.30 based on the final upstream commits in 3.32:

  https://gitlab.gnome.org/GNOME/mutter/merge_requests/318.patch

It's functionally identical to what's already in disco. I wouldn't bother updating the disco patch though since it changes nothing functional and disco should get 3.32 eventually anyway.

So the above link is intended for cosmic.

Changed in mutter (Ubuntu Cosmic):
status: Triaged → In Progress

Nothing about Bionic yet? Still need the "CLUTTER_DEFAULT_FPS" workaround.

Marius Acniz (mayaru) wrote :

Hi Daniel van Vugt, would you be kind enough to let us know how to apply this patch and compile mutter from source. Thank you,
Marius.

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

Other bug subscribers

Remote bug watches

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