The compass in Xiaomi smartphones is not just an extra feature for tourists or for orientation, it is critical for work. AR-applications, navigation in Google Maps or Yandex.Maps, as well as for the correct operation of certain games (for example, PokΓ©mon GO). However, many users have a problem when the compass needle jumps, shows the wrong direction or refuses to work at all, and 80% of the time the fault is a demagnetized sensor or software failure that can be fixed on its own.
In this article, we'll look at all the ways that compasses can be calibrated on Xiaomi, Redmi and POCO smartphones, from standard MIUI tools to hidden engineering menus, how to test the sensor's performance, why the calibration is reset after rebooting, and what to do if nothing works, and a unique method of recovering the magnetic sensor without resetting, which is not even written about in official forums.
Why Xiaomi Compass Lies: 5 Reasons Why It Is Lie
Before you start calibrating, it's important to understand what caused the failure, and most of the time, it's not hardware failure, it's software or external factors that are the most common causes.
- π§² Exposure to magnetic fields: Even a brief exposure to speakers, speakers, induction plates or magnets can knock down the sensor.
- π± Programming errors MIUI: after updating the firmware or resetting the settings, the calibration may fly.
- π Battery discharge below 15%: at critically low charge, the system turns off the precise operation of sensors to save energy.
- π οΈ Physical damage: falls or impacts can displace the magnetic sensor (especially in models with metal body).
- π Geomagnetic anomalies: In some regions (for example, the Kursk magnetic anomaly), the compass may behave unstablely.
Fun fact: Xiaomi smartphones are designed to run the compass with an AK09918 chip (or similar one), which combines a magnetometer and an accelerometer. If the sensor is physically damaged, calibration won't help, you'll need a replacement board, but 95% of the time, the problem is solved by software.
How to check if a compass needs calibration
Before you set up the sensor, make sure it's the one that's the problem. Here are 3 ways to diagnose:
- Standard Compass: Open the built-in Compass app (if not available, download from Google Play). If the arrow twitches chaotically or shows a clearly wrong direction (for example, north where south should be) - the sensor requires calibration.
- Engineering menu: Enter ##6484## in the phone dialer (newer models may not work). In the Sensor Test menu, select Magnetic Field and look at the charts. If the lines are chaotic or X/Y/Z values are close to zero, the sensor is not calibrated.
- GPS Status & Toolbox: Download it from the Play Market and go to the Compass tab. The app will show not only the direction, but also the level of interference (if it is above 30% - the sensor requires adjustment).
β οΈ Note: if the sensor does not respond at all (X values) during the test in the engineering menu=0, Y=0, Z=0), this may indicate a hardware breakdown, in which case the calibration is useless - contact the service center.
π‘
Before calibration, turn off magnet covers (for example, to attach to the holder in the car) - they can distort the sensor readings.
Method 1: Standard calibration through MIUI settings
The simplest method that works on most Xiaomi, Redmi and POCO models (including Redmi Note 12, POCO X5, Xiaomi 13).
- Open the Compass app (if not, download it from Google Play).
- Hold the phone horizontally and rotate it on all axes (as if drawing an eight in the air).
- The screen will show a hint βCalibration of the compassβ with the progress bar. Wait for completion (usually takes 10-20 seconds).
- If the calibration does not start automatically, tap the screen β sometimes confirmation is required.
Once you've successfully calibrated, the shooter should stabilize, and if you don't, move on to the next method.
Make sure there are no magnets or electronic devices nearby.|
Charge your phone to at least 30% |
Enable In-Air mode (to avoid network interference)|
Remove the cover (especially with metal elements)-->
Method 2: Calibration through the engineering menu (for advanced)
If the standard method didnβt work, try manually adjusting through a hidden menu, which is suitable for most MIUI 12-14 models, but may vary depending on the firmware version.
Instructions:
- Open the Phone app and enter the code ##6484## (some models may run ##4636## β Sensor Test).
- Select Sensor Test β Magnetic Field.
- Look at the charts X, Y, Z. If they are chaotic, press Calibrate (if there is such a button).
- If there is no button, manually rotate the phone on all axes (as in method 1), then press Save or Apply.
- Reboot your smartphone.
| Xiaomi model | Does the code ##6484## work? | Alternative code |
|---|---|---|
| Redmi Note 10/11/12 | Yes. | ##4636## |
| POCO X3/X4/X5 | Yes (sometimes required) SIM-map) | ##36446337## |
| Xiaomi 12/13/14 | No (locked) | Use the Sensor Test app from the Play Market |
| Redmi 9/9A/9C | Yes. | ##64663## |
β οΈ Warning: Do not change other settings in the engineering menu unless you are sure of their purpose! Incorrect settings can lead to network loss or camera failure.
Method 3: Reset sensor settings (if nothing helps)
If the compass is still lying, try resetting all the sensors, and it won't delete your data, but it will return the factory parameters of the gyroscope, accelerometer and magnetometer.
Instructions:
- Go to Settings β About the phone β All the characteristics.
- Find the MIUI version and tap it 7-10 times until you see the caption βYouβve become a developer!β
- Back to Settings β Additionally. β For developers.
- Find the Sensor Calibration Reset option and confirm the action.
- Reboot the phone and recalibrate (method 1 or 2).
After resetting, you may need to reset the gyroscope (for example, for games), open any gyro-enabled game (for example, PUBG Mobile) and perform a training calibration.
What to do if the item "Reset sensor settings" is not?
Method 4: Calibration through ADB (for power users)
If standard methods donβt work, you can try calibrating the sensor via Android Debug Bridge (ADB), which requires a computer and basic command line knowledge.
Instructions:
- Download and install ADB Tools on your computer.
- Turn on the phone debugging over USB (Settings β For developers).
- Connect your phone to your PC and type in the command line: adb shell su echo"1" > /sys/class/sensors/magneticfield_sensor/calibration (If you request root rights, grant them).
- Reboot the phone.
β οΈ Warning: This method requires an unlocked bootloader and root rights. Wrong commands can result in a loss of warranty or device blink!
π‘
If the compass is knocked down again after a few days, the problem may be a hardware malfunction, in which case only replacing the magnetic sensor in the service center will help.
Frequent calibration errors and how to avoid them
Many users make the same mistakes that make the calibration fail.
- π΅ Calibrate near metal objects: keys, coins, knives, or even metal furniture distort the magnetic field.
- π Interrupt the process: if you interrupt the calibration on the half, the sensor can βhangβ in an incorrect state.
- π² Use magnet covers: even after calibration, they will knock down readings.
- π Calibrate at low charge: At a battery level below 15%, the system can ignore sensor settings.
- π Staying in the weak signal zone GPS: For accurate calibration, a stable signal from satellites is required.
If you make one of these errors, recalibrate the calibration, and in most cases, this is enough to restore the compass.