Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3939828imd; Mon, 29 Oct 2018 15:02:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5fEY+JsTBK21VvfmchYHK0O8PNlZJ0BGLPeu+P4/yCg0vBhGxIICa06CFiTcuhj/Tg44BSw X-Received: by 2002:a17:902:a5c3:: with SMTP id t3-v6mr16110810plq.287.1540850523850; Mon, 29 Oct 2018 15:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540850523; cv=none; d=google.com; s=arc-20160816; b=bihizZHMuAgHtMLhF1NK6C/LBhvjZ2/P4DBCbpy7GmHL3OYMNKRKcnPOhA3js5KXqb E4NH9xSb4q411n5BKcgMDjaxK7O1tlk6nsYcrp9gCV7onvW7ueIxcPybZsVEiMU+DEye 2UFNKNmkQG4TA2tTQO0qSAwkxapnxt+2VO2ATc9/O8H1VlH8fnyMH3LrC4BKpwSosznI ZmXIvm4kUsCr6fiaIcomLXkn6LoA31ZVPYDz0/3gW9lEdA8Pd5PB2A6QQWp/0V0K9r5r CH+nkZkV0VzC46ohWQdR3oEI8QECxlVmEkebS10Zy6IivOBxq4cf/80PuVjtZWe0WeCV ilhw== 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=Xb00rV8W5FboYyxLcRQFquUw2L0pvaQJwpwyOnz6bVE=; b=F+KSYsVAUR2hBKyg1Bz+YUCu+YH0RX6c1P111GMkwULtmTvG4A3wLQLbD6FjvLy305 IkkJMPHos2J1HbFWCVqQzxUod5svl15NaCNbY859lJz4y2YWkmWFjvqwhhy19Os8eCkO CMv6dUiS/dFxlrphOFS9oYyAd4dKPbn69tseqkVnigGGXzGxx1dNXqDo3x6Qg+2D7R0I VYKAUYl+ImTB9hswju492adW+Dv3gPD1LaJhCKRxOlgq5Y15xU+FFs5mcOVUmmXv1Rns NSX9ea2MC7FK6l+PB0cTigHsuUf1S0D3esFwhqoAJOY922ocwBonuchU3W8akie4m7Vx XkCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GIgmNpCz; 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 g20-v6si20203175plq.192.2018.10.29.15.01.48; Mon, 29 Oct 2018 15:02:03 -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=GIgmNpCz; 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 S1727824AbeJ3Gvg (ORCPT + 99 others); Tue, 30 Oct 2018 02:51:36 -0400 Received: from mail-lj1-f179.google.com ([209.85.208.179]:42983 "EHLO mail-lj1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727683AbeJ3Gvg (ORCPT ); Tue, 30 Oct 2018 02:51:36 -0400 Received: by mail-lj1-f179.google.com with SMTP id f3-v6so9386796ljk.9 for ; Mon, 29 Oct 2018 15:00:59 -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=Xb00rV8W5FboYyxLcRQFquUw2L0pvaQJwpwyOnz6bVE=; b=GIgmNpCzsKOFMI9dAcZdxuxAcgsB9M7YYVv38+dS7zKb9yDp2HmJzui8+jzVuaEx+K FQPHRIwNSd2uvTjy4ZfD/TipOU3f77oi4sltR4jxPUv+t5DjhaW4APxyoTYp4zFCPF5w wEsoUHsuftiHmdjVqFzFQGAFec+9kjWOi1M+c= 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=Xb00rV8W5FboYyxLcRQFquUw2L0pvaQJwpwyOnz6bVE=; b=bd2v+avj0q9SRzpsmnJuH4i2/Sn5vinCKl3uV+SCdBxeKfXYIdnFr9SQ6fYiIW4ROc 8+2WoNNJdoai7f843rWr7Erf5AoLZIWeJvICDLupHmWnL9HXYai17bkysv3AhwUEebL2 NH1Ih4QsLZIw9/BvZ6FKjecE/YKH3lYOgWCIrX1eeI/TtBF2J7JHkSrrA5wjqFW6NXeE s17fqEO14m6amajQSDRJlFuJbBzlmbDHcbG+NvjqmxRTDnXK2hZZ/og5Xz1yAI9OLKoQ 6FKDXgxSoxQ2P2+bpTiwsJ0r6ZN9pUhpPHpP/xDvNEDbwsz7NBNYFmb5Hi5Wy218n7Xt wKRQ== X-Gm-Message-State: AGRZ1gJLs5UwVxx+5sLM8EMIrQknK1j2ifL+vwJGSGBFmIdLwnnjdz6D 6F3mu/CWDGNNdACh7b4vVoF852umyBhXAA== X-Received: by 2002:a2e:9355:: with SMTP id m21-v6mr10369409ljh.135.1540850458194; Mon, 29 Oct 2018 15:00:58 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id t144sm538730lff.53.2018.10.29.15.00.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 15:00:57 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id f3-v6so9386688ljk.9 for ; Mon, 29 Oct 2018 15:00:56 -0700 (PDT) X-Received: by 2002:a2e:9584:: with SMTP id w4-v6mr10688502ljh.118.1540850456067; Mon, 29 Oct 2018 15:00:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 29 Oct 2018 15:00:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Logitech high-resolution scrolling.. To: Harry Cutts Cc: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, Linux Kernel Mailing List , 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 On Mon, Oct 29, 2018 at 2:42 PM Harry Cutts wrote: > > Ah, I see what you mean. So, if we move the threshold to (multiplier - > 1)/multiplier (7/8) in this case, I think the equivalent scenario > would be: That would work, yes. Except I think you *do* want the "reset on direction change" logic, because otherwise we still end up having the: > - we update remainder to -1 where it now gets easier to next time go the wrong way, for no good reason. So now you only need another 6/8ths the other way to get to within 7/8ths of -8 and scroll back. In other words, the whole "round partial scrolling" also causes that whole "now the other direction is closer" issue. At 7/8's it is less obviously a problem than it was at 1/2, but I still think it's a sign of an unstable algorithm, where changes get triggered too easily in the non-highres world. Also, honestly, I'm not sure I see the point. *IF* you actually scroll more in one direction, it doesn't matter one whit whether you pick 1/2, 7/8, or whole multipliers: the *next* step is still always going to be one whole multiplier away. So I think the whole rounding is actually misguided. I think it may come from the very fact that you did *not* reset the remainder on direction changes, so you could scroll in one direction to -3, and then you change direction and go a "whole" tick the other way, but now it's just at +5, so you think you need to round up. With the whole "reset when changing direction", I don't think the rounding is necessary, and I don't think it makes sense. But I'm willing to test patches. I would suggest looking at the "oops, direction changed" issue, though, because it really was very annoying. > I tested these changes with 5 different Logitech mice (see the > Logitech high-res support patch [0] for details), and did so mainly > with applications that were *not* high-res aware, using a mix of > clicky and smooth modes. Admittedly the MX Anywhere 2S was not one of > my test devices; I had assumed that its behaviour would be > sufficiently similar to that of the MX Anywhere 2 and the MX Master > 2S. I happen to have a MX Master 2S too, but I don't use it because I find I like the smaller and lightweight "anywhere" mice. I didn't try the broken case with it, but one thing I notice with the Master 2S is that it seems to have a "heftier" feel to its wheel. It may simply have more mass and not be as flighty, and thus show the issue less. But that's just a theory. It could just be something that is individual to some mice. Linus