Yaw turning from left to right automatically

Hello experts,

First of all, I don’t have well knowledge in this field, still learning. So any mistake in my question please forgive.
Few days onwards, my drone show unusual response…
Main : turn yaw left to right. Some times it show yaw in Consistency in xx degree error.(only few times)

What i tried :

*Checked the motor layout and propeller direcrion
*tried to calibrate compass ( on ground.)

  • use lipo instead of li-ion
  • tried to trim
    *also checked the frame condition ( don’t have any tilt in arms)

Hardware spec :

FC : Pixhack v3 - fmuv2
Frame : TBS 500s
Battery : lipo 3s 3000mah
ESC : 30A simon K
GPS : m8n
Motor: 920kv readytosky

Firmware used :
4.0.0
4.0.5
4.0.7
4.1.5

Checked all of these firmware… Still have same issue.

Thanks advance

This is not a FW issue. Do not waste your time. Use the latest stable version.

And tune the Yaw PID values