Whenever I go into the calibration for the accelerometer and gyroscope, the blue dot is not moving around for the accelerometer and for the gyroscope. Also, all of the auto screen rotation functions have stopped working. No matter what I try, the screen will not flip when turned sideways in any app or menu.
Any ideas on causes or fixes? Could it be hardware or software?
I have been into the *#0*#menu. I tested sensors, and I do get readings from the gyroscope, and it's self-test says it FAIL.
(Click images to enlarge). When I go into sensor, it's showing this:

