Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3784872imd; Mon, 29 Oct 2018 12:19:36 -0700 (PDT) X-Google-Smtp-Source: AJdET5fqicfHKpLnFoB1dSoAhdfzMrMy4NMsiJtkdAsMzriAskf/Y8fa2YHYAegIV/WVqqlbGNtp X-Received: by 2002:a17:902:e005:: with SMTP id ca5-v6mr15213454plb.195.1540840776857; Mon, 29 Oct 2018 12:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540840776; cv=none; d=google.com; s=arc-20160816; b=E8CKlIsdYHfUOjsozbe/CdGCeStBvBYiYEnbgNUiHdsr7ZZRoPZHt8HwFnGa0Rocv0 nvVjM/xwF6v82XYtIKaW8YfFxdNdJWJGILsZ3Dt+Hj3IahLZM7ckvNzIHWOAaqNtjsNn j5Y2G3j7+n7fiNZfCCgfPOLneA3qc9qi7UdCfuFGuAiBSvq/kbGVUIp4DXuaDdbLza8P YjReW4QhyaF8XJXg7WYcF2uX6FcJeT2JJ5C9vj/wAxTux52MfFgkxSn7VOb9FkEh1auK uJxMivEUzrM+xRqqSOpGvQ47zKiIlGN6Bcz3Hv41atfAxB0OPsdo1bM1t8X0RnBHn4cq 3eUw== 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=5ZnP8R4xBH4YY0qsa5R+ZxHVpJTmCXgjqcES8jMRwBo=; b=iQz8NRuvPNbFKYNTTol0mfPDgwEKUNVMOkgauvVA25bW7f1heP00jfIBgsRiDBdSiz FXeaKVXGlfkpjS/zq+gc4FogVEgas6Mt2ZwU7PDOmrl9xaYDLbHfWCvlcomjsi4BChuS gmNQ49YTyjSuQhHavQZ50aKExL11ddOf70VX20o3EIhaYSl3DaxIsPAOveXLHAoGprJB YnChI315RMjsvdc3C1yY5JwAtkazAWihD8ZruaC51S/zKaEkzBdEiIK8MlMRQNluc9CK eEJ4UTP4aZj87v+D7YCbOzw3c1SVn7p787sh35cmvTvRX7JvtqyX5jeEZAOqyaWNb0N4 Gwfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mE3giW1x; 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 f6-v6si19181320plt.346.2018.10.29.12.19.21; Mon, 29 Oct 2018 12:19:36 -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=mE3giW1x; 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 S1725903AbeJ3EH3 (ORCPT + 99 others); Tue, 30 Oct 2018 00:07:29 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:43506 "EHLO mail-ed1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbeJ3EH3 (ORCPT ); Tue, 30 Oct 2018 00:07:29 -0400 Received: by mail-ed1-f48.google.com with SMTP id y20-v6so8338203eds.10 for ; Mon, 29 Oct 2018 12:17:27 -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; bh=5ZnP8R4xBH4YY0qsa5R+ZxHVpJTmCXgjqcES8jMRwBo=; b=mE3giW1xXnXtw6XDhYjjWMYIRDwG/vVpJDwBj8LzSdFR2uKWAjk9zzsHoUAb4wgep2 3ZSLGH06DGJEYIN+m6tFTXmXpX26AS/XUAM2HfikUdG5EFLG4+3U1FZQmfCuAlIvBTAB JZMT+CyzkuNn5zlGUlg89t+UIWWtZKPcDmslU= 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=5ZnP8R4xBH4YY0qsa5R+ZxHVpJTmCXgjqcES8jMRwBo=; b=lHUma4lx3ytS+YHp8ZkrC2pPtjkXx2zqPtj2G+uSq7j2Z/D4yC5UxAu3fCHa8GyKgn 63qmro4oHXd49+0Hf03Ah4HJfE4bKm5uxD+/v/r+Pb9x5KTgw32pV43SVFjIw+88CVCz diGLQ9XQXVFlUAj0Qn1XHddoeI0TdyA9Q4RMsg0x48MDfRyG141JOufsb+2VwQfnCnFI Bda3+YMaRHKxwCZOHubLYgzB/F6gbNBWg8U2fbnIcDt7Qv4m59MAB7Voobv8wolhKSr1 lF6svrLrpx0V5fjnK3XDWdHscgCpYvvgNDZ6BIvfxarFwyiwCOJ3kOlVqUhNMkDTB7Rc SUZg== X-Gm-Message-State: AGRZ1gJQr5yHJ4PNeBdYqZr5kRirgSD9Hp+3XfmeqdxE6XwIh27mRxgs YnEFUvdxxzWXIcwjnG8cMw9DT5XV1CI= X-Received: by 2002:a17:906:5249:: with SMTP id y9-v6mr11589771ejm.139.1540840646665; Mon, 29 Oct 2018 12:17:26 -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 i33-v6sm1550216edc.81.2018.10.29.12.17.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 12:17:25 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id u1-v6so9988825wrn.0 for ; Mon, 29 Oct 2018 12:17:25 -0700 (PDT) X-Received: by 2002:adf:f1cd:: with SMTP id z13-v6mr9014958wro.79.1540840644664; Mon, 29 Oct 2018 12:17:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Harry Cutts Date: Mon, 29 Oct 2018 12:17:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Logitech high-resolution scrolling.. To: torvalds@linux-foundation.org Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Hutterer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As I explained in the comments, the reason for triggering at the half multiplier point and then setting a negative remainder is to cater for wheels that sometimes rest just before they complete a whole "notch" in clicky mode. On those mice, setting the threshold at a full notch means that you frequently have to move the wheel a little past its resting point to trigger the low-res scroll event. I don't really understand why the half-multiplier thing would cause the instability; there's still a low-res threshold every 8 high-res units whichever way you do it, it's just that with the half-multiplier method it's 4 closer to the point where the wheel was when the device was connected. Once you've scrolled around a bit in smooth mode that should be irrelevant, unless you're somehow managing to move the wheel in whole-notch increments without the help of the ratchet. Maybe the long-term solution is to use more than just the value of the current scroll event when deciding whether to send a low-res event. In the meantime, I'll write a patch putting the threshold at 7/8ths of a notch, to see if that can solve both issues. Thanks, Harry Cutts Chrome OS Touch/Input team Harry Cutts Chrome OS Touch/Input team On Mon, 29 Oct 2018 at 11:33, Linus Torvalds wrote: > > On Mon, Oct 29, 2018 at 8:16 AM Linus Torvalds > wrote: > > > > Patch I'm using attached. I'm inclined to just commit it, but if > > somebody has a better idea, I can test alternatives too. > > I committed my patch, as it at least makes the scroll wheel usable. > > I'm more than open to further improvements, but I wasn't willing to > live with the status quo, and carrying this around in my tree as a > patch kept confusing me while doing merges whenever a conflict > happened (because the "git diff" that I use to see the conflicts > obviously also showed my own local modifications). > > Linus