-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controller is not recognized as a haptic device with hotplugging #387
Comments
This should not be a driver bug because the driver initializes with force feedback support enabled, the device should only become available after the rumble notification, and then the feedback driver will already be there. Could you try with module parameter |
I unloaded Then I repeated both scenarios.
This now matches the behavior with the sony dualshock3 controller where the error message is the same and the second scenario works correctly. Potentially there are two different bugs in both xpadneo and SDL2? Or perhaps the test program is doing something wrong? I will make an SDL2 issue soon. |
I made a SDL2 issue here. libsdl-org/SDL#6250 |
Well, just because without the rumble notification the force feedback device becomes available sooner, doesn't mean there isn't a race condition in SDL: It should wait until the driver initialization settled. So, yes, xpadneo should probably not delay the initialization as long but SDL should be unaffected by whether it takes 9ms, 90ms, or 900ms: The appearance of such additional features is not atomic in Linux. Without that rumble notification delay, we are actually doing it exactly the same way as hid-microsoft. But this delay is a longstanding issue I'd like to avoid anyways. There's a plan on my agenda to fix it when introducing haptic feedback for mouse mode (and normal gamepad usage if someone wants to enable that instead of rumble). That said, I think it's a racing bug in SDL although xpadneo could and should act faster here. OTOH, the test program may need to consider looking for the haptic property again later - and thus SDL behavior may be totally valid. What happens if you delay checking |
Yes, with this diff for the behavior for the test program now matches the sony dualshock3 controller.
So as you said xpadneo could improve this delay and SDL could fix this race condition. I will make a second related SDL issue soon. |
I made a second SDL issue. libsdl-org/SDL#6253 |
Version of xpadneo
48f4b11
Controller Model
Connection mode
Installed Software
N/A
Protocol Information
evtest
is showing issues (describe the issues below)BTN_NORTH
andBTN_WEST
are intentionally swappedjstest
is showing issues (describe the issues below)gamepad-tool
is showing issues (post console output below)Please describe how it is failing below in the next sections.
Severity / Impact
Describe the Bug
With SDL2 programs and maybe other programs the rumble does not work with some hotplugging under certain circumstances.
For example with the following test program created by the jgrf developer.
sdl2hp.c.txt
Build it:
./sd2hp
And the second scenario.
./sd2hp
I have an official sony dualshock3 controller which fails in a with an different error message in the first scenario and works in the second scenario so I think this is potentially a driver bug rather than SDL2. Although possibly the test program and/or SDL is doing something wrong?
Expected Behavior
The rumble should work with the hotplugging.
Screenshots / GIFs / Videos
N/A
System Information
Controller and Bluetooth Information
xpadneo-btmon.txt
xpadneo-dmesg.txt
xpadneo-lsusb.txt
Additional Context
There is a SDL2 hotplugging example repo here.
https://github.com/carmiker/sdl2-hotplug-example
The text was updated successfully, but these errors were encountered: