I feel for you. I just got my 5X and it initially appeared to have compass issues, but I think I got it fixed, just by doing the figure 8 calibration (moving the phone very quickly when doing it seemed to help). Even after rebooting it seemed to hold calibration, so I'm relieved there.
I...