Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5071692imd; Tue, 30 Oct 2018 11:30:34 -0700 (PDT) X-Google-Smtp-Source: AJdET5eOyINw5CA4Zp4wrNP5Yi/k2RPp/05EejtLtL6y5ILD6oIfkY9j7ZxGrGhvPoSc5H/Gqrvi X-Received: by 2002:a62:99cd:: with SMTP id t74-v6mr4040764pfk.179.1540924234638; Tue, 30 Oct 2018 11:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540924234; cv=none; d=google.com; s=arc-20160816; b=WqiHLdy9CIPIuCXilp8DbFHCFIIH/NDD+dm2gzn06V2jPTqLaFcG2tqczZ2tZT4nA/ j6MPWaALqprDSTEDj4wgCxNNUYY7+O7GGvPtteDaaIQ6k+cMuujqpKmrpptmZ8IEqrqZ CHZILYyoPG5awgVWXx/mUqGr05Lr/araf/uhNEoW+zDgLPnJsS0AXriY9hZ22uV/rxXg tEPq0iT73qVXpohXUZA/UbUC47K1kSf26nz50+YtEB+WOnZoDuVWzzpJXMr7JZfXdGJC KjvxUiVxJZtALeoyQUbthOBat8ajA0IOxTirXKoIaQ846wb6vjsIxDnYUIdtoqY1zth/ Sn4g== 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=Hw4d6rOdT80jngEvhuprpfvAvrlSV1+fKlVWPWdXFlw=; b=aa/tS2AKz2KsHXxdLm1Pk6hChcGPM87yBUxok5F0mh3CY7wXke8ibHiOqQgTFBAvcl qm3bI+SoX5GyDJV3CIvUvB09qbdI+5KShsVnKeQZu4YIPMZBG0g0QaFXzN87wIsAJpBN 6Da6p768PaRQi9nrw5Rmr+BYTEcO8SwOkn4Ck6zEEP5Hgaf1GXySidtb9L8UGnE2pjOW fe8pBWyOMJIpCB8zbb3in3IiNjswhgKORsWW0sE3KOZ4eCp1lWUlbIPRPxQDj04xdIZN g1exc4ll86ZZWSvJhav3v0i9DVeNqUDWfpCh36EnhvkyGrp37d7u0EYPjlAway2DjHvH 77iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jCzBNf5c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73-v6si23266055pfs.7.2018.10.30.11.30.15; Tue, 30 Oct 2018 11:30:34 -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=@chromium.org header.s=google header.b=jCzBNf5c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728033AbeJaCnI (ORCPT + 99 others); Tue, 30 Oct 2018 22:43:08 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:46962 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbeJaCnH (ORCPT ); Tue, 30 Oct 2018 22:43:07 -0400 Received: by mail-ed1-f67.google.com with SMTP id v18-v6so11273725edq.13 for ; Tue, 30 Oct 2018 10:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Hw4d6rOdT80jngEvhuprpfvAvrlSV1+fKlVWPWdXFlw=; b=jCzBNf5c0+d08OjJ0xSCsbMI2ZsyvRtGvzdOM7GIQNljnZi5JO6TGeQUf4h9ly4kNx 7+cNvMyoJMcIBTqCrc8nx3mpOZwpfHBTYxf5JAvGpLAh3z5CNAMnGrvm7WTuRhMVpx0i dyM1jpW+unVmtHLQBCpe+fRP7cHcU5+nIKy9w= 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=Hw4d6rOdT80jngEvhuprpfvAvrlSV1+fKlVWPWdXFlw=; b=Iz6u6j+QKpstV/UNJ33SvtcuGEuRoAakKWXp+HRZyqsxP/ylxNqPFOb58cScrCgR2I 7ncuG+lQkfOxYfo4HveDdQnjop0oNy954TtDvYa18MK3yfwh5u6OMerH9KGarhVd5TxF oKFVLVo0dwWMrZkiAtmn+3ZhOs453yExYlsRIUANbVp/Xumf7GTY1hCCzMzrgrqLoj55 1gMOE7WUPL40dY9rkUH9KjfqPMfTWbA4vt3NXGQgnH5/jOhF5u6p7tRkG1duUxS0kCPM uufqL95cgmM7OV5bVcWrMboVEzXXOvQUI9Y2CmRFSSWQHtfBk7+htaoYiKRBAoV0ZvWv tYOw== X-Gm-Message-State: AGRZ1gLYqy98KJPchMSs81xIw4bA67ll1A9iFnFx6iyUz41vSzI0kvz6 /XPLKMlTLZclygTu0Fin6awB+LCLtX0= X-Received: by 2002:aa7:d410:: with SMTP id z16-v6mr18312055edq.26.1540921719898; Tue, 30 Oct 2018 10:48:39 -0700 (PDT) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id f3-v6sm1994112edr.64.2018.10.30.10.48.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 10:48:38 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id t10-v6so13577785wrn.10 for ; Tue, 30 Oct 2018 10:48:38 -0700 (PDT) X-Received: by 2002:adf:f90f:: with SMTP id b15-v6mr12802718wrr.178.1540921717759; Tue, 30 Oct 2018 10:48:37 -0700 (PDT) MIME-Version: 1.0 References: <20181030062657.GA5380@jelly> In-Reply-To: From: Harry Cutts Date: Tue, 30 Oct 2018 10:48:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Logitech high-resolution scrolling.. To: torvalds@linux-foundation.org Cc: Peter Hutterer , jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Nestor Lopez Casado 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 Thanks for the analysis, Peter. On Mon, 29 Oct 2018 at 23:27, Peter Hutterer wro= te: > 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 a= nd > freewheeling time and once you're out of one mode, you have no reference > 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 th= e > center-point for the trigger. This gives us a few events to slide and sti= ll > 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 would > only give me 1 hi-res event per notch movement but failed to reproduce th= at > 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