elantech touchpad issues

7 messages, 3 authors, 2011-09-13 · open the first message on its own page

elantech touchpad issues

From: Richard Schütz <hidden>
Date: 2011-09-06 14:53:35

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

Re: elantech touchpad issues

From: JJ Ding <hidden>
Date: 2011-09-07 01:44:31

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 [off-list ref] 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

Re: elantech touchpad issues

From: JJ Ding <hidden>
Date: 2011-09-08 04:15:59

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

Re: elantech touchpad issues

From: Richard Schütz <hidden>
Date: 2011-09-10 14:43:16

Am 08.09.2011 06:18, schrieb JJ Ding:
quoted hunk
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

Re: elantech touchpad issues

From: Éric Piel <hidden>
Date: 2011-09-12 08:42:37

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

Re: elantech touchpad issues

From: Richard Schütz <hidden>
Date: 2011-09-12 09:57:27

Am 12.09.2011 10:42, schrieb Éric Piel:
Op 08-09-11 20:17, Richard Schütz schreef:
quoted
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

Re: elantech touchpad issues

From: JJ Ding <hidden>
Date: 2011-09-13 01:24:55

Hi Éric, Richard,

On Mon, 12 Sep 2011 10:42:30 +0200, Éric Piel [off-list ref] wrote:
Op 08-09-11 20:17, Richard Schütz schreef:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help