[regression] [nonblockswap] Client judders, skipping frames periodically
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Mir development team | ||
mir (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Running mir_demo_
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
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- Alexandros Frantzis: Pending requested
- Alan Griffiths: Pending requested
- Mir development team: Pending requested
-
Diff: 297 lines (+166/-35)3 files modifiedsrc/server/compositor/multi_threaded_compositor.cpp (+29/-26)
tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+3/-4)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+134/-5)
- PS Jenkins bot (community): Approve (continuous-integration)
- Alan Griffiths: Abstain
- Daniel van Vugt: Abstain
- Andreas Pokorny (community): Approve
- Alexandros Frantzis (community): Abstain
- Alberto Aguirre (community): Approve
-
Diff: 3043 lines (+1552/-378)38 files modifiedinclude/platform/mir/graphics/buffer_id.h (+1/-1)
include/server/mir/asio_main_loop.h (+2/-0)
include/server/mir/compositor/frame_dropping_policy.h (+69/-0)
include/server/mir/compositor/frame_dropping_policy_factory.h (+57/-0)
include/server/mir/default_server_configuration.h (+3/-0)
include/server/mir/time/timer.h (+8/-1)
include/test/mir_test/fake_clock.h (+72/-0)
include/test/mir_test/signal.h (+63/-0)
include/test/mir_test_doubles/mock_frame_dropping_policy_factory.h (+83/-0)
include/test/mir_test_doubles/mock_timer.h (+52/-0)
include/test/mir_test_doubles/stub_frame_dropping_policy_factory.h (+58/-0)
src/server/asio_main_loop.cpp (+23/-9)
src/server/compositor/CMakeLists.txt (+1/-0)
src/server/compositor/buffer_queue.cpp (+37/-1)
src/server/compositor/buffer_queue.h (+5/-1)
src/server/compositor/buffer_stream_factory.cpp (+6/-4)
src/server/compositor/buffer_stream_factory.h (+4/-4)
src/server/compositor/default_configuration.cpp (+15/-1)
src/server/compositor/multi_threaded_compositor.cpp (+53/-135)
src/server/compositor/timeout_frame_dropping_policy_factory.cpp (+92/-0)
src/server/compositor/timeout_frame_dropping_policy_factory.h (+56/-0)
tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+8/-13)
tests/integration-tests/compositor/test_buffer_stream.cpp (+45/-15)
tests/integration-tests/compositor/test_swapping_swappers.cpp (+3/-1)
tests/integration-tests/graphics/android/test_buffer_integration.cpp (+4/-1)
tests/integration-tests/graphics/android/test_internal_client.cpp (+2/-1)
tests/mir_test/CMakeLists.txt (+2/-0)
tests/mir_test/fake_clock.cpp (+53/-0)
tests/mir_test/signal.cpp (+46/-0)
tests/mir_test_doubles/CMakeLists.txt (+2/-0)
tests/mir_test_doubles/mock_frame_dropping_policy_factory.cpp (+70/-0)
tests/mir_test_doubles/mock_timer.cpp (+149/-0)
tests/unit-tests/compositor/CMakeLists.txt (+1/-0)
tests/unit-tests/compositor/test_buffer_queue.cpp (+128/-46)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+15/-78)
tests/unit-tests/compositor/test_timeout_frame_dropping_policy.cpp (+186/-0)
tests/unit-tests/graphics/mesa/test_linux_virtual_terminal.cpp (+1/-0)
tests/unit-tests/test_asio_main_loop.cpp (+77/-66)
- PS Jenkins bot (community): Approve (continuous-integration)
- Daniel van Vugt: Needs Fixing
- Kevin DuBois (community): Needs Fixing
- Alan Griffiths: Needs Information
-
Diff: 365 lines (+82/-31)11 files modifiedexamples/render_overlays.cpp (+11/-1)
include/platform/mir/graphics/renderable.h (+2/-0)
include/test/mir_test_doubles/fake_renderable.h (+10/-1)
include/test/mir_test_doubles/mock_renderable.h (+1/-0)
include/test/mir_test_doubles/stub_renderable.h (+13/-0)
src/server/compositor/multi_threaded_compositor.cpp (+23/-27)
src/server/scene/basic_surface.cpp (+8/-0)
src/server/scene/basic_surface.h (+3/-0)
src/server/scene/surface_stack.cpp (+3/-0)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+2/-2)
tests/unit-tests/graphics/android/test_hwc_device.cpp (+6/-0)
- PS Jenkins bot (community): Approve (continuous-integration)
- Daniel van Vugt: Disapprove
- Chris Halse Rogers: Approve
- Kevin DuBois (community): Approve
- Alexandros Frantzis (community): Approve
-
Diff: 2890 lines (+1520/-333)38 files modifiedinclude/platform/mir/graphics/buffer_id.h (+1/-1)
include/server/mir/asio_main_loop.h (+2/-0)
include/server/mir/compositor/frame_dropping_policy.h (+69/-0)
include/server/mir/compositor/frame_dropping_policy_factory.h (+57/-0)
include/server/mir/default_server_configuration.h (+3/-0)
include/server/mir/time/timer.h (+8/-1)
include/test/mir_test/fake_clock.h (+72/-0)
include/test/mir_test/signal.h (+63/-0)
include/test/mir_test_doubles/mock_frame_dropping_policy_factory.h (+83/-0)
include/test/mir_test_doubles/mock_timer.h (+52/-0)
include/test/mir_test_doubles/stub_frame_dropping_policy_factory.h (+58/-0)
src/server/asio_main_loop.cpp (+20/-6)
src/server/compositor/CMakeLists.txt (+1/-0)
src/server/compositor/buffer_queue.cpp (+54/-3)
src/server/compositor/buffer_queue.h (+6/-1)
src/server/compositor/buffer_stream_factory.cpp (+6/-4)
src/server/compositor/buffer_stream_factory.h (+4/-4)
src/server/compositor/default_configuration.cpp (+15/-1)
src/server/compositor/multi_threaded_compositor.cpp (+53/-135)
src/server/compositor/timeout_frame_dropping_policy_factory.cpp (+92/-0)
src/server/compositor/timeout_frame_dropping_policy_factory.h (+56/-0)
tests/acceptance-tests/test_client_surface_swap_buffers.cpp (+8/-13)
tests/integration-tests/compositor/test_buffer_stream.cpp (+44/-14)
tests/integration-tests/compositor/test_swapping_swappers.cpp (+3/-1)
tests/integration-tests/graphics/android/test_buffer_integration.cpp (+4/-1)
tests/integration-tests/graphics/android/test_internal_client.cpp (+2/-1)
tests/mir_test/CMakeLists.txt (+2/-0)
tests/mir_test/fake_clock.cpp (+53/-0)
tests/mir_test/signal.cpp (+46/-0)
tests/mir_test_doubles/CMakeLists.txt (+2/-0)
tests/mir_test_doubles/mock_frame_dropping_policy_factory.cpp (+70/-0)
tests/mir_test_doubles/mock_timer.cpp (+149/-0)
tests/unit-tests/compositor/CMakeLists.txt (+1/-0)
tests/unit-tests/compositor/test_buffer_queue.cpp (+130/-47)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+15/-78)
tests/unit-tests/compositor/test_timeout_frame_dropping_policy.cpp (+186/-0)
tests/unit-tests/graphics/mesa/test_linux_virtual_terminal.cpp (+1/-0)
tests/unit-tests/test_asio_main_loop.cpp (+29/-22)
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 |
description: | updated |
summary: |
- [regression] Client judders, skipping frames periodically + [regression] [nonblockswap] Client judders, skipping frames periodically |
tags: | added: nonblockswap |
Changed in mir: | |
milestone: | 0.1.9 → 0.1.10 |
Changed in mir: | |
assignee: | Daniel van Vugt (vanvugt) → Mir development team (mir-team) |
tags: |
added: regression removed: regression-update |
Changed in mir: | |
milestone: | 0.2.0 → 0.3.0 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in mir (Ubuntu): | |
importance: | Undecided → High |
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 /bugs.launchpad .net/bugs/ 1233564, https:/ /bugs.launchpad .net/bugs/ 1292306.
rendered. Fixes: https:/
Approved by Alberto Aguirre, PS Jenkins bot. ------- ------- ------- ------- ------- ------- ------- ----
-------