Skip to contentSkip to conversation

Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads"

PATCH In review José Expósito 6 participants 9 messages Mar 21, 2022 – Apr 5, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads"

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

---
 drivers/input/input.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/input/input.c +0 -6
index c3139bc2aa0d..ccaeb2426385 100644
@@ -2285,12 +2285,6 @@ int input_register_device(struct input_dev *dev)
 	/* KEY_RESERVED is not supposed to be transmitted to userspace. */
 	__clear_bit(KEY_RESERVED, dev->keybit);
 
-	/* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */
-	if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) {
-		__clear_bit(BTN_RIGHT, dev->keybit);
-		__clear_bit(BTN_MIDDLE, dev->keybit);
-	}
-
 	/* Make sure that bitmasks not mentioned in dev->evbit are clean. */
 	input_cleanse_bitmasks(dev);
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 7 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 21 lines
---
 drivers/input/input.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/input/input.c +0 -6
index c3139bc2aa0d..ccaeb2426385 100644
@@ -2285,12 +2285,6 @@ int input_register_device(struct input_dev *dev)
 	/* KEY_RESERVED is not supposed to be transmitted to userspace. */
 	__clear_bit(KEY_RESERVED, dev->keybit);
 
-	/* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */
-	if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) {
-		__clear_bit(BTN_RIGHT, dev->keybit);
-		__clear_bit(BTN_MIDDLE, dev->keybit);
-	}
-
 	/* Make sure that bitmasks not mentioned in dev->evbit are clean. */
 	input_cleanse_bitmasks(dev);
 
Acked-by on v1 1/1
#2 lore raw
In reply to José Expósito
Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 7 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Cheers,
Peter

Quoted 24 lines
---
 drivers/input/input.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/input/input.c +0 -6
index c3139bc2aa0d..ccaeb2426385 100644
@@ -2285,12 +2285,6 @@ int input_register_device(struct input_dev *dev)
 	/* KEY_RESERVED is not supposed to be transmitted to userspace. */
 	__clear_bit(KEY_RESERVED, dev->keybit);
 
-	/* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */
-	if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) {
-		__clear_bit(BTN_RIGHT, dev->keybit);
-		__clear_bit(BTN_MIDDLE, dev->keybit);
-	}
-
 	/* Make sure that bitmasks not mentioned in dev->evbit are clean. */
 	input_cleanse_bitmasks(dev);
 
Signature · 1 line
2.25.1
#3 lore raw
In reply to José Expósito

Hi, this is your Linux kernel regression tracker.

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

#regzbot ^backmonitor:
https://lore.kernel.org/stable/[email protected]/

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them and lack knowledge about most of the areas they concern. I thus unfortunately will sometimes get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.

#4 lore raw
Quoted 33 lines · Thorsten Leemhuis

Hi, this is your Linux kernel regression tracker.

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Quoted 4 lines

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

No, I think it just wasn't picked up by the input maintainer yet (Dmitry, now in CC).

FWIW:

José, please do not forget to add the input maintainer when you target the input tree, not the HID one :)

Cheers,
Benjamin

Quoted 15 lines

#regzbot ^backmonitor:
https://lore.kernel.org/stable/[email protected]/

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)

P.S.: As the Linux kernel's regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them and lack knowledge about most of the areas they concern. I thus unfortunately will sometimes get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.

maintainer
#5 lore raw
Quoted 40 lines · Benjamin Tissoires
Quoted 33 lines · Thorsten Leemhuis

Hi, this is your Linux kernel regression tracker.

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Quoted 4 lines

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

Quoted 8 lines

No, I think it just wasn't picked up by the input maintainer yet (Dmitry, now in CC).

FWIW:

José, please do not forget to add the input maintainer when you target the input tree, not the HID one :)

I see that there were several ACKs, but how many devices misuse the HID_DG_BUTTONTYPE? Would it be better to quirk against either affected Dell models, or particular touchpads (by HID IDs) instead of reverting wholesale?

Thanks.

Signature · 1 line
Dmitry
#6 lore raw
Quoted 47 lines · Dmitry Torokhov
Quoted 46 lines · Benjamin Tissoires
Quoted 33 lines · Thorsten Leemhuis

Hi, this is your Linux kernel regression tracker.

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Quoted 4 lines

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

No, I think it just wasn't picked up by the input maintainer yet (Dmitry, now in CC).

FWIW:

Quoted 7 lines
Quoted 2 lines

José, please do not forget to add the input maintainer when you target the input tree, not the HID one :)

I see that there were several ACKs, but how many devices misuse the HID_DG_BUTTONTYPE? Would it be better to quirk against either affected Dell models, or particular touchpads (by HID IDs) instead of reverting wholesale?

fwiw, a quick git grep in libinput shows 12 entries for disabling BTN_RIGHT and 9 entries for enabling/disabling INPUT_PROP_BUTTONPAD. That's not the number of devices affected by this bug, merely devices we know advertise the wrong combination.

Note that the cause for the revert is loss of functionality. Previously, a device was just advertising buttons incorrectly but still worked fine. This was mostly a cosmetic issue (and could be worked around in userspace). With the patch in place some devices right button no longer works because it's filtered by the kernel. That's why the revert is needed.

The device could/should still be quirked to drop INPUT_PROP_BUTTONPAD but that is only required to work around the cosmetic issues then.

Cheers,
Peter

maintainer
#7 lore raw
Quoted 61 lines · Peter Hutterer
Quoted 47 lines · Dmitry Torokhov
Quoted 46 lines · Benjamin Tissoires
Quoted 33 lines · Thorsten Leemhuis

Hi, this is your Linux kernel regression tracker.

Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Quoted 4 lines

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

No, I think it just wasn't picked up by the input maintainer yet (Dmitry, now in CC).

FWIW:

Quoted 7 lines
Quoted 2 lines

José, please do not forget to add the input maintainer when you target the input tree, not the HID one :)

I see that there were several ACKs, but how many devices misuse the HID_DG_BUTTONTYPE? Would it be better to quirk against either affected Dell models, or particular touchpads (by HID IDs) instead of reverting wholesale?

fwiw, a quick git grep in libinput shows 12 entries for disabling BTN_RIGHT and 9 entries for enabling/disabling INPUT_PROP_BUTTONPAD. That's not the number of devices affected by this bug, merely devices we know advertise the wrong combination.

Quoted 8 lines

Note that the cause for the revert is loss of functionality. Previously, a device was just advertising buttons incorrectly but still worked fine. This was mostly a cosmetic issue (and could be worked around in userspace). With the patch in place some devices right button no longer works because it's filtered by the kernel. That's why the revert is needed.

The device could/should still be quirked to drop INPUT_PROP_BUTTONPAD but that is only required to work around the cosmetic issues then.

OK, fair enough, applied.

Thank you.

Signature · 1 line
Dmitry
#8 lore raw
In reply to Peter Hutterer

Just a quick add-on note for the record about another affected device:

Quoted 58 lines · Peter Hutterer
Quoted 44 lines · Dmitry Torokhov
Quoted 43 lines · Benjamin Tissoires
Quoted 30 lines · Thorsten Leemhuis
Quoted 20 lines · José Expósito

This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40.

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 and making impossible to workaround it in user space.

Quoted 8 lines

In order to avoid breakage on other present or future devices, revert the patch causing the issue.

Quoted 4 lines

Jiri, Benjamin, what the status here? Sure, this is not a crucial regression and we are in the middle of the merge window, but it looks like nothing has happened for a week now. Or was progress made somewhere and I just missed it?

No, I think it just wasn't picked up by the input maintainer yet (Dmitry, now in CC).

FWIW:

Quoted 7 lines
Quoted 2 lines

José, please do not forget to add the input maintainer when you target the input tree, not the HID one :)

I see that there were several ACKs, but how many devices misuse the HID_DG_BUTTONTYPE? Would it be better to quirk against either affected Dell models, or particular touchpads (by HID IDs) instead of reverting wholesale?

fwiw, a quick git grep in libinput shows 12 entries for disabling BTN_RIGHT and 9 entries for enabling/disabling INPUT_PROP_BUTTONPAD. That's not the number of devices affected by this bug, merely devices we know advertise the wrong combination.

Quoted 8 lines

Note that the cause for the revert is loss of functionality. Previously, a device was just advertising buttons incorrectly but still worked fine. This was mostly a cosmetic issue (and could be worked around in userspace). With the patch in place some devices right button no longer works because it's filtered by the kernel. That's why the revert is needed.

The device could/should still be quirked to drop INPUT_PROP_BUTTONPAD but that is only required to work around the cosmetic issues then.

I anyone cares now or in the future: seems the patch meanwhile reverted (thx) also broke the ICL Si1516:
https://bugzilla.kernel.org/show_bug.cgi?id=215771

Ciao, Thorsten

P.S.: Any while at it, let me let regzbot about the fix as well:

#regzbot fixed-by: 8b188fba75195745026e11d408e4a7e94e01d701