If your PS3 controller says its not configured in yellow text at the bottom of the screen, it may be that you need to change this line in /opt/retropie/configs/all/retroarch.cfg
input_joypad_driver = udev
Then re-configure the PS3 controller in Emulation Station.
And I know this says ps3 controller but I was having the same exact issue when using a ps4 controller and chaning the driver fixed the issue for both ps3 and ps4 controller. You can also get to this setting and change it through the RGUI.
To use the RGUI to change it:
EDIT RETROPIE/RETROARCH CONFIGURATIONS
1 Change common RetroArch options
13 input_joypad_driver (udev)
New technology doesn't solve all our issues, it changes the issues we have.