This might be common knowledge - I don't know. But a search doesn't find this discussed so I thought it worth a post.
My RayMarine St8001 AutoSteer course wandered widely, and did not agree with my GPS course. I suspected the fluxgate compass was at fault. "What did I have to lose?" I opened the compass housing to find a coil in a plastic frame mounted in a plastic gimbal. A lead weight hung from the coil to keep the coil level. The coil did not move freely in the gimbal. I used a plastic friendly aerosol solvent to clean the gimbal bearings until freedom of movement was achieved. Reassembled. Post test showed optimum function; 0 degrees average deviation, max error was 3 degrees from GPS. So, before you go buy a new one ....