All of lore.kernel.org
 help / color / mirror / Atom feed
* Elantech touchpad detected as Logitech PS2 Wheel Mouse
@ 2012-05-20 18:36 Nicola Alessi
  2012-05-20 19:20 ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: Nicola Alessi @ 2012-05-20 18:36 UTC (permalink / raw)
  To: linux-input; +Cc: jj_ding, 673588

Hi,

I'm running debian wheezy with latest kernel (uname -a gives me: Linux
ehehehpc 3.2.0-2-686-pae #1 SMP Sun May 13 07:51:23 UTC 2012 i686
GNU/Linux).
While I'm expecting the kernel to correctly detect my touchpad, it's
detected as a mouse. No scrolling, no multitouch.
Below there's a snippet of my /proc/bus/input/devices:

[...]
I: Bus=0011 Vendor=0002 Product=0001 Version=0063
N: Name="PS/2 Logitech Wheel Mouse"
P: Phys=isa0060/serio4/input0
S: Sysfs=/devices/platform/i8042/serio4/input/input7
U: Uniq=
H: Handlers=mouse0 event7
B: PROP=0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103
[...]

The notebook I'm using is a Fujitsu Siemens Amilo pi2515.
I also tried kernel version 3.3.6 with same results.
In both cases grep ELANTECH .config gives me:

CONFIG_MOUSE_PS2_ELANTECH=y

so I suppose it shouldn't be a kernel configuration problem.
I opened a bug on http://bugs.debian.org/673588
You can find more information and preliminary testing there.
Thank you very much for your attention.
Regards.


Nicola

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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-20 18:36 Elantech touchpad detected as Logitech PS2 Wheel Mouse Nicola Alessi
@ 2012-05-20 19:20 ` Jonathan Nieder
  2012-05-20 20:18   ` Nicola Alessi
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2012-05-20 19:20 UTC (permalink / raw)
  To: Nicola Alessi; +Cc: linux-input, jj_ding

Nicola Alessi wrote:

> While I'm expecting the kernel to correctly detect my touchpad, it's
> detected as a mouse. No scrolling, no multitouch.
> Below there's a snippet of my /proc/bus/input/devices:

Kernel log:

 http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=dmesg.txt;att=3;bug=673588

[...]
> The notebook I'm using is a Fujitsu Siemens Amilo pi2515.
> I also tried kernel version 3.3.6 with same results.

Can you get a log with the following patch applied?

Thanks,
Jonathan

diff --git i/drivers/input/mouse/elantech.c w/drivers/input/mouse/elantech.c
index d2c0db159b18..a1d59e11e2d3 100644
--- i/drivers/input/mouse/elantech.c
+++ w/drivers/input/mouse/elantech.c
@@ -10,6 +10,7 @@
  * Trademarks are the property of their respective owners.
  */
 
+#define DEBUG
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/module.h>

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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-20 19:20 ` Jonathan Nieder
@ 2012-05-20 20:18   ` Nicola Alessi
  2012-05-21  5:23     ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: Nicola Alessi @ 2012-05-20 20:18 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: linux-input, jj_ding

I applied the patch. Now my kernel (3.3.6) log says:

[    6.734445] psmouse serio4: elantech: unexpected magic knock result
0x3c, 0x03, 0x3c.

I hope this can help.

Nicola

Il 20/05/12 21:20, Jonathan Nieder ha scritto:
> Can you get a log with the following patch applied?
> 
> Thanks,
> Jonathan
> 
> diff --git i/drivers/input/mouse/elantech.c w/drivers/input/mouse/elantech.c
> index d2c0db159b18..a1d59e11e2d3 100644
> --- i/drivers/input/mouse/elantech.c
> +++ w/drivers/input/mouse/elantech.c
> @@ -10,6 +10,7 @@
>   * Trademarks are the property of their respective owners.
>   */
>  
> +#define DEBUG
>  #include <linux/delay.h>
>  #include <linux/slab.h>
>  #include <linux/module.h>


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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-20 20:18   ` Nicola Alessi
@ 2012-05-21  5:23     ` Jonathan Nieder
  2012-05-21  7:56       ` JJ Ding
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2012-05-21  5:23 UTC (permalink / raw)
  To: Nicola Alessi; +Cc: linux-input, jj_ding

Nicola Alessi wrote:

> [    6.734445] psmouse serio4: elantech: unexpected magic knock result 0x3c, 0x03, 0x3c.
>
> I hope this can help.

Yes, thanks much.

One more question: how do you know this touchpad is an Elantech pad?
E.g., is there another OS with a driver that detects it as Elantech?

Based on [1] it seems the Amilo Pi 2515 ships with a variety of
different touchpad models.

Jonathan

[1] https://bugzilla.kernel.org/show_bug.cgi?id=10942

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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-21  5:23     ` Jonathan Nieder
@ 2012-05-21  7:56       ` JJ Ding
  2012-05-21  8:28         ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: JJ Ding @ 2012-05-21  7:56 UTC (permalink / raw)
  To: Jonathan Nieder, Nicola Alessi; +Cc: linux-input

Hi Jonathan and Nicola,

On Mon, 21 May 2012 00:23:11 -0500, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Nicola Alessi wrote:
> 
> > [    6.734445] psmouse serio4: elantech: unexpected magic knock
> > result 0x3c, 0x03, 0x3c.
           ^^^^^^^^^^^^^^^^^
Yes, from this, the touchpad is probably Elan.

But it is meant to be used as such, a basic pointing device. Some NB
vendors may not require the multi-finger functions, for cost reason or
others. Elan touchpad reports this magic knock when it only supports
the basic mouse functions. With these touchpads, the multi-finger functons
are NOT TESTED and thus NOT SUPPORTED.

We used to have a "force_elantech" module param to force the TP to be
detected as Elan, but I removed it when I was updating elantech.c to
support newer models. Maybe you can convince Dmitry to add it back, but
still, this kind of Elan touchpads is not supported as multi-touch
pointing device, so I wouldn't recommand it.

I hope this helps.

Best regards,
-JJ

> >
> > I hope this can help.
> 
> Yes, thanks much.
> 
> One more question: how do you know this touchpad is an Elantech pad?
> E.g., is there another OS with a driver that detects it as Elantech?
> 
> Based on [1] it seems the Amilo Pi 2515 ships with a variety of
> different touchpad models.
> 
> Jonathan
> 
> [1] https://bugzilla.kernel.org/show_bug.cgi?id=10942

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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-21  7:56       ` JJ Ding
@ 2012-05-21  8:28         ` Jonathan Nieder
  2012-05-21 13:45           ` Nicola Alessi
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2012-05-21  8:28 UTC (permalink / raw)
  To: Nicola Alessi; +Cc: JJ Ding, linux-input

JJ Ding wrote:

> We used to have a "force_elantech" module param to force the TP to be
> detected as Elan, but I removed it when I was updating elantech.c to
> support newer models. Maybe you can convince Dmitry to add it back, but
> still, this kind of Elan touchpads is not supported as multi-touch
> pointing device, so I wouldn't recommand it.

Neat.

> I hope this helps.

Definitely; thanks for explaining.  Nicola, I'm still curious about
the following:

>> E.g., is there another OS with a driver that detects it as Elantech?

If another OS offers more functionality, then we would know the
hardware is capable of it.

The patch JJ described follows, in case you want to experiment.

-- >8 --
Subject: Input: elantech - allow forcing Elantech protocol when knock fails

This does not quite revert 4af61e90270e35bafa9e99a3c48fb3f363da592d
("Input: elantech - remove module parameter force_elantech") --- the
old force_elantech parameter was about ignoring an unrecognized
response to ETP_FW_VERSION_QUERY, while this one is about ignoring
unrecognized responses to the magic knock.

This patch is just for experimentation and is not meant for inclusion.
---
 drivers/input/mouse/elantech.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db159b18..55ac1aa5e943 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -27,6 +27,10 @@
 					fmt, ##__VA_ARGS__);		\
 	} while (0)
 
+static bool force_elantech;
+module_param_named(force_elantech, force_elantech, bool, 0644);
+MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default).");
+
 /*
  * Send a Synaptics style sliced query command
  */
@@ -1195,10 +1199,14 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
 	 */
 	if (param[0] != 0x3c || param[1] != 0x03 ||
 	    (param[2] != 0xc8 && param[2] != 0x00)) {
-		psmouse_dbg(psmouse,
-			    "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
-			    param[0], param[1], param[2]);
-		return -1;
+		if (!force_elantech) {
+			psmouse_dbg(psmouse,
+				    "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
+				    param[0], param[1], param[2]);
+			return -1;
+		}
+		psmouse_warning(psmouse, "Unexpected magic knock result.\n");
+		psmouse_info(psmouse, "Enabling anyway due to force_elantech.\n");
 	}
 
 	/*
-- 
1.7.10.2


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

* Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
  2012-05-21  8:28         ` Jonathan Nieder
@ 2012-05-21 13:45           ` Nicola Alessi
  0 siblings, 0 replies; 7+ messages in thread
From: Nicola Alessi @ 2012-05-21 13:45 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: JJ Ding, linux-input

Hi,

I'd like to thank you all for the time you dedicated to this problem.
I'll try to experiment with the patch and I'll report if something
interesting happens.

@Jonathan: there are two things that make me think to have a elantech
touchpad. First, a sticker from the manufacturer below laptop's battery
pack (in the slot, you can see it only if you remove the battery)
labeled "ELANTEK". Second, I think more important, I've played around
(about two months ago) with dkms and patches to psmouse. More in detail,
I tried the patch from Seth Forshee (see
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/681904/comments/111).
Through it didn't fix the issue (the touchpad was totally unusable due
to continuous "sync lost" messages) the touchpad was recognized as an
elantech (I don't remember the details, but I could try to build the
module again and mail some info).

Thanks again,

Nicola

Il 21/05/12 10:28, Jonathan Nieder ha scritto:
> JJ Ding wrote:
> 
>> We used to have a "force_elantech" module param to force the TP to be
>> detected as Elan, but I removed it when I was updating elantech.c to
>> support newer models. Maybe you can convince Dmitry to add it back, but
>> still, this kind of Elan touchpads is not supported as multi-touch
>> pointing device, so I wouldn't recommand it.
> 
> Neat.
> 
>> I hope this helps.
> 
> Definitely; thanks for explaining.  Nicola, I'm still curious about
> the following:
> 
>>> E.g., is there another OS with a driver that detects it as Elantech?
> 
> If another OS offers more functionality, then we would know the
> hardware is capable of it.
> 
> The patch JJ described follows, in case you want to experiment.
> 
> -- >8 --
> Subject: Input: elantech - allow forcing Elantech protocol when knock fails
> 
> This does not quite revert 4af61e90270e35bafa9e99a3c48fb3f363da592d
> ("Input: elantech - remove module parameter force_elantech") --- the
> old force_elantech parameter was about ignoring an unrecognized
> response to ETP_FW_VERSION_QUERY, while this one is about ignoring
> unrecognized responses to the magic knock.
> 
> This patch is just for experimentation and is not meant for inclusion.
> ---
>  drivers/input/mouse/elantech.c |   16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index d2c0db159b18..55ac1aa5e943 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -27,6 +27,10 @@
>  					fmt, ##__VA_ARGS__);		\
>  	} while (0)
>  
> +static bool force_elantech;
> +module_param_named(force_elantech, force_elantech, bool, 0644);
> +MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default).");
> +
>  /*
>   * Send a Synaptics style sliced query command
>   */
> @@ -1195,10 +1199,14 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
>  	 */
>  	if (param[0] != 0x3c || param[1] != 0x03 ||
>  	    (param[2] != 0xc8 && param[2] != 0x00)) {
> -		psmouse_dbg(psmouse,
> -			    "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
> -			    param[0], param[1], param[2]);
> -		return -1;
> +		if (!force_elantech) {
> +			psmouse_dbg(psmouse,
> +				    "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
> +				    param[0], param[1], param[2]);
> +			return -1;
> +		}
> +		psmouse_warning(psmouse, "Unexpected magic knock result.\n");
> +		psmouse_info(psmouse, "Enabling anyway due to force_elantech.\n");
>  	}
>  
>  	/*


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

end of thread, other threads:[~2012-05-21 13:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 18:36 Elantech touchpad detected as Logitech PS2 Wheel Mouse Nicola Alessi
2012-05-20 19:20 ` Jonathan Nieder
2012-05-20 20:18   ` Nicola Alessi
2012-05-21  5:23     ` Jonathan Nieder
2012-05-21  7:56       ` JJ Ding
2012-05-21  8:28         ` Jonathan Nieder
2012-05-21 13:45           ` Nicola Alessi

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.