2004-03-21 23:14:09

by Krzysztof Halasa

[permalink] [raw]
Subject: Synaptics touchpad + external mouse with Linux 2.6?

Hi,

I have a notebook PC (an old Fujitsu-Siemens Liteline, celeron 600 etc)
with a Synaptics touchpad:

Synaptics Touchpad, model: 1
Firmware: 4.6
Sensor: 19
new absolute packet format
Touchpad has extended capability bits
-> multifinger detection
-> palm detection
input: SynPS/2 Synaptics TouchPad on isa0060/serio1

This notebook has external mouse+keyboard connector. Is it possible to
have both the touchpad and the external mouse simultaneously active in
their native modes? The hardware (keyboard controller) doesn't seem to
support the active multiplexing mode (by Synaptics and others):

drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
drivers/input/serio/i8042.c: f0 -> i8042 (parameter) [3]
drivers/input/serio/i8042.c: 0f <- i8042 (return) [3]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
drivers/input/serio/i8042.c: 56 -> i8042 (parameter) [3]
drivers/input/serio/i8042.c: a9 <- i8042 (return) [3]
drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
drivers/input/serio/i8042.c: a4 -> i8042 (parameter) [3]
drivers/input/serio/i8042.c: 5b <- i8042 (return) [3]

It looks the keyboard controller just forwards all data from both
devices. I can set them (i.e. Linux and XFree86 driver) to IM PS/2 mode
and they will both work (Linux treats them as one device), but I can't
use touchpad's special features.

I was thinking about setting them to IM PS/2 mode first (both would go
IM PS/2) then switching to Synaptics mode (the mouse should ignore it).
On the receiving side, I could check if the packet is valid for IM or
Synaptics mode and pass it to the respective driver. Not sure if the
keyboard controller is fully transparent, though - it could be changing
data as outlined in the Synaptics PS2-MUX paper ("legacy hidden
multiplexing").

If I set Linux to Synaptics mode (i.e. modprobe psmouse without any
parameters), I can't use the external mouse as it produces 3-byte
packets by default (the kernel = synaptics.c prints "Synaptics driver
lost sync at byte 1").

What do you think?
--
Krzysztof Halasa, B*FH


2004-03-22 00:50:10

by Craig Bradney

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Sun, 2004-03-21 at 23:52, Krzysztof Halasa wrote:
> Hi,
>
> I have a notebook PC (an old Fujitsu-Siemens Liteline, celeron 600 etc)
> with a Synaptics touchpad:
>
> Synaptics Touchpad, model: 1
> Firmware: 4.6
> Sensor: 19
> new absolute packet format
> Touchpad has extended capability bits
> -> multifinger detection
> -> palm detection
> input: SynPS/2 Synaptics TouchPad on isa0060/serio1
>
> This notebook has external mouse+keyboard connector. Is it possible to
> have both the touchpad and the external mouse simultaneously active in
> their native modes? The hardware (keyboard controller) doesn't seem to
> support the active multiplexing mode (by Synaptics and others):
>
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: f0 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: 0f <- i8042 (return) [3]
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: 56 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: a9 <- i8042 (return) [3]
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: a4 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: 5b <- i8042 (return) [3]
>
> It looks the keyboard controller just forwards all data from both
> devices. I can set them (i.e. Linux and XFree86 driver) to IM PS/2 mode
> and they will both work (Linux treats them as one device), but I can't
> use touchpad's special features.
>
> I was thinking about setting them to IM PS/2 mode first (both would go
> IM PS/2) then switching to Synaptics mode (the mouse should ignore it).
> On the receiving side, I could check if the packet is valid for IM or
> Synaptics mode and pass it to the respective driver. Not sure if the
> keyboard controller is fully transparent, though - it could be changing
> data as outlined in the Synaptics PS2-MUX paper ("legacy hidden
> multiplexing").
>
> If I set Linux to Synaptics mode (i.e. modprobe psmouse without any
> parameters), I can't use the external mouse as it produces 3-byte
> packets by default (the kernel = synaptics.c prints "Synaptics driver
> lost sync at byte 1").
>
> What do you think?

Hmm would be a nice thing to have both running "how they
should/natively". I have IMPS/2 set and am running the touchpad with a
usb logitech notebook mouse on a Siemens Amilo D7830.

Craig


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-03-22 06:15:45

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Sun, Mar 21, 2004 at 11:52:31PM +0100, Krzysztof Halasa wrote:
> Hi,
>
> I have a notebook PC (an old Fujitsu-Siemens Liteline, celeron 600 etc)
> with a Synaptics touchpad:
>
> Synaptics Touchpad, model: 1
> Firmware: 4.6
> Sensor: 19
> new absolute packet format
> Touchpad has extended capability bits
> -> multifinger detection
> -> palm detection
> input: SynPS/2 Synaptics TouchPad on isa0060/serio1
>
> This notebook has external mouse+keyboard connector. Is it possible to
> have both the touchpad and the external mouse simultaneously active in
> their native modes? The hardware (keyboard controller) doesn't seem to
> support the active multiplexing mode (by Synaptics and others):
>
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: f0 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: 0f <- i8042 (return) [3]
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: 56 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: a9 <- i8042 (return) [3]
> drivers/input/serio/i8042.c: d3 -> i8042 (command) [3]
> drivers/input/serio/i8042.c: a4 -> i8042 (parameter) [3]
> drivers/input/serio/i8042.c: 5b <- i8042 (return) [3]
>
> It looks the keyboard controller just forwards all data from both
> devices. I can set them (i.e. Linux and XFree86 driver) to IM PS/2 mode
> and they will both work (Linux treats them as one device), but I can't
> use touchpad's special features.

I'm sorry to say it, but it's not possible. Well, it might be, but still
the magic to recognize which device is sending the data would be rather
crazy.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-03-23 02:41:16

by Joshua Kwan

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Mon, 22 Mar 2004 07:16:57 +0100, Vojtech Pavlik wrote:
> I'm sorry to say it, but it's not possible. Well, it might be, but still
> the magic to recognize which device is sending the data would be rather
> crazy.

Forgive me if I'm being naive, but...

Why can't synaptics be transparent? Why can't it do all the stuff it
requires special userspace things for in kernel space?

I should think that mapping the scroll buttons to their normal PS/2
equivalents on a Synaptics touchpad is possible in kernel space.

A friend recently expressed his discontent with this condition when he
tried to plug in another mouse and use it while the Synaptics touchpad was
still present.

So, please enlighten me...

--
Joshua Kwan


2004-03-23 04:32:48

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Monday 22 March 2004 09:41 pm, Joshua Kwan wrote:
> On Mon, 22 Mar 2004 07:16:57 +0100, Vojtech Pavlik wrote:
> > I'm sorry to say it, but it's not possible. Well, it might be, but still
> > the magic to recognize which device is sending the data would be rather
> > crazy.
>
> Forgive me if I'm being naive, but...
>
> Why can't synaptics be transparent? Why can't it do all the stuff it
> requires special userspace things for in kernel space?
>
> I should think that mapping the scroll buttons to their normal PS/2
> equivalents on a Synaptics touchpad is possible in kernel space.
>
> A friend recently expressed his discontent with this condition when he
> tried to plug in another mouse and use it while the Synaptics touchpad was
> still present.
>
> So, please enlighten me...
>

Because it is not implementation, it is hardware limitation. Synaptics native
protocol uses 6 bytes, standard PS/2 3 or 4. The protocols are not compatible
at all so unless the PC has an active multiplexing controller (which provides
up to 4 completely independent AUX ports) all devices have to speak the same
protocol.

I have seen 2 different behaviors for PCs without active multiplexor:
1. Plugging external mouse forces synaptics into hardware PS/2 compatibility
mode (Dells).
2. Hardware completely hides presence of external mouse (older Compaqs, ASUS).
In this case psmouse.proto option is needed to force both devices use the
same protocol, but all advanced features of Synaptics are lost.

As a side note what is normal PS/2 equivalent lower left corner tap has? What
about lower right corner tap? 3-finger tap? Synaptics provides much more
features than you can have with standard PS/2.


Hope that helps.

--
Dmitry

2004-03-23 05:40:30

by Aaron Lehmann

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Mon, Mar 22, 2004 at 11:32:29PM -0500, Dmitry Torokhov wrote:
> Because it is not implementation, it is hardware limitation. Synaptics native
> protocol uses 6 bytes, standard PS/2 3 or 4. The protocols are not compatible
> at all so unless the PC has an active multiplexing controller (which provides
> up to 4 completely independent AUX ports) all devices have to speak the same
> protocol.

This only matters if you plug in a PS/2 mouse. If you have a USB
mouse, that's another issue entirely. Ideally XFree86 should read
/dev/input/mice and not have to worry about the specifics of the
device. When you use the synaptics driver, XFree86 won't accept input
from USB mice. It may be possible to work around this by using
multiple Input sections, but that seems especially awkward when
Synaptics events are presented in both /dev/input/mice and /dev/psaux.

I recently switched from the synaptics driver reading /dev/psaux to
the generic ImPS/2 driver reading /dev/input/mice. (Note that the only
reason I ever installed the synaptics driver was that a kernel upgrade
forced me to.) It performs bearably, but I personally wish that I
could click by tapping and use the odd scrolling button as button3
(this only works when I hit the button exactly in the middle). At
lease I can plug in external mice without hassle.

2004-03-23 06:01:06

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Synaptics touchpad + external mouse with Linux 2.6?

On Tuesday 23 March 2004 12:40 am, Aaron Lehmann wrote:
> On Mon, Mar 22, 2004 at 11:32:29PM -0500, Dmitry Torokhov wrote:
> > Because it is not implementation, it is hardware limitation. Synaptics native
> > protocol uses 6 bytes, standard PS/2 3 or 4. The protocols are not compatible
> > at all so unless the PC has an active multiplexing controller (which provides
> > up to 4 completely independent AUX ports) all devices have to speak the same
> > protocol.
>
> This only matters if you plug in a PS/2 mouse. If you have a USB
> mouse, that's another issue entirely. Ideally XFree86 should read
> /dev/input/mice and not have to worry about the specifics of the
> device.

You can do that if you do not care about extended features, just use
/dev/input/mice and all should be fine (well, for tapping to work you will
have to pass psmouse.proto as in-kernel synaptics->PS/2 protocol emulation
does not process taps).

> When you use the synaptics driver, XFree86 won't accept input
> from USB mice. It may be possible to work around this by using
> multiple Input sections,

That is correct. You should use one input section for devices speaking
PS/2 protocol and other input sections for devices using other protocols.

> but that seems especially awkward when
> Synaptics events are presented in both /dev/input/mice and /dev/psaux.

Well, that is not a surprise as /dev/input/mice is a synonim for /dev/psaux
in 2.6. If you have your XFree reading from both devices you will get
duplicate events no matter what hardware it is (USB, PS/2, Synaptics).
Now, default XFree86 Synaptics setup has "auto-dev" protocol and "/dev/psaux"
device, but with "auto-dev" protocol the driver actually scans
/dev/input/eventX devices for Synaptics and /dev/psaux is only used as a
fall-back so the same setup works in 2.4.

>
> I recently switched from the synaptics driver reading /dev/psaux to
> the generic ImPS/2 driver reading /dev/input/mice. (Note that the only
> reason I ever installed the synaptics driver was that a kernel upgrade
> forced me to.) It performs bearably, but I personally wish that I
> could click by tapping and use the odd scrolling button as button3
> (this only works when I hit the button exactly in the middle).

Try psmouse.proto=bare or psmouse.proto=imps

> At lease I can plug in external mice without hassle.

That means that your hardware does not have the problem I described in my
other mail.

--
Dmitry