From: Yariv <oigevald+kernel@gmail.com>
To: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Subject: Re: PROBLEM: Apple external Trackpad event timestamps are jittery (regression)
Date: Tue, 12 May 2020 22:54:32 +0300 [thread overview]
Message-ID: <CAEwx+QpN7c4i4qRfaVAP6yPFoydQ+W_0DOsv-NfgwU8Zb1BVZQ@mail.gmail.com> (raw)
In-Reply-To: <20200512051925.GA48688@koala>
Thanks for following up!
I took Peter's advice and used 'libinput recrod' to get some logs.
I tested both a 1st gen as well as a 2nd gen Apple external trackpads.
While the 1st gen is Bluetooth-only, the 2nd gen can be connected over
both Bluetooth and USB.
The 2nd gen external trackpad had no jitter, regardless if used over
Bluetooth or USB.
Following is a snippet of a 1st gen touchpad, showing only SYN_REPORT
lines for brevity.
This was taken on a kernel with the regression:
- [ 7, 526745, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 7, 537376, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 7, 540141, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +3ms
- [ 7, 540141, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +0ms
- [ 7, 560065, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +20ms
- [ 7, 571556, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 7, 580125, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +9ms
- [ 7, 580125, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +0ms
- [ 7, 594466, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +14ms
- [ 7, 604987, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +10ms
- [ 7, 616458, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 7, 624124, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +8ms
- [ 7, 624124, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +0ms
- [ 7, 639259, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +15ms
- [ 7, 650772, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 7, 660130, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +10ms
- [ 7, 660130, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +0ms
Now a snippet of the 2nd gen trackpad, over Bluetooth, same kernel:
- [ 9, 584965, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 595860, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 607147, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 9, 618610, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 630279, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 9, 641047, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 652429, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 664148, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 9, 674600, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +10ms
- [ 9, 686040, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 9, 697808, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 9, 709277, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 9, 719649, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +10ms
I'm entirely clueless with regard to the input device protocols,
however it is apparent that the 2nd gen trackpad has only SYN_REPORT
(0) in its log, while the 1st gen has both SYN_REPORT (0) and
SYN_REPORT (1).
Last is a snippet of the 1st gen, this time on a kernel with my hack -
so should behave as before the regression:
- [ 6, 243965, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 6, 254576, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 6, 257637, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +3ms
- [ 6, 265675, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +8ms
- [ 6, 277512, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 6, 288059, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 6, 297642, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +9ms
- [ 6, 299646, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +2ms
- [ 6, 310849, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 6, 322000, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 6, 333265, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +11ms
- [ 6, 337681, 0, 0, 1] # ------------ SYN_REPORT (1)
---------- +4ms
- [ 6, 344588, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +7ms
- [ 6, 356921, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +12ms
- [ 6, 366979, 0, 0, 0] # ------------ SYN_REPORT (0)
---------- +10ms
Here it seems that if we add the delta from each SYN_REPORT (1) to the
delta of the following SYN_REPORT (0) we get sane timestamps.
I also tested a USB mouse, and the timestamps were Ok.
So to summarize my limited finding, only the 1st gen Apple external
touchpad seems to be affected.
Entire logs:
https://drive.google.com/open?id=1nUNf2uOQPvFw_kE8h4mZB0c80kj3hu4F
Gen1, after regression
https://drive.google.com/open?id=1pr508bqeax1Csle2HQuLcuXwinWksdjo
Gen2, after regression
https://drive.google.com/open?id=1W0XekSNyf1i-Um-VqxDJuMmJoWAGXIG5
Gen1, before regression
Please let me know if I there is anything else I can do to help.
Best regards,
Yariv
On Tue, May 12, 2020 at 8:19 AM Peter Hutterer <peter.hutterer@who-t.net> wrote:
>
> On Mon, May 11, 2020 at 01:11:18PM -0700, Dmitry Torokhov wrote:
> > Hi,
> >
> > On Mon, May 11, 2020 at 09:18:15AM +0300, Yariv wrote:
> > > Using a vanilla installation of Ubuntu 20.04 (kernel v5.4), the
> > > timestamps of input events from my Apple "Magic Trackpad" - 1st
> > > generation, connected over Bluetooth - are jittery.
> > > This is a kernel regression. I bisected the bug.
> >
> > Do you see the same jitter when connected over USB? Can you also see if
> > there is similar jitter when you parse timestamps of SYN_RPEORT events
> > from "evtest"?
> >
> > Could you post a sample of events generated by device (via evtest)?
>
> unrelated, but I really recommend using 'libinput record' these days since
> it can be replayed (libinput replay) or analysed easier (it's YAML).
> Also, it prints delta times into the recording so you can immediately check
> those without having to parse them, e.g.:
>
> - evdev:
> - [ 0, 375974, 2, 0, 5] # EV_REL / REL_X 5
> - [ 0, 375974, 2, 1, -2] # EV_REL / REL_Y -2
> - [ 0, 375974, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +8ms
>
> Cheers,
> Peter
>
next prev parent reply other threads:[~2020-05-12 19:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 6:18 PROBLEM: Apple external Trackpad event timestamps are jittery (regression) Yariv
2020-05-11 20:11 ` Dmitry Torokhov
2020-05-12 5:19 ` Peter Hutterer
2020-05-12 19:54 ` Yariv [this message]
2020-05-22 5:27 ` Yariv
2020-05-23 18:37 ` Dmitry Torokhov
2020-05-23 19:11 ` Yariv
2020-05-23 21:18 ` Dmitry Torokhov
2020-05-24 11:36 ` Yariv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEwx+QpN7c4i4qRfaVAP6yPFoydQ+W_0DOsv-NfgwU8Zb1BVZQ@mail.gmail.com \
--to=oigevald+kernel@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).