It appears that after a crash or even a modest hit the camera may get life of its own. As shown in the video bellow, the gimbal starts to vibrate and shake with no apparent reason and the remote has no control over it. Sometimes it will get fixed by itself and you can fly, but you should expect it to go wild again and need to fix the gimbal.
What may look like control / firmware issue is a simple mechanical failure of the gimbal’s X axis which upon good side impact will get loose from its base. As shown in image A below, the axis marked green should be firmly snagged in the yellow marked bore.
Once the axis is released from its base, the only thing that holds the motor in place is the round magnet of the brushless motor. It will hold it with enough strength and you may have no clue that it is broken. It also may work for some time after the impact but once the axis turns freely it will misalign the camera position and the trimmer-potentiometer located on the other side of the motor will not read correct physical position of the camera.
Image B shows a post impact trimmer and its misalignment with the camera on the X-axis. The trimmer is the feedback mechanism of the micro-controller which reads the trimmer resistance based on its angular position (like a volume button) and assumes the camera is aligned with it. When the reading is extreme to one of the ends, the controller tries to fix it and starts bouncing quite radically.
The proper alignment of the trimmer is shown in the image C, note the blue lines, the trimmer flat notch should be parallel with the flat edge of the PCB. Don’t worry about slight misalignment, the gimbal can work with that.
To fix the problem I remounted the axis using extreme strength treads locker (Loctite or similar) and clamped the motor in place overnight to allow the bond to fully cure.
Not knowing in advance what I am dealing with, I took the camera off the quad but you don’t have to, you can do the work leaving the gimbal attached to the body. If you do take it apart, you can use plastic wire fasteners instead of the anti-drop pins which you have to cut during disassembly.
A test flight I did today gave very good results, no evidence of the problem. However, I am not sure how long this will hold, the axis might be released again and I will have to repeat the fix. This is why I used soft Loctite and not hard metal bonding formulas that will make it difficult to remove residues in due time.
As for DJI, it seems to me they are aware of the problem but will not tell you how to fix it, they will however ask you t ship it back.