Mir

[regression] Compositing is jerky and stutters during touch events

Bug #1372850 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Critical
Robert Carr
0.7
Invalid
Undecided
Unassigned
mir (Ubuntu)
Fix Released
Undecided
Unassigned
mir (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

[regression] Compositing is jerky and stutters during touch events

This appears to be a recent regression. In r1930 fingerpaint draws very disjointed curves on the N4. Going back just 10 revisions to r1920 however everything is beautifully smooth.

Test case (on a touch device):
  1. mir_demo_server_minimal &
  2. mir_demo_client_fingerpaint -w
  3. Draw!
Expected: Smooth curves.
Observed: Irregular and disjointed curves.

Update: Bisected. Found the regression happened in r1924.

Related branches

summary: - [regression] Fingerpaint/touch events are suddenly unsmooth and jerky
+ [regression] Fingerpaint/touch events are suddenly disjoint and not
+ smooth
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [regression] Fingerpaint/touch events are suddenly disjoint and not smooth

Bisected. The regression came from:

------------------------------------------------------------
revno: 1924 [merge]
author: Robert Carr <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Thu 2014-09-18 21:35:56 +0000
message:
  Add touchspot visualizations toggleable with --enable-touchspots. Fixes: https://bugs.launchpad.net/bugs/1323522.

  Approved by PS Jenkins bot, Andreas Pokorny, Alberto Aguirre, Kevin DuBois, Cemil Azizoglu.
------------------------------------------------------------

tags: added: input
description: updated
summary: - [regression] Fingerpaint/touch events are suddenly disjoint and not
- smooth
+ [regression] Touch events are suddenly disjoint and not smooth
Changed in mir:
importance: High → Critical
Robert Carr (robertcarr)
Changed in mir:
assignee: nobody → Robert Carr (robertcarr)
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ignore comment #2. I forgot the "-w" parameter. Now that I remember it, the bug is visibly very obvious.

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

Screenshot of the problem (r1924).

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

Screenshot of what it looked like before the regression (r1923).

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

The problem appears to be that we're triggering scene changes at the raw touch event rate (125Hz on Nexus4), and so the compositor never has any hope of keeping up. It will always skip frames.

Robert has a workaround to disable the code, which works when touchspots are disabled. But the problem persists when you enable touchspots.

I suggest the design and implementation of the feature is very overcomplicated and inefficient. Although if I can't get team approval to revert it, we can try to look at ways to make our scene change events groupable, and thus give the compositor a chance of keeping up.

In Compiz I implemented a simple approach that could help. That is to simply delay all compositing by some milliseconds after the change event. This allows multiple events to be grouped and composited in a single frame. Although I'm not sure that would suffice here when we're dealing with touchscreens that generate events hundreds of times per second.

Maybe we can make our compositors' scheduling/scene change logic smarter still some other way... such that a compositor does not have to render at 125Hz to keep up with the change events. I guess the missing piece is that the scene doesn't yet have any method for probing its renderables to ask "are there _really_ any more buffers pending that have not been composited?". Although I'm reluctant to jump in to any solution that adds yet more complexity to the mix.

tags: added: touchspots
summary: - [regression] Touch events are suddenly disjoint and not smooth
+ [regression] Compositing is jerky and stutters during touch events
description: updated
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.8.0

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

This bug is invalid for 0.7 right now. Only exists in 0.8. Let's keep it that way.

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

Invalid for Ubuntu. The bug was never released (it regressed and was fixed entirely in the 0.8 series before the 0.8.0 release).

Changed in mir (Ubuntu):
status: New → Invalid
Changed in mir:
status: Fix Committed → Fix Released
Changed in mir (Ubuntu RTM):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package mir - 0.8.0+14.10.20141010-0ubuntu1

---------------
mir (0.8.0+14.10.20141010-0ubuntu1) utopic; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.8.0 (https://launchpad.net/mir/+milestone/0.8.0)
    - Enhancements:
      . Less sensitivity to ABI breaks - many headers unused by external
        projects are now hidden and not installed by -dev packaes. If you
        require any headers that are missing, just ask.
      . Touchspots: --enable-touchspots to servers; visually shows touch
        locations (warning: This affects performance LP: #1373692).
      . Client performance reporting: Any Mir client can now get accurate
        performance information (frame rate, render time, buffer lag etc)
        logged to stdout. Just set env MIR_CLIENT_PERF_REPORT=log
      . Further improved touch responsiveness, with less lag and smoother
        scrolling (so long as you don't enable touchspots).
      . Slightly faster builds using precompiled headers.
      . Turn hardware overlays on by default. When in use, this halves the
        CPU usage of a Mir server. Already enabled in unity-system-compositor.
      . More scripting to detect ABI breaks.
      . Improved src/ tree consistency (renamed "src/shared" to "src/common").
      . Improved fatal signal design: Changed from SIGTERM to SIGHUP delivered
        to clients on unexpected server disconnection.
      . Improved library/package design to allow concurrent installations
        of different Mir versions without conflicts.
      . Fd reception code is now common to client and server.
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI bumped to 2
      . Mirplatform ABI bumped to 3
      . Mirserver ABI bumped to 26
    - API changes between Mir 0.7 and 0.8:
      . Lots of headers removed from the public SDK! We have only hidden
        headers not known to be used by any known projects. Please let us
        know if anything is missing - https://bugs.launchpad.net/mir/+filebug
      . graphics::Platform - interface changed significantly.
      . Lots of server API changes to support touchspots.
      . File descriptors now passed as type Fd instead of int32_t.
    - Bug fixes:
      . [regression] Mir deb packages with versioned names cannot be installed
        simultaneously any more (LP: #1293944)
      . A frozen client can hang the whole server (LP: #1350207)
      . QtMir FTBFS: fatal error: mir/input/input_channel.h: No such file or
        directory (LP: #1365934)
      . [regression] platform-api fails to build against Mir 0.8 (LP: #1368354)
      . Mir FTBFS with gcc 4.9.1-14 (utopic update):
        auto_unblock_thread.h:44:46: error: no matching function for call to
        ‘std::thread::thread(<brace-enclosed initializer list>)’ (LP: #1369389)
      . [regression] Compositing is jerky and stutters during touch events
        (LP: #1372850)
      . unit test fails: AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_
        frameskipping (LP: #1373826)
      . intermittent hang in TestClientInput (LP: #1338612)
      . TestClientInput.scene_obscure_mo...

Read more...

Changed in mir (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.4 KiB)

This bug was fixed in the package mir - 0.8.0+14.10.20141005-0ubuntu1

---------------
mir (0.8.0+14.10.20141005-0ubuntu1) 14.09; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.8.0 (https://launchpad.net/mir/+milestone/0.8.0)
    - Enhancements:
      . Less sensitivity to ABI breaks - many headers unused by external
        projects are now hidden and not installed by -dev packaes. If you
        require any headers that are missing, just ask.
      . Touchspots: --enable-touchspots to servers; visually shows touch
        locations (warning: This affects performance LP: #1373692).
      . Client performance reporting: Any Mir client can now get accurate
        performance information (frame rate, render time, buffer lag etc)
        logged to stdout. Just set env MIR_CLIENT_PERF_REPORT=log
      . Further improved touch responsiveness, with less lag and smoother
        scrolling (so long as you don't enable touchspots).
      . Slightly faster builds using precompiled headers.
      . Turn hardware overlays on by default. When in use, this halves the
        CPU usage of a Mir server. Already enabled in unity-system-compositor.
      . More scripting to detect ABI breaks.
      . Improved src/ tree consistency (renamed "src/shared" to "src/common").
      . Improved fatal signal design: Changed from SIGTERM to SIGHUP delivered
        to clients on unexpected server disconnection.
      . Improved library/package design to allow concurrent installations
        of different Mir versions without conflicts.
      . Fd reception code is now common to client and server.
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI bumped to 2
      . Mirplatform ABI bumped to 3
      . Mirserver ABI bumped to 26
    - API changes between Mir 0.7 and 0.8:
      . Lots of headers removed from the public SDK! We have only hidden
        headers not known to be used by any known projects. Please let us
        know if anything is missing - https://bugs.launchpad.net/mir/+filebug
      . graphics::Platform - interface changed significantly.
      . Lots of server API changes to support touchspots.
      . File descriptors now passed as type Fd instead of int32_t.
    - Bug fixes:
      . [regression] Mir deb packages with versioned names cannot be installed
        simultaneously any more (LP: #1293944)
      . A frozen client can hang the whole server (LP: #1350207)
      . QtMir FTBFS: fatal error: mir/input/input_channel.h: No such file or
        directory (LP: #1365934)
      . [regression] platform-api fails to build against Mir 0.8 (LP: #1368354)
      . Mir FTBFS with gcc 4.9.1-14 (utopic update):
        auto_unblock_thread.h:44:46: error: no matching function for call to
        ‘std::thread::thread(<brace-enclosed initializer list>)’ (LP: #1369389)
      . [regression] Compositing is jerky and stutters during touch events
        (LP: #1372850)
      . unit test fails: AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_
        frameskipping (LP: #1373826)
      . intermittent hang in TestClientInput (LP: #1338612)
      . TestClientInput.scene_obscure_mot...

Read more...

Changed in mir (Ubuntu RTM):
status: Invalid → 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.