RM 3100 Compass Error

Hello,

I’ve had some problems lately with my RM 3100 magnetometer. The tell-tale signs of the problem are a very brief compass error reported followed by a jump in magnetometer value and significant reduction in responsiveness of the magnetometer to changes in direction of the aircraft. This slowly causes a completely incorrect yaw being reported. Does anyone know why this is happening? Some graphs from a recent flight log below, I’m using a Cube Orange so I have a secondary compass onboard but it is not used for navigation at all:

Primary magnetometer X, Y, Z:

Primary vs secondary X:

Primary vs secondary Y:

Yaw vs ground course (winds have some influence but not to the extent seen later in the flight)