All of lore.kernel.org
 help / color / mirror / Atom feed
* elantech touchpad issues
@ 2011-09-06 14:53 Richard Schütz
  2011-09-07  1:46 ` JJ Ding
  2011-09-08  4:18 ` JJ Ding
  0 siblings, 2 replies; 8+ messages in thread
From: Richard Schütz @ 2011-09-06 14:53 UTC (permalink / raw)
  To: linux-input

Hello everybody!

I'm owning a Samsung N145P netbook, that comes along with an elantech 
touchpad:

[    5.949921] elantech: assuming hardware version 2, firmware version 
4.2.22
[    5.985481] elantech: Synaptics capabilities query result 0x09, 0x14, 
0x0b.

It has some annoying issues, which hopefully can be resolved now as 
there is some ongoing development on the driver again. I have already 
tested the current "[PATCH v5 0/8] Input: elantech: add support for 
newer hardware" patchset, but without success.


The device's axis ranges, which are reported to userspace, seem to be 
totally wrong.

(kernel 3.0.4)
[    17.940] (--) ETPS/2 Elantech Touchpad: x-axis range 8 - 1144
[    17.940] (--) ETPS/2 Elantech Touchpad: y-axis range 8 - 760

(kernel 3.0.4 + patchset)
[    16.936] (--) ETPS/2 Elantech Touchpad: x-axis range 0 - 1152
[    16.936] (--) ETPS/2 Elantech Touchpad: y-axis range 0 - 576

I get the following ranges, when I use synclient in monitor mode to look 
which values really are passed to the synaptics driver in X:

(kernel 3.0.4)
x: 0-819
y: 355-760

(kernel 3.0.4 + patchset)
x: 0-819
y: 171-576

Because of this differences the edge/scrolling areas of the touchpad are 
calculated wrong and can't be used by default.


The other issue occurs very often when two fingers are used:

(kernel 3.0.4)
     time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
    7.982  1020 -268 127 2  7  0 0 0 0 0  00000000

(kernel 3.0.4 + patchset)
     time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
    3.118  1020 -444 127 2  7  0 0 0 0 0  00000000

When the fingers are released this strange values are reported. This 
makes two finger scrolling unusable, because it jumps back to the 
beginning everytime.

-- 
Regards,
Richard Schütz
--
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

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

* Re: elantech touchpad issues
  2011-09-06 14:53 elantech touchpad issues Richard Schütz
@ 2011-09-07  1:46 ` JJ Ding
  2011-09-08  4:18 ` JJ Ding
  1 sibling, 0 replies; 8+ messages in thread
From: JJ Ding @ 2011-09-07  1:46 UTC (permalink / raw)
  To: Richard Schütz, linux-input; +Cc: Aaron Huang, Tom Lin

Hi Richard,

I will try to find a touchpad that matches your model and see what I can
do.

jj

On Tue, 06 Sep 2011 16:53:25 +0200, Richard Schütz <r.schtz@t-online.de> wrote:
> Hello everybody!
> 
> I'm owning a Samsung N145P netbook, that comes along with an elantech 
> touchpad:
> 
> [    5.949921] elantech: assuming hardware version 2, firmware version 
> 4.2.22
> [    5.985481] elantech: Synaptics capabilities query result 0x09, 0x14, 
> 0x0b.
> 
> It has some annoying issues, which hopefully can be resolved now as 
> there is some ongoing development on the driver again. I have already 
> tested the current "[PATCH v5 0/8] Input: elantech: add support for 
> newer hardware" patchset, but without success.
> 
> 
> The device's axis ranges, which are reported to userspace, seem to be 
> totally wrong.
> 
> (kernel 3.0.4)
> [    17.940] (--) ETPS/2 Elantech Touchpad: x-axis range 8 - 1144
> [    17.940] (--) ETPS/2 Elantech Touchpad: y-axis range 8 - 760
> 
> (kernel 3.0.4 + patchset)
> [    16.936] (--) ETPS/2 Elantech Touchpad: x-axis range 0 - 1152
> [    16.936] (--) ETPS/2 Elantech Touchpad: y-axis range 0 - 576
> 
> I get the following ranges, when I use synclient in monitor mode to look 
> which values really are passed to the synaptics driver in X:
> 
> (kernel 3.0.4)
> x: 0-819
> y: 355-760
> 
> (kernel 3.0.4 + patchset)
> x: 0-819
> y: 171-576
> 
> Because of this differences the edge/scrolling areas of the touchpad are 
> calculated wrong and can't be used by default.
> 
> 
> The other issue occurs very often when two fingers are used:
> 
> (kernel 3.0.4)
>      time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
>     7.982  1020 -268 127 2  7  0 0 0 0 0  00000000
> 
> (kernel 3.0.4 + patchset)
>      time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
>     3.118  1020 -444 127 2  7  0 0 0 0 0  00000000
> 
> When the fingers are released this strange values are reported. This 
> makes two finger scrolling unusable, because it jumps back to the 
> beginning everytime.
> 
> -- 
> Regards,
> Richard Schütz
> --
> 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
--
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

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

* Re: elantech touchpad issues
  2011-09-06 14:53 elantech touchpad issues Richard Schütz
  2011-09-07  1:46 ` JJ Ding
@ 2011-09-08  4:18 ` JJ Ding
  2011-09-08 18:17   ` Richard Schütz
  1 sibling, 1 reply; 8+ messages in thread
From: JJ Ding @ 2011-09-08  4:18 UTC (permalink / raw)
  To: Richard Schütz, linux-input; +Cc: Aaron Huang, Tom Lin

Hi Richard,

It turns out that v2 hardware has debounce packet, too. But with
different signature compared to v3. To the best of my knowledge, I can
only say some models of v2 hardware have this, and others don't. So we
always check for debounce.

Please test this patch and see if it works for you.
Please apply this on up of my v5 series.

Thanks
---
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 38fb155..1e5ea1d 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -613,6 +613,13 @@ static int elantech_packet_check_v1(struct psmouse *psmouse)
 	       etd->parity[packet[3]] == p3;
 }
 
+static int elantech_check_debounce_v2(struct psmouse *psmouse)
+{
+	const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff };
+	unsigned char *packet = psmouse->packet;
+	return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
+}
+
 static int elantech_packet_check_v2(struct psmouse *psmouse)
 {
 	struct elantech_data *etd = psmouse->private;
@@ -708,6 +715,9 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
 		break;
 
 	case 2:
+		if (elantech_check_debounce_v2(psmouse))
+			return PSMOUSE_FULL_PACKET;
+
 		if (etd->paritycheck && !elantech_packet_check_v2(psmouse))
 			return PSMOUSE_BAD_DATA;
--
jj

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

* Re: elantech touchpad issues
  2011-09-08  4:18 ` JJ Ding
@ 2011-09-08 18:17   ` Richard Schütz
  2011-09-12  8:42     ` Éric Piel
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Schütz @ 2011-09-08 18:17 UTC (permalink / raw)
  To: JJ Ding; +Cc: linux-input, Aaron Huang, Tom Lin

Am 08.09.2011 06:18, schrieb JJ Ding:
> Hi Richard,
>
> It turns out that v2 hardware has debounce packet, too. But with
> different signature compared to v3. To the best of my knowledge, I can
> only say some models of v2 hardware have this, and others don't. So we
> always check for debounce.
>
> Please test this patch and see if it works for you.
> Please apply this on up of my v5 series.
>
> Thanks
> ---
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 38fb155..1e5ea1d 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -613,6 +613,13 @@ static int elantech_packet_check_v1(struct psmouse *psmouse)
>   	       etd->parity[packet[3]] == p3;
>   }
>
> +static int elantech_check_debounce_v2(struct psmouse *psmouse)
> +{
> +	const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff };
> +	unsigned char *packet = psmouse->packet;
> +	return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
> +}
> +
>   static int elantech_packet_check_v2(struct psmouse *psmouse)
>   {
>   	struct elantech_data *etd = psmouse->private;
> @@ -708,6 +715,9 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
>   		break;
>
>   	case 2:
> +		if (elantech_check_debounce_v2(psmouse))
> +			return PSMOUSE_FULL_PACKET;
> +
>   		if (etd->paritycheck&&  !elantech_packet_check_v2(psmouse))
>   			return PSMOUSE_BAD_DATA;
> --
> jj

Yeah, this fixes the annoying issue with multiple fingers.

Now only the problem with the wrong axis ranges is remaining.

-- 
Regards,
Richard Schütz
--
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

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

* Re: elantech touchpad issues
  2011-09-08 18:17   ` Richard Schütz
@ 2011-09-12  8:42     ` Éric Piel
  2011-09-12  9:57       ` Richard Schütz
  2011-09-13  1:27       ` JJ Ding
  0 siblings, 2 replies; 8+ messages in thread
From: Éric Piel @ 2011-09-12  8:42 UTC (permalink / raw)
  To: Richard Schütz; +Cc: JJ Ding, linux-input, Aaron Huang, Tom Lin

Op 08-09-11 20:17, Richard Schütz schreef:
> Am 08.09.2011 06:18, schrieb JJ Ding:
>
> Yeah, this fixes the annoying issue with multiple fingers.
>
> Now only the problem with the wrong axis ranges is remaining.
>

I've tried with my version of the hardware (a old v2) and it doesn't 
seem to have the problem you describe.

Basically your problem is that the driver reports ranges as 0-1152 and 
0-576, but in reality, when you move your finger, the coordinates stay 
in the ranges 0-819, 171-576. So in practice the cursor moves as 
expected but the borders to allow the scrolling don't work. Is that right?

I wonder if it's normal that the device has a range even smaller than 
what it reports, and whether something can be done. JJ Ding?

Cheers,
Éric
--
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

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

* Re: elantech touchpad issues
  2011-09-12  8:42     ` Éric Piel
@ 2011-09-12  9:57       ` Richard Schütz
  2011-09-13  1:27       ` JJ Ding
  1 sibling, 0 replies; 8+ messages in thread
From: Richard Schütz @ 2011-09-12  9:57 UTC (permalink / raw)
  To: Éric Piel; +Cc: JJ Ding, linux-input, Aaron Huang, Tom Lin

Am 12.09.2011 10:42, schrieb Éric Piel:
> Op 08-09-11 20:17, Richard Schütz schreef:
>> Am 08.09.2011 06:18, schrieb JJ Ding:
>>
>> Yeah, this fixes the annoying issue with multiple fingers.
>>
>> Now only the problem with the wrong axis ranges is remaining.
>>
>
> I've tried with my version of the hardware (a old v2) and it doesn't
> seem to have the problem you describe.
>
> Basically your problem is that the driver reports ranges as 0-1152 and
> 0-576, but in reality, when you move your finger, the coordinates stay
> in the ranges 0-819, 171-576. So in practice the cursor moves as
> expected but the borders to allow the scrolling don't work. Is that right?

Exactly.

> I wonder if it's normal that the device has a range even smaller than
> what it reports, and whether something can be done. JJ Ding?
>
> Cheers,
> Éric

-- 
Regards,
Richard Schütz
--
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

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

* Re: elantech touchpad issues
  2011-09-12  8:42     ` Éric Piel
  2011-09-12  9:57       ` Richard Schütz
@ 2011-09-13  1:27       ` JJ Ding
  1 sibling, 0 replies; 8+ messages in thread
From: JJ Ding @ 2011-09-13  1:27 UTC (permalink / raw)
  To: Éric Piel, Richard Schütz; +Cc: linux-input, Aaron Huang, Tom Lin

Hi Éric, Richard,

On Mon, 12 Sep 2011 10:42:30 +0200, Éric Piel <E.A.B.Piel@tudelft.nl> wrote:
> Op 08-09-11 20:17, Richard Schütz schreef:
> > Am 08.09.2011 06:18, schrieb JJ Ding:
> >
> > Yeah, this fixes the annoying issue with multiple fingers.
> >
> > Now only the problem with the wrong axis ranges is remaining.
> >
> 
> I've tried with my version of the hardware (a old v2) and it doesn't 
> seem to have the problem you describe.
> 
> Basically your problem is that the driver reports ranges as 0-1152 and 
> 0-576, but in reality, when you move your finger, the coordinates stay 
> in the ranges 0-819, 171-576. So in practice the cursor moves as 
> expected but the borders to allow the scrolling don't work. Is that right?
> 
> I wonder if it's normal that the device has a range even smaller than 
> what it reports, and whether something can be done. JJ Ding?

I asked our firmware team and windows team, the v2 hardware is such a
wild beast. ;-) It has many variants WRT x, y ranges (due to different
scanning methods the hardware is using.) I am preparing a patch that
will hopefully fix this issue for all the v2 variants.

jj

> Cheers,
> Éric
> --
> 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
--
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

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

* elantech touchpad issues
@ 2011-01-23 14:12 Richard Schütz
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Schütz @ 2011-01-23 14:12 UTC (permalink / raw)
  To: linux-input

I noticed that the elantech driver reports totally wrong axis range 
values to the xf86-input-synaptics driver for the touchpad in my Samsung 
N145 Plus netbook.

kernel output:
elantech: assuming hardware version 2, firmware version 4.2.22
elantech: Synaptics capabilities query result 0x09, 0x14, 0x0b.

As it's detected as hardware version 2 the hardcoded ranges from 
elantech.h are used:
[    16.863] (--) ETPS/2 Elantech Touchpad: x-axis range 8 - 1144
[    16.863] (--) ETPS/2 Elantech Touchpad: y-axis range 8 - 760

But with synclient's monitor mode I discovered that the correct values 
for my touchpad seem to be:
min x: 0
max x: 819
min y: 355
max y: 760
(without ETP_EDGE_FUZZ_V2)

This results in unusuable edge areas by default.

When using more then one finger on the touchpad also sometimes this 
strange thing happens and the cursor jumps:
    time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
155.600  1020 -268  31 2  0  0 0 0 0 0  00000000
155.610  1020 -268   0 0  0  0 0 0 0 0  00000000
(the second line is optional)

I guess this would have no effect (like jumping cursor) with correct 
ranges. Can't they be queried from hardware? I have no clue if these 
ranges I figured out are valid for my netbook only or if there was a 
general change in newer firmware versions. Unfortunately, I own no other 
hardware for figuring this out. I could patch the driver for my personal 
need, but I think this should by handled somehow in the driver 
automatically. If that would not work adequate I would suggest to 
introduce driver parameters to pass the ranges at runtime without the 
need for recompiling.

-- 
Regards,
Richard Schütz
--
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

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

end of thread, other threads:[~2011-09-13  1:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06 14:53 elantech touchpad issues Richard Schütz
2011-09-07  1:46 ` JJ Ding
2011-09-08  4:18 ` JJ Ding
2011-09-08 18:17   ` Richard Schütz
2011-09-12  8:42     ` Éric Piel
2011-09-12  9:57       ` Richard Schütz
2011-09-13  1:27       ` JJ Ding
  -- strict thread matches above, loose matches on Subject: below --
2011-01-23 14:12 Richard Schütz

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.