Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753846AbdCFKZA (ORCPT ); Mon, 6 Mar 2017 05:25:00 -0500 Received: from mail-os2jpn01on0044.outbound.protection.outlook.com ([104.47.92.44]:35184 "EHLO JPN01-OS2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753027AbdCFKYy (ORCPT ); Mon, 6 Mar 2017 05:24:54 -0500 From: Masaki Ota To: Paul Donohue , Nick Fletcher CC: Joseph Salisbury , "ben@smart-cactus.org" , "mhocko@suse.com" , "dmitry.torokhov@gmail.com" , "pali.rohar@gmail.com" , "rydberg@bitmath.org" , "linux@roeck-us.net" , "open list:HID CORE LAYER" , LKML , "stable@vger.kernel.org" Subject: RE: [REGRESSION][v4.9.y][v4.10.y] Input: ALPS - set DualPoint flag for 74 03 28 devices Thread-Topic: [REGRESSION][v4.9.y][v4.10.y] Input: ALPS - set DualPoint flag for 74 03 28 devices Thread-Index: AQHSldnQOEuqHud7XkuysJn/lVJLrqGGi1aAgAC6HCA= Date: Mon, 6 Mar 2017 08:45:33 +0000 Message-ID: References: <78be095c-a7ae-328d-dd0a-b8470dfc1318@canonical.com> <20170304161509.GI4609@TopQuark.net> <20170305175619.GJ4609@TopQuark.net> <20170305180841.GK4609@TopQuark.net> In-Reply-To: <20170305180841.GK4609@TopQuark.net> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: paulsd.com; dkim=none (message not signed) header.d=none;paulsd.com; dmarc=none action=none header.from=jp.alps.com; x-originating-ip: [106.184.109.136] x-ms-office365-filtering-correlation-id: d742c8db-7417-4c5d-7dc8-08d4646d26fe x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:KAWPR01MB1092; x-microsoft-exchange-diagnostics: 1;KAWPR01MB1092;7:2cSYsg3kP6MbZJjxzkQiMCMgN4pVC9DOfys+yNa08q1NWSp5BghVgKsJdgeE5x+gcSk0v5140UpUCwvWnX9PL5V6ACGdvuC+6SQySCEp3cpiEuildoAPtOtS1GV1aeGpex9NLj6sU9j0jnIqkn4LwCGiCpAntj9dVditH24QyYyt225QKZS1s/wcvsr4Ncyl9xAV5COCKNftWsmnXq6l2Nlk+OrG3aVTI77FY+t1RiNYPSDCKoScjbFLylWPXtk/djZHWmgxkEVCeDAXcPijoiQ6UFHPopRXR8N90RFrqxr63Gzu9X39YeRh5aJqd9HD6Zt/QV94iXKGA2hJNjtc0A==;20:+a1TLkFD7R9AoRjvpO/Hu8Ge0M7Ww1f/n6VI0bHANTjDK8PgpRL1jqMnsYuYvokyk1W7xBxROWlBghkV6M9ixc8kiW3x/Z24ghnQKGZwHEFs/pXhmhjgO1RF8HOMvEop/bbE3auZGhKKbDsw6jrYbMPNW6VsZMuXCuj5g7oep835zovh6ukuHneyevRaUZlZDv7yYJVv5kXJtRs/IE9fZf0WqYp9xnTil49AwSSmK55oe3Zr1Us8a3BEBJh2nZ3M x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(198206253151910)(9931346810618); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558025)(6072148);SRVR:KAWPR01MB1092;BCL:0;PCL:0;RULEID:;SRVR:KAWPR01MB1092; x-forefront-prvs: 0238AEEDB0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39850400002)(39860400002)(39450400003)(39410400002)(39840400002)(40764003)(377454003)(53754006)(24454002)(13464003)(2906002)(345774005)(53936002)(55016002)(3280700002)(25786008)(81166006)(6246003)(77096006)(38730400002)(53366004)(76176999)(54356999)(106116001)(99286003)(39060400002)(54906002)(229853002)(53376002)(7416002)(966004)(50986999)(6506006)(33656002)(53546006)(6436002)(4326008)(5890100001)(5660300001)(7696004)(8676002)(2950100002)(42882006)(122556002)(1720100001)(3846002)(102836003)(6116002)(8936002)(2900100001)(3660700001)(92566002)(66066001)(85182001)(189998001)(9686003)(93886004)(7736002)(74316002)(6306002)(305945005)(86362001)(10090945008)(16193025007);DIR:OUT;SFP:1101;SCL:1;SRVR:KAWPR01MB1092;H:KAWPR01MB1092.jpnprd01.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-2022-jp" MIME-Version: 1.0 X-OriginatorOrg: jp.alps.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2017 08:45:33.2166 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 57e76998-77bd-4b82-a424-198f46eb2254 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KAWPR01MB1092 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v26AP4CW019549 Content-Length: 7356 Lines: 181 Hi, Paul, I understand the current situation. We have three devices that have ID: E7=73 03 28. DELL: Normal Pad type (There are Left and right button below Touchpad.) ID: E7=73 03 28, EC=73 01 13 ID: E7=73 03 28, EC=73 01 22 TOSHIBA: Button Pad type ID: E7=73 03 28, EC=73 01 14 I think Nick mentioned about TOSHIBA device. I have checked the source code and I guess EC=73 01 14 device does not have "ALPS_BUTTONPAD" Flag, although it is the Button Pad. Because "alps_update_btn_info_ss4_v2()" does not support E7=73 03 28 devices. E7=73 03 14 device can use below code. is_btnless = (otp[1][1] >> 3) & 0x01; E7=73 03 28 device has to use below bit. is_btnless = (otp[1][0] >> 1) & 0x01; I will check other parts of source code. Best Regards, Masaki Ota -----Original Message----- From: Paul Donohue [mailto:linux-kernel@paulsd.com] Sent: Monday, March 06, 2017 3:09 AM To: Nick Fletcher ; 太田 真喜 Masaki Ota Cc: Joseph Salisbury ; ben@smart-cactus.org; mhocko@suse.com; dmitry.torokhov@gmail.com; pali.rohar@gmail.com; rydberg@bitmath.org; linux@roeck-us.net; open list:HID CORE LAYER ; LKML ; stable@vger.kernel.org Subject: Re: [REGRESSION][v4.9.y][v4.10.y] Input: ALPS - set DualPoint flag for 74 03 28 devices Oops, forgot the attachments On Sun, Mar 05, 2017 at 12:56:19PM -0500, Paul Donohue wrote: > Masaki: Do you have any information about this touchpad you can share? Is the third byte in EC relevant to the protocol and something we should look for when identifying devices in the driver? > > Nick: > > Unfortunately, I didn't print quite enough information in the two-finger message, but yeah, this kinda looks like a different protocol. > > I've attached two tarballs this time: > 1) alps_2a.tar.gz prints some additional info in the two-finger message which may help figure out what protocol your device is speaking: > sudo -s > dkms remove alps_ss5/1.0 --all > cd /usr/src/ > rm -rf alps_ss5-1.0 > tar -xvzf alps_2a.tar.gz > dkms install alps_ss5/1.0 > modprobe -r psmouse ; modprobe psmouse # Try two-finger scrolling, > then run: > dmesg | grep 'two-finger' > > 2) alps_2b.tar.gz disables the driver unless the third byte in EC is 0x13 (the value my device uses) ... This driver should make your mouse work properly: > sudo -s > dkms remove alps_ss5/1.0 --all > cd /usr/src/ > rm -rf alps_ss5-1.0 > tar -xvzf alps_2b.tar.gz > dkms install alps_ss5/1.0 > modprobe -r psmouse ; modprobe psmouse > > Try those out and let's see where that gets us. > > When you are done testing, you can revert back to whatever driver came with your kernel by running: > sudo -s > dkms remove alps_ss5/1.0 --all > modprobe -r psmouse ; modprobe psmouse > > -Paul > > On Sun, Mar 05, 2017 at 09:09:01AM +0000, Nick Fletcher wrote: > > Hi All, > > > > My touchpad has the physical buttons above the touchpad. > > > > I have cut and pasted the the results of the two dmesg commands > > below. The trackpad of course stopped working correctly again after > > installing alps_ss5-1.0. > > > > I'm afraid any experimenting with the code myself may be beyond my ability. > > :-( > > > > root@brassneck-test:/usr/src# modprobe -r psmouse ; modprobe psmouse > > root@brassneck-test:/usr/src# dmesg | grep 'ALPS ID' > > [ 239.983818] psmouse serio1: alps: ALPS ID: E7=73 03 28, EC=73 01 > > 14 [ 240.433532] psmouse serio1: alps: ALPS ID: E7=73 03 28, EC=73 > > 01 14 root@brassneck-test:/usr/src# dmesg | grep two-finger [ > > 279.294490] psmouse serio1: alps: ALPS two-finger packet w/ button > > (buttonpad: 0): d9 73 24 > > > > > > Thank you for your help in this and thank you to Joseph for building > > all the test kernels whilst attempting to find out which commit > > first caused my issue. > > > > Cheers, > > Nick. > > > > On 4 March 2017 at 16:15, Paul Donohue wrote: > > > > > I have a 74 03 28 device on a Dell Precision laptop that handles > > > two-finger scrolling fine. Without this patch, my mouse functions > > > only as a dumb PS/2 mouse, which means I lose all multi-touch and > > > scrolling capabilities entirely. So I would rather not see this > > > reverted. :) > > > > > > I suspect one of two things: > > > 1) My device has physical buttons below the touchpad. There are > > > some different code paths for devices without physical buttons > > > below the touchpad. Perhaps there is a bug in those alternate > > > code paths? Does the buggy device have physical buttons? > > > 2) Perhaps this is a new ALPS variant which speaks a new protocol > > > that is not currently handled by the driver but which isn't > > > properly identified/differentiated by the alps_identify() function? > > > > > > To get some additional data, grab the attached tarball, then: > > > sudo -s > > > cd /usr/src/ > > > tar -xvzf alps_1.tar.gz > > > apt install dkms > > > dkms install alps_ss5/1.0 > > > # Do not copy and paste the modprobe command! Type it manually! > > > # Otherwise the mouse click used to paste the command at the same > > > time as # reloading the driver may crash the kernel. > > > modprobe -r psmouse ; modprobe psmouse dmesg | grep 'ALPS ID' > > > > > > In the dmesg output, you should see something like: > > > psmouse serio1: alps: ALPS ID: E7=73 03 28, EC=73 01 13 > > > > > > Are the E7 and EC numbers identical to the above? > > > > > > Then try two-finger scrolling, then run: > > > dmesg | grep 'two-finger' > > > > > > In the dmesg output, I expect you should see something like: > > > psmouse serio1: alps: ALPS two-finger packet (buttonpad: 0): 1c 51 > > > 46 > > > > > > We can compare your output to mine to see what is different. > > > > > > If you're willing to experiment with the code yourself to try to > > > figure out more, the relevant code is in alps_decode_ss4_v2() in > > > src/alps.c in that tarball. You should see the "ALPS two-finger > > > packet" debug message I added there ... you can add additional > > > debugging messages to figure out what exactly the decoder is > > > doing. The SS4_* macros for bit manipulation and field extraction > > > are defined near the top of src/alps.h. To recompile/reload the driver after making changes: > > > dkms remove alps_ss5/1.0 --all > > > dkms install alps_ss5/1.0 > > > modprobe -r psmouse ; modprobe psmouse > > > > > > On Fri, Mar 03, 2017 at 02:58:34PM -0500, Joseph Salisbury wrote: > > > > Hi Ben, > > > > > > > > A kernel bug report was opened against Ubuntu [0]. After a > > > > kernel bisect, it was found that reverting the following commit > > > > resolved this > > > bug: > > > > > > > > commit aeaa881f9b17823028b464893b89c42db797b717 > > > > Author: Ben Gamari > > > > Date: Tue Oct 4 11:43:30 2016 -0700 > > > > > > > > Input: ALPS - set DualPoint flag for 74 03 28 devices > > > > > > > > The regression was introduced as of v4.9-rc1. > > > > > > > > I was hoping to get your feedback, since you are the patch > > > > author. Do you think gathering any additional data will help > > > > diagnose this issue, or would it be best to submit a revert request? > > > > > > > > > > > > Thanks, > > > > > > > > Joe > > > > > > > > [0] http://pad.lv/1662589 > > > > > > >