Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2302194pxp; Fri, 18 Mar 2022 07:46:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNxBGq+zQoCQ9l78VcpL1NumsysN/v4SHF25ftA8ZEEc4BuVVuP6TS5BmoeMxMpFKszQBM X-Received: by 2002:a05:6a00:851:b0:4f7:68db:51bb with SMTP id q17-20020a056a00085100b004f768db51bbmr10579424pfk.74.1647614795686; Fri, 18 Mar 2022 07:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647614795; cv=none; d=google.com; s=arc-20160816; b=e7zmPJtodCADkED/WqGy/bHnm4xl0z/S2So0NJR/oDsyHwhQ3zpS9K5vdeE+GDrb4w P/WQm/AWMpTHNw+RxZ/iS0F8zdBORRpsA5n/K09qpOtMIvMvMUp1luyst5jUYq0ffztO GD2jIJwmmYCkFCvi24Aes8TEXOm6b9iEwuDWhGhcOi05+Ev4rbJA4AgxaqhFtpcpXpbg so6V9AdS7LWmrdVdQsT4681Pv0fqoUiBFpgwwt2hvy0zL6cgefcy5Pk9NxTLW2BPyqhU VY5MZHg+U314iivdD2pIoV8M338cTS8ZyO8vk2sHFmSmsYCtRMir4mFcmXtw1PaIiaLW +7Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=XNXcAYQW5Hz3fswspMidh1mhKM6SNhu/Xg3QEmgSjuo=; b=xRSEar1nlVllD+KmMnppJ0ZG4vPdM1+uWiTdaga9oLCGoLlbJUN0oPOieGXJ3KF84N Mfc3zWbbg5X9xnyxLZc7uAQlK2C2eoEoC2/eTJDLWuIAG2u0mwaAltBCQVEsoDzRZm1U eZh6TXQugLvOfQS4AyW/5lL/ar35G41sBpOQownsEYpmLkApgDlhmCjVbr/BTazY8x+O fCAGCvx3MQDl6KIYiA7HMxsJaDe7wFB7FnTnBVFmKYtUVpp0BJiG72rLYgqBrN+I/PUX TIrV6aclZUIybrvxwwjZ69LcLu0GMXcz9oPCreW1ilPTqqinVtbFmpcvfbNbkiAMadni 8c9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nVlLwTw5; dkim=neutral (no key) header.i=@suse.de header.b=041PDJvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a17090a521200b001bf297ac775si972358pjh.71.2022.03.18.07.46.21; Fri, 18 Mar 2022 07:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=nVlLwTw5; dkim=neutral (no key) header.i=@suse.de header.b=041PDJvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237365AbiCROiu (ORCPT + 99 others); Fri, 18 Mar 2022 10:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236567AbiCROip (ORCPT ); Fri, 18 Mar 2022 10:38:45 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ADA82E5753; Fri, 18 Mar 2022 07:37:22 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id E95281F37F; Fri, 18 Mar 2022 14:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647614240; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XNXcAYQW5Hz3fswspMidh1mhKM6SNhu/Xg3QEmgSjuo=; b=nVlLwTw5JhuxSmkaEo0iKIxgJbmg6YvlZsS664H7PlXuiO1q81InlpRkPeypySZMXhZU97 n/Uh6uOoaVrYbkwwtaAmLWk9eiUyVhoXT2Zm65shJPIK6JF49nFLzkXG42298X9+kbhnId IhVRiCCd36tkcueus49Yr0hYKKgAhNk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647614240; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XNXcAYQW5Hz3fswspMidh1mhKM6SNhu/Xg3QEmgSjuo=; b=041PDJvY/a63e9IcGtaWYaJG2OGMoJ+BVkvxg5PwJL9neVI01m2Diaolgv/ZZIMfuYOdwW DSnuQeGISxaOqJDQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id C6410A3B89; Fri, 18 Mar 2022 14:37:20 +0000 (UTC) Date: Fri, 18 Mar 2022 15:37:20 +0100 Message-ID: From: Takashi Iwai To: Benjamin Tissoires Cc: Takashi Iwai , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , linux-input@vger.kernel.org, Peter Hutterer , Jiri Kosina , stable@vger.kernel.org, regressions@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [REGRESSION] Right touchpad button disabled on Dell 7750 In-Reply-To: References: <20220318130740.GA33535@elementary> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Mar 2022 15:06:55 +0100, Benjamin Tissoires wrote: > > > > A couple of days ago another user with the same laptop (Dell Precision > > > 7550 or 7750) emailed me to report the issue and I sent him a patch for > > > testing. > > > > > > I he confirms that the patch works, I'll send it to the mailing list. > > > > > > I believe that your analysis of the regression is correct and I think > > > that we'd need to add a quirk for the device. > > > > > > In case you want to have a look to the patch, I added it to this > > > libinput [1] report. > > > > Great, I'll try to build and ask the reporter to test with the patch. > > > > As noticed on the libinput bug, I think the patch is wrong (not by a lot). > We should base the class on MT_CLS_WIN8, not MT_CLS_DEFAULT. > > The testers might say that it's working, but this might create some > corner cases where it's not leading to more and more headaches with > your users. So is it like below? I'll build another kernel with that. Thanks! Takashi -- 8< -- From: José Expósito Subject: [PATCH] HID: multitouch: fix Dell Precision 7550 and 7750 button type The touchpad present in the Dell Precision 7550 and 7750 laptops reports a HID_DG_BUTTONTYPE of type MT_BUTTONTYPE_CLICKPAD. However, the device is not a clickpad, it is a touchpad with physical buttons. In order to fix this issue, a quirk for the device was introduced in libinput [1] [2] to disable the INPUT_PROP_BUTTONPAD property: [Precision 7x50 Touchpad] MatchBus=i2c MatchUdevType=touchpad MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50* AttrInputPropDisable=INPUT_PROP_BUTTONPAD However, because of the change introduced in 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") the BTN_RIGHT key bit is not mapped anymore breaking the device right click button. In order to fix the issue, create a quirk for the device forcing its button type to touchpad regardless of the value reported by the firmware. [1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/481 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1868789 [ modified MT_CLS_BUTTONTYPE_TOUCHPAD quirk bits to base on MT_CLS_WIN8 as suggested by Benjamin -- tiwai ] Fixes: 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") Signed-off-by: José Expósito Signed-off-by: Takashi Iwai --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-multitouch.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -285,6 +285,9 @@ #define USB_VENDOR_ID_CIDC 0x1677 +#define USB_VENDOR_ID_CIRQUE_CORP 0x0488 +#define USB_DEVICE_ID_DELL_PRECISION_7X50 0x120A + #define USB_VENDOR_ID_CJTOUCH 0x24b8 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020 0x0020 #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040 0x0040 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -71,6 +71,7 @@ MODULE_LICENSE("GPL"); #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) #define MT_QUIRK_DISABLE_WAKEUP BIT(21) +#define MT_QUIRK_BUTTONTYPE_TOUCHPAD BIT(22) #define MT_INPUTMODE_TOUCHSCREEN 0x02 #define MT_INPUTMODE_TOUCHPAD 0x03 @@ -194,6 +195,7 @@ static void mt_post_parse(struct mt_devi #define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015 #define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016 #define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017 +#define MT_CLS_BUTTONTYPE_TOUCHPAD 0x0018 /* vendor specific classes */ #define MT_CLS_3M 0x0101 @@ -302,6 +304,15 @@ static const struct mt_class mt_classes[ MT_QUIRK_CONTACT_CNT_ACCURATE | MT_QUIRK_WIN8_PTP_BUTTONS, .export_all_inputs = true }, + { .name = MT_CLS_BUTTONTYPE_TOUCHPAD, + .quirks = MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_IGNORE_DUPLICATES | + MT_QUIRK_HOVERING | + MT_QUIRK_CONTACT_CNT_ACCURATE | + MT_QUIRK_STICKY_FINGERS | + MT_QUIRK_WIN8_PTP_BUTTONS |, + MT_QUIRK_BUTTONTYPE_TOUCHPAD, + .export_all_inputs = true }, /* * vendor specific classes @@ -1286,6 +1297,9 @@ static int mt_touch_input_configured(str (app->buttons_count == 1)) td->is_buttonpad = true; + if (app->quirks & MT_QUIRK_BUTTONTYPE_TOUCHPAD) + td->is_buttonpad = false; + if (td->is_buttonpad) __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); @@ -1875,6 +1889,12 @@ static const struct hid_device_id mt_dev MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, + /* Cirque Corp (Dell Precision 7550 and 7750 touchpad) */ + { .driver_data = MT_CLS_BUTTONTYPE_TOUCHPAD, + HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, + USB_VENDOR_ID_CIRQUE_CORP, + USB_DEVICE_ID_DELL_PRECISION_7X50) }, + /* CJTouch panels */ { .driver_data = MT_CLS_NSMU, MT_USB_DEVICE(USB_VENDOR_ID_CJTOUCH,