Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp6095262imd; Wed, 31 Oct 2018 06:49:01 -0700 (PDT) X-Google-Smtp-Source: AJdET5d7P9Ify7THPjBKsfM90E/33Dz5XZ4OkgJP+16LbY35G/+jCZtwJFeWS/HiELy5G6FsdwJW X-Received: by 2002:a63:330e:: with SMTP id z14-v6mr3261276pgz.220.1540993740975; Wed, 31 Oct 2018 06:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540993740; cv=none; d=google.com; s=arc-20160816; b=BBrQb+xVMX9cxs4xq7up9LdrR80zKC//oc7MIo45hp7jnlQVBQ5ZWHStMIlPBSIJMd W9FS3n293tT/9SWeDSwla1oKc2Y6bruAvnHWEAlv0Z1be+p3ZqwpqO2IeHQEg8tkJEOh JBJgX+x3Z3oBr7x7b0iv58DNHpGJDOc00G9+WT/KMNn1ZQjAfQ4q3lnReTSqM0VotfEh ekam4XYNniJ0OC86NfqsHPUzum+G37c721O8qvEyunuGkmYKMGJuKpTm0oRK99WzFWD5 x/nto5Ot2F0Ddf1t7ie/P1Qf5tLo7To8W4DofsCxL02fMWCkchhlRSI0Zc3ZJ6nO2/JD JoFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=SClc0V8aqFpX8plRleDD84T0Y58wXcNRcSrkcQr6Mqk=; b=twhoFFEm4rxJODaxJSUCqO+kBzi4/5lIs6mBHHCAjAaUzPEZBxBpJkS63a5nC8ltEb UJBfmnH7I1hxBt0WBm0wcJEuL0dNT/MM6wxeFVQ/1S81lOckED28MeNf/ldnIDrapAIp +EcNttoXKZfpJm0N4pEYh+NUMKy9pv3qPgLjGiQtzomRAMngjesBhCGsUYw8gCCVHBto JRFhr0A08k5STu152YQ5tuIgR8Ib77n6fPNdyxzrRFYE8OerYhi88gjNfaS8K3LG08h5 iDW8xkWI3MN55G6sJbveXPBGdg9mx7n0VJgjWoAeczVrO4n7a0tRg2lRn7UczsCKpzK4 osxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@logitech-com.20150623.gappssmtp.com header.s=20150623 header.b=nSa3TVbX; 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 q25-v6si22386413pgd.357.2018.10.31.06.48.44; Wed, 31 Oct 2018 06:49:00 -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=@logitech-com.20150623.gappssmtp.com header.s=20150623 header.b=nSa3TVbX; 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 S1729359AbeJaWq0 (ORCPT + 99 others); Wed, 31 Oct 2018 18:46:26 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:43325 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728849AbeJaWqZ (ORCPT ); Wed, 31 Oct 2018 18:46:25 -0400 Received: by mail-yb1-f193.google.com with SMTP id g75-v6so6616339yba.10 for ; Wed, 31 Oct 2018 06:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=logitech-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SClc0V8aqFpX8plRleDD84T0Y58wXcNRcSrkcQr6Mqk=; b=nSa3TVbXVYB7t/HUkXfIk1hMD4Rfn3yBDHk/9D3HX6HZEzqdvp3sf6Sr5uj16Bp6wO EEhpqV+Zq+8LsrTbeoGNPtQxnLXw1c3IzPEczeu/Yg9f17OgYHHKvGts/IJKWXXk8dlJ Aamov5ToQxx2JZZ06cD69ekNNUblJ7/F2jSNilU2tkaWAdW0ZBqRH4/iNo0EDUM1T9ik zEJcZiUm630Z7dcwqV9o0+dV0a6GVJDOHzXp6FakmbXdqshXjLbUKokjhdmhvWQDj8tn NsWAXNjeUkjM/pY7Q8Maog9fbtEO2fCchaim68LK69OJMvHEfOPhHOP5C+T8sqVKCVNg vU2w== 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:content-transfer-encoding; bh=SClc0V8aqFpX8plRleDD84T0Y58wXcNRcSrkcQr6Mqk=; b=DAZIVggIIF3F3TagfM+fGHzHalu+J97Hr9nlAYzAG0pDTY7Gs/Zr+XT52Z0KpjQWXZ zxht5SA3fP959P9dFbMBNGgP7ZPiLXOgEplhLWb/kr74TSX4pTXVdGs4AtOjjG9JPCRW /zc4i/XWMXASXb0dDfaJxaqO74VloiTyzawMLUgLUYqn6w71oecE1Rzrffmu5WNXPVvi CDyWKAgD/ftY5kflFAeHTjX4PaGt553cTN5S1MAGlorGySzoe0//FsUjofLefz25Q7Uh xx2+Z/smeICyZa7664WVn/5yEF4R3kl2sD6FddHI8U4Wd9GJIhMKzA2Kp0wnkGIou58q eYow== X-Gm-Message-State: AGRZ1gJLAAZL5gqSp5HJfE60v07OtIr9op0T9Ba/AEi/CpG3w2Opxj4Q lb4n/79qWPL4GMUFNUk9Xjz7iq8EzQszsGlgqyEiFQ== X-Received: by 2002:a25:1dc3:: with SMTP id d186-v6mr3018237ybd.485.1540993698802; Wed, 31 Oct 2018 06:48:18 -0700 (PDT) MIME-Version: 1.0 References: <20181030062657.GA5380@jelly> In-Reply-To: From: Nestor Lopez Casado Date: Wed, 31 Oct 2018 14:47:52 +0100 Message-ID: Subject: Re: Logitech high-resolution scrolling.. To: hcutts@chromium.org Cc: Linus Torvalds , peter.hutterer@who-t.net, jikos@kernel.org, Benjamin Tissoires , "open list:HID CORE LAYER" , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, I've read the discussion, I think I understand the problem and I'll get back to this thread with more information as soon as I've got some internal feedback. BTW, lovely to see so many MX Anywhere 2 users :) -nestor On Tue, Oct 30, 2018 at 6:48 PM Harry Cutts wrote: > > Thanks for the analysis, Peter. > > On Mon, 29 Oct 2018 at 23:27, Peter Hutterer w= rote: > > IMO this is a lost battle because you cannot know when the ratchet is > > enabled or not (at least not on all mice). Users switch between ratchet= and > > freewheeling time and once you're out of one mode, you have no referenc= e > > to the other mode's reset point anymore. > > It would be a lost battle, if it weren't for the fact that on all the > mice I've tested, putting the wheel back into clicky mode causes the > wheel to jump to the nearest notch resting point, which should mean > that the remainder resets to 0 (or maybe =C2=B11 if the mechanism is worn= ). > > > So my suggestion is to combine Linus' reset with your approach and use = the > > center-point for the trigger. This gives us a few events to slide and s= till > > do the right thing, and any direction change will reset anyway. Biggest > > drawback is that the first event after a direction change is triggered > > faster than the next event. Otherwise it feels correct to me, both in > > free-wheeling and in ratchet mode now. > > This sounds like a reasonable approach if we find that we can't keep > the triggering point consistent. > > > Also, WTF moment: I managed to get the mouse into a state where it woul= d > > only give me 1 hi-res event per notch movement but failed to reproduce = that > > again. > > Interesting; let me know if you manage to reliably reproduce it. The > only time I've encountered this in the past was when connecting to the > mouse over BLE, where we don't seem to be able to detect if the mouse > is power cycled (meaning that the mouse resets to low-res mode but the > kernel is still expecting high-res reports). I held off on enabling > high-res scrolling over Bluetooth for this reason. > > On Tue, 30 Oct 2018 at 09:29, Linus Torvalds > wrote: > > I wonder if there's some docs on what Logitech does internally in the > > mouse. It might involve a timeout (ie "if not moving for a while, do > > the rounding _and_ reset), which would probably be too expensive to do > > on the host side. > > I've been wondering this as well. Nestor (CCed), is there anything you > can tell us about this? > > Harry Cutts > Chrome OS Touch/Input team