All of lore.kernel.org
 help / color / mirror / Atom feed
* Trackpoint on Thinkpad X1 Carbon (5th gen)
@ 2017-05-19 20:12 Damjan Georgievski
  2017-05-23 18:12 ` Damjan Georgievski
  0 siblings, 1 reply; 11+ messages in thread
From: Damjan Georgievski @ 2017-05-19 20:12 UTC (permalink / raw)
  To: linux-input

Hi all,
the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is
recognised as:
"ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 IBM
TrackPoint".

Conversely, the middle button is not configured to emulate a mouse
wheel for scrolling, so I need to enable it explicitly with:
xinput set-prop "ImPS/2 Generic Wheel Mouse" "libinput Scroll Method
Enabled" 0 0 1


I'm not sure what information to provide about the device. the kernel
seems to find it as:
[    0.690665] pnp 00:06: Plug and Play ACPI device, IDs LEN0072
PNP0f13 (active)



Additionally,
if I load the `psmouse` module with synaptics_intertouch=1 option I get:
$ xinput list
⎜   ↳ Synaptics TM3289-002                      id=11   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]

and kernel log:
[ 3244.067726] psmouse serio1: synaptics: queried max coordinates: x
[..5676], y [..4760]
[ 3244.099572] psmouse serio1: synaptics: queried min coordinates: x
[1266..], y [1094..]
[ 3244.099577] psmouse serio1: synaptics: Trying to set up SMBus access
[ 3244.113905] rmi4_smbus 0-002c: registering SMbus-connected sensor
[ 3244.173149] rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer:
Synaptics, product: TM3289-002, fw id: 2492434
[ 3244.244186] input: Synaptics TM3289-002 as /devices/rmi4-00/input/input104
[ 3246.073366] input: AlpsPS/2 ALPS DualPoint Stick as
/devices/rmi4-00/rmi4-00.fn03/serio4/input/input107
[ 3246.139663] input: AlpsPS/2 ALPS DualPoint TouchPad as
/devices/rmi4-00/rmi4-00.fn03/serio4/input/input106

but in that case the trackpoint is too sensitive and middle click
scrolling still doesn't work

-- 
damjan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-05-19 20:12 Trackpoint on Thinkpad X1 Carbon (5th gen) Damjan Georgievski
@ 2017-05-23 18:12 ` Damjan Georgievski
  2017-05-30 17:24   ` Dmitry Torokhov
  0 siblings, 1 reply; 11+ messages in thread
From: Damjan Georgievski @ 2017-05-23 18:12 UTC (permalink / raw)
  To: linux-input

On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
> Hi all,
> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is
> recognised as:
> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 IBM
> TrackPoint".

the following patch[1] adds the X1 Carbon gen 5 to work with the
rmi4_smbus support, there are some issues though:
- the touchpad _seems_ to be working a bit better (at least that's
what I feel like)
- the trackpoint moves too fast
- middle click scrolling is not enabled and can't be set with xinput

Can I do someting to improve/test the trackpoint issues, before
submiting this for merging?

ps.
also, when this is aplied the touchpad and trackpoint are recognized as
> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]


[1]
https://gist.github.com/gdamjan/511eb192a46b2226474e855ec0aa7365



> Conversely, the middle button is not configured to emulate a mouse
> wheel for scrolling, so I need to enable it explicitly with:
> xinput set-prop "ImPS/2 Generic Wheel Mouse" "libinput Scroll Method
> Enabled" 0 0 1
>
>
> I'm not sure what information to provide about the device. the kernel
> seems to find it as:
> [    0.690665] pnp 00:06: Plug and Play ACPI device, IDs LEN0072
> PNP0f13 (active)
>
>
>
> Additionally,
> if I load the `psmouse` module with synaptics_intertouch=1 option I get:
> $ xinput list
> ⎜   ↳ Synaptics TM3289-002                      id=11   [slave  pointer  (2)]
> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
>
> and kernel log:
> [ 3244.067726] psmouse serio1: synaptics: queried max coordinates: x
> [..5676], y [..4760]
> [ 3244.099572] psmouse serio1: synaptics: queried min coordinates: x
> [1266..], y [1094..]
> [ 3244.099577] psmouse serio1: synaptics: Trying to set up SMBus access
> [ 3244.113905] rmi4_smbus 0-002c: registering SMbus-connected sensor
> [ 3244.173149] rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer:
> Synaptics, product: TM3289-002, fw id: 2492434
> [ 3244.244186] input: Synaptics TM3289-002 as /devices/rmi4-00/input/input104
> [ 3246.073366] input: AlpsPS/2 ALPS DualPoint Stick as
> /devices/rmi4-00/rmi4-00.fn03/serio4/input/input107
> [ 3246.139663] input: AlpsPS/2 ALPS DualPoint TouchPad as
> /devices/rmi4-00/rmi4-00.fn03/serio4/input/input106
>
> but in that case the trackpoint is too sensitive and middle click
> scrolling still doesn't work




-- 
damjan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-05-23 18:12 ` Damjan Georgievski
@ 2017-05-30 17:24   ` Dmitry Torokhov
  2017-06-02 10:46     ` Damjan Georgievski
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Torokhov @ 2017-05-30 17:24 UTC (permalink / raw)
  To: Damjan Georgievski; +Cc: linux-input, Benjamin Tissoires, Masaki Ota

On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
>> Hi all,
>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is
>> recognised as:
>> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 IBM
>> TrackPoint".
>
> the following patch[1] adds the X1 Carbon gen 5 to work with the
> rmi4_smbus support, there are some issues though:
> - the touchpad _seems_ to be working a bit better (at least that's
> what I feel like)
> - the trackpoint moves too fast
> - middle click scrolling is not enabled and can't be set with xinput
>
> Can I do someting to improve/test the trackpoint issues, before
> submiting this for merging?
>
> ps.
> also, when this is aplied the touchpad and trackpoint are recognized as
>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]

This is surprising that device on F03 pass-through port managed to
respond to ALPS queries...

Masaki, is there a chance to make ALPS detection more robust here as I
do not believe we are dealing with ALPS device here.

>
>
> [1]
> https://gist.github.com/gdamjan/511eb192a46b2226474e855ec0aa7365
>
>
>
>> Conversely, the middle button is not configured to emulate a mouse
>> wheel for scrolling, so I need to enable it explicitly with:
>> xinput set-prop "ImPS/2 Generic Wheel Mouse" "libinput Scroll Method
>> Enabled" 0 0 1
>>
>>
>> I'm not sure what information to provide about the device. the kernel
>> seems to find it as:
>> [    0.690665] pnp 00:06: Plug and Play ACPI device, IDs LEN0072
>> PNP0f13 (active)
>>
>>
>>
>> Additionally,
>> if I load the `psmouse` module with synaptics_intertouch=1 option I get:
>> $ xinput list
>> ⎜   ↳ Synaptics TM3289-002                      id=11   [slave  pointer  (2)]
>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
>>
>> and kernel log:
>> [ 3244.067726] psmouse serio1: synaptics: queried max coordinates: x
>> [..5676], y [..4760]
>> [ 3244.099572] psmouse serio1: synaptics: queried min coordinates: x
>> [1266..], y [1094..]
>> [ 3244.099577] psmouse serio1: synaptics: Trying to set up SMBus access
>> [ 3244.113905] rmi4_smbus 0-002c: registering SMbus-connected sensor
>> [ 3244.173149] rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer:
>> Synaptics, product: TM3289-002, fw id: 2492434
>> [ 3244.244186] input: Synaptics TM3289-002 as /devices/rmi4-00/input/input104
>> [ 3246.073366] input: AlpsPS/2 ALPS DualPoint Stick as
>> /devices/rmi4-00/rmi4-00.fn03/serio4/input/input107
>> [ 3246.139663] input: AlpsPS/2 ALPS DualPoint TouchPad as
>> /devices/rmi4-00/rmi4-00.fn03/serio4/input/input106
>>
>> but in that case the trackpoint is too sensitive and middle click
>> scrolling still doesn't work
>
>
>
>
> --
> damjan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-05-30 17:24   ` Dmitry Torokhov
@ 2017-06-02 10:46     ` Damjan Georgievski
  2017-06-05  0:52       ` Masaki Ota
  0 siblings, 1 reply; 11+ messages in thread
From: Damjan Georgievski @ 2017-06-02 10:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, Benjamin Tissoires, Masaki Ota

On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
>> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
>>> Hi all,
>>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is
>>> recognised as:
>>> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 IBM
>>> TrackPoint".
>>
>> the following patch[1] adds the X1 Carbon gen 5 to work with the
>> rmi4_smbus support, there are some issues though:
>> - the touchpad _seems_ to be working a bit better (at least that's
>> what I feel like)
>> - the trackpoint moves too fast
>> - middle click scrolling is not enabled and can't be set with xinput
>>
>> Can I do someting to improve/test the trackpoint issues, before
>> submiting this for merging?
>>
>> ps.
>> also, when this is aplied the touchpad and trackpoint are recognized as
>>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
>>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
>
> This is surprising that device on F03 pass-through port managed to
> respond to ALPS queries...


actually the touchpad seems to be recognized as
⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]

and the other two ALPS devices are the trackpoint and its buttons
(which I beleive are connected to the touchpad)


> Masaki, is there a chance to make ALPS detection more robust here as I
> do not believe we are dealing with ALPS device here.


Is there anything else I can test?



-- 
damjan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-02 10:46     ` Damjan Georgievski
@ 2017-06-05  0:52       ` Masaki Ota
  2017-06-06  7:49         ` Benjamin Tissoires
  0 siblings, 1 reply; 11+ messages in thread
From: Masaki Ota @ 2017-06-05  0:52 UTC (permalink / raw)
  To: Damjan Georgievski, Dmitry Torokhov; +Cc: linux-input, Benjamin Tissoires

Hi, Damjan,

Latest X1 Carbon system has two TrackPoint venders.
One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)

To detect the device, we can send "E1" command by using pass-through.
The device response is as below.
If Alps, E1 -> 02
If Elantech, E1-> 01

It's a spec, but I have not checked it.

By the way, TrackPoint speed might be different between Alps and Elan.
And Middle Button Click behavior without a driver is the same as Mouse middle click.

Best Regards,
Masaki Ota
-----Original Message-----
From: Damjan Georgievski [mailto:gdamjan@gmail.com] 
Sent: Friday, June 02, 2017 7:47 PM
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org; Benjamin Tissoires <benjamin.tissoires@redhat.com>; 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)

On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
>> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
>>> Hi all,
>>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is 
>>> recognised as:
>>> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 
>>> IBM TrackPoint".
>>
>> the following patch[1] adds the X1 Carbon gen 5 to work with the 
>> rmi4_smbus support, there are some issues though:
>> - the touchpad _seems_ to be working a bit better (at least that's 
>> what I feel like)
>> - the trackpoint moves too fast
>> - middle click scrolling is not enabled and can't be set with xinput
>>
>> Can I do someting to improve/test the trackpoint issues, before 
>> submiting this for merging?
>>
>> ps.
>> also, when this is aplied the touchpad and trackpoint are recognized 
>> as
>>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
>>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
>
> This is surprising that device on F03 pass-through port managed to 
> respond to ALPS queries...


actually the touchpad seems to be recognized as
⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]

and the other two ALPS devices are the trackpoint and its buttons (which I beleive are connected to the touchpad)


> Masaki, is there a chance to make ALPS detection more robust here as I 
> do not believe we are dealing with ALPS device here.


Is there anything else I can test?



--
damjan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-05  0:52       ` Masaki Ota
@ 2017-06-06  7:49         ` Benjamin Tissoires
  2017-06-06 17:28           ` Damjan Georgievski
  2017-06-06 17:41           ` Dmitry Torokhov
  0 siblings, 2 replies; 11+ messages in thread
From: Benjamin Tissoires @ 2017-06-06  7:49 UTC (permalink / raw)
  To: Masaki Ota, Damjan Georgievski; +Cc: Dmitry Torokhov, linux-input

Hi,

On Jun 05 2017 or thereabouts, Masaki Ota wrote:
> Hi, Damjan,
> 
> Latest X1 Carbon system has two TrackPoint venders.
> One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)
> 
> To detect the device, we can send "E1" command by using pass-through.
> The device response is as below.
> If Alps, E1 -> 02
> If Elantech, E1-> 01
> 
> It's a spec, but I have not checked it.

Thanks. This made me realize that we have a difference between the PS/2
handling of the touchpad and the RMI4 use: in the PS/2 protocol, we
mark the pass-through device as such by using SERIO_PS_PSTHRU.
While in RMI4, we mark it as if it was a platform device, meaning we
check on every protocol.

Damjan, would you mind trying the following change:
diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c
index 77dad04..ad71a5e 100644
--- a/drivers/input/rmi4/rmi_f03.c
+++ b/drivers/input/rmi4/rmi_f03.c
@@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
        if (!serio)
                return -ENOMEM;
 
-       serio->id.type = SERIO_8042;
+       serio->id.type = SERIO_PS_PSTHRU;
        serio->write = rmi_f03_pt_write;
        serio->port_data = f03;

---

If this gives equal results than when using synaptics_intertouch=0, then
I guess this will be a good candidate for an rc.

Cheers,
Benjamin

> 
> By the way, TrackPoint speed might be different between Alps and Elan.
> And Middle Button Click behavior without a driver is the same as Mouse middle click.
> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Damjan Georgievski [mailto:gdamjan@gmail.com] 
> Sent: Friday, June 02, 2017 7:47 PM
> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org; Benjamin Tissoires <benjamin.tissoires@redhat.com>; 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
> 
> On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
> >> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
> >>> Hi all,
> >>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is 
> >>> recognised as:
> >>> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 
> >>> IBM TrackPoint".
> >>
> >> the following patch[1] adds the X1 Carbon gen 5 to work with the 
> >> rmi4_smbus support, there are some issues though:
> >> - the touchpad _seems_ to be working a bit better (at least that's 
> >> what I feel like)
> >> - the trackpoint moves too fast
> >> - middle click scrolling is not enabled and can't be set with xinput
> >>
> >> Can I do someting to improve/test the trackpoint issues, before 
> >> submiting this for merging?
> >>
> >> ps.
> >> also, when this is aplied the touchpad and trackpoint are recognized 
> >> as
> >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
> >
> > This is surprising that device on F03 pass-through port managed to 
> > respond to ALPS queries...
> 
> 
> actually the touchpad seems to be recognized as
> ⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]
> 
> and the other two ALPS devices are the trackpoint and its buttons (which I beleive are connected to the touchpad)
> 
> 
> > Masaki, is there a chance to make ALPS detection more robust here as I 
> > do not believe we are dealing with ALPS device here.
> 
> 
> Is there anything else I can test?
> 
> 
> 
> --
> damjan

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-06  7:49         ` Benjamin Tissoires
@ 2017-06-06 17:28           ` Damjan Georgievski
  2017-06-06 17:41           ` Dmitry Torokhov
  1 sibling, 0 replies; 11+ messages in thread
From: Damjan Georgievski @ 2017-06-06 17:28 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Masaki Ota, Dmitry Torokhov, linux-input

On 6 June 2017 at 09:49, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> Hi,
>
> On Jun 05 2017 or thereabouts, Masaki Ota wrote:
>> Hi, Damjan,
>>
>> Latest X1 Carbon system has two TrackPoint venders.
>> One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)
>>
>> To detect the device, we can send "E1" command by using pass-through.
>> The device response is as below.
>> If Alps, E1 -> 02
>> If Elantech, E1-> 01
>>
>> It's a spec, but I have not checked it.
>
> Thanks. This made me realize that we have a difference between the PS/2
> handling of the touchpad and the RMI4 use: in the PS/2 protocol, we
> mark the pass-through device as such by using SERIO_PS_PSTHRU.
> While in RMI4, we mark it as if it was a platform device, meaning we
> check on every protocol.
>
> Damjan, would you mind trying the following change:
> diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c
> index 77dad04..ad71a5e 100644
> --- a/drivers/input/rmi4/rmi_f03.c
> +++ b/drivers/input/rmi4/rmi_f03.c
> @@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
>         if (!serio)
>                 return -ENOMEM;
>
> -       serio->id.type = SERIO_8042;
> +       serio->id.type = SERIO_PS_PSTHRU;
>         serio->write = rmi_f03_pt_write;
>         serio->port_data = f03;
>
> ---
>
> If this gives equal results than when using synaptics_intertouch=0, then
> I guess this will be a good candidate for an rc.

what equal results?

based on 4.12-rc4 (ba7b2387ad239a519041f2a2d35a1902bdd03dfb) and this
change, and 'psmouse' loaded with no options, I get:

[    9.151247] psmouse serio1: synaptics: queried max coordinates: x
[..5676], y [..4760]
[    9.181297] psmouse serio1: synaptics: queried min coordinates: x
[1266..], y [1094..]
[    9.181300] psmouse serio1: synaptics: Your touchpad (PNP: LEN0072
PNP0f13) says it can support a different bus. If i2c-hid and hid-rmi
are not used, you might want to try setting
psmouse.synaptics_intertouch to 1 and report this to
linux-input@vger.kernel.org.
[    9.240307] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2,
id: 0x1e2b1, caps: 0xf002a3/0x940300/0x12e800/0x400000, board id:
3289, fw id: 2492434
[    9.240310] psmouse serio1: synaptics: serio: Synaptics
pass-through port at isa0060/serio1/input0
[    9.278160] input: SynPS/2 Synaptics TouchPad as
/devices/platform/i8042/serio1/input/input6
[    9.281307] mousedev: PS/2 mouse device common for all mice

$ xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎜   ↳ ImPS/2 Generic Wheel Mouse                id=12   [slave  pointer  (2)]


-- 
damjan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-06  7:49         ` Benjamin Tissoires
  2017-06-06 17:28           ` Damjan Georgievski
@ 2017-06-06 17:41           ` Dmitry Torokhov
  2017-06-07  1:18             ` Masaki Ota
  2017-06-07  6:36             ` Dmitry Torokhov
  1 sibling, 2 replies; 11+ messages in thread
From: Dmitry Torokhov @ 2017-06-06 17:41 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Masaki Ota, Damjan Georgievski, linux-input

On Tue, Jun 06, 2017 at 09:49:09AM +0200, Benjamin Tissoires wrote:
> Hi,
> 
> On Jun 05 2017 or thereabouts, Masaki Ota wrote:
> > Hi, Damjan,
> > 
> > Latest X1 Carbon system has two TrackPoint venders.
> > One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)
> > 
> > To detect the device, we can send "E1" command by using pass-through.
> > The device response is as below.
> > If Alps, E1 -> 02
> > If Elantech, E1-> 01

Masaki, is there a way to for ALPS driver to determine whether we are
dealing with a trackpoint-only or a touchpad + trackpoint combo?

> > 
> > It's a spec, but I have not checked it.
> 
> Thanks. This made me realize that we have a difference between the PS/2
> handling of the touchpad and the RMI4 use: in the PS/2 protocol, we
> mark the pass-through device as such by using SERIO_PS_PSTHRU.
> While in RMI4, we mark it as if it was a platform device, meaning we
> check on every protocol.
> 
> Damjan, would you mind trying the following change:
> diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c
> index 77dad04..ad71a5e 100644
> --- a/drivers/input/rmi4/rmi_f03.c
> +++ b/drivers/input/rmi4/rmi_f03.c
> @@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
>         if (!serio)
>                 return -ENOMEM;
>  
> -       serio->id.type = SERIO_8042;
> +       serio->id.type = SERIO_PS_PSTHRU;

No, you do not want to do this. psmouse-base has more logic than just
selecting protocols to probe keyed off SERIO_PS_PSTHRU.

Also, if we are not seeing ALPS and Elantech devices behind pass-through
ports we need to add them to the list of devices probed on pass-through
ports anyway. Although, since we do not handle Elantech or ALPS
tracksticks any differently than generic mouse (unlike IBM Trackpoints
that we know how to control enhanced features), maybe not probing them
as ALPS and Elantech will allow us to keep faster probing...

>         serio->write = rmi_f03_pt_write;
>         serio->port_data = f03;
> 
> ---
> 
> If this gives equal results than when using synaptics_intertouch=0, then
> I guess this will be a good candidate for an rc.
> 
> Cheers,
> Benjamin
> 
> > 
> > By the way, TrackPoint speed might be different between Alps and Elan.
> > And Middle Button Click behavior without a driver is the same as Mouse middle click.
> > 
> > Best Regards,
> > Masaki Ota
> > -----Original Message-----
> > From: Damjan Georgievski [mailto:gdamjan@gmail.com] 
> > Sent: Friday, June 02, 2017 7:47 PM
> > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: linux-input@vger.kernel.org; Benjamin Tissoires <benjamin.tissoires@redhat.com>; 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> > Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
> > 
> > On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > > On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > >> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > >>> Hi all,
> > >>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) is 
> > >>> recognised as:
> > >>> "ImPS/2 Generic Wheel Mouse" while typically it should be "TPPS/2 
> > >>> IBM TrackPoint".
> > >>
> > >> the following patch[1] adds the X1 Carbon gen 5 to work with the 
> > >> rmi4_smbus support, there are some issues though:
> > >> - the touchpad _seems_ to be working a bit better (at least that's 
> > >> what I feel like)
> > >> - the trackpoint moves too fast
> > >> - middle click scrolling is not enabled and can't be set with xinput
> > >>
> > >> Can I do someting to improve/test the trackpoint issues, before 
> > >> submiting this for merging?
> > >>
> > >> ps.
> > >> also, when this is aplied the touchpad and trackpoint are recognized 
> > >> as
> > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
> > >
> > > This is surprising that device on F03 pass-through port managed to 
> > > respond to ALPS queries...
> > 
> > 
> > actually the touchpad seems to be recognized as
> > ⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]
> > 
> > and the other two ALPS devices are the trackpoint and its buttons (which I beleive are connected to the touchpad)
> > 
> > 
> > > Masaki, is there a chance to make ALPS detection more robust here as I 
> > > do not believe we are dealing with ALPS device here.
> > 
> > 
> > Is there anything else I can test?
> > 
> > 
> > 
> > --
> > damjan

-- 
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-06 17:41           ` Dmitry Torokhov
@ 2017-06-07  1:18             ` Masaki Ota
  2017-06-07  6:34               ` Dmitry Torokhov
  2017-06-07  6:36             ` Dmitry Torokhov
  1 sibling, 1 reply; 11+ messages in thread
From: Masaki Ota @ 2017-06-07  1:18 UTC (permalink / raw)
  To: Dmitry Torokhov, Benjamin Tissoires; +Cc: Damjan Georgievski, linux-input

Hi, Dmitry,

About this device, we don't have a way to check whether a device is Trackpoint only or TrackPoint +Touchpad.

Best Regards,
Masaki Ota
-----Original Message-----
From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com] 
Sent: Wednesday, June 07, 2017 2:42 AM
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>; Damjan Georgievski <gdamjan@gmail.com>; linux-input@vger.kernel.org
Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)

On Tue, Jun 06, 2017 at 09:49:09AM +0200, Benjamin Tissoires wrote:
> Hi,
> 
> On Jun 05 2017 or thereabouts, Masaki Ota wrote:
> > Hi, Damjan,
> > 
> > Latest X1 Carbon system has two TrackPoint venders.
> > One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)
> > 
> > To detect the device, we can send "E1" command by using pass-through.
> > The device response is as below.
> > If Alps, E1 -> 02
> > If Elantech, E1-> 01

Masaki, is there a way to for ALPS driver to determine whether we are dealing with a trackpoint-only or a touchpad + trackpoint combo?

> > 
> > It's a spec, but I have not checked it.
> 
> Thanks. This made me realize that we have a difference between the 
> PS/2 handling of the touchpad and the RMI4 use: in the PS/2 protocol, 
> we mark the pass-through device as such by using SERIO_PS_PSTHRU.
> While in RMI4, we mark it as if it was a platform device, meaning we 
> check on every protocol.
> 
> Damjan, would you mind trying the following change:
> diff --git a/drivers/input/rmi4/rmi_f03.c 
> b/drivers/input/rmi4/rmi_f03.c index 77dad04..ad71a5e 100644
> --- a/drivers/input/rmi4/rmi_f03.c
> +++ b/drivers/input/rmi4/rmi_f03.c
> @@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
>         if (!serio)
>                 return -ENOMEM;
>  
> -       serio->id.type = SERIO_8042;
> +       serio->id.type = SERIO_PS_PSTHRU;

No, you do not want to do this. psmouse-base has more logic than just selecting protocols to probe keyed off SERIO_PS_PSTHRU.

Also, if we are not seeing ALPS and Elantech devices behind pass-through ports we need to add them to the list of devices probed on pass-through ports anyway. Although, since we do not handle Elantech or ALPS tracksticks any differently than generic mouse (unlike IBM Trackpoints that we know how to control enhanced features), maybe not probing them as ALPS and Elantech will allow us to keep faster probing...

>         serio->write = rmi_f03_pt_write;
>         serio->port_data = f03;
> 
> ---
> 
> If this gives equal results than when using synaptics_intertouch=0, 
> then I guess this will be a good candidate for an rc.
> 
> Cheers,
> Benjamin
> 
> > 
> > By the way, TrackPoint speed might be different between Alps and Elan.
> > And Middle Button Click behavior without a driver is the same as Mouse middle click.
> > 
> > Best Regards,
> > Masaki Ota
> > -----Original Message-----
> > From: Damjan Georgievski [mailto:gdamjan@gmail.com]
> > Sent: Friday, June 02, 2017 7:47 PM
> > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: linux-input@vger.kernel.org; Benjamin Tissoires 
> > <benjamin.tissoires@redhat.com>; 太田 真喜 Masaki Ota 
> > <masaki.ota@jp.alps.com>
> > Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
> > 
> > On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > > On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > >> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > >>> Hi all,
> > >>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) 
> > >>> is recognised as:
> > >>> "ImPS/2 Generic Wheel Mouse" while typically it should be 
> > >>> "TPPS/2 IBM TrackPoint".
> > >>
> > >> the following patch[1] adds the X1 Carbon gen 5 to work with the 
> > >> rmi4_smbus support, there are some issues though:
> > >> - the touchpad _seems_ to be working a bit better (at least 
> > >> that's what I feel like)
> > >> - the trackpoint moves too fast
> > >> - middle click scrolling is not enabled and can't be set with 
> > >> xinput
> > >>
> > >> Can I do someting to improve/test the trackpoint issues, before 
> > >> submiting this for merging?
> > >>
> > >> ps.
> > >> also, when this is aplied the touchpad and trackpoint are 
> > >> recognized as
> > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
> > >
> > > This is surprising that device on F03 pass-through port managed to 
> > > respond to ALPS queries...
> > 
> > 
> > actually the touchpad seems to be recognized as
> > ⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]
> > 
> > and the other two ALPS devices are the trackpoint and its buttons 
> > (which I beleive are connected to the touchpad)
> > 
> > 
> > > Masaki, is there a chance to make ALPS detection more robust here 
> > > as I do not believe we are dealing with ALPS device here.
> > 
> > 
> > Is there anything else I can test?
> > 
> > 
> > 
> > --
> > damjan

--
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-07  1:18             ` Masaki Ota
@ 2017-06-07  6:34               ` Dmitry Torokhov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Torokhov @ 2017-06-07  6:34 UTC (permalink / raw)
  To: Masaki Ota; +Cc: Benjamin Tissoires, Damjan Georgievski, linux-input

On Wed, Jun 07, 2017 at 01:18:14AM +0000, Masaki Ota wrote:
> Hi, Dmitry,
> 
> About this device, we don't have a way to check whether a device is Trackpoint only or TrackPoint +Touchpad.

I see. Then I guess we are better off keeping it in PS/2 compatibility
mode.

Thank you for looking into this.

> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com] 
> Sent: Wednesday, June 07, 2017 2:42 AM
> To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>; Damjan Georgievski <gdamjan@gmail.com>; linux-input@vger.kernel.org
> Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
> 
> On Tue, Jun 06, 2017 at 09:49:09AM +0200, Benjamin Tissoires wrote:
> > Hi,
> > 
> > On Jun 05 2017 or thereabouts, Masaki Ota wrote:
> > > Hi, Damjan,
> > > 
> > > Latest X1 Carbon system has two TrackPoint venders.
> > > One is Alps, the other is Elantech. ( Touchpad is only Synaptics.)
> > > 
> > > To detect the device, we can send "E1" command by using pass-through.
> > > The device response is as below.
> > > If Alps, E1 -> 02
> > > If Elantech, E1-> 01
> 
> Masaki, is there a way to for ALPS driver to determine whether we are dealing with a trackpoint-only or a touchpad + trackpoint combo?
> 
> > > 
> > > It's a spec, but I have not checked it.
> > 
> > Thanks. This made me realize that we have a difference between the 
> > PS/2 handling of the touchpad and the RMI4 use: in the PS/2 protocol, 
> > we mark the pass-through device as such by using SERIO_PS_PSTHRU.
> > While in RMI4, we mark it as if it was a platform device, meaning we 
> > check on every protocol.
> > 
> > Damjan, would you mind trying the following change:
> > diff --git a/drivers/input/rmi4/rmi_f03.c 
> > b/drivers/input/rmi4/rmi_f03.c index 77dad04..ad71a5e 100644
> > --- a/drivers/input/rmi4/rmi_f03.c
> > +++ b/drivers/input/rmi4/rmi_f03.c
> > @@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
> >         if (!serio)
> >                 return -ENOMEM;
> >  
> > -       serio->id.type = SERIO_8042;
> > +       serio->id.type = SERIO_PS_PSTHRU;
> 
> No, you do not want to do this. psmouse-base has more logic than just selecting protocols to probe keyed off SERIO_PS_PSTHRU.
> 
> Also, if we are not seeing ALPS and Elantech devices behind pass-through ports we need to add them to the list of devices probed on pass-through ports anyway. Although, since we do not handle Elantech or ALPS tracksticks any differently than generic mouse (unlike IBM Trackpoints that we know how to control enhanced features), maybe not probing them as ALPS and Elantech will allow us to keep faster probing...
> 
> >         serio->write = rmi_f03_pt_write;
> >         serio->port_data = f03;
> > 
> > ---
> > 
> > If this gives equal results than when using synaptics_intertouch=0, 
> > then I guess this will be a good candidate for an rc.
> > 
> > Cheers,
> > Benjamin
> > 
> > > 
> > > By the way, TrackPoint speed might be different between Alps and Elan.
> > > And Middle Button Click behavior without a driver is the same as Mouse middle click.
> > > 
> > > Best Regards,
> > > Masaki Ota
> > > -----Original Message-----
> > > From: Damjan Georgievski [mailto:gdamjan@gmail.com]
> > > Sent: Friday, June 02, 2017 7:47 PM
> > > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > Cc: linux-input@vger.kernel.org; Benjamin Tissoires 
> > > <benjamin.tissoires@redhat.com>; 太田 真喜 Masaki Ota 
> > > <masaki.ota@jp.alps.com>
> > > Subject: Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
> > > 
> > > On 30 May 2017 at 19:24, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > > > On Tue, May 23, 2017 at 11:12 AM, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > > >> On 19 May 2017 at 22:12, Damjan Georgievski <gdamjan@gmail.com> wrote:
> > > >>> Hi all,
> > > >>> the trackpoint on the  Thinkpad X1 Carbon (5th gen) (model 20HQ) 
> > > >>> is recognised as:
> > > >>> "ImPS/2 Generic Wheel Mouse" while typically it should be 
> > > >>> "TPPS/2 IBM TrackPoint".
> > > >>
> > > >> the following patch[1] adds the X1 Carbon gen 5 to work with the 
> > > >> rmi4_smbus support, there are some issues though:
> > > >> - the touchpad _seems_ to be working a bit better (at least 
> > > >> that's what I feel like)
> > > >> - the trackpoint moves too fast
> > > >> - middle click scrolling is not enabled and can't be set with 
> > > >> xinput
> > > >>
> > > >> Can I do someting to improve/test the trackpoint issues, before 
> > > >> submiting this for merging?
> > > >>
> > > >> ps.
> > > >> also, when this is aplied the touchpad and trackpoint are 
> > > >> recognized as
> > > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=12   [slave  pointer  (2)]
> > > >>> ⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=14   [slave  pointer  (2)]
> > > >
> > > > This is surprising that device on F03 pass-through port managed to 
> > > > respond to ALPS queries...
> > > 
> > > 
> > > actually the touchpad seems to be recognized as
> > > ⎜   ↳ Synaptics TM3289-002                      id=12   [slave  pointer  (2)]
> > > 
> > > and the other two ALPS devices are the trackpoint and its buttons 
> > > (which I beleive are connected to the touchpad)
> > > 
> > > 
> > > > Masaki, is there a chance to make ALPS detection more robust here 
> > > > as I do not believe we are dealing with ALPS device here.
> > > 
> > > 
> > > Is there anything else I can test?
> > > 
> > > 
> > > 
> > > --
> > > damjan
> 
> --
> Dmitry

-- 
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Trackpoint on Thinkpad X1 Carbon (5th gen)
  2017-06-06 17:41           ` Dmitry Torokhov
  2017-06-07  1:18             ` Masaki Ota
@ 2017-06-07  6:36             ` Dmitry Torokhov
  1 sibling, 0 replies; 11+ messages in thread
From: Dmitry Torokhov @ 2017-06-07  6:36 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Masaki Ota, Damjan Georgievski, linux-input

On Tue, Jun 06, 2017 at 10:41:54AM -0700, Dmitry Torokhov wrote:
> On Tue, Jun 06, 2017 at 09:49:09AM +0200, Benjamin Tissoires wrote:
> > Damjan, would you mind trying the following change:
> > diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c
> > index 77dad04..ad71a5e 100644
> > --- a/drivers/input/rmi4/rmi_f03.c
> > +++ b/drivers/input/rmi4/rmi_f03.c
> > @@ -146,7 +146,7 @@ static int rmi_f03_register_pt(struct f03_data *f03)
> >         if (!serio)
> >                 return -ENOMEM;
> >  
> > -       serio->id.type = SERIO_8042;
> > +       serio->id.type = SERIO_PS_PSTHRU;
> 
> No, you do not want to do this. psmouse-base has more logic than just
> selecting protocols to probe keyed off SERIO_PS_PSTHRU.

Actually, you are right, it will work, since psmouse-base.c also checks
if serio has a parent before activating/deactivating passthrough logic,
and F03-backed serio port will not have a serio parent.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-06-07  6:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19 20:12 Trackpoint on Thinkpad X1 Carbon (5th gen) Damjan Georgievski
2017-05-23 18:12 ` Damjan Georgievski
2017-05-30 17:24   ` Dmitry Torokhov
2017-06-02 10:46     ` Damjan Georgievski
2017-06-05  0:52       ` Masaki Ota
2017-06-06  7:49         ` Benjamin Tissoires
2017-06-06 17:28           ` Damjan Georgievski
2017-06-06 17:41           ` Dmitry Torokhov
2017-06-07  1:18             ` Masaki Ota
2017-06-07  6:34               ` Dmitry Torokhov
2017-06-07  6:36             ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.