* Multiple clients reading from /dev/input/eventX
@ 2012-10-19 15:49 simon
2012-10-19 22:32 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: simon @ 2012-10-19 15:49 UTC (permalink / raw)
To: linux-input
Hi all,
I'm trying to track down a problem with SDL missing events from a gaming
wheel. It looks like it's not seeing a 'section' of events and this
results in an axis from the wheel/joystick being stuck on.
If I simultaneously use evtest to monitor the same /dev/input/eventX I see
all the events in evtest, but not in SDL.
I suspect that some scheduling (or other business) is causing SDL not to
check the file handle, and as a result the input system is
dropping/resyncing the interface.
Can anyone here confirm the behaviour under the situation that one client
is busy? What is the maximum time it can be 'away' or what is the size of
the inline buffer?
Many thanks,
Simon.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple clients reading from /dev/input/eventX
2012-10-19 15:49 Multiple clients reading from /dev/input/eventX simon
@ 2012-10-19 22:32 ` Dmitry Torokhov
2012-10-24 4:26 ` simon
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2012-10-19 22:32 UTC (permalink / raw)
To: simon; +Cc: linux-input
Hi SImon,
On Fri, Oct 19, 2012 at 11:49:29AM -0400, simon@mungewell.org wrote:
> Hi all,
> I'm trying to track down a problem with SDL missing events from a gaming
> wheel. It looks like it's not seeing a 'section' of events and this
> results in an axis from the wheel/joystick being stuck on.
>
> If I simultaneously use evtest to monitor the same /dev/input/eventX I see
> all the events in evtest, but not in SDL.
>
> I suspect that some scheduling (or other business) is causing SDL not to
> check the file handle, and as a result the input system is
> dropping/resyncing the interface.
>
> Can anyone here confirm the behaviour under the situation that one client
> is busy? What is the maximum time it can be 'away' or what is the size of
> the inline buffer?
Every user of event device has a buffer that can hold up at least 64
input events and is completely independent from other users. Newer
kernels generate EV_SYN/SYN_DROPPED event to indicate that user was too
slow reading data and there was buffer overrun.
Hope this helps.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple clients reading from /dev/input/eventX
2012-10-19 22:32 ` Dmitry Torokhov
@ 2012-10-24 4:26 ` simon
2012-10-24 5:07 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: simon @ 2012-10-24 4:26 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: simon, linux-input
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
>> Can anyone here confirm the behaviour under the situation that one
>> client
>> is busy? What is the maximum time it can be 'away' or what is the size
>> of
>> the inline buffer?
>
> Every user of event device has a buffer that can hold up at least 64
> input events and is completely independent from other users. Newer
> kernels generate EV_SYN/SYN_DROPPED event to indicate that user was too
> slow reading data and there was buffer overrun.
>
> Hope this helps.
Yes, very helpful.... I am seeing 'SYN_DROPPED' on my system, so the next
question is how to work around this?
In the event of an overflow is there any method of reading/polling the
last (correct) event value for each of the axis?
In my case on the G27 wheel when your foot transitions from the brake to
accelerator, you get no more 'brake events' to 'refresh' the value.
I see that I could use QUIRK to enlarge the buffer for this device, would
that be an acceptable workaround?
http://www.spinics.net/lists/linux-input/msg15497.html
Attached is a little log showing SDL 'missing' 68 events, which are
correctly reported by 'evtest'. The time stamps in log will give you an
idea about how quickly the events are coming in from this wheel.
Thanks,
Simon.
[-- Attachment #2: SDL_missing_events2.txt.gz --]
[-- Type: application/x-gzip, Size: 1379 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Multiple clients reading from /dev/input/eventX
2012-10-24 4:26 ` simon
@ 2012-10-24 5:07 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2012-10-24 5:07 UTC (permalink / raw)
To: simon; +Cc: linux-input
On Wed, Oct 24, 2012 at 12:26:17AM -0400, simon@mungewell.org wrote:
> >> Can anyone here confirm the behaviour under the situation that one
> >> client
> >> is busy? What is the maximum time it can be 'away' or what is the size
> >> of
> >> the inline buffer?
> >
> > Every user of event device has a buffer that can hold up at least 64
> > input events and is completely independent from other users. Newer
> > kernels generate EV_SYN/SYN_DROPPED event to indicate that user was too
> > slow reading data and there was buffer overrun.
> >
> > Hope this helps.
>
> Yes, very helpful.... I am seeing 'SYN_DROPPED' on my system, so the next
> question is how to work around this?
>
> In the event of an overflow is there any method of reading/polling the
> last (correct) event value for each of the axis?
EVIOCGABS() and other ioctls allow to query state of the device.
>
> In my case on the G27 wheel when your foot transitions from the brake to
> accelerator, you get no more 'brake events' to 'refresh' the value.
>
> I see that I could use QUIRK to enlarge the buffer for this device, would
> that be an acceptable workaround?
> http://www.spinics.net/lists/linux-input/msg15497.html
With 3.7 Henrik just put in code that would better estimate number of
events in devices event packet, so hopefully quirk is not needed.
>
> Attached is a little log showing SDL 'missing' 68 events, which are
> correctly reported by 'evtest'. The time stamps in log will give you an
> idea about how quickly the events are coming in from this wheel.
You need to figure out why SDL takes such a long time to get around
reading device data
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-24 5:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 15:49 Multiple clients reading from /dev/input/eventX simon
2012-10-19 22:32 ` Dmitry Torokhov
2012-10-24 4:26 ` simon
2012-10-24 5:07 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).