I just finished setting up a RetroPie box and had a very similar issue. At first I was getting the text upon starting a game that the F310 was not configured. I hacked around for a while eventually settling on the XBox driver as my solution. This would work for a while but would eventually disconnect and leave me in a very bad spot. I was at a point where I’d have an SSH session constantly going to the ReteroPie box so I could cleanly reboot it after these failures.
I rebuilt the box and started again from scratch. This time I set the driver to “udev” (not using the XBox driver at all) and started playing around. When I’d load a game this time I’d get that the controller was connected but nothing would work. I researched this for a while and found many references to “pushing the right shoulder button” to get the controller to work. Well that didn’t seem to work for me but I found out I could get the controller to eventually work by mashing buttons in random combinations each time I started up a game. While this worked, it was a silly solution.
At one point I was playing a SNES ROM and found that the left shoulder button seemed to constantly be activated. I then determined that the left analog trigger was mapped to the left SNES shoulder button and when I’d press it, the button would deactivate. After seeing this, I started up a game and instead of hitting the “right shoulder button” I hit the left analog trigger and it immediately gave me control. This was a better solution than random button mashing but still not 100%.
I then stumbled across a post that said to reconfigure the F310 in EmulationStation after setting the driver to “udev”. I also found a YouTube video about setting up the F310 that skipped mapping the triggers until the end of the configuration process (not exactly sure why yet). I don’t have the video URL available at the moment but I can post it if you find any of this helps.
After reconfiguring the controller, everything now works perfectly.