OnePlus X (OxygenOS): Screen auto-rotating in wrong direction I have an unrooted OnePlus X phone with the stock recovery and stock OxygenOS 2.2.0-X operating system (based on Android 5.1.1) installed.

With auto-rotation enabled, whenever I turn the device into landscape mode, the screen rotates in the wrong direction. I.e. when I turn it clockwise the screen contents are rotated counterclockwise, and the other way round. This leads to the screen contents always being upside down in landscape mode.

Does anyone have an idea how I could go about fixing this problem? Is there a way to check whether this is a software or a sensor problem?



Update: In the GSensor section of the developer-type manual test menu accessible via *#808#, the phone reports an angle of 270 when I turn it 90° clockwise and it reports 90 when I turn it 90° counterclockwise. I assume it's supposed to be the other way round?



Update 2: After flashing TWRP recovery, rooting the device and installing a custom ROM, the problem persists. Is it fair to conclude that it's definitely a hardware issue now?
I've had the same problem. It was fine again after restoring an old TWRP-backup of "Persist".
Don't know why. Just worked.

If you don't have a Backup of your Persist partition then I think that (re)installing a stock ROM could also be able to fix this. Even if not, it won't hurt to give it a shot.



Edit: I took a short look into /persist and found two interesting files inside it:
/persist/sensors/gyro_sensitity_cal - Containing GyroSens 1.000000 1.000000 1.000000
/persist/sensors/sensors_settings - Containing 1
I guess that explains why it fixed the error and maybe also just checking and correcting these files will do so.