Bug 81781 - Drop events when device is disabled
Summary: Drop events when device is disabled
Status: RESOLVED NOTOURBUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-26 13:48 UTC by Bastien Nocera
Modified: 2014-10-29 13:17 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-Make-the-slot-state-per-slot.patch (5.72 KB, patch)
2014-08-05 06:14 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Bastien Nocera 2014-07-26 13:48:26 UTC
As seen in https://bugzilla.gnome.org/show_bug.cgi?id=720295

I can reproduce the problem by doing:
xinput disable 9 ; sleep 5 ; xinput enable 9

With 9 being the device ID for the touchscreen.

During the "sleep", touch your touchscreen in such a way that you can do a selection. The whole of the events will be replayed when re-enabling the device, instead of dropping all the events whilst disabled.
Comment 1 Peter Hutterer 2014-08-04 06:06:17 UTC
do me a favour and monitor the journal when you do that. on my t440 I can reproduce but I actually get a usb disconnect for the touchscreen. Only if the xorg device is disabled though and the touchscreen is used while disabled. Kernel power saving getting too excited maybe?
Comment 2 Bastien Nocera 2014-08-04 10:56:37 UTC
(In reply to comment #1)
> do me a favour and monitor the journal when you do that. on my t440 I can
> reproduce but I actually get a usb disconnect for the touchscreen. Only if
> the xorg device is disabled though and the touchscreen is used while
> disabled. Kernel power saving getting too excited maybe?

It doesn't get disconnected at all. The only warning I got was:
Aug 04 12:53:54 nuvo gdm-Xorg-:0[782]: (EE) [dix] eGalax Inc. eGalaxTouch EXC7903-66v03_T1: unable to find touch point 0

But using the touchscreen a little and running the test afterwards, I could reproduce the problem without errors.
Comment 3 Peter Hutterer 2014-08-05 06:14:29 UTC
Created attachment 104052 [details] [review]
0001-Make-the-slot-state-per-slot.patch

Give this one a try please. Don't know where the events would be coming from since we close the fds and everything, but this one quashes the warning you've been seeing and may fix the other issue too.
Comment 4 Bastien Nocera 2014-08-05 11:41:20 UTC
(In reply to comment #3)
> Created attachment 104052 [details] [review] [review]
> 0001-Make-the-slot-state-per-slot.patch
> 
> Give this one a try please. Don't know where the events would be coming from
> since we close the fds and everything, but this one quashes the warning
> you've been seeing and may fix the other issue too.

This doesn't solve the warning, or the events replay. I applied the patch on top of the xorg-x11-drv-evdev-2.9.0-2.fc22.x86_64 package.
Comment 5 Peter Hutterer 2014-08-05 22:16:44 UTC
punting to benjamin for now, he can reproduce it
Comment 6 Peter Hutterer 2014-08-08 00:47:03 UTC
Update: this looks like a bug in the kernel USB stack
Comment 7 Benjamin Tissoires 2014-10-29 13:02:52 UTC
The kernel patch has been accepted and is scheduled for v3.19:

https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-3.19/upstream&id=b905811a49bcd6e6726ce5bbb591f57aaddfd3be
Comment 8 Bastien Nocera 2014-10-29 13:17:03 UTC
(In reply to Benjamin Tissoires from comment #7)
> The kernel patch has been accepted and is scheduled for v3.19:
> 
> https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-3.
> 19/upstream&id=b905811a49bcd6e6726ce5bbb591f57aaddfd3be

Closing as NOTOURBUG, as it's not an Xorg bug. Thanks Benjamin!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.