As it says in the title, my Huawei P7 Ascend running the latest firmware for it (Android 5.1.1) has something strange going on with the compass for the last year or so. I have already attempted calibration, but that did not fix it. The compass only exclusively points directly north or directly south, both on calibration apps and in apps like Google Maps. How can I get it to work properly again?
I too have this problem after upgrading my phone to lollipop. However, if I tilt my phone vertically or upside down (so I'm looking up to face the screen), the compass works fine. Try calibrating your accelerometer with your phone upside down.