Ryujinx
Ryujinx copied to clipboard
Xbox Wireless Controller Randomly Stops Receiving Input
Bug Report
What's the issue you encountered?
I've been playing Kirby and the Forgotten Land in Ryujinx with my Xbox Series S Wireless Controller. I started encountering an issue yesterday where about every 5 minutes or so (sometimes in an even shorter interval), Ryujinx stops receiving input from the controller. This is immediately noticeable when my character starts moving/keeps moving in the same direction despite pressing buttons or changing direction on the joystick. It takes about 5 seconds or so for the Xbox controller to start blinking at this point, and after that, takes an additional 10-20 seconds to reconnect to Ryujinx, at which point I have control over the game again. This has basically made playing through the game almost unplayable due to disconnects in the middle of the action constantly.
This is similar to what is reported here (https://github.com/Ryujinx/Ryujinx/issues/3235) although I am using an Xbox Series S Wireless Controller instead of Dual Joycons. I chose to write up an issue report since the proposed solution to that problem appears to pertain only to Dual Joycons.
How can the issue be reproduced?
Connect an Xbox Series S Wireless Controller and connect it to a Windows 10 PC via Bluetooth pairing. Map the controls in Ryujinx as a Pro Controller. Then, play any game (I played Kirby & The Forgotten Land) and see if at any time, the game stops receiving input due to the controller disconnecting for a few seconds. The Xbox controller should start blinking after a few seconds and take some time to reconnect (usually around 10-20 seconds), and when it stops blinking, you regain control of the game.
Log file
See below comments.
Environment?
- Ryujinx version: 1.1.106
- Game version: 1.0
- System Specs:
- OS: Windows 10 Home, OS Build 19044.1645
- CPU: AMD Ryzen 7 3700X 8-Core Processor 3.59 GHz
- GPU: NVIDIA RTX 3070
- RAM: 16GB
- Applied Mods : Kirby & The Forgotten Land 60 FPS Mod, No Depth of Field Blur
Additional context?
I tested New Pokemon Snap after this, and did not experience any controller disconnects whatsoever.
Change the batteries, your controller is low on battery. If that doesn't work, have you tried, unpairing and repairing the controller in the Bluetooth section?
Change the batteries, your controller is low on battery.
I changed my batteries prior to this occurring so I do not think this is the issue. Additionally, this issue did not occur when playing New Pokemon Snap.
Make sure Steam input isn't interfering, and try to unpair and repair the controller in the Bluetooth section
I have tried unpairing and repairing the controller via Bluetooth trouble shooter and manually via Bluetooth options. Additionally, I've also tried updating the controller's firmware via Xbox accessories (it was on the latest version), checking for Windows updates (my system is up to date), checking for driver updates for both the controller, Bluetooth, and WiFi (all are up to date), uninstalling the Bluetooth drivers so they would automatically reinstall upon reboot, and ensuring via Device Manager that the Bluetooth LE XINPUT compatible input device's check box "Allow the computer to turn off this device to save power" is unchecked. None of these solutions have worked. I also doubt it is a problem with the controller because I tested other games with the Xbox controller (on Steam) and had no disconnects, and also tested on another computer with another Steam game with no disconnects.
I've disabled Guide Button Focuses Steam and Xbox Configuration Support in Steam Big Picture, please let me know if there's anything else I need to do to ensure Steam input isn't interfering. I'm still getting disconnects in Kirby & the Forgotten Land.
update the controllers firmware,
ps: there is no series s controller, the device is just "xbox wireless" with no distinction between series or otherwise.
The firmware's been updated already, I plugged in the controller and checked on Xbox Accessories and it's on the latest version.
I can confirm I have the same issue several times. IMHO there are potentially 2 issues:
- if a xbox controller is low in battery and got a micro deconnection, a refresh seems to be done by the emulator (probably because the list of inputs change). This make previous configuration lost (all inputs were set to disabled in my cases and so all users can not do anything in the game). We need to go in input setup and reconfigure for the input.
- Even without any battery issue, ALL xbox controllers cease to function properly from time to time without any explanation. I check the input setup and no more xbox controlles were on the list. I then check the bluetooth windows in parameters and the xbox were still there. The only solution I found was to restart the emulator.
regards !
Same issue has been going on for me in Breath of the wild, Mario Oddysey and MK8D with XBOX Series X controller. Its batteries have been just changed, I have messed with the controller options/inputs, I have also reinstalled all the drivers and got the latest updates, etc. Nothing seems to be working for me either. It also does not happen in games like Links Awakening, or Brain Academy.
I can confirm I have the same issue several times. IMHO there are potentially 2 issues:
- if a xbox controller is low in battery and got a micro deconnection, a refresh seems to be done by the emulator (probably because the list of inputs change). This make previous configuration lost (all inputs were set to disabled in my cases and so all users can not do anything in the game). We need to go in input setup and reconfigure for the input.
- Even without any battery issue, ALL xbox controllers cease to function properly from time to time without any explanation. I check the input setup and no more xbox controlles were on the list. I then check the bluetooth windows in parameters and the xbox were still there. The only solution I found was to restart the emulator.
regards !
my experience exactly. my xbox one & one S controllers work just fine anywhere else. One thing that just happened to me is that opening up the controller config after this happens causes the controller to turn off/disconnect (its light goes off), even though you can now see it in the controller config GUI
Happens pretty badly on my end. One of my controllers disconnect for a microsecond and then the inputs disappear and i have to restart my entire ryujinx system. There must be a way to reset the connection.
this should be fixed by using the HIDAPI capabilities added to SDL, though ryujinx has some weird caching of controller states that i've never seen performed in any other application.
Sometimes, if we boot up ryujinx “correctly” the xbox controllers will still disconnect, but then reconnect and load the input mappings properly. Unfortunately, I don’t know what entails booting up ryujinx “correctly”.
I am having same issue with DS4. Config is lost on next load of the emulator and I need to reconfigure again. Was not happening last year iirc.
I did some debugging, trying to find the source of the problem. It's my first time poking around this repo but I may have found some useful information.
Here's a log with the relevant information. I've added the InputConfig logs to verify that data, and it seems consistent. I've added some comments and explanations below.
This is where I first disconnected the controller at Ryujinx.Input.HLE.NpadManager:122
(DriverConfigurationUpdate
function)
00:01:48.433 |W| Hid ReloadConfiguration: Is our controller valid? False:
InputConfig:
ControllerType: ProController
PlayerIndex: Player1
InputBackendType: GamepadSDL2
ID: 0-79820003-045e-0000-ea02-000000007200
Version: 1
00:01:55.519 |I| Hid RefreshInputConfig: Refreshing input configs: 0
00:01:55.521 |I| GUI.WindowThread Hid SetupNpad: Disconnected Controller ProController from Player1
00:01:55.521 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight, Invalid' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
00:01:57.523 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight, Invalid' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
This is where I reconnected it - a successful controller recognition at Ryujinx.Input.HLE.NpadManager:122
(DriverConfigurationUpdate
function)
00:02:05.589 |W| Hid ReloadConfiguration: Is our controller valid? True:
InputConfig:
ControllerType: ProController
PlayerIndex: Player1
InputBackendType: GamepadSDL2
ID: 0-79820003-045e-0000-ea02-000000007200
Version: 1
00:02:24.639 |I| Hid RefreshInputConfig: Refreshing input configs: 1
=================
InputConfig:
ControllerType: ProController
PlayerIndex: Player1
InputBackendType: GamepadSDL2
ID: 0-79820003-045e-0000-ea02-000000007200
Version: 1
=================
Successful reconnection
00:02:24.639 |I| Hid Configure: Configured Controller ProController to Player1
00:02:24.639 |I| GUI.WindowThread Hid SetupNpad: Connected Controller ProController to Player1
Followed by repeating controller driver initialization, this time it comes up as invalid even though the data is the same. it's possible the _gamepadDriver
may have been set incorrectly or to null just before this point. at Ryujinx.Input.HLE.NpadManager:122
(DriverConfigurationUpdate
function)
00:02:24.750 |W| Hid ReloadConfiguration: Is our controller valid? False:
InputConfig:
ControllerType: ProController
PlayerIndex: Player1
InputBackendType: GamepadSDL2
ID: 0-79820003-045e-0000-ea02-000000007200
Version: 1
refreshes input configs (empty?) and as a result disconnects the controller
00:03:07.357 |I| Hid RefreshInputConfig: Refreshing input configs: 0
00:03:07.358 |I| GUI.WindowThread Hid SetupNpad: Disconnected Controller ProController from Player1
00:03:07.358 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight, Invalid' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
00:03:09.359 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight, Invalid' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
00:03:11.361 |W| GUI.WindowThread Hid Remap: No matching controllers found. Application requests 'ProController, Handheld, JoyconPair, JoyconLeft, JoyconRight, Invalid' on 'Player1, Player2, Player3, Player4, Player5, Player6, Player7, Player8, Handheld'
https://www.reddit.com/r/sdl/comments/v42pnp/controller_disconnects_after_connecting/ Seems to be a general SDL problem. https://github.com/libsdl-org/SDL/issues/3468
damn, it looks like that bug is over 3 years old too /:
The issue happens if the controllers are unplugged at the same time it's being polled, SDL enumerates a /dev/input/eventX file but then fails to open it.
I think it's probably then keeping the joystick halfway opened in its internal list and fails to detect its removal later on (as it's never opened, and so never read from) and thus never send any new event about it.
https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/issues/19
That's very strange. But it seems like there's a potential solve here - would a super-dumb fix be acceptable here? Like, if we were to connect a controller and then skip a connection event if that device is already connected? or even if it's some sort of timeout.
I think we're running into something like this:
When the DS4 game pad is unplugged and the X-Box controller is plugged, SDL may report two SDL_JOYDEVICEADDED events (instead of one as we would expect), and opening the corresponding joysticks indexes fail with "Unable to open /dev/input/event6" and "Unable to open /dev/input/event30" message respectively.
I say that because I see the gamepad driver pick up the gamepad when reconnecting it, then it drops it
// there are tons of these logs after reconnecting the controller - it seems like it's picked up like normal.
// (These are temp logs I put in for this bug)
00:01:51.022 |I| GUI.WindowThread Hid DebugGamepadDriver: IGamepadDriver (gamepadDriver):
Type: Ryujinx.Input.SDL2.SDL2GamepadDriver, DriverName: SDL2
Gamepad IDs: 0-79820003-045e-0000-ea02-000000007200,
// until this happens very shortly after - the second event?
00:01:51.030 |I| Hid DebugGamepadDriver: IGamepadDriver (gamepadDriver):
Type: Ryujinx.Input.SDL2.SDL2GamepadDriver, DriverName: SDL2
Gamepad IDs:
// and of course the update then fails
00:01:51.030 |W| Hid DriverConfigurationUpdate: Updating driver configuration....!
00:01:51.056 |W| Hid ReloadConfiguration: Is our controller valid? False:
InputConfig:
ControllerType: ProController
PlayerIndex: Player1
InputBackendType: GamepadSDL2
ID: 0-79820003-045e-0000-ea02-000000007200
Version: 1
00:01:51.056 |I| Hid RefreshInputConfig: Refreshing input configs: 0
00:01:51.056 |I| GUI.WindowThread Hid SetupNpad: Disconnected Controller ProController from Player1
I say that because I see the gamepad driver pick up the gamepad when reconnecting it, then it drops it
This seems like a fair assumption
Any ETA on this? We are getting minor fixes for games no one cares anymore but not for something very annoying like this?
I never experienced this issue and am not on Windows, so I can't really help with this. Aside from that, we generally don't do ETAs.
I am having this exact issue myself. Game works fine for a number of time, and then the controller disconnects from Ryujinx. Applet warning pops up asking to connect a controller, and upon going into Settings the controller is not found.
One note that I noticed - when going into settings it appears the controller completely turns off. It is not a battery issue, as upon fully closing Ryujinx, the controller turns on and reconnects to windows just fine.
Xbox Controller (Newest model + FW) Xbox Wireless Adapter for PC.
I am having a similar issue while playing BOTW when opening the menu right stick does not works (after use left stick, or several tries, it start working) right stick works fine outside menu (arrows, runes, pause, map, etc...)
tried switch pro controller and everything working here, looks like an issue with xbox controller.
You do not have a similar issue.
it seems like this is an Xbox Wireless Adapter problem - is there any way to detect if that is the interface being used so that behavior can be adjusted (in the way i described earlier) ONLY when that adapter is in use?
it seems like this is an Xbox Wireless Adapter problem - is there any way to detect if that is the interface being used so that behavior can be adjusted (in the way i described earlier) ONLY when that adapter is in use?
Interesting, I will try with a Bluetooth adapter instead and test tonight, will report back.
Damn this bug! I'd be fine with using bluetooth for my xbox controller but it does not support the attached chatpad, which I need. It will be a beautiful day when someone has a solution for this!
There may be a fix in SDL 2.26.3
Fixed infinite loop shutting down WGI controllers
Also having a similar issue with ryujinx + Xbox wireless adapter. I don't have this issue with other applications, games, or emulators. For me, it turns off the controller as soon as it successfully connects. It shows up for about 2 seconds in device manager or USB game controllers, then turns off every time. I have to close ryujinx and re open, then it works fine for about an hour or so before doing it again, which requires closing and reopening. There are no new drivers for Xbox wireless adapter. I thought it was windows causing issues, so I'd restart and fix it. But it was ryujinx, because as soon as I close ryujinx and relaunch, it fixes the problem.