I had the same problem.
I don’t know anymore exactly but if I setup the hotkey for keyboard AND for gamepad in the retroarch.cfg, it works for me:
input_enable_hotkey = alt
input_enable_hotkey_btn = 2
I also can push the hotkeybutton on gamepad and e.g. the key for save on the keyboard.