* ALPS input driver problem with DualPoint on Dell E6400/E6500
@ 2008-11-01 4:48 Matthew Chapman
2008-11-03 19:02 ` Frederik Himpe
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Chapman @ 2008-11-01 4:48 UTC (permalink / raw)
To: linux-kernel
I have a Dell Latitude E6400 laptop with an ALPS touchpad/touchstick
combination, aka DualPoint. Individually, the touchpad and touchstick
work fine. However, if I accidentally touch both together, or use the
touchpad buttons while using the touchstick (or vice versa), things go
astray. The pointer jumps around, stray mouse buttons are pressed, and
the driver typically loses sync:
[13333.661085] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0
lost sync at byte 5
[13333.662353] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0
lost sync at byte 1
[13333.669493] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 -
driver resynched.
To cut a long story short, it seems that in this case the ALPS device
sends a 9-byte packet format, with both a relative update and an
absolute update combined (why oh why...). Has anyone else seen
something like this?
When I use just the touchstick and its buttons, the packets are normal
PS/2 relative mode packets, e.g.:
08 01 00 dx=1 dy=0
09 01 00 dx=1 dy=0 left T/S button down
08 00 01 dx=0 dy=1 left T/S button up
When I use just the touchpad and its buttons, the packets look like
this, which also works fine with the current ALPS code:
cf 27 1a 38 24 46 x=423 y=420 z=70 fin=1
cf 2c 1a 39 1e 45 x=428 y=414 z=69 fin=1 left T/P button down
cf 2f 1a 38 17 44 x=431 y=407 z=68 fin=1 left T/P button up
Let's say now I use the touchpad and press a touchstick button...
cf 15 1a 38 5e 3d x=405 y=478 z=61
cf 19 1a 0f 00 00 39 56 3d x=409 y=470 z=61 left T/P button down
^^^^^^^^
cf 1d 1a 39 4e 3d x=413 y=462 z=61
cf 21 1a 0f 00 00 38 49 3f x=417 y=456 z=63 left T/P button up
^^^^^^^^
cf 21 1a 38 48 3e x=417 y=455 z=62
Now let's try moving the touchstick also...
cf 3d 12 3f fa fd 18 4c 21 dx=-6 dy=-3 x=317 y=204 z=33
^^^^^^^^
38 fa fd dx=-6 dy=-3
cf 3a 12 3f f9 fc 18 4c 20 dx=-7 dy=-4 x=314 y=204 z=32
^^^^^^^^
38 fa fd dx=-6 dy=-3
etc.
In other words, it seems like there's a relative update embedded right
in the middle of the absolute mode packet, which can be identified by
all the buttons being set to 1.
I can put together a patch, but it's a non-trivial change... I'm
interested in hearing whether anyone else has the same problem with
their E6400/E6500 or other DualPoint laptop, or has better ideas
regarding how to deal with this.
Matt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALPS input driver problem with DualPoint on Dell E6400/E6500
2008-11-01 4:48 ALPS input driver problem with DualPoint on Dell E6400/E6500 Matthew Chapman
@ 2008-11-03 19:02 ` Frederik Himpe
0 siblings, 0 replies; 6+ messages in thread
From: Frederik Himpe @ 2008-11-03 19:02 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-input
On Sat, 01 Nov 2008 15:48:28 +1100, Matthew Chapman wrote:
> I have a Dell Latitude E6400 laptop with an ALPS touchpad/touchstick
> combination, aka DualPoint. Individually, the touchpad and touchstick
> work fine. However, if I accidentally touch both together, or use the
> touchpad buttons while using the touchstick (or vice versa), things go
> astray. The pointer jumps around, stray mouse buttons are pressed, and
> the driver typically loses sync:
>
> [13333.661085] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0
> lost sync at byte 5
> [13333.662353] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0
> lost sync at byte 1
> [13333.669493] psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 -
> driver resynched.
>
> To cut a long story short, it seems that in this case the ALPS device
> sends a 9-byte packet format, with both a relative update and an
> absolute update combined (why oh why...). Has anyone else seen
> something like this?
I can definitely confirm this problem, also on a Dell Latitutde E6400 with
2.6.27 kernel.
dmesg contains errors like this:
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 6
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 - driver resynched.
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 5
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 1
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 - driver resynched.
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 5
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 6
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 3
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 3
psmouse.c: DualPoint TouchPad at isa0060/serio1/input0 lost sync at byte 3
psmouse.c: issuing reconnect request
input: PS/2 Generic Mouse as /class/input/input13
(Note also that this patch is still required to make this patch to make
the synaptic driver recognize the touchpad:
http://lkml.org/lkml/2008/9/7/133 )
# cat /proc/bus/input/devices
I: Bus=0017 Vendor=0001 Product=0001 Version=0100
N: Name="Macintosh mouse button emulation"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=120013
B: KEY=800000000000 0 0 500f02102002 380303cf810d001 feffffdfffefffff
ffffffffffffffff
B: MSC=10
B: LED=7
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=event4
B: EV=21
B: SW=1
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button (CM)"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button (CM)"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/class/input/input6
U: Uniq=
H: Handlers=kbd event6
B: EV=3
B: KEY=4000 0 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=/video/input0
S: Sysfs=/class/input/input7
U: Uniq=
H: Handlers=kbd event7
B: EV=3
B: KEY=3f000b00000000 0 0 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=/video/input0
S: Sysfs=/class/input/input8
U: Uniq=
H: Handlers=kbd event8
B: EV=3
B: KEY=3f000b00000000 0 0 0
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=/video/input0
S: Sysfs=/class/input/input9
U: Uniq=
H: Handlers=kbd event9
B: EV=3
B: KEY=3f000b00000000 0 0 0
I: Bus=0003 Vendor=413c Product=8157 Version=0111
N: Name="HID 413c:8157"
P: Phys=usb-0000:00:1a.0-1.1/input0
S: Sysfs=/class/input/input10
U: Uniq=
H: Handlers=kbd event10
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=7
I: Bus=0001 Vendor=111d Product=76b2 Version=0001
N: Name="HDA Digital PCBeep"
P: Phys=card0/codec#0/beep0
S: Sysfs=/class/input/input12
U: Uniq=
H: Handlers=kbd event12
B: EV=40001
B: SND=6
I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input13
U: Uniq=
H: Handlers=mouse1 event2
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=3
> When I use just the touchstick and its buttons, the packets are normal
> PS/2 relative mode packets, e.g.:
>
> 08 01 00 dx=1 dy=0
> 09 01 00 dx=1 dy=0 left T/S button down 08 00 01 dx=0 dy=1
> left T/S button up
>
> When I use just the touchpad and its buttons, the packets look like
> this, which also works fine with the current ALPS code:
>
> cf 27 1a 38 24 46 x=423 y=420 z=70 fin=1 cf 2c 1a 39 1e 45 x=428
> y=414 z=69 fin=1 left T/P button down cf 2f 1a 38 17 44 x=431
> y=407 z=68 fin=1 left T/P button up
>
> Let's say now I use the touchpad and press a touchstick button...
>
> cf 15 1a 38 5e 3d x=405 y=478 z=61 cf 19 1a 0f 00 00 39 56
> 3d x=409 y=470 z=61 left T/P button down
> ^^^^^^^^
> cf 1d 1a 39 4e 3d x=413 y=462 z=61
>
> cf 21 1a 0f 00 00 38 49 3f x=417 y=456 z=63 left T/P button up
> ^^^^^^^^
> cf 21 1a 38 48 3e x=417 y=455 z=62
>
> Now let's try moving the touchstick also...
>
> cf 3d 12 3f fa fd 18 4c 21 dx=-6 dy=-3 x=317 y=204 z=33
> ^^^^^^^^
> 38 fa fd dx=-6 dy=-3 cf 3a 12 3f f9 fc 18 4c 20
> dx=-7 dy=-4 x=314 y=204 z=32
> ^^^^^^^^
> 38 fa fd dx=-6 dy=-3 etc.
>
> In other words, it seems like there's a relative update embedded right
> in the middle of the absolute mode packet, which can be identified by
> all the buttons being set to 1.
>
> I can put together a patch, but it's a non-trivial change... I'm
> interested in hearing whether anyone else has the same problem with
> their E6400/E6500 or other DualPoint laptop, or has better ideas
> regarding how to deal with this.
--
Frederik Himpe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALPS input driver problem with DualPoint on Dell E6400/E6500
@ 2008-11-25 18:45 Alexander Hofbauer
2008-12-08 14:14 ` ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch] Matthew Chapman
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Hofbauer @ 2008-11-25 18:45 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 543 bytes --]
Hi!
> I can put together a patch, but it's a non-trivial change... I'm
> interested in hearing whether anyone else has the same problem with
> their E6400/E6500 or other DualPoint laptop, or has better ideas
> regarding how to deal with this.
I'm facing the same problem here on my "Latitude E5500" and 2.6.27.7
with no found workarounds so far ("synclient TouchpadOff=0" works until
reset but doesn't avoid the touchpad getting reset eventually).
If there was a patch to test I'd be happy to do so :-).
Thank you,
Alex
[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch]
2008-11-25 18:45 ALPS input driver problem with DualPoint on Dell E6400/E6500 Alexander Hofbauer
@ 2008-12-08 14:14 ` Matthew Chapman
2008-12-08 19:06 ` Alexander Hofbauer
2009-02-24 0:16 ` Andy Isaacson
0 siblings, 2 replies; 6+ messages in thread
From: Matthew Chapman @ 2008-12-08 14:14 UTC (permalink / raw)
To: Alexander Hofbauer; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
Hi,
Here's a patch that implements the 9-byte packet format, which solves
the problem for me.
Matt
On Tue, Nov 25, 2008 at 07:45:42PM +0100, Alexander Hofbauer wrote:
> Hi!
>
> > I can put together a patch, but it's a non-trivial change... I'm
> > interested in hearing whether anyone else has the same problem with
> > their E6400/E6500 or other DualPoint laptop, or has better ideas
> > regarding how to deal with this.
>
> I'm facing the same problem here on my "Latitude E5500" and 2.6.27.7
> with no found workarounds so far ("synclient TouchpadOff=0" works until
> reset but doesn't avoid the touchpad getting reset eventually).
>
>
> If there was a patch to test I'd be happy to do so :-).
>
>
> Thank you,
> Alex
[-- Attachment #2: alps.diff --]
[-- Type: text/plain, Size: 1866 bytes --]
--- linux-2.6.27/drivers/input/mouse/alps.c 2008-12-09 00:31:48.000000000 +1100
+++ linux-2.6.27.alps/drivers/input/mouse/alps.c 2008-12-09 01:08:09.000000000 +1100
@@ -100,6 +100,19 @@
return;
}
+ if ((packet[3] & 0xf) == 0xf) {
+ /* 9-byte packet format seen on some DualPoints */
+ /* handle relative update and then fall through for remainder */
+ input_report_rel(dev2, REL_X,
+ packet[4] ? packet[4] - ((packet[3] << 4) & 0x100) : 0);
+ input_report_rel(dev2, REL_Y,
+ packet[5] ? ((packet[3] << 3) & 0x100) - packet[5] : 0);
+ input_sync(dev2);
+ packet[3] = packet[6];
+ packet[4] = packet[7];
+ packet[5] = packet[8];
+ }
+
if (priv->i->flags & ALPS_OLDPROTO) {
left = packet[2] & 0x10;
right = packet[2] & 0x08;
@@ -197,6 +210,21 @@
if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
return PSMOUSE_BAD_DATA;
+ if ((psmouse->pktcnt >= 4) && ((psmouse->packet[3] & 0xf) == 0xf))
+ {
+ /* 9-byte packet format seen on some DualPoints */
+ /* Bytes 7 - 9 should have 0 in the highest bit */
+ if ((psmouse->pktcnt >= 7) && (psmouse->pktcnt <= 9) &&
+ (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
+ return PSMOUSE_BAD_DATA;
+
+ if (psmouse->pktcnt == 9) {
+ alps_process_packet(psmouse);
+ return PSMOUSE_FULL_PACKET;
+ }
+ return PSMOUSE_GOOD_DATA;
+ }
+
/* Bytes 2 - 6 should have 0 in the highest bit */
if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
(psmouse->packet[psmouse->pktcnt - 1] & 0x80))
--- linux-2.6.27/drivers/input/mouse/psmouse.h 2008-10-10 09:13:53.000000000 +1100
+++ linux-2.6.27.alps/drivers/input/mouse/psmouse.h 2008-11-06 02:32:45.000000000 +1100
@@ -42,7 +42,7 @@
struct work_struct resync_work;
char *vendor;
char *name;
- unsigned char packet[8];
+ unsigned char packet[9];
unsigned char badbyte;
unsigned char pktcnt;
unsigned char pktsize;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch]
2008-12-08 14:14 ` ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch] Matthew Chapman
@ 2008-12-08 19:06 ` Alexander Hofbauer
2009-02-24 0:16 ` Andy Isaacson
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Hofbauer @ 2008-12-08 19:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Matthew Chapman
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
On Die, 2008-12-09 at 01:14 +1100, Matthew Chapman wrote:
> Hi,
>
> Here's a patch that implements the 9-byte packet format, which solves
> the problem for me.
Thank you.
Indeed, the patch seems to work except for losing "grip" when using e.g.
the DualPoint Stick and the touchpad buttons at the same time.
Let's assume I click a window decoration drawn by compiz
(gtk-window-decorator) to move the window and the use the Stick. At
"normal" speed the window is dropped immediately. If I start dragging
very slowly I can sometimes move it successfully.
Playing around and trying to get some usable output from xev I could
reproducibly freeze the whole system (at least graphical output and
keyboard/mouse input) but I don't know if this is related to using
2.6.28-rc7 or the video drivers+compiz or the ALPS DualPoint anyway.
I nevertheless also experimented with metacity. Dragging works most of
the time but even metacity sometimes seems to interpret a double click
and maximizes the window instead of starting to move it.
So I'm quite positive that this patch still has some rough edges and
events that don't belong where they appear (or at least are not expected
by the window managers) because not mixing Touchpad's and -stick's
controls doesn't have any issues at all.
Greetings from Austria,
Alex
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch]
2008-12-08 14:14 ` ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch] Matthew Chapman
2008-12-08 19:06 ` Alexander Hofbauer
@ 2009-02-24 0:16 ` Andy Isaacson
1 sibling, 0 replies; 6+ messages in thread
From: Andy Isaacson @ 2009-02-24 0:16 UTC (permalink / raw)
To: Matthew Chapman; +Cc: Alexander Hofbauer, linux-kernel, linux-input
On Tue, Dec 09, 2008 at 01:14:38AM +1100, Matthew Chapman wrote:
> Hi,
>
> Here's a patch that implements the 9-byte packet format, which solves
> the problem for me.
>
> Matt
Matt,
Your patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=12577 for
me. Would you consider resending it to linux-input@ with your
Signed-off-by?
Thanks,
-andy
> --- linux-2.6.27/drivers/input/mouse/alps.c 2008-12-09 00:31:48.000000000 +1100
> +++ linux-2.6.27.alps/drivers/input/mouse/alps.c 2008-12-09 01:08:09.000000000 +1100
> @@ -100,6 +100,19 @@
> return;
> }
>
> + if ((packet[3] & 0xf) == 0xf) {
> + /* 9-byte packet format seen on some DualPoints */
> + /* handle relative update and then fall through for remainder */
> + input_report_rel(dev2, REL_X,
> + packet[4] ? packet[4] - ((packet[3] << 4) & 0x100) : 0);
> + input_report_rel(dev2, REL_Y,
> + packet[5] ? ((packet[3] << 3) & 0x100) - packet[5] : 0);
> + input_sync(dev2);
> + packet[3] = packet[6];
> + packet[4] = packet[7];
> + packet[5] = packet[8];
> + }
> +
> if (priv->i->flags & ALPS_OLDPROTO) {
> left = packet[2] & 0x10;
> right = packet[2] & 0x08;
> @@ -197,6 +210,21 @@
> if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
> return PSMOUSE_BAD_DATA;
>
> + if ((psmouse->pktcnt >= 4) && ((psmouse->packet[3] & 0xf) == 0xf))
> + {
> + /* 9-byte packet format seen on some DualPoints */
> + /* Bytes 7 - 9 should have 0 in the highest bit */
> + if ((psmouse->pktcnt >= 7) && (psmouse->pktcnt <= 9) &&
> + (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> + return PSMOUSE_BAD_DATA;
> +
> + if (psmouse->pktcnt == 9) {
> + alps_process_packet(psmouse);
> + return PSMOUSE_FULL_PACKET;
> + }
> + return PSMOUSE_GOOD_DATA;
> + }
> +
> /* Bytes 2 - 6 should have 0 in the highest bit */
> if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
> (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
> --- linux-2.6.27/drivers/input/mouse/psmouse.h 2008-10-10 09:13:53.000000000 +1100
> +++ linux-2.6.27.alps/drivers/input/mouse/psmouse.h 2008-11-06 02:32:45.000000000 +1100
> @@ -42,7 +42,7 @@
> struct work_struct resync_work;
> char *vendor;
> char *name;
> - unsigned char packet[8];
> + unsigned char packet[9];
> unsigned char badbyte;
> unsigned char pktcnt;
> unsigned char pktsize;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-24 0:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25 18:45 ALPS input driver problem with DualPoint on Dell E6400/E6500 Alexander Hofbauer
2008-12-08 14:14 ` ALPS input driver problem with DualPoint on Dell E6400/E6500 [patch] Matthew Chapman
2008-12-08 19:06 ` Alexander Hofbauer
2009-02-24 0:16 ` Andy Isaacson
-- strict thread matches above, loose matches on Subject: below --
2008-11-01 4:48 ALPS input driver problem with DualPoint on Dell E6400/E6500 Matthew Chapman
2008-11-03 19:02 ` Frederik Himpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox