When you look at the patches and settings on the D5 are they all messed up as well? Has the internal battery ever been changed in the D5? When the battery dies all the settings and patches will turn to garbage that can cause weird things to happen. If everything doe look messed up you could try sending the original factory data to the D5 to see if that helps? You can find the original factory data at
http://www.synthzone.com/midi/roland/d5/