Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3517821imd; Mon, 29 Oct 2018 08:17:40 -0700 (PDT) X-Google-Smtp-Source: AJdET5cjUT5IZ0zLwVjIwEFO3M5xOnDrmaglh6y9TRzZOon+rlKQ0J2uWtOJ32UIKTAMKUQQQBOI X-Received: by 2002:a17:902:4681:: with SMTP id p1-v6mr14538466pld.68.1540826259895; Mon, 29 Oct 2018 08:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540826259; cv=none; d=google.com; s=arc-20160816; b=UOo+eYsLSNka5fobb/GgqWNun8dXh0hM0ufAqY5gLpnWBTEYe/N/0Ceyg2DAwvbTdg aIC9905CEvqS462RoijXrObLOrSsnzY39SLpoKlKmRbqfu6jAfSpsuWfTT75s0dAU1Ws 8fWlJ2pAyq2DFyTClBvNjnPAAqADbsC2PaA3mekOx8NhcDZjr+AIcjYkvq1XWG87rGbm voHgD/OTKhU3cmZaDCEPuBaIeHf8DC+js32eStDrWxwVJdR4qGB5Vhb6ZSHP6t0LvLBQ 0wBJXHQHb7SwVjp19qMzOjWTYfQ/XC2cxZ0qCEyBCGbjhi6lRgvnAVwordbl2JUyKqR8 Bjcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ad7JmFwvQi5rh7yBEPchr5v3P/0GAv7ynfrhYPUPjw4=; b=Fl/e7OMucf60GB/OtfnGT71KEiGhh+D6aShezTZqJZFMn9d5IazFATb2cpeBaUKNkq idtvMVTZ8v5+XU+DuWvYy2I/d5yRy2Dvd5AvaZS1AIlRz6zEJvOg8NOtWYFRteWkZjIF y57fDh76rJz/30MiqMmOf+OpY1jAGvmWZD7zGV8lMY3x1u/Spz94tXRYm21prW3gix7x RVTQRZVAek4o4MNNF4sB/F8xbWZSBB3oZ4kJDW5FpeijQyUc24R5lOlykYXsdu2Pv67G Zmpj1oV+kp/dym2h8KybzsIZQTiiLrjVZsJVQOuvmUdt/9cBrRLKPbcd4vgj5hdcAPr5 cFmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=BwrRZDJm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m23-v6si20497833pgk.424.2018.10.29.08.17.12; Mon, 29 Oct 2018 08:17:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=BwrRZDJm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727518AbeJ3AFp (ORCPT + 99 others); Mon, 29 Oct 2018 20:05:45 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:41070 "EHLO mail-lj1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbeJ3AFo (ORCPT ); Mon, 29 Oct 2018 20:05:44 -0400 Received: by mail-lj1-f170.google.com with SMTP id z80-v6so2100509ljb.8 for ; Mon, 29 Oct 2018 08:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ad7JmFwvQi5rh7yBEPchr5v3P/0GAv7ynfrhYPUPjw4=; b=BwrRZDJmrSG8PbX371ounciT2741wy2QkcLuZmsguqdXZDmRKFW56Ds96arBOAR55D 540oZQZ7l2L6orLQ8UZB51GD4HWc365IcJLE+2Il2VDfrDH6LKQ1ilhoFmRoY6BZOrG7 rCxsxj0nyL6uOlv8Es5EMRsLJ4AadzL06rlV8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ad7JmFwvQi5rh7yBEPchr5v3P/0GAv7ynfrhYPUPjw4=; b=r/VmkYtmyrEqDaeFVsQEA8ZeyW4Rh5LuZRYbguXowfp7poO1twe9cNfJcaK0/6Dz+D tBCA8w0XAMNUOGZyUrIZV4zIi38VrhY3pbBArDFBujMsXYIOiQOR1KO7Mmb4wahU+zAm kaKhHwxtonegC/BkADDNggDog0tWW/+ki1cKLPz4D/G0wk9gZSvRqOnpTCG6lELqBETi iCPmtDH12TlIWi3bKwD6ihgD55osCUpfUguHAho23ZxEchWkyd+Rg6NOB+3zy7+6w4qR aWIm3EZxQ6KwUVlsTo8dRm0nHhVzEIbmbtzoxVuWFXXTp3RvAf0BUk0ITDCc40b3FPLY Onxg== X-Gm-Message-State: AGRZ1gJPxDMhBJYoQbjOQ6gQYyhkYqWRgAHqmzMpkAWY4Ne0hqlw3SrF JCx4NzU9gEOpN+1f0aiitzw8o9l1lALTjw== X-Received: by 2002:a2e:5703:: with SMTP id l3-v6mr9723061ljb.106.1540826198568; Mon, 29 Oct 2018 08:16:38 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id s3-v6sm850102lje.73.2018.10.29.08.16.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 08:16:36 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id q6-v6so6315584lfh.9 for ; Mon, 29 Oct 2018 08:16:35 -0700 (PDT) X-Received: by 2002:a19:7019:: with SMTP id h25-v6mr8959498lfc.147.1540826195229; Mon, 29 Oct 2018 08:16:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 29 Oct 2018 08:16:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Logitech high-resolution scrolling.. To: Jiri Kosina Cc: Harry Cutts , Benjamin Tissoires , linux-input@vger.kernel.org, Linux Kernel Mailing List , peter.hutterer@who-t.net Content-Type: multipart/mixed; boundary="00000000000007413e05795f8e85" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000007413e05795f8e85 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 29, 2018 at 6:18 AM Jiri Kosina wrote: > > Benjamin indicated that Peter probably has found the issue in the code > (failure to properly reset on direction change) that might be causing > this. So honestly, once I looked at that hid_scroll_counter_handle_scroll() function, that's the first thing I tried - get rid of the "half-way threshold" thing, and reset on direction changes. It fixes the instability, and I don't see the "back-and-forth" movements and I don't get the "move the mouse and it generates mouse wheel events" any more. It basically makes the wheel _work_ for me. I'm not entirely convinced it's as good as it used to be, though. It still feels like it might be a bit over-sensitive, but that may be because now I'm just looking for it.. Patch I'm using attached. I'm inclined to just commit it, but if somebody has a better idea, I can test alternatives too. Linus --00000000000007413e05795f8e85 Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jnug1vmy0 IGRyaXZlcnMvaGlkL2hpZC1pbnB1dC5jIHwgNDMgKysrKysrKysrKysrKysrKysrKysrLS0tLS0t LS0tLS0tLS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDIxIGluc2VydGlvbnMoKyksIDIyIGRl bGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvaGlkL2hpZC1pbnB1dC5jIGIvZHJpdmVy cy9oaWQvaGlkLWlucHV0LmMKaW5kZXggNTY3YzNiZjY0NTE1Li5hMmY3NGU2YWRjNzAgMTAw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