Skip to content
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

Rumble never stops #3366

Open
i-am-linja opened this issue Dec 7, 2024 · 18 comments
Open

Rumble never stops #3366

i-am-linja opened this issue Dec 7, 2024 · 18 comments
Labels
pending This issue needs more investigation by a maintainer to triage appropriately
Milestone

Comments

@i-am-linja
Copy link

With mGBA 0.10.3
at 1c61b54
in macOS 15.1.1
on Apple M3
using GameSir T4 Kaleid
to play Mario & Luigi: Superstar Saga
or Super Mario Advance 4: Super Mario Bros. 3,

any instance of rumble causes it to start rumbling, and never stop. It's not until I close the game that it finally stops. I have reproduced this at multiple points in both games, and with multiple controller input modes on the hardware side.

@endrift endrift changed the title The Eternal Shake Rumble never stops Dec 7, 2024
@endrift
Copy link
Member

endrift commented Dec 7, 2024

Please test with latest development builds. Things have changed a lot since 0.10.3 (and I'm planning to release 0.10.4 very soon).

@endrift endrift added the blocked:needs retest Needs a retest to confirm if it's fixed label Dec 7, 2024
@i-am-linja
Copy link
Author

@endrift Done. Issue persists, and I notice something weird: once rumble starts, it persists even once I stop emulation and even after I quit mGBA entirely. It stops immediately once I restart mGBA, before loading any ROMs. This smells of byzantine emergent behaviour with no single root cause.

@endrift
Copy link
Member

endrift commented Dec 7, 2024

It smells of SDL bug. I assume you're using the "modern macOS" build? The one that's actually signed.

@endrift endrift removed the blocked:needs retest Needs a retest to confirm if it's fixed label Dec 7, 2024
@i-am-linja
Copy link
Author

Yes, I am.

@endrift endrift added the pending This issue needs more investigation by a maintainer to triage appropriately label Dec 7, 2024
@endrift endrift added this to the mGBA 0.11.0 milestone Dec 7, 2024
@endrift
Copy link
Member

endrift commented Dec 7, 2024

I'll try to take a look at it soon.

@Squall-Leonhart
Copy link

Assuming a usb connection, (and Steam is currently running on the affected machine) this may be due to Steam's Desktop configuration fighting over the controller if that is running at the same time as mgba (per reports on steam/reddit)

as per libsdl-org/SDL#3450, if another sdl application hijacks the controller right after mgba has triggered switch haptics vibration it may continue into perpetuity, despite the buttons still working. (device handle lost, i believe)

This might require SDLv3 to resolve.

@i-am-linja
Copy link
Author

@Squall-Leonhart Steam is not even installed on the affected machine. I can't think of another application that may be attempting to capture input, and even if there were, the described mechanism would not happen consistently.

@Squall-Leonhart
Copy link

Hrm, i remember this one having issues on switch emulators too, looking now theres no Mac controller setting profile.

Is it showing as an Xbox device or a Switch pro device on GameController Tester

@i-am-linja
Copy link
Author

@Squall-Leonhart It has two modes which work with my machine: one shows as a Switch Pro controller, the other as a DualShock 4.

@Squall-Leonhart
Copy link

Squall-Leonhart commented Dec 11, 2024

This looks to be a platform issue,

  1. OSX broke switch pro Various controls over USB in GCController back in Monterrey
  2. The M3 comes with a Bluetooth 5 radio, which has notable compatibility issues with both official and and oem Switch controllers.

@i-am-linja
Copy link
Author

@Squall-Leonhart Again, this is a GameSir T4 Kaleid. It's a wired controller, with four input modes, only one of which is the Switch protocol. This rumble issue happens with all four.

@endrift
Copy link
Member

endrift commented Dec 11, 2024

I talked to @slouken about this a few days ago because it sounded like an SDL bug and he confirmed to me that recent changes to GCController did break rumble support. However, he said that rumble never started for him, so I'm not really sure what's going on there.

@i-am-linja
Copy link
Author

@endrift Interesting. Does SDL 3.0 indeed fix this? Is it stable enough to switch to, for the dev channel?

@endrift
Copy link
Member

endrift commented Dec 11, 2024

I have no idea, but I don't intend to switch to SDL3 until a stable version is released.

@slouken
Copy link

slouken commented Dec 11, 2024

macOS recently added support for Xbox controllers to GCController. Wired Xbox controllers currently do not rumble using this support as far as I can tell.

If rumble never stops using any controller mode, this sounds like a bug in SDL. The SDL controller support is largely the same between SDL2 and SDL3, so I wouldn't expect an upgrade to fix anything, even though the SDL3 API is stable at this point. That said, I haven't seen this issue on any platform. I just got a GameSir Kaleid (not T4, I couldn't find that one), and can run tests using testcontroller from the SDL repo, but since it's a licensed Xbox controller I don't expect it to behave differently from a Microsoft controller.

@i-am-linja, the most helpful thing to do would be to download the SDL preview release and build that, and see if you get the same behavior with testcontroller:

wget https://github.com/libsdl-org/SDL/releases/download/preview-3.1.6/SDL3-3.1.6.tar.gz
tar xvf SDL3-3.1.6.tar.gz
cd SDL3-3.1.6
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DSDL_TESTS=ON ..
make -j10
./test/testcontroller

Then pull the trigger to generate rumble

@i-am-linja
Copy link
Author

@slouken Now this is interesting. In DualShock 4 mode, rumble ramps up smoothly and stops immediately on release; in Switch Pro mode, it starts when I hit the right trigger, then stops when I hit the left trigger. This is utterly bizarre.

@endrift
Copy link
Member

endrift commented Dec 12, 2024

Do you have any separate controllers you can test this with? Or only the one with multiple modes?

@i-am-linja
Copy link
Author

@endrift Only the one, I'm afraid. I bought this one specifically so I'd only need one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This issue needs more investigation by a maintainer to triage appropriately
Projects
None yet
Development

No branches or pull requests

4 participants