Bug 196253 - Middle button on trackpoint is not detected on ThinkPad E470
Summary: Middle button on trackpoint is not detected on ThinkPad E470
Status: REOPENED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Dmitry Torokhov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-03 14:15 UTC by Kiril Vladimiroff
Modified: 2019-06-14 08:21 UTC (History)
7 users (show)

See Also:
Kernel Version: 4.11.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (57.03 KB, text/plain)
2017-07-03 14:15 UTC, Kiril Vladimiroff
Details
New dmesg with zero detected buttons (62.46 KB, text/plain)
2017-11-21 21:56 UTC, eldrad.ulthran
Details
Handle newer trackpoints (15.26 KB, patch)
2018-01-18 20:01 UTC, Dmitry Torokhov
Details | Diff
Assume 3 buttons even if extended read successful (460 bytes, patch)
2018-01-19 13:35 UTC, Alexander Blinne
Details | Diff
Patch to treat 0 reported buttons as 3 (1.91 KB, patch)
2018-01-19 17:58 UTC, Dmitry Torokhov
Details | Diff

Description Kiril Vladimiroff 2017-07-03 14:15:35 UTC
Created attachment 257313 [details]
dmesg

On a new Lenovo ThinkPad E470 the trackpoint is recognized without a middle button. When `psmouse` is removed and loaded with `proto=imps` the middle button works, but the touchpad recognizes only one finger.


Looking at `dmesg` (attached) I see `psmouse serio2: trackpoint: failed to get extended button data.


Distro: Arch Linux
Let me know what information I need to provide and any way that I can help.
Comment 1 Perttu Luukko 2017-07-14 09:44:42 UTC
This bug was recently analyzed on linux-input:
https://www.spinics.net/lists/linux-input/msg51021.html
The thread also includes a patch.
Comment 2 Kiril Vladimiroff 2017-07-14 13:46:41 UTC
That's correct. I've tried it and can confirm that the proposed patch solves it. Should I close this bug or wait for the patch to get merged first?
Comment 3 Perttu Luukko 2017-07-14 18:50:18 UTC
I would keep this bug open until there is some kind of resolution. Just in case the linux-input thread gets stalled and forgotten.
Comment 5 eldrad.ulthran 2017-11-21 21:56:06 UTC
Created attachment 260763 [details]
New dmesg with zero detected buttons
Comment 6 eldrad.ulthran 2017-11-21 21:58:14 UTC
The TrackPoint middle button is still not working on my Lenovo E470 with OpenSuse Leap 42.3 with Kernel version 4.14 from kernel:stable. I recently updated BIOS to its current version 1.88.
Dmesg now tells:
psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

psmouse doesn't fail to get extended button data, but it says tat there are no buttons at all. Somehow the left and right TrackPoint buttons are still working.
Comment 7 Alexander Blinne 2017-11-24 10:42:00 UTC
Still not working for me either on my Lenovo E470. "evemu-describe" detects a BTN_LEFT and a BTN_RIGHT (and no BTN_MIDDLE), while dmesg output is:

> [    7.597352] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e,
> buttons: 0/0

Left and right buttons are working fine. This is kernel 4.13 on arch linux.
Comment 8 Perttu Luukko 2017-11-24 11:12:51 UTC
I am running kernel 4.13.12 on Arch Linux and all three buttons are working fine on my E470. Dmesg says:

> psmouse serio2: trackpoint: failed to get extended button data, assuming 3
> buttons
> psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3

Does Comment 6 imply that the buttons stopped working after a BIOS update?
Comment 9 Alexander Blinne 2017-11-24 11:19:06 UTC
I recently updated my BIOS, too. Unfortunately I cannot say whether the Patch of Comment 4 enabled the middle button before the BIOS update. Maybe it stopped working again after the update or it never worked at all.
Comment 10 eldrad.ulthran 2017-11-24 11:38:03 UTC
(In reply to Perttu Luukko from comment #8)

> Does Comment 6 imply that the buttons stopped working after a BIOS update?

No, it was meant as "despite a BIOS update" the button still doesn't work. I started with BIOS 1.4 as delivered and Kernel 4.10 or so half a year ago, went through all consecutive kernel updates and only recently updated to BIOS 1.88. The middle button hasn't worked even once so far.
In case it matters I have a E470 20H2-S007.
Comment 11 Niki Waibel 2018-01-14 01:31:24 UTC
same here (middle button still does not work):

 Linux version 4.14.13-300.fc27.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Thu Jan 11 04:00:01 UTC 2018

 thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown
 thinkpad_acpi: Lenovo ThinkPad E470, model 20H1004SGE

 psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

status should not be "RESOLVED". please reopen.
Comment 12 Dmitry Torokhov 2018-01-18 20:01:41 UTC
Created attachment 273699 [details]
Handle newer trackpoints

Niki, can you please try if you see the issue with this patch (likely you will still see the 0/0 buttons as I expect your trackpoint reports the original 0x010e firmware ID).
Comment 13 Alexander Blinne 2018-01-19 11:16:34 UTC
I have tried the patch on my Thinkpad E470:

[    1.923080] thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown
[    1.923080] thinkpad_acpi: Lenovo ThinkPad E470, model 20H2S00400


It does not seem to change anything for me.

I still get:

[    7.317253] psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0

Neither "libinput-debug-events", nor "evemu-record", nor "xev" output anything when I press the middle trackpoint button.

"xinput list-props" says:

libinput Button Scrolling Button (495): 3

, which is referring to the right trackpoint button, and scrolling works using that button. Changing this property to "1" works, enabling scrolling using the left button. Changing it to "2", which would indicate the middle button, is not possible:

$ xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Button Scrolling Button" 2
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Value in failed request:  0x1ef
  Serial number of failed request:  20
  Current serial number in output stream:  21

All of this is also the case without the patch.
Comment 14 Alexander Blinne 2018-01-19 12:20:31 UTC
I have added some additional psmouse_info calls to get the necessary information. The Trackpoint is recognized as "TP_VARIANT_IBM" and line 

443 error = trackpoint_read(ps2dev, TP_EXT_BTN, &button_info);

is actually executed and results in error == 0 and button_info == 0.

Maybe a valid workaround would be to check if button_info == 0 and override it with button_info = 0x33 in that case?
Comment 15 Alexander Blinne 2018-01-19 13:35:20 UTC
Created attachment 273725 [details]
Assume 3 buttons even if extended read successful

I have applied this on top of 0001-Input-trackpoint-only-expose-supported-controls-for-.patch and now my middle button works fine.
Comment 16 Dmitry Torokhov 2018-01-19 17:53:48 UTC
OK, so that was expected. I'll be applying Aaron Ma's patch (I'll attach it shortly) that does pretty much the same thing.
Comment 17 Dmitry Torokhov 2018-01-19 17:58:36 UTC
Created attachment 273739 [details]
Patch to treat 0 reported buttons as 3

Note You need to log in before you can comment on or make changes to this bug.