You don’t need to run
xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
if you have edited /etc/rc.local to start xboxdrv on boot, your pad should connect automatically.
In this thread gizmo98 confirmed the joypad config was broken and suggested this command:
# cp /home/pi/RetroPie-Setup/supplementary/settings.xml /home/pi/supplementary/supplementary/ES-config/
and trying the joypad config again. You will need to place a blank file ‘gngeorc’ in /home/pi/.gngeo/ and and a file ‘dgenrc’ in home/pi/RetroPie/configs/all/
Regarding Dgen, I recommend you switch to Picodrive for Genesis emulation, it has better performance and compatibility and supports Sega CD/32X. It is also configured through Retroarch. It is the default emulator in the latest RetroPie image 1.9.1 or you can install it via the setup script. I made a guide here a while ago, should still be the same process: https://www.petrockblock.com/forums/topic/change-dgen-to-picodrive-in-retropie-image-1-7/