Look for the file retroarchcustom.cfg and change the value of input_joypad_driver from udev to sdl2

More info:
https://forum.recalbox.com/topic/8125/4-1-slow-game-launch-any-game-emulator/35