Picade Hat joystick not detected w/out usb keyboard plugged in

I got my picade hat set up (hooray!) and there are tons of things I love about it (soft power on / off, powered speaker line, single source rather than having multiple cards rattling around), BUT I’ve got one very strange issue:

If I do NOT have a USB keyboard plugged in, the joystick isn’t recognized in Emulation Station or Attract Mode. I can’t figure it out - the power button will still work (long press to shut-down) but no other buttons are recognized.

Has anyone run into this? Is there some simple solution I’m missing? I have a portable (ish) system I’m making, and I can’t have a keyboard plugged in all the time!

are you saying that if a USB keyboard is hooked up the Picade HAT controls respond? That would be quite weird.

my best guess would be that evdev hasn’t taken, which is quite possible if a dependency could not be filled.

what happens if you download the following file and run sudo dpkg -i python-evdev_0.6.4-1_armhf.deb:

another thing you can try is showkey at the command line and see if you get any response from the joystick or buttons.

The challenge here is that when the Pi is booted with USB keyboard is plugged in, the joystick + buttons work great! No keyboard plugged in, the joystick / buttons aren’t picked up at all :-/

Yeah - it’s super duper strange:

  1. Boot with USB Keyboard plugged in: joystick + buttons work great!
  2. Boot w/out USB Keyboard plugged in: joystick + buttons unresponsive in EmulationStation or Attract mode EXCEPT the power button (which will still turn off the console)

I will definitely try your fix when I get home tonight - thanks for the advice!

I can think of some reasons why this might be the case. I’d guess EmulationStation requires a device to be present when it fires up, or at least present, for the emulated UInput events to be detected.

What happens if you boot up without a USB Keyboard plugged in, and then plug it in after EmulationStation has started?

Power button? That’s news to me? Don’t have one on my Picade?

The power toggle is a feature unique to Picade HAT.

Ah ok thanks, can I buy one to ‘upgrade’ the one I have in my Picade? Are they swappable? Cheers

see my reply here: Picade HAT to rule them all?

(and respond there rather than here if you have a follow up question)

OK, I downloaded the file & ran the command - sadly no dice. When the keyboard isn’t plugged in at bootup, the joystick / button inputs aren’t recognized (pressing buttons / moving joystick does nothing).

Any other ideas?

OK - I tried booting up w/out a keyboard and then plugging it in after startup: no dice, neither the keyboard OR the joystick is recognized. Any idea on how to fix?

Sorry for being so chatty - but I have more information! I followed RogueM’s advice and SSH’d in (while the joystick was unresponsive) and ran the showkey action. The joystick & keyboard were recognized, and showed responses like:
keycode 103 press
keycode 103 release

So, the real question is why emulationstation or attract mode aren’t picking up on it unless I boot w/ the keyboard plugged in.

I’ve just set up a fresh RetroPie image and installed the Picade HAT software. I’m seeing the same problem as you.

Looks like I’ve got some tinkering to do.

I think I’ve fixed it, using some information I found yesterday when trying to figure out what could be the problem.

Could you grab the picadehatd file from this branch on GitHub? https://github.com/pimoroni/picade-hat/tree/keyboard-detect-fix

There are a few ways to do this, but I’d suggest plugging a keyboard into your RetroPie box and running:

git clone http://github.com/pimoroni/picade-hat -b keyboard-detect-fix
cd picade-hat
sudo cp daemon/usr/bin/picadehatd /usr/bin/picadehatd

And then unplug your keyboard and reboot!

If you’ve set up keyboard controls already, you may have to delete any EmulationStation key bindings to get the Picade HAT controls bound properly.

THAAAAANK YOU! I’ll be giving this an update this evening when I’m back from work!

1 Like

So, one step forward: I can now boot up & navigate emulationstation / attract mode w/out having a USB keyboard plugged in. Hooray! However, I can’t figure out how to reset my key bindings so that I can actually play any games that use Retroarch (advmame controls work fine). I’ve tried deleting the retroarch.cfg file in the opt/all section, copying back in my old ones, but nothing seems to work.

Any idea on how I can restore / reset joystick controls for retroarch? Right now I can’t play any retroarch games (ex: FBA, SNES, etc).

I can’t remember where on earth I found the menu option for it, but I’ll fire up this Picade and find it for you.

Guessing your controls are too messed up to press whatever button is currently bound to “Start” and navigate to “Configure Input”

You should just be able to delete /home/pi/.emulationstation/es_input.cfg

1 Like

Well, the problem is not emulationstation – that (and attract mode) works a treat! The problem now is the underlying “retroarch” system that provides keyboard mappings for the majority of retropie emulators is for some reason not working. So, to be clear:

  • I can navigate ES and Attract Mode w/ no difficulties, including launching games & accessing the “configure input” controls (which didn’t help the problems below)
  • When I launch an emulator that requires retroarch, for some reason the controls do not respond.(I’m guessing a mapping issue somehow? Very vexxing).
  • When I launch an emulator that does not use retroarch (like AdvMame) it runs fine - my old keyboard mappings work great.

I’ll try to delete the es_input configs just in case that helps… thanks for the advice, I’m so close to a fully functional picade-hat powered console!

From what I understand, EmulationStation is supposed to auto-configure RetroArch with the same bindings. This might be useful: https://github.com/retropie/retropie-setup/wiki/retroarch-configuration

Re-configuring the EmulationStation input might fix this functionality. Worth a punt!