Controller works in menu, stops working after loading game

I’m using a generic USB gamepad with OTG connection.

The USB gamepad is recognized upon opening RetroArch, I’ve been able to map all the keys properly, the issue is after loading a game; the gamepad does nothing as if it had been disconnected, not even if I return to the RetroArch menu (the gamepad is still responsive to the OS).

So far the only thing that works is unplugging/plugging back the usb gamepad and pressing any button, then I get the bottom-left notification message about it being detected again and it starts working within the game and RetroArch menus.

I’ve tried saving the autoconfig file too, but it makes no difference at all… works until a game is loaded and I’m back to unplugging/plugging back. Anyone has any idea why this happens?

EDIT: workaround here: Controller works in menu, stops working after loading game

Specs

  • Android v8.1
  • RetroArch v1.8.4 (f425d8d),

I also tested as far back as v1.2.2 (Jul 19 2015); v1.2.2 does NOT have this issue, it seems to start in the next v1.3.0 (Feb 25 2016) along with the implementation of the new material design menu, lasting to this day (although possibly only affecting marginal number of hardware/controllers), hence the short amount of complaints and attention to this issue.

2 Likes

If you save an autoconfig for it and it gets recognized when you plug it in, you should be able to just press a button on it once the core+content starts and it should say “blah blah controller configured” again

2 Likes

I would assume that it would, and when RetroArch is opened it is exactly what happens, the gamepad gets immediately recognized after pressing any button, it works fine, all buttons do. Unfortunately after loading a game it is as if it was unmapped, although going manually into the quick menu settings shows the controller still mapped. It never works on the first time the content is loaded, and some times (90%) it stops working altogether after closing the game (content).

I’m in the process of gathering logs, but from what I see there is nothing suspect about it apart from the fact that it logs a bunch of lookups:

Using new lookupdevice name: usb gamepad
device vendor id: 2064
device product id: 58625

5 times in one run, the first being the obvious initial detection, 2 or 3 other ones from me manually having to unplug/replug because it clearly is no longer working, and the other I’m not sure… I was expecting something to say gamepad disconnected/lost/unloaded or w/e, I don’t know… apparently there are quite a few users with a similar problem too.

2 Likes

I wonder if it’s getting knocked down to another input port… Do you have “all players control the menu” enabled?

1 Like

I tried having all players control the menu enabled, didn’t change a thing; also bound the same controller to the first 5 ports, also not working as soon as the content is loaded, and the problem always starts immediately after loading/closing the game. But it’s curious that you mentioned being knocked down to another port, because one time (out of 20) I was unplugging/replugging the gamepad an every time the little notification appeared the port # incremented (did it 9 times, went up to #10), it started doing that after I switched the number of available ports from 5 to 1, but that was a one off. Every other time the process goes like this:

  1. Open RetroArch, press a button on gamepad, great!
  2. Navigate all over just with the gamepad, load content;
  3. Content is loaded, gamepad stops working;
  4. Unplug/replug gamepad (not too fast), gamepad gets recognized in-game and works (sometimes accompanied by notification pop-up, other times without);
  5. Now it plays fine… then I use the menu hotkey on the controller, select ‘Close content’;
  6. Game is unloaded, goes back to RetroArch menu and gamepad no longer works again - rinse/repeat.

A weird thing that I noticed is, if the content is loaded through touchscreen tapping and as soon as it starts if I press any direction on the D-Pad (and no other buttons), it picks up the controller within the game, otherwise, if I load the content using the B button of the controller it is not picked up afterwards, neither if I press any other button before the D-Pad.

-**############## EDIT ###############**

I found a very weird workaround, but it seems to trick it into working every time:

To load (run) the content, press and hold the B button, immediately after pressing the B button and while still holding it, start pressing repeatedly any D-Pad direction - a notification indicating gamepad detection should pop-up at the bottom.

Now, this might work for loading the game/content, but the same problem happens on closing the content (advice, don’t use the close content option), but if you must use it, you will have to use the same trick with something in mind: use any D-Pad direction except left, because if you press left while you’re holding the B button it will just return on top of the ‘Run’ option and will enter the game again, by using another direction (right, up, down) it will jump to another menu option an not run the game again.

NOTE: By ‘B’ button I mean the confirmation/action button inside the RetroArch menu, which is by default B.

-**############## EDIT ###############**

There has been corroboration from third-parties that this workaround works for them aswell with a different controller than mine, namely:

2 Likes

I sometimes have a similar issue where when I load a game the controller doesnt work at all as far as any button presses. I found a small work around that helped me. I go into the quick menu>Controls make sure that the controls on 2 and higher are set to none. Then I change my controller type in port 1 to something else then back to what I want. Like ill change it from retropad w analog to retropad then back. It continues to work the menus fine when i leave the game as well. I most commonly run into this in playstation games for some reason.

That is interesting, but unfortunately that workaround means that you have to go into the quick menu with something other than the controller and execute extra steps, in most cases that won’t be a problem but it does seem rather tedious in comparison.

Although there seems to be some similarity, I think these are different cases. While testing I reduced the number of players to 1, something which excludes the first part of your workaround (setting secondary device types to “none”), then the second part of that workaround, alternating the primary controller between device types, hasn’t worked in my particular case - this is something I too had tried before to no avail.

Hello.

I have a similar problem, sometimes I need to unplug/plug back the gamepad twice to get it working, or unplug/plug back, go to “Port 1 Binds” using a keyboard and select the gamepad in “Device Index” which for some reason is disabled. Your workaround does not work for me, I always need to unplug/plug back the controller after starting a game.

Android 6.0.1 RetroArch 1.8.4

USB Joystick (Microntek) input_vendor_id = 121 input_product_id = 6

That’s a shame, I was hoping it would work for more people. So far there is only one other person that got it working as I did (mine is wired OTG, his is Bluetooth). As a side note, my Android version is 8.1. and I’m not entirely convinced the issue is the device (gamepad) itself, at least it doesn’t make sense as to why a simple unplug/plug would solve it.

I’m running RetroArch on a TV box (MX9 with Rockchip RK3229).

1 - If I launch RetroArch from the TV box menu using the gamepad itself, it won’t work to navigate the menu unless I unplug it, plug it back and press the D-pad (any direction). If I press any other button, the gamepad is not recognized, even if I press the D-pad later. When I start a game, gamepad won’t work unless I repeat the procedure.

2 - If I launch RetroArch using any other device (keyboard or TV remote), once in the menu, if I press the D-pad in the gamepad, it’s recognized (I get the message “Microntek USB Joystick configured in port #0”) and it works to navigate the menu. If I press any other button, the gamepad is not recognized, even if I press the D-pad later. When I start a game, gamepad won’t work unless I unplug it, plug it back and press the D-pad again.

3 - If I launch RetroArch using any other device (keyboard or TV remote) and do not press any button in the gamepad when in the menu (navigate using the other device), when I start a game, gamepad will be recognized if I press the D-pad. If I press any other button, the gamepad is not recognized, even if I press the D-pad later.

Long story short: looks like RetroArch can’t “find” the controller if it’s used in the OS, and the core can’t find it if it’s used in the menu. Unplugging/plugging back the controller makes it work. I can also avoid using the controller in the OS and in RetroArch menu, so it’s still “available” to the core when emulation starts.

Option 3 is good enough for me. I hope this debugging helps to solve your problem or fix the issue.

I was having pretty much the same issue, and I can match almost all your symptoms, maybe except option 1, because for me I was actually using the gamepad to navigate the smartphone icons and run RetroArch.

Now, option 2. is also almost the exact same with me, but again the exception is that the gamepad is always woking within the menu upon starting RetroArch, only after running a game using the gamepad do I have a problem, but I don’t have a problem if I only use the gamepad after running the game with another input device, like touch screen for example, followed by a D-Pad press before any other key will make the game recognize the gamepad.

Option 3 is similar to option 2 in my case because I do not have the issue in the menu.

Essentially it seems to me that my workaround does not work for you because any interaction from the gamepad within the menu breaks the input for whatever reason. So, I suppose that when you try to press and hold the B button to launch the game it has lost connectivity/input at that point already and cannot regain it without unplugging/replugging.

Part of the issue may be the version of Android, but also as I mentioned in my first post, a part of this seems to be tied to the modern interface of RetroArch and the way it handles and hands-on/off input to the cores and back. At least from my experience these issues weren’t present in the old interface from v1.2.2, they started immediately on the next release, v1.3.0; the issue is that the old versions of RetroArch are pretty bad in comparison to the current ones, in every sense except input.

I was only just experimenting with RetroArch on Android really, but if I depended on it, my workaround does work for me; as a fallback your option 3 would also be viable, unless you accidentally touch the controller before entering the game :slight_smile:

Thanks for replying.

Actually I’m also just experimenting with this Android box, it can handle only up to Neo Geo, N64 is a no go, it runs the games but they are not playable. Unfortunately I don’t have a newer Android device to try. The controller is a generic one but it works fine in RetroArch on PC.

The box is working well enough since I can use the remote control to launch the app and navigate the menus, then the controller will work in the games (unless I touch it accidentally as you said), but if this issue was introduced in a release I guess it would not be too hard to fix.

Thank you, @ner0 ! Your workaround with B+D-pad is working for me. My hardware is Amlogic s905d + Genius g-12u gamepad (USB) and recent Retroarch (1.8 if I remember correctly)

2 Likes

Thanks for taking the time to leave that feedback, @Farmatique, glad it works for you too.

A post was split to a new topic: Forum griping plus input question

I had this problem with a dualshock ps4 controller via Bluetooth on android. Then if I tried to map controls once the game had loaded retroarch would crash. I was about to give up and use octopus but then I hit “bind all”, mapped the controls and it worked perfectly from then on. Good luck!

It sems that this issue is entirely different from the one being discussed in the topic:

  • There is no crash involved;
  • There is no attempt to map or bind the controller keys after loading a game (in most cases because it was mapped beforehand, as it should);

Maybe you should create a separate topic with an appropriate title that puts emphasis on those 2 obvious distinctions, mainly the crash which is even less normal than what the people complain about here (controller unrecognized after loading game using said controller).

Bump this. I am experiencing the same issue on Android. Controls work for all the menus, not in the game (can’t coin, start…). From within the game both mame menu as Retroarch are accessible with the controls, but the game specific controls are not reactive.

Bizarre. It renders my whole Retroarch setup which took me days to setup useless :frowning_face:

No luck with the weird workaround I came up with?