Request to remove tslib-input_raw-grab_events.patch

Neil Brown neilb at
Fri Aug 22 09:13:32 CEST 2008

 I'd like to suggest that the above mentioned patch
 be removed from the tslib package.
 Alternately, /etc/tslib.conf could be changed to remove
 from the
     module_raw input grab_events=1
 line (though it would be best to do both).

My reasons are that the patch is non-standard, no necessary, and

Hopefully the "non-standard" doesn't need further explanation, though
by itself it isn't a very strong reason.

It is unnecessary because what it tries to achieve has been achieved a
different way in the kernel.  The stated purpose of the patch is:

    This patch adds support for "EVIOCGRAB" on the input device, which
    tells the kernel _not_ to deliver events of the touchscreen to

    This is probably what most people want, since unprocessed raw touchscreen
    events should not be converted to emulated PS/2 mouse movements.

Not having touchscreen events go to /dev/input/mice is certainly a good
idea.  Doing it with EVIOCGRAB is too heavy handed as we will get to
It is (in my opinion) best to do this in the kernel by making the touch
screen not look like a mouse (and in reality, you would never want it
to look like a mouse).
There is a patch in the openmoko kernel:

commit 5c2f325aefe9280ae6f1220200bf40281d218fda
Author: mokopatches <mokopatches at>
Date:   Sun Apr 13 07:23:48 2008 +0100

    This patch disables the reporting of touchscreen-like devices via
    /dev/input/mice.  In the Neo1973 (much like other handheld devices),
    we need this to distinguish between the touchscreen (which uses tslib)
    and optional additional usb/bluetooth mice that might be attached.
    Signed-off-by: Harald Welte <laforge at>

which stops touch-screen like devices from being connected to
/dev/input/mice.  This makes the tslib patch pointless.
I believe this kernel patch is not the best way to do it and I have
suggested an alternative on the kernel list which has received a
positive reaction.  One obvious reason for not liking this patch is
that it would never be accepted upstream, and carrying upstream
patches that will never go upstream is not fun.

The reason the tslib patch is harmful is that it requires another
kernel patch which will never go upstream.  EVIOCGRAB does stop events
from going to /dev/input/mice, but also stops them going to any other
program.  odeviced in FSO and neod also want to see touchscreen
events.  Normally EVIOCGRAB would prevent them from seeing the events.

So there is a patch in the kernel:
commit a6b37451a52ae7d30c2493b9cc14b8604e81587d
Author: mokopatches <mokopatches at>
Date:   Sun Apr 13 07:23:53 2008 +0100


which changes the semantics of EVIOCGRAB so that FSO and neod can
still see the events.
This is another patch which will never go upstream, so carrying it is
bad.  Further, it means EVIOCGRAB doesn't do what it is supposed to
do which break compatibility with other Linux installations.

In summary, this patch is of no value (any longer) and would best be
If this can be done I would really appreciate it.
If further information is needed, please ask.

If anyone want to check that every thing still works without this
patch (I have tested a few things myself), you can simply remove 
grab_events=1 from /etc/ts.conf and reboot.


More information about the devel mailing list