Mir

Activity log for bug #1515515

Date Who What changed Old value New value Message
2015-11-12 08:22:14 Andreas Pokorny bug added bug
2015-11-12 08:22:58 Andreas Pokorny bug task added mir
2015-11-12 08:26:17 Andreas Pokorny bug task added unity8
2015-11-12 15:09:52 Andreas Pokorny canonical-devices-system-image: status New Invalid
2015-11-12 15:10:06 Andreas Pokorny bug task deleted canonical-devices-system-image
2015-11-12 15:12:00 Andreas Pokorny summary Monotonic clocks behave weird after a wakeup Shells that inject user input events need to agree on the clock to use
2015-11-12 15:12:21 Andreas Pokorny summary Shells that inject user input events need to agree on the clock to use Shells that inject user input events need to agree with the system compositor on the clock to use
2015-11-12 15:19:22 Andreas Pokorny description Calling clock_gettime behaves strangely with CLOCK_MONOTONIC CLOCK_MONOTONIC_RAW or CLOCK_MONOTONIC_BOOTTIME depending on which process you are in. Whithin usc and unity8 we get a consistent stream of monotonic time updates. independet of suspends/wakeups. Within a process like unity8-dash it seems to work until after the first suspend then the current time of CLOCK_REALTIME is returned. This can be observed through input receiver traces in mir/unity8 and unity8-dash. Steps to reproduce - take the current released version of mir : http://bazaar.launchpad.net/~mir-team/mir/0.17/view/head:/3rd_party/android-input/android/frameworks/native/libs/utils/Timers.cpp Modify // we don't support the clocks here. struct timeval t; t.tv_sec = t.tv_usec = 0; gettimeofday(&t, NULL); return std::chrono::nanoseconds(t.tv_sec)*1000000000LL + std::chrono::nanoseconds(t.tv_usec)*1000LL; into: struct timespec t; t.tv_sec = t.tv_nsec = 0; clock_gettime(CLOCK_MONOTONIC, &t); return std::chrono::nanoseconds(t.tv_sec*1000000000LL) + std::chrono::nanoseconds(t.tv_nsec); Then enable mirs input traces in /usr/share/upstart/sessions/unity8-dash.conf i.e. add: export MIR_CLIENT_INPUT_RECEIVER_REPORT=log and for comparison you could do something similar in /usr/share/upstart/sessions/unity8.conf You should get traces like: [1447315263.459656] <DEBUG> input-receiver: Received event:touch_event(when=71864404480 (-88787157.149558 ms ago), from=0, touch = {{id=0, action=change, tool=finger, x=328.545, y=504.624, pressure=0.275735, major=7.98521, minor=0, size=0}, modifiers=1) The timestamp at the beginning of the trace is gettimeofday(), but look at the "when=" part - this is the 'current time' androids input resampling believes it is. Then after the wakeup you should see: [1447315273.639723] <DEBUG> input-receiver: Received event:touch_event(when=1447404060779907704 (-88787140.-356826 ms ago), from=0, touch = {{id=0, action=down, tool=finger, x=416.229, y=593.339, pressure=0.291054, major=11.9778, minor=0, size=0}, modifiers=1) when= is now closer to gettimeofday.. If we try to change the input platforms to also use CLOCK_MONOTONIC (or std::chrono::steady_clock) in mir we also need to change unity8. Otherwise input resampling will get confused by the large difference in time stamps and long press calculation will fail. Mir should provide an interface to the clock used for user input event time stamps - both server and client side.
2015-11-12 15:28:43 Andreas Pokorny bug task deleted unity8
2015-11-12 15:29:02 Andreas Pokorny bug task added qtmir
2015-11-12 16:00:45 Andreas Pokorny description If we try to change the input platforms to also use CLOCK_MONOTONIC (or std::chrono::steady_clock) in mir we also need to change unity8. Otherwise input resampling will get confused by the large difference in time stamps and long press calculation will fail. Mir should provide an interface to the clock used for user input event time stamps - both server and client side. If we try to change the input platforms to also use CLOCK_MONOTONIC (or std::chrono::steady_clock) in mir we also need to change unity8. Otherwise input resampling will get confused by the large difference in time stamps and long press calculation will fail. Mir should provide an interface to the clock used for user input event time stamps - both server and client side. Qtmir should ensure that it uses the same clock and that dispatch within the qtEvent loop does not cause a mix of used clocks..
2015-11-18 07:48:02 Andreas Pokorny qtmir: status New Invalid
2015-11-30 14:12:44 Alan Griffiths branch linked lp:~andreas-pokorny/mir/use-monotonic-clock-for-input
2015-11-30 14:12:50 Alan Griffiths mir: status New Fix Committed
2015-11-30 14:13:04 Alan Griffiths mir: assignee Andreas Pokorny (andreas-pokorny)
2015-11-30 14:13:07 Alan Griffiths mir: milestone 0.18.0
2015-12-07 09:41:04 Daniel van Vugt bug task added mir (Ubuntu)
2015-12-22 17:59:20 Launchpad Janitor mir (Ubuntu): status New Fix Released
2015-12-22 18:55:03 Kevin DuBois mir: status Fix Committed Fix Released
2017-03-13 17:46:49 MichaƂ Sawicz affects qtmir qtmir (Ubuntu)