[xmir] Inputs slowing, last event of a stream of events greatly delayed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mir |
Fix Released
|
Critical
|
Daniel van Vugt | |
| mir (Ubuntu) |
Critical
|
Daniel van Vugt |
Bug Description
If I type 10 characters quickly, the first 9 come out reasonably fast, but the last after a delay of almost 1/2 a second.
Also if I move mouse rapidly, then stop, mouse cursor stops, then after a few 100ms it jumps a few pixels to final destination.
Have been using XMir continuously for over 6 hours now.
Possibly related to bug: 1199449
Related branches
- PS Jenkins bot (community): Approve (continuous-integration) on 2013-08-08
- Alan Griffiths: Approve on 2013-08-08
- Kevin DuBois (community): Abstain on 2013-08-07
- Alexandros Frantzis (community): Approve on 2013-08-07
-
Diff: 5340 lines (+1332/-3186)55 files modifieddebian/control (+2/-2)
debian/libmirserver1.install (+1/-1)
examples/buffer_render_target.cpp (+8/-0)
examples/buffer_render_target.h (+1/-0)
include/server/mir/compositor/back_buffer_strategy.h (+0/-47)
include/server/mir/compositor/buffer_allocation_strategy.h (+0/-63)
include/server/mir/compositor/buffer_stream_factory.h (+6/-6)
include/server/mir/compositor/buffer_stream_surfaces.h (+0/-1)
include/server/mir/compositor/buffer_swapper.h (+0/-131)
include/server/mir/compositor/buffer_swapper_exceptions.h (+0/-42)
include/server/mir/compositor/buffer_swapper_multi.h (+0/-66)
include/server/mir/compositor/buffer_swapper_spin.h (+0/-73)
include/server/mir/compositor/multi_acquisition_back_buffer_strategy.h (+0/-66)
include/server/mir/compositor/swapper_factory.h (+0/-55)
include/server/mir/default_server_configuration.h (+0/-2)
include/test/mir_test_doubles/mock_buffer_bundle.h (+2/-0)
include/test/mir_test_doubles/mock_swapper.h (+0/-66)
include/test/mir_test_doubles/mock_swapper_factory.h (+0/-47)
src/server/CMakeLists.txt (+1/-1)
src/server/compositor/CMakeLists.txt (+0/-5)
src/server/compositor/buffer_bundle.h (+2/-0)
src/server/compositor/buffer_stream_factory.cpp (+5/-5)
src/server/compositor/buffer_stream_surfaces.cpp (+4/-7)
src/server/compositor/buffer_swapper_multi.cpp (+0/-174)
src/server/compositor/buffer_swapper_spin.cpp (+0/-114)
src/server/compositor/multi_acquisition_back_buffer_strategy.cpp (+0/-119)
src/server/compositor/rw_lock.cpp (+0/-71)
src/server/compositor/rw_lock.h (+0/-88)
src/server/compositor/swapper_factory.cpp (+0/-118)
src/server/compositor/switching_bundle.cpp (+352/-51)
src/server/compositor/switching_bundle.h (+55/-11)
src/server/compositor/temporary_buffers.cpp (+16/-7)
src/server/compositor/temporary_buffers.h (+13/-2)
src/server/default_server_configuration.cpp (+1/-14)
tests/integration-tests/compositor/CMakeLists.txt (+0/-1)
tests/integration-tests/compositor/test_buffer_stream.cpp (+132/-130)
tests/integration-tests/compositor/test_stress_buffer_swapper.cpp (+0/-308)
tests/integration-tests/compositor/test_swapping_swappers.cpp (+3/-6)
tests/integration-tests/graphics/android/test_buffer_integration.cpp (+5/-6)
tests/integration-tests/graphics/android/test_internal_client.cpp (+1/-4)
tests/integration-tests/shell/test_session.cpp (+1/-0)
tests/integration-tests/shell/test_session_manager.cpp (+0/-1)
tests/integration-tests/test_surfaceloop.cpp (+8/-39)
tests/unit-tests/compositor/CMakeLists.txt (+0/-6)
tests/unit-tests/compositor/test_buffer_stream.cpp (+14/-2)
tests/unit-tests/compositor/test_buffer_swapper.cpp (+0/-156)
tests/unit-tests/compositor/test_buffer_swapper_double.cpp (+0/-207)
tests/unit-tests/compositor/test_buffer_swapper_spin_triple.cpp (+0/-213)
tests/unit-tests/compositor/test_buffer_swapper_triple.cpp (+0/-125)
tests/unit-tests/compositor/test_rw_lock.cpp (+0/-173)
tests/unit-tests/compositor/test_swapper_factory.cpp (+0/-221)
tests/unit-tests/compositor/test_switching_bundle.cpp (+688/-111)
tests/unit-tests/compositor/test_temporary_buffers.cpp (+9/-21)
tests/unit-tests/graphics/android/test_internal_client_interpreter.cpp (+0/-1)
tests/unit-tests/surfaces/test_surface_stack.cpp (+2/-0)
- Kevin DuBois (community): Approve on 2013-08-09
- Alexandros Frantzis (community): Approve on 2013-08-09
- PS Jenkins bot (community): Approve (continuous-integration) on 2013-08-08
-
Diff: 172 lines (+60/-27)3 files modifiedinclude/server/mir/compositor/multi_threaded_compositor.h (+2/-0)
src/server/compositor/multi_threaded_compositor.cpp (+15/-9)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+43/-18)
summary: |
- [xmir] Keyboard input slowing, last character of a spell of typing takes - 1/2 second to appear + [xmir] Inputs slowing, last event of a stream of events greatly delayed |
Changed in mir: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Chris Halse Rogers (raof) |
Gerry Boland (gerboland) wrote : | #1 |
Changed in xmir: | |
status: | New → Triaged |
assignee: | nobody → Chris Halse Rogers (raof) |
Changed in xmir: | |
importance: | Undecided → Medium |
Gerry Boland (gerboland) wrote : | #2 |
Using XFCE on Mir, no issue
kevin gunn (kgunn72) wrote : | #3 |
ok i am now seeing this again after last nights update - hadn't had a problem in a week.
1 google hangout last night after rebooting too....
super annoying, must be fixed for 13.10
Changed in xmir: | |
importance: | Medium → Critical |
Changed in mir: | |
importance: | Medium → Critical |
kevin gunn (kgunn72) wrote : | #4 |
I am noticing lag in my usb mouse click as well
Alan Griffiths (alan-griffiths) wrote : | #5 |
I don't run XMir (as I like to run Mir by itself and this doesn't work currently).
But I occasionally see this behaviour too. (But not - so far - today)
Christopher Townsend (townsend) wrote : | #6 |
I just updated with last night's update and I see this immediately when typing into a terminal. I tried both Gnome Terminal and Terminator with the same result.
Gerry Boland (gerboland) wrote : | #7 |
To update me comment above, still using XFCE on Mir, after a few suspend/resume cycle, the input stream has become a bit erratic. All events gets through eventually - and in the right order, but some events in a close bunch are delayed by up to a second.
Typing this sentence alone is a chore!! And mouse movement is increasingly unpredictable - I move my physical mouse, the cursor waits about 500ms, then hops to where it should be . Then when I stop moving the mouse, again I get that final jump.
And then hang. Can't find anything useful in log files that could help :(
Daniel van Vugt (vanvugt) wrote : | #8 |
I wonder if we're just assuming that the lag is in input, because that's how we interact with Mir.
It's possible the lag is in rendering, and that just makes input feel delayed.
Chris Halse Rogers (raof) wrote : | #9 |
I believe that Daniel is correct.
I think that after some trigger we're missing the last Damage event, so the final character is only drawn after the *next* drawing event occurs (you can see this well in a text field with a blinking cursor - the final character will appear when the cursor blinks).
I'll investigate further next week.
Chris Halse Rogers (raof) wrote : | #10 |
On further inspection - we're *not* missing a damage event. When adding counters for our thread-proxy messages, damage events received, and swap_buffers sent XMir definitely receives a Damage event and sends a swap_buffers call in reply. It would appear that the buffers we're submitting have a 1-frame delay between rendering and display.
This could be because XMir is rendering to the wrong buffer, or it could be because Mir is doing something crazy, like triple buffering.
Daniel van Vugt (vanvugt) wrote : | #11 |
I think I noticed this could happen when I started looking at multi_threaded_
It looks like the client/
Chris Halse Rogers (raof) wrote : | #12 |
This is definitely a Mir problem rather than an XMir problem. Instrumenting everything, we find that the (correct) buffer client acquire/
12:16 <RAOF> ...
12:16 <RAOF> Client sub buffer{3}
12:16 <RAOF> Client acquired buffer{4}
12:16 <RAOF> Compositor acquired buffer{3}
12:16 <RAOF> Compositing buffer{3}
12:16 <RAOF> Client sub buffer{4}
12:16 <RAOF> Compositor released buffer{3}
12:17 <RAOF> ...
to
12:17 <RAOF> ...
12:17 <RAOF> Client acquired buffer{3}
12:17 <RAOF> Client sub buffer{3}
12:17 <RAOF> Compositor acquired buffer{4}
12:17 <RAOF> Compositing buffer{4}
12:17 <RAOF> Compositor released buffer{4}
12:17 <RAOF> Client acquired buffer{4}
12:17 <RAOF> Client sub buffer{4}
12:17 <RAOF> Compositor acquired buffer{3}
12:17 <RAOF> Compositing buffer{3}
12:17 <RAOF> Compositor released buffer{3}
12:17 <RAOF> ...
12:18 <RAOF> At some point in this log we start compositing the N-1'th buffer submitted by the client, rather than the last one.
Daniel van Vugt (vanvugt) wrote : | #13 |
Linked a branch I'm working on. Early testing suggests it solves this bug.
In case this helps somebody: this bug can be greatly noticed if you disable cursor blink in your terminal emulator.
And I can also confirm that the bug is in rendering, not in input.
Daniel van Vugt (vanvugt) wrote : | #15 |
While it would be nice if we had a fix just for this bug, no one else is working on it yet. And given my current work seems to fix it, I will loosely take responsibility for the bug.
Changed in mir: | |
assignee: | Chris Halse Rogers (raof) → Daniel van Vugt (vanvugt) |
status: | Triaged → In Progress |
Changed in mir: | |
assignee: | Daniel van Vugt (vanvugt) → nobody |
status: | In Progress → Triaged |
assignee: | nobody → Daniel van Vugt (vanvugt) |
status: | Triaged → In Progress |
Changed in xmir: | |
status: | Triaged → Invalid |
PS Jenkins bot (ps-jenkins) wrote : | #16 |
Fix committed into lp:mir at revision 948, scheduled for release in mir, milestone 0.0.9
Changed in mir: | |
status: | In Progress → Fix Committed |
tags: | added: flavormirbug |
Daniel van Vugt (vanvugt) wrote : | #17 |
Not fixed yet. Only one of the two branches required has landed.
Changed in mir: | |
status: | Fix Committed → In Progress |
Launchpad Janitor (janitor) wrote : | #18 |
This bug was fixed in the package mir - 0.0.8+13.
---------------
mir (0.0.8+
[ Daniel van Vugt ]
* Simplify and generalize buffer swapping to support arbitrary numbers
of: - buffers - compositors - clients This is a unified N-buffers
algorithm which supports any positive number of buffers, as well as
dynamically switching between synchronous and asynchronous
behaviour. So it does everything the existing code does and more.
The key requirement is to support an arbitrary number of (different)
simultaneous compositor acquisitions, as is needed for bypass
support (coming soon). This then leads to the requirement that a
compositor and a snapshot buffer should be acquired differently.
Because a snapshot should never consume frames, only observe them.
On the other hand, a compositior acquire must consume a frame (if
available) so as to guarantee correct ordering when more than one
are acquired simultaneously in bypass mode. Also fixes LP: #1199717
and is half the fix for LP: #1199450. (LP: #1199450, #1199717)
[ Alan Griffiths ]
* doc, tools: update instructions for "flipped" image.
[ Christopher James Halse Rogers ]
* Split out unversioned Mir platform package to fix upgrades across
libmirserver SONAME bumps.
[ Ubuntu daily release ]
* Automatic snapshot from revision 950
-- Ubuntu daily release <email address hidden> Fri, 09 Aug 2013 11:14:41 +0000
Changed in mir (Ubuntu): | |
status: | New → Fix Released |
kevin gunn (kgunn72) wrote : | #19 |
just approved https:/
which should be the other part to the solution
PS Jenkins bot (ps-jenkins) wrote : | #20 |
Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.0.9
Changed in mir: | |
status: | In Progress → Fix Committed |
Changed in mir: | |
milestone: | none → 0.0.9 |
no longer affects: | xmir |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Anca Emanuel (anca-emanuel) wrote : | #21 |
Not fixed for me.
Daniel van Vugt (vanvugt) wrote : | #22 |
Anca,
What versions are your libmirserver* packages and unity-system-
Anca Emanuel (anca-emanuel) wrote : | #23 |
emanuel@test:~$ apt-cache show libmirserver* | grep Version
Version: 0.0.9+13.
Version: 0.0.9+13.
emanuel@test:~$ unity-system-
unity-system-
Daniel van Vugt (vanvugt) wrote : | #24 |
Anca,
Can you please confirm the version installed (not cached) by querying:
dpkg -l | grep libmirserver
?
Also, what kind of GPU/driver are you using?
Anca Emanuel (anca-emanuel) wrote : | #25 |
emanuel@test:~$ dpkg -l | grep libmirserver
ii libmirserver1:amd64 0.0.9+13.
emanuel@test:~$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce 8800 GT] (rev a2)
emanuel@test:~$ dpkg -l | grep nouveau
ii libdrm-
ii libdrm-
ii xserver-
Daniel van Vugt (vanvugt) wrote : | #26 |
Anca,
I think you might be seeing nouveau-specific pauses/hiccups, which I have seen myself. But those are nouveau-specific.
Can you please log a new bug? At least unless someone with an Intel GPU reports this one is not fixed.
Anca Emanuel (anca-emanuel) wrote : | #27 |
Reported as bug 1212163
Gerry Boland (gerboland) wrote : | #28 |
After over 24 hours of usage, I confirm this is fixed on my Macbook Pro 8,1 with Sandybridge graphics.
Changed in mir (Ubuntu): | |
assignee: | nobody → Daniel van Vugt (vanvugt) |
importance: | Undecided → Critical |
Ubuntu QA Website (ubuntuqa) wrote : | #29 |
This bug has been reported on the Ubuntu Package testing tracker.
A list of all reports related to this bug can be found here:
http://
tags: | added: package-qa-testing |
Having done a fresh boot 3 hours ago, everything was fine until I had a Google hangout. Now the lag is back.