Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp357363imm; Fri, 31 Aug 2018 02:17:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ0Hsb3lugasuwt2bjeanAp44toFYgGfqXkKEnBJ4eOR3sZ9wmUSKPjGdYFf/SmBO2sV5RC X-Received: by 2002:a63:1d3:: with SMTP id 202-v6mr13449866pgb.136.1535707029321; Fri, 31 Aug 2018 02:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535707029; cv=none; d=google.com; s=arc-20160816; b=zDbozHACiLzpJMVIsAlD27djfk0JroAh2l1DtRDIfW3ooGt5riRGobUHsMB26KuAWV 74Fyg5FGltA4c5SnNfg4oLHUnfcJaUgJayXPt274x1B3Y7r4BFsfZP8Nxa94SW+5dHIj R3dIK4PAUGOsV9mRS6xugI2Bz4kTXLfi6L35rjB35uZhsVhdr3648/kAnGJIUs8RZRYO aoj3yOh65cAC5apAgMkKXUfMk+iZhkMZZeR2fgtQN6A3TmpOA7DYfHG+uOcn6/A+o4tO TdVhtAd/dMEqXRCC5Out1TdMVNlD4Vbq8RdiRxCCBCp+L7sRGw31DwnVTubdYe8fFOs4 6DHQ== 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 :arc-authentication-results; bh=MJrgb3xk1VRcA5niIOkHAQ/4GLGlxEQ409cvwYh98l8=; b=mu0MYBB0fSdn71WgM4gsFYCL/gHQrCfWehtI87meUtFJIgAoQTW5KhR7NBW0TZmmDZ EBP2LYfO6ohT/KjzPvSPqWZ/NLrWHZOGJgcisItwfX4YikYgS6178jH/KIqvrY5IDsZi CfAg4RZysQQpgdaM2fe6a5xiR2krv7/nY9CAE746CQVe3WE8Q/8jxXMJKBD0z30KZfZX 8I3JPxj9lWTzsbSJuSCkTyL7lsKT791fMhaq/JcJPxoNANo9bVLt6l/7kH9wKxhMVgz0 ROavZ3WfgemPR5CGM0PIonB6F/1l3KvcSNqkV3OvVvaIZjdr/Qk+YrzCmmit8Thy5s3o MfKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@logitech-com.20150623.gappssmtp.com header.s=20150623 header.b=pLg1Dq7B; 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 71-v6si3636839pla.92.2018.08.31.02.16.54; Fri, 31 Aug 2018 02:17:09 -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=pLg1Dq7B; 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 S1728068AbeHaNVY (ORCPT + 99 others); Fri, 31 Aug 2018 09:21:24 -0400 Received: from mail-yb1-f172.google.com ([209.85.219.172]:42829 "EHLO mail-yb1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727758AbeHaNVY (ORCPT ); Fri, 31 Aug 2018 09:21:24 -0400 Received: by mail-yb1-f172.google.com with SMTP id z12-v6so622639ybg.9 for ; Fri, 31 Aug 2018 02:14:51 -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; bh=MJrgb3xk1VRcA5niIOkHAQ/4GLGlxEQ409cvwYh98l8=; b=pLg1Dq7BAVfNzoWvqTfsszxu7tQR4ExBytraVdWlV8VkNXqJKuqKWCEXGUEBAaw3sK 5CeTgqoS64kM/ca2MoRyNgTDjRBIU3eBWFeaHohFPtJAtTgVODzbvGPjTv9ywtmvr/BG q/ZxyBcfF/PB/JHp5mXsdOsDkYAS96pwO/3A1YLRZ/QwWnXX/FLEy/BzbWso0os46KDr rRjpn5uu6I7O7DaRl2oLOgawTOwlpvTT3gYTtuH7YzpZSb6y1AAlmGS9tFdcpUG5e9c/ Oq/0FzOS0cHqv/VJANJHmEs27gw5lHxCbi0dGaN+nl9ZX1BoReLQEcyjwPSStXB3YlBi B6vw== 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=MJrgb3xk1VRcA5niIOkHAQ/4GLGlxEQ409cvwYh98l8=; b=uYmO8Q17qHcVpZ7O0K224bUhtjYzJIyawygq1B62gzR1WZG/UjCobqHm66inhuYO9H eEOMjkcRS+H8aMTBNvY5uv+EwB2Njr51hGYExY0tLUZhIlZ0I2I7qMrOw04FjVkyh+WO ry4d9JKGRBrl11kG7Y53Sz81Oqutcu7S9jcjVdOYbyMA2RI4qFiyiTCCVdv3ZQHtc7wU Ae+g55gdmufx+t1KzfnTGo8u5M5hbQQy326TcqkLtUBXvXYZVxiLmbHfPlm0jZSfmQ0V lD9GL2kb8nI1V6wyXWwuNTbFppYeU0+ykymaWYTj7UvvhlvZeTePIEzy+v/7zKZtP+i1 eAkw== X-Gm-Message-State: APzg51Can9Xef7UtMPu9QdOXwYFpG7wQZ5h7lVL9kSpZdY+KTD+u/PmA U4Wr49+N29ev14fl4sz+CzLSlkkSg1R49Y4WbSRgiw== X-Received: by 2002:a25:3354:: with SMTP id z81-v6mr7960257ybz.212.1535706891069; Fri, 31 Aug 2018 02:14:51 -0700 (PDT) MIME-Version: 1.0 References: <20180823183057.247630-1-hcutts@chromium.org> <20180823183057.247630-4-hcutts@chromium.org> In-Reply-To: From: Nestor Lopez Casado Date: Fri, 31 Aug 2018 11:14:26 +0200 Message-ID: Subject: Re: [PATCH 3/3] Enable high-resolution scrolling on Logitech mice To: hcutts@chromium.org Cc: Benjamin Tissoires , "open list:HID CORE LAYER" , linux-kernel@vger.kernel.org, Dmitry Torokhov , jikos@kernel.org 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 Fri, Aug 31, 2018 at 11:11 AM Nestor Lopez Casado wrote: > > > > On Thu, Aug 30, 2018 at 10:38 PM Harry Cutts wrote: >> >> Hi Benjamin, >> >> On Thu, 30 Aug 2018 at 00:18, Benjamin Tissoires >> wrote: >> >> On Thu, Aug 30, 2018 at 1:06 AM Harry Cutts wrote: >> > > > The conversion input_report_rel(... REL_WHEEL,...) to >> > > > hid_scroll_counter_handle_scroll() should be dealt in a separate >> > > > patch. >> > > >> > > OK, I'll do that in v2, but might I ask why? I don't see how this >> > > particular hunk is special. >> > >> > I tend to consider that existing code rewrite need to be in their >> > special commit, especially if the change isn't supposed to change the >> > behaviour. This is my personal taste in case something goes wrong and >> > (in this case) a m560 suddenly starts complaining about an issue with >> > this mouse. >> > I wouldn't mind too much if you rather keep the >> > hid_scroll_counter_handle_scroll() introduction to this commit though. >> >> Yes, I see the reasoning for that, but this hunk is pretty tied to the >> main change in that scrolling on the M560 would be 8x too fast without >> it. I'll keep it in the same one, if you don't mind. >> >> > > [snip] >> > > Yes, it seems to work fine without it (at least for the MX Master 2S). >> > > Unfortunately, while testing this I encountered a bug with high-res >> > > scrolling over Bluetooth. (It seems that if you turn off the MX Master >> > > 2S while it's connected over Bluetooth, we don't detect that and >> > > remove the input device, meaning that when it reconnects the driver >> > > thinks it's in high-res mode but the mouse is in low-res.) I'm >> > > investigating, but in the meantime I'll remove the Bluetooth support >> > > from v2 and add it back in later. >> > >> > As far as I can see, the MX Master 2S is connected over BLE. Bluez >> > keeps the uhid node opened (and thus the existing bluetooth HID >> > device) to be able to reconnect faster. >> > I would suppose you should get notified in the connect event of a >> > reconnection, but it doesn't seem to be the case. >> > >> > Nestor, is there any event emitted by the mouse when it gets >> > reconnected over BLE or is that a bluez issue? >> >> Ah, interesting. The MX Master 2S is indeed using BLE, and testing >> with another Logitech BLE mouse (the M585) also leaves the input >> device around. I think this is something Logitech-specific, though, as >> the Microsoft Surface Precision mouse (also BLE) does have its input >> device removed when it turns off. I notice that btmon does show >> "device disconnected" and "device connected" events when I turn the >> M585 on and off; maybe we need to plumb those through to the driver. >> We've decided to delay Bluetooth support for high-res scrolling until >> the Chrome OS Bluetooth stack is more stable. -----Ooops, no html now... This might be related to how the device disconnects from the host. Sometimes a disconnection comes from the device not responding anymore and it is the BT supervision timeout that kicks in (host side). In some cases (hw support required on the device side) a device will send a disconnect request when switched off. Maybe these different disconnect flavors are the root cause behind the input device being removed or not. --nestor >> >> Harry Cutts >> Chrome OS Touch/Input team