Very strange problem with input events

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 14 02:19:22 PDT 2012


On 14/06/12 17:35 , Cedric Sodhi wrote:
> On Thu, Jun 14, 2012 at 01:52:28PM +1000, Peter Hutterer wrote:
>> On Wed, Jun 13, 2012 at 09:02:52PM +0200, Cedric Sodhi wrote:
>>> Unfortunally, I lack a better or just more precise description of my
>>> problem. I get strange behaviour all throughout X, everywhere clicks are
>>> involved.
>>>
>>> One thing I think I had already mentioned is that my touchscreen, which
>>> runs evdev does work properly everywhere, but there are no regular
>>> events generated - only XI events.
>>
>> this can only be a client issue. I can't tell you which client from here
>> though. The drivers and the server don't deal with core vs XI events until
>> very late. There' internal events and then based on the client selection
>> that internal event structure is converted to the wire event and sent.
>>
>> So if you don't see core events, the clients haven't registered for it, or
>> clients have otherwise registered for XI events and take precedence over
>> core..
>>
>>> Also, many applications strangely misbehave in a way that other people
>>> cannot possibly reproduce. Unrelated to the touchscreen, that is. Using
>>> an ordinary mouse with evdev.
>>>
>>> Two examples:
>>>
>>> Tint2 (the panel) had me "drag" window-icons ("tasks") on the taskbar,
>>> when I clicked them, as if I had held the mouse button down. I was able
>>> to "fix" that by a minor change in the code of tint2, but as no one else
>>> is getting any such behaviour I assume I did not really fix the bug but
>>> only found some solution to somewhich, which fails elsewhere. I was not
>>> able to track the logic which is supposed to run, though.
>>>
>>> Second example, Midori (the browser). When I right click a hyperlink and
>>> subsequently left click an entry in the context menu, the context menu
>>> disappears (as it should) and I'm suddenly "dragging" the link upon
>>> which I clicked.
>>>
>>> Similar things happen everywhere else, too.
>>>
>>> I'm not even sure where to start looking. I wish I could get a
>>> suggestion from you, what to do.
>>
>> options are trying an older X servers and bisecting from a good one if you
>> can find one.
>>
>> or look at the protocol with xscope to see the actual events sent on the
>> wire (you can also use systemtap/dtrace for that but it's less pretty).
>>
>> For the link issue, I'd check the evtest output of the touchscreen to see if
>> the actual device data makes sense.
>
> I take back what I said previously, that it was unrelated to the
> touchscreen. In fact, I narrowed down the source of the problem exactly
> to the touchscreen. It appears that if I do not touch the touchscreen at
> all, after the server has started, everything works.
>
> But as soon as I touched it at least once - thought there appears to be
> no sign of problems at first - these strange things (see the two
> examples above - I've got more examples, if you like) start happening,
> even if I just use the normal mouse. I had attached an evtest log of the
> device, do you see any indication of problems in that?

disable the device in X with xinput and run mtview against it, that 
should tell you if the device misbehaves. the log looks ok on a glance.

https://github.com/whot/mtview/

Cheers,
   Peter


More information about the xorg-devel mailing list