The D5100 shouldn't act this way. However it will only recognize a Nikon flash which is CLS compatible. I have no problem using a non-CLS flash but by setting the shutter speed in M mode and the flash in Auto mode or manual. I don't have a Sunpak flash. Is your model a dedicated Sony model? What mode are you putting the flash in? I can shoot the D5100 in any light with or without a flash in any light. The flashing ? is only a reminder you need more light, it won't stop you from taking a photo. If you want the camera to operate the way you want it will but I recommend a Nikon flash mentioned in the D5100 manual. . However they don't make a low cost model like the Sunpak.