2004-01-10 18:01:02

by Pavel Machek

[permalink] [raw]
Subject: Do not use synaptics extensions by default


..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
is not really suitable to be enabled by default. You can not click by
tapping the touchpad (well, unless you have very new X with right
configuration, but than you can't go back to 2.4), and touchpad senses
your finger even when it is not touching, doing spurious movements =>
you can't hit anything on screen. Without synaptics extensions
everything works just fine. You can reenable synaptics support using
commandline.

Plus it documents psmouse_noext option.

Please apply,
Pavel




--- tmp/linux/Documentation/kernel-parameters.txt 2004-01-10 18:51:13.000000000 +0100
+++ linux/Documentation/kernel-parameters.txt 2004-01-10 16:15:31.000000000 +0100
@@ -799,8 +799,10 @@
before loading.
See Documentation/ramdisk.txt.

+ psmouse_noext= [HW,MOUSE,deprecated] Equivalent to psmouse_proto=bare
+
psmouse_proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
- probe for (bare|imps|exps).
+ probe for (bare|imps|exps|synaptics).

psmouse_resetafter=
[HW,MOUSE] Try to reset Synaptics Touchpad after so many
--- tmp/linux/drivers/input/mouse/psmouse-base.c 2004-01-09 20:24:19.000000000 +0100
+++ linux/drivers/input/mouse/psmouse-base.c 2004-01-10 16:16:06.000000000 +0100
@@ -31,7 +31,7 @@
MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");

static char *psmouse_proto;
-static unsigned int psmouse_max_proto = -1U;
+static unsigned int psmouse_max_proto = PSMOUSE_IMEX;
module_param(psmouse_proto, charp, 0);
MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");

@@ -678,6 +678,8 @@
psmouse_max_proto = PSMOUSE_IMPS;
else if (!strcmp(psmouse_proto, "exps"))
psmouse_max_proto = PSMOUSE_IMEX;
+ else if (!strcmp(psmouse_proto, "synaptics"))
+ psmouse_max_proto = PSMOUSE_SYNAPTICS;
else
printk(KERN_ERR "psmouse: unknown protocol type '%s'\n", psmouse_proto);
}

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


2004-01-10 18:52:23

by Sean Neakums

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Pavel Machek <[email protected]> writes:

> ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> is not really suitable to be enabled by default. You can not click by
> tapping the touchpad (well, unless you have very new X with right
> configuration, but than you can't go back to 2.4), and touchpad senses
> your finger even when it is not touching, doing spurious movements =>
> you can't hit anything on screen. Without synaptics extensions
> everything works just fine. You can reenable synaptics support using
> commandline.

My laptop has a dodgy trackpoint attached to the passthrough port,
although the touchpad works fine. Before 2.6.1 this didn't matter,
because whether by accident or design, the passthrough was disabled.
Does this patch disable the passthrough port by default? If not,
would it be possible to add a boot parameter or something to allow it
to be disabled?

2004-01-10 19:33:53

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 06:59:30PM +0100, Pavel Machek wrote:

> ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> is not really suitable to be enabled by default. You can not click by
> tapping the touchpad (well, unless you have very new X with right
> configuration, but than you can't go back to 2.4), and touchpad senses
> your finger even when it is not touching, doing spurious movements =>
> you can't hit anything on screen. Without synaptics extensions
> everything works just fine. You can reenable synaptics support using
> commandline.
>
> Plus it documents psmouse_noext option.
>
> Please apply,

No way. This also kills Logitech mouse detection and Genius and ...
... and those cannot be enabled via kernel command line parameters.

> Pavel
>
>
>
>
> --- tmp/linux/Documentation/kernel-parameters.txt 2004-01-10 18:51:13.000000000 +0100
> +++ linux/Documentation/kernel-parameters.txt 2004-01-10 16:15:31.000000000 +0100
> @@ -799,8 +799,10 @@
> before loading.
> See Documentation/ramdisk.txt.
>
> + psmouse_noext= [HW,MOUSE,deprecated] Equivalent to psmouse_proto=bare
> +
> psmouse_proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
> - probe for (bare|imps|exps).
> + probe for (bare|imps|exps|synaptics).
>
> psmouse_resetafter=
> [HW,MOUSE] Try to reset Synaptics Touchpad after so many
> --- tmp/linux/drivers/input/mouse/psmouse-base.c 2004-01-09 20:24:19.000000000 +0100
> +++ linux/drivers/input/mouse/psmouse-base.c 2004-01-10 16:16:06.000000000 +0100
> @@ -31,7 +31,7 @@
> MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
>
> static char *psmouse_proto;
> -static unsigned int psmouse_max_proto = -1U;
> +static unsigned int psmouse_max_proto = PSMOUSE_IMEX;
> module_param(psmouse_proto, charp, 0);
> MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
>
> @@ -678,6 +678,8 @@
> psmouse_max_proto = PSMOUSE_IMPS;
> else if (!strcmp(psmouse_proto, "exps"))
> psmouse_max_proto = PSMOUSE_IMEX;
> + else if (!strcmp(psmouse_proto, "synaptics"))
> + psmouse_max_proto = PSMOUSE_SYNAPTICS;
> else
> printk(KERN_ERR "psmouse: unknown protocol type '%s'\n", psmouse_proto);
> }
>
> --
> When do you have a heart between your knees?
> [Johanka's followup: and *two* hearts?]

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-10 19:28:57

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Saturday 10 January 2004 12:59 pm, Pavel Machek wrote:
> ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> is not really suitable to be enabled by default. You can not click by
> tapping the touchpad (well, unless you have very new X with right
> configuration, but than you can't go back to 2.4),

It is my understanding that by setting "Protocol" to "auto-dev" and
"Device" to "/dev/psaux" you can freely switch between 2.4 and 2.5.

> and touchpad senses
> your finger even when it is not touching, doing spurious movements =>
> you can't hit anything on screen.

Does the touchpad sensitivity is OK for you when using then native XFree
driver? Should we bump it up a little?

Plus, there were issues in mousedev regarding PS2 emulation for touchpads
in absolute mode, it should be fixed in -mm or you can try grabbing patches
from http://www.geocities.com/dt_or/input/2_6_1/
You are probably mostly interesed in one that deals with mouse jitter.

> Without synaptics extensions
> everything works just fine. You can reenable synaptics support using
> commandline.
>
> Plus it documents psmouse_noext option.
>

Why would you document something that is deprecated? It was removed so the
new users would not start using it instead of psmouse.proto. psmouse.noext
should be gone soon.

Plus, you not only disabling Synaptics extensions but Genius and Logitech's
ones as well.

> Please apply,
> Pavel

Dmitry

2004-01-10 19:45:49

by Pavel Machek

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Hi!

> > > ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> > > is not really suitable to be enabled by default. You can not click by
> > > tapping the touchpad (well, unless you have very new X with right
> > > configuration, but than you can't go back to 2.4),
> >
> > It is my understanding that by setting "Protocol" to "auto-dev" and
> > "Device" to "/dev/psaux" you can freely switch between 2.4 and 2.5.
>
> I work with this setting for a couple of weeks now switching between 2.4
> and 2.6. The touchpad works quite well in X. (Dell inspiron 8000).
> I only notice I have to tap harder to get a click.

Is there way to make it work with gpm, too? I'm using that
heavily. Currently I'm doing gpm in repeater mode, then X reading from
/dev/gpmdata....
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

2004-01-10 19:42:10

by Marcel Mol

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 02:28:49PM -0500, Dmitry Torokhov wrote:
> On Saturday 10 January 2004 12:59 pm, Pavel Machek wrote:
> > ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> > is not really suitable to be enabled by default. You can not click by
> > tapping the touchpad (well, unless you have very new X with right
> > configuration, but than you can't go back to 2.4),
>
> It is my understanding that by setting "Protocol" to "auto-dev" and
> "Device" to "/dev/psaux" you can freely switch between 2.4 and 2.5.

I work with this setting for a couple of weeks now switching between 2.4
and 2.6. The touchpad works quite well in X. (Dell inspiron 8000).
I only notice I have to tap harder to get a click.

-Marcel

>
> > and touchpad senses
> > your finger even when it is not touching, doing spurious movements =>
> > you can't hit anything on screen.
>
> Does the touchpad sensitivity is OK for you when using then native XFree
> driver? Should we bump it up a little?
>
> Plus, there were issues in mousedev regarding PS2 emulation for touchpads
> in absolute mode, it should be fixed in -mm or you can try grabbing patches
> from http://www.geocities.com/dt_or/input/2_6_1/
> You are probably mostly interesed in one that deals with mouse jitter.
>
> > Without synaptics extensions
> > everything works just fine. You can reenable synaptics support using
> > commandline.
> >
> > Plus it documents psmouse_noext option.
> >
>
> Why would you document something that is deprecated? It was removed so the
> new users would not start using it instead of psmouse.proto. psmouse.noext
> should be gone soon.
>
> Plus, you not only disabling Synaptics extensions but Genius and Logitech's
> ones as well.
>
> > Please apply,
> > Pavel
>
> Dmitry
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
======-------- Marcel J.E. Mol MESA Consulting B.V.
=======--------- ph. +31-(0)6-54724868 P.O. Box 112
=======--------- [email protected] 2630 AC Nootdorp
__==== http://www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____
They couldn't think of a number, Linux user 1148 -- counter.li.org
so they gave me a name! -- Rupert Hine -- http://www.ruperthine.com

2004-01-10 19:50:04

by Pavel Machek

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Hi!

> Why would you document something that is deprecated? It was removed so the
> new users would not start using it instead of psmouse.proto. psmouse.noext
> should be gone soon.

My understanding is that Documentation/kernel-parameters.txt should
document all available parameters...
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

2004-01-10 19:44:52

by Pavel Machek

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Hi!

> > ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> > is not really suitable to be enabled by default. You can not click by
> > tapping the touchpad (well, unless you have very new X with right
> > configuration, but than you can't go back to 2.4), and touchpad senses
> > your finger even when it is not touching, doing spurious movements =>
> > you can't hit anything on screen. Without synaptics extensions
> > everything works just fine. You can reenable synaptics support using
> > commandline.
> >
> > Plus it documents psmouse_noext option.
> >
> > Please apply,
>
> No way. This also kills Logitech mouse detection and Genius and ...
> ... and those cannot be enabled via kernel command line parameters.

I'm setting it to PSMOUSE_IMEX, that's just below PSMOUSE_SYNAPTICS:

#define PSMOUSE_PS2 1
#define PSMOUSE_PS2PP 2
#define PSMOUSE_PS2TPP 3
#define PSMOUSE_GENPS 4
#define PSMOUSE_IMPS 5
#define PSMOUSE_IMEX 6
#define PSMOUSE_SYNAPTICS 7

That should turn off just synaptics, no?

Okay, so how to do this properly? Synaptics driver with "mouse
emulation" is not usable (tap-to-click is critical), and I want to be
able to boot 2.4...

Pavel

> > --- tmp/linux/drivers/input/mouse/psmouse-base.c 2004-01-09 20:24:19.000000000 +0100
> > +++ linux/drivers/input/mouse/psmouse-base.c 2004-01-10 16:16:06.000000000 +0100
> > @@ -31,7 +31,7 @@
> > MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
> >
> > static char *psmouse_proto;
> > -static unsigned int psmouse_max_proto = -1U;
> > +static unsigned int psmouse_max_proto = PSMOUSE_IMEX;
> > module_param(psmouse_proto, charp, 0);
> > MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
> >
> > @@ -678,6 +678,8 @@
> > psmouse_max_proto = PSMOUSE_IMPS;
> > else if (!strcmp(psmouse_proto, "exps"))
> > psmouse_max_proto = PSMOUSE_IMEX;
> > + else if (!strcmp(psmouse_proto, "synaptics"))
> > + psmouse_max_proto = PSMOUSE_SYNAPTICS;
> > else
> > printk(KERN_ERR "psmouse: unknown protocol type '%s'\n", psmouse_proto);
> > }
> >
> > --
> > When do you have a heart between your knees?
> > [Johanka's followup: and *two* hearts?]
>

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

2004-01-10 19:57:23

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 08:51:24PM +0100, Pavel Machek wrote:
> Hi!
>
> > Why would you document something that is deprecated? It was removed so the
> > new users would not start using it instead of psmouse.proto. psmouse.noext
> > should be gone soon.
>
> My understanding is that Documentation/kernel-parameters.txt should
> document all available parameters...

Well, I wouldn't mind documenting psmouse.noext, with a comment that it
shouldn't be used because it'll be removed in near future.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-10 19:56:15

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 08:44:20PM +0100, Pavel Machek wrote:

> I'm setting it to PSMOUSE_IMEX, that's just below PSMOUSE_SYNAPTICS:
>
> #define PSMOUSE_PS2 1
> #define PSMOUSE_PS2PP 2
> #define PSMOUSE_PS2TPP 3
> #define PSMOUSE_GENPS 4
> #define PSMOUSE_IMPS 5
> #define PSMOUSE_IMEX 6
> #define PSMOUSE_SYNAPTICS 7
>
> That should turn off just synaptics, no?

No. The numbers are arbitrary.

> Okay, so how to do this properly? Synaptics driver with "mouse
> emulation" is not usable (tap-to-click is critical), and I want to be
> able to boot 2.4...

Well, if you need to boot both 2.6 and 2.4 _and_ need to use gpm and X
in parallel _and_ need tap-to-click in both gpm and X, then you have to
use the kernel command line parameter and put your synaptics into legacy
mode.

Or, the very nice thing to do would be to port the XFree86 driver to
GPM, so that GPM can understand the event protocol as well.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-10 20:17:17

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 09:10:58PM +0100, Pavel Machek wrote:

> Hi!
>
> > > > Why would you document something that is deprecated? It was removed so the
> > > > new users would not start using it instead of psmouse.proto. psmouse.noext
> > > > should be gone soon.
> > >
> > > My understanding is that Documentation/kernel-parameters.txt should
> > > document all available parameters...
> >
> > Well, I wouldn't mind documenting psmouse.noext, with a comment that it
> > shouldn't be used because it'll be removed in near future.
>
> AFAICS, it is still psmouse*_*noext in mainline kernel, so this should
> be correct...
>
> Pavel

No problem with this patch, though it'd be better if you could provide
it against the -mm kernel for Andrew.

> --- clean/Documentation/kernel-parameters.txt 2004-01-09 20:24:12.000000000 +0100
> +++ linux/Documentation/kernel-parameters.txt 2004-01-10 21:08:32.000000000 +0100
> @@ -795,6 +799,9 @@
> before loading.
> See Documentation/ramdisk.txt.
>
> + psmouse_noext= [HW,MOUSE,deprecated] Equivalent to psmouse_proto=bare,
> + will be removed in near future.
> +
> psmouse_proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
> probe for (bare|imps|exps).
>
>
>
> --
> When do you have a heart between your knees?
> [Johanka's followup: and *two* hearts?]

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-10 20:09:42

by Pavel Machek

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Hi!

> > > Why would you document something that is deprecated? It was removed so the
> > > new users would not start using it instead of psmouse.proto. psmouse.noext
> > > should be gone soon.
> >
> > My understanding is that Documentation/kernel-parameters.txt should
> > document all available parameters...
>
> Well, I wouldn't mind documenting psmouse.noext, with a comment that it
> shouldn't be used because it'll be removed in near future.

AFAICS, it is still psmouse*_*noext in mainline kernel, so this should
be correct...

Pavel

--- clean/Documentation/kernel-parameters.txt 2004-01-09 20:24:12.000000000 +0100
+++ linux/Documentation/kernel-parameters.txt 2004-01-10 21:08:32.000000000 +0100
@@ -795,6 +799,9 @@
before loading.
See Documentation/ramdisk.txt.

+ psmouse_noext= [HW,MOUSE,deprecated] Equivalent to psmouse_proto=bare,
+ will be removed in near future.
+
psmouse_proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
probe for (bare|imps|exps).



--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

2004-01-10 20:18:32

by Sean Neakums

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Vojtech Pavlik <[email protected]> writes:

> Well, if you need to boot both 2.6 and 2.4 _and_ need to use gpm and X
> in parallel _and_ need tap-to-click in both gpm and X, then you have to
> use the kernel command line parameter and put your synaptics into legacy
> mode.

Using psmouse_proto=imps? Or something else?

Will this also result in the passthough port not being enabled?
(I'd like to disable it.)

2004-01-10 20:23:55

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 08:18:22PM +0000, Sean Neakums wrote:

> > Well, if you need to boot both 2.6 and 2.4 _and_ need to use gpm and X
> > in parallel _and_ need tap-to-click in both gpm and X, then you have to
> > use the kernel command line parameter and put your synaptics into legacy
> > mode.
>
> Using psmouse_proto=imps? Or something else?

Yes, that one.

> Will this also result in the passthough port not being enabled?
> (I'd like to disable it.)

It depends on the touchpad firmware. Most leave it enabled.
In this mode we don't have any control over the passthrough port.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-10 20:30:12

by Peter Osterlund

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

"Marcel J.E. Mol" <[email protected]> writes:

> On Sat, Jan 10, 2004 at 02:28:49PM -0500, Dmitry Torokhov wrote:
> > On Saturday 10 January 2004 12:59 pm, Pavel Machek wrote:
> > > ..aka "make synaptics touchpad usable in 2.6.1" -- synaptics support
> > > is not really suitable to be enabled by default. You can not click by
> > > tapping the touchpad (well, unless you have very new X with right
> > > configuration, but than you can't go back to 2.4),
> >
> > It is my understanding that by setting "Protocol" to "auto-dev" and
> > "Device" to "/dev/psaux" you can freely switch between 2.4 and 2.5.
>
> I work with this setting for a couple of weeks now switching between 2.4
> and 2.6. The touchpad works quite well in X. (Dell inspiron 8000).
> I only notice I have to tap harder to get a click.

You can adjust the sensitivity by changing the FingerLow and
FingerHigh XFree86 driver parameters. They control how much finger
pressure is needed before it counts as a touch. (There are two
parameters to get a hysteresis effect.)

--
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340

2004-01-10 20:49:32

by Sean Neakums

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Vojtech Pavlik <[email protected]> writes:

> On Sat, Jan 10, 2004 at 08:18:22PM +0000, Sean Neakums wrote:
>
>> > Well, if you need to boot both 2.6 and 2.4 _and_ need to use gpm and X
>> > in parallel _and_ need tap-to-click in both gpm and X, then you have to
>> > use the kernel command line parameter and put your synaptics into legacy
>> > mode.
>>
>> Using psmouse_proto=imps? Or something else?
>
> Yes, that one.

I tried 2.6.1 with that option set as above, and also with it set to
base. In both cases I don't seem to get tap-to-click. In
2.6.1-rc1-mm1 with psmouse_noext=1, I get tap-to-click.

>> Will this also result in the passthough port not being enabled?
>> (I'd like to disable it.)
>
> It depends on the touchpad firmware. Most leave it enabled.
> In this mode we don't have any control over the passthrough port.

I notice that the passthrough appears as an extra device (mouse1 on my
system). Is there a way to disable devices from userspace? I did
find the place in the synaptics driver that looks like it is where the
passthrough port is registered, so I guess I could take that out as a
last resort. But it's a pain having to remember to patch my kernel
every time I upgrade.

2004-01-10 21:33:41

by Peter Osterlund

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Sean Neakums <[email protected]> writes:

> Vojtech Pavlik <[email protected]> writes:
>
> > On Sat, Jan 10, 2004 at 08:18:22PM +0000, Sean Neakums wrote:
> >
> >> Will this also result in the passthough port not being enabled?
> >> (I'd like to disable it.)
> >
> > It depends on the touchpad firmware. Most leave it enabled.
> > In this mode we don't have any control over the passthrough port.
>
> I notice that the passthrough appears as an extra device (mouse1 on my
> system). Is there a way to disable devices from userspace?

You can write a program that grabs the event device for exclusive
access and then just ignores all events, like this:

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>

/* From linux/include/linux/input.h */
struct input_event {
struct timeval time;
unsigned short type;
unsigned short code;
unsigned int value;
};

#define EVDEV "/dev/input/event0"

#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */

int main(int argc, char* argv[])
{
const char* devName = EVDEV;
int fd;
int ret;

if (argc > 1)
devName = argv[1];

fd = open(devName, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "Can't open file %s, errno:%d (%s)\n",
devName, errno, strerror(errno));
exit(1);
}

ret = ioctl(fd, EVIOCGRAB, 1);
if (ret < 0) {
printf("Can't grab event device, errno:%d (%s)\n",
errno, strerror(errno));
exit(1);
}

for (;;) {
struct input_event ev;
read(fd, &ev, sizeof(ev));
}

close(fd);
return 0;
}

--
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340

2004-01-10 21:47:38

by Sean Neakums

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

Peter Osterlund <[email protected]> writes:

> Sean Neakums <[email protected]> writes:
>
>> Vojtech Pavlik <[email protected]> writes:
>>
>> > On Sat, Jan 10, 2004 at 08:18:22PM +0000, Sean Neakums wrote:
>> >
>> >> Will this also result in the passthough port not being enabled?
>> >> (I'd like to disable it.)
>> >
>> > It depends on the touchpad firmware. Most leave it enabled.
>> > In this mode we don't have any control over the passthrough port.
>>
>> I notice that the passthrough appears as an extra device (mouse1 on my
>> system). Is there a way to disable devices from userspace?
>
> You can write a program that grabs the event device for exclusive
> access and then just ignores all events, like this:

That works great. Thank you!

2004-01-10 23:42:55

by Dax Kelson

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, 2004-01-10 at 12:55, Vojtech Pavlik wrote:
> Or, the very nice thing to do would be to port the XFree86 driver to
> GPM, so that GPM can understand the event protocol as well.

Already done...

# rpm -q gpm
gpm-1.20.1-dt8

# ps -e o pid,user,cmd | grep gpm
2068 root gpm -m /dev/input/event0 -t evdev -o type=synaptics -M -m /dev/input/mice -t imps2

I believe the issue is that /dev/input/event0 can't be opened by
multiple things (gpm and X) in 2.4 as can be done in 2.6.

Dax Kelson
Guru Labs

2004-01-10 23:53:04

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Saturday 10 January 2004 03:15 pm, Vojtech Pavlik wrote:
> On Sat, Jan 10, 2004 at 09:10:58PM +0100, Pavel Machek wrote:
> > Hi!
> >
> > > > > Why would you document something that is deprecated? It was
> > > > > removed so the new users would not start using it instead of
> > > > > psmouse.proto. psmouse.noext should be gone soon.
> > > >
> > > > My understanding is that Documentation/kernel-parameters.txt
> > > > should document all available parameters...
> > >
> > > Well, I wouldn't mind documenting psmouse.noext, with a comment
> > > that it shouldn't be used because it'll be removed in near future.
> >
> > AFAICS, it is still psmouse*_*noext in mainline kernel, so this
> > should be correct...
> >
> > Pavel
>
> No problem with this patch, though it'd be better if you could provide
> it against the -mm kernel for Andrew.
>

In Andrew's tree noext option is already gone.

Dmitry

2004-01-11 08:13:37

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 06:52:56PM -0500, Dmitry Torokhov wrote:
> On Saturday 10 January 2004 03:15 pm, Vojtech Pavlik wrote:
> > On Sat, Jan 10, 2004 at 09:10:58PM +0100, Pavel Machek wrote:
> > > Hi!
> > >
> > > > > > Why would you document something that is deprecated? It was
> > > > > > removed so the new users would not start using it instead of
> > > > > > psmouse.proto. psmouse.noext should be gone soon.
> > > > >
> > > > > My understanding is that Documentation/kernel-parameters.txt
> > > > > should document all available parameters...
> > > >
> > > > Well, I wouldn't mind documenting psmouse.noext, with a comment
> > > > that it shouldn't be used because it'll be removed in near future.
> > >
> > > AFAICS, it is still psmouse*_*noext in mainline kernel, so this
> > > should be correct...
> > >
> > > Pavel
> >
> > No problem with this patch, though it'd be better if you could provide
> > it against the -mm kernel for Andrew.
> >
>
> In Andrew's tree noext option is already gone.

That makes the patch rather trivial then, doesn't it? ;)

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-01-11 08:13:14

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Do not use synaptics extensions by default

On Sat, Jan 10, 2004 at 04:42:48PM -0700, Dax Kelson wrote:

> On Sat, 2004-01-10 at 12:55, Vojtech Pavlik wrote:
> > Or, the very nice thing to do would be to port the XFree86 driver to
> > GPM, so that GPM can understand the event protocol as well.
>
> Already done...

Cool! I forgot. I thought only the regular mouse event protocol was
added.

> # rpm -q gpm
> gpm-1.20.1-dt8
>
> # ps -e o pid,user,cmd | grep gpm
> 2068 root gpm -m /dev/input/event0 -t evdev -o type=synaptics -M -m /dev/input/mice -t imps2
>
> I believe the issue is that /dev/input/event0 can't be opened by
> multiple things (gpm and X) in 2.4 as can be done in 2.6.

It can be opened by any number of programs on both 2.4 and 2.6. 2.4
doesn't have the synaptics (or any other ps/2) mouse driver and thus
it's only used for USB mice.

--
Vojtech Pavlik
SuSE Labs, SuSE CR