Just wondering is 5X users are having compass issues. My 6P compass isn't accurate at all. I've heard 5 users having issues as well once upgraded to lollipop.
Simple test is to open up Google Maps and see if shows you are pointing in the right direction.
I think I've noticed this on more than just a Nexus device (another 2015 device exhibits this behavior).
Fix it with a
quick 3 step calibration
If your arrow is pointing in the wrong direction, you’ll need to calibrate your phone’s compass. Open the Google Maps app and then follow these directions:
1. Tilt your phone forward and back
2. Move it side to side
3. And then tilt left and right
You may need to repeat the steps until your compass is calibrated.
Test with your phone held vertical to the ground (bottom of the phone points towards the ground, top of the phone points towards the sky).