Mir

[regression] [nonblockswap] Client judders, skipping frames periodically

Bug #1308843 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Mir development team
mir (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Running mir_demo_server_shell with mir_demo_client_egltriangle I see frame skips every 10 seconds or so, which is visible in the output too:

61 FPS
60 FPS
59 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
61 FPS
60 FPS
59 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
60 FPS
61 FPS

This only seems to happen when a single monitor is plugged in.

OLD DESCRIPTION:
I used to have an intel GPU (GM45 with SU9600) which would clock down the refresh rate to 40Hz for power savings. Although I don't have it any more, I can see we probably have broken that use case. Clients will probably skip frames now and look "unsmooth".

I think the simple solution is to ensure the new buffer consumer thread never runs faster than any real display. It should probably be slowed down to about 10Hz.

Related branches

tags: added: regression-update
removed: regression-uodate
Changed in mir:
milestone: none → 0.1.9
summary: - [regression] Clients skip frames on 40Hz displays
+ [regression] Clients skip frames periodically
description: updated
Changed in mir:
importance: Medium → High
status: New → In Progress
assignee: nobody → Daniel van Vugt (vanvugt)
summary: - [regression] Clients skip frames periodically
+ [regression] Client judders, skipping frames periodically
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [regression] Client judders, skipping frames periodically

Bisected. The problem appeared in r1545:

------------------------------------------------------------
revno: 1545 [merge]
author: Alexandros Frantzis <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Thu 2014-04-10 20:17:20 +0000
message:
  compositor: Consume buffers of surfaces that are not rendered on screen

  This ensures that eglSwapBuffers() in clients doesn't block if a surface is not
  rendered. Fixes: https://bugs.launchpad.net/bugs/1233564, https://bugs.launchpad.net/bugs/1292306.

  Approved by Alberto Aguirre, PS Jenkins bot.
------------------------------------------------------------

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

It appears my default refresh rate is actually closer to 59.95Hz but Mir's internal logic rounds up to 60 so that information is hidden. That would explain why the physical display is beating/juddering, because it's not 60Hz like the fake consumer is.

kevin gunn (kgunn72)
summary: - [regression] Client judders, skipping frames periodically
+ [regression] [nonblockswap] Client judders, skipping frames periodically
tags: added: nonblockswap
Revision history for this message
kevin gunn (kgunn72) wrote :

As discussed in the stand-up today.
There's no ill effect seen from a end user point of view on the phone, tablet or xmir.
Based on that, we're accepting this bug as part of the 019 milestone in order to deliver the overall improvement of unblocking events on the phone/tablet.

As for addressing this bug, the team seems to be in agreement on using Chris' proposed solution as an improvement (solving in switching bundle) and a way to correct this issue.
https://code.launchpad.net/~raof/mir/1hz-rendering-always/+merge/216246

kevin gunn (kgunn72)
Changed in mir:
milestone: 0.1.9 → 0.1.10
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Just to clarify, living with this regression is probably OK for displays of 60Hz, close to 60Hz or greater. In that case you'll only see periodic glitches like I do every few seconds.

However, displays of significantly less than 60Hz may be dramatically affected, glitching several times per second. I haven't set up the hardware to prove this, but expect it could be unbearable for say 50Hz modes. So we do need to fix this ASAP. Visual quality is a key feature of Mir we don't want to go backwards very often.

Changed in mir:
assignee: Daniel van Vugt (vanvugt) → Mir development team (mir-team)
tags: added: regression
removed: regression-update
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir/devel at revision None, scheduled for release in mir, milestone Unknown

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix reverted in r1653 due to more serious regressions.

Changed in mir:
status: Fix Committed → In Progress
Changed in mir:
milestone: 0.2.0 → 0.3.0
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir/devel at revision None, scheduled for release in mir, milestone Unknown

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mir - 0.3.0+14.10.20140618.1-0ubuntu1

---------------
mir (0.3.0+14.10.20140618.1-0ubuntu1) utopic; urgency=medium

  [ Cemil Azizoglu ]
  * New upstream release 0.3.0 (https://launchpad.net/mir/+milestone/0.3.0)
    - mirclient ABI unchanged, still at 7. Clients do not need rebuilding.
    - mirserver ABI bumped to 21. Shells need rebuilding.
      . Divide swap_client_buffers into separate functions.
      . Allow buffer swapping even when compositor is turned off or blocked.
        (LP: #1308843, 1308844)
      . Wire the cursor client API through the session mediator to the surface
        observer.
      . Generate destination alpha for alpha enabled display buffers.
      . Named threads.
      . Support for prompt sessions :
        https://wiki.ubuntu.com/Security/TrustStoreAndSessions.

    - mirscreencast screenshots now produce images with correct color instead
      of transparency.
    - Rename bind_to_texture->gl_bind_to_texture.
    - Refinements in test infrastructure.
    - Phablet: allow disabling the overlays via a command line switch.
    - Unify the DisplayBuffer interface's optimization functions
      behind post_renderables_if_optimizable.
    - Clean up the DisplayDevice interface so that it doesn't require the
      functions are called in any particular order.
    - Phablet: graphics: android: preserve buffer ownership for onscreen
      overlay layers until the subsequent display posting.
    - Allow the platform to register emergency cleanup handlers in order to
      restore the graphics system to a sane state when the server fails
      abruptly.

    - Bugs fixed:
       . Mirscreencast outputs translucency instead of shadows, producing
         incorrect images. (LP: #1301210)
       . JSON formatting. (LP: #1324902)
       . Fix input_area_contains to work properly in global coordinates even
         when input_rectangles is updated. (LP: #1261647)
       . Allow a moment for clients to acquire a buffer. (LP: #1317370)
       . Generate correct alpha by changing blending equation to assume
         pre-multiplied alpha sources. (LP: #1318852)
       . Rework the recomposition messaging so that the DisplayBufferCompositor
         is no longer involved. (LP: #1319907)
  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Wed, 18 Jun 2014 17:51:53 +0000

Changed in mir (Ubuntu):
status: New → Fix Released
kevin gunn (kgunn72)
Changed in mir:
status: Fix Committed → Fix Released
Changed in mir (Ubuntu):
importance: Undecided → High
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.