Even the most advanced Xiaomi Mi 9 smartphone with its flagship Snapdragon 855 chipset and GPS module can give inaccurate location data if the compass sensor (magnetometer) is not calibrated. The problem is the βjumpingβ arrow in applications like Google Maps, Yandex.Navigator or 3D Compass, when the phone shows north where there is none, or refuses to identify the directions of the world. 80% of the time it is not the hardware fault, but the downed sensor settings β and this is easy to fix yourself.
In this article, youβll find 3 proven calibration methods (including hidden engineering mode), deal with common errors (such as why a compass is βcrazyβ next to metal), and learn how to check the sensorβs performance without third-party software. And also - a unique life hack for owners of Mi 9 with firmware MIUI 14+, Which is not available in official Xiaomi documentation.
Why the compass on Xiaomi Mi 9 lies: 5 main reasons
Before you start calibrating the sensor, you need to know what caused the failure, and here are the most common reasons.
- π§² Magnetic field exposure: Even a simple magnetic lock case or wireless charging can knock the readings off, and if you put your phone next to a speaker or microwave, the compass will stop working.
- π± Software failure MIUI: After the system updates, especially MIUI 12β14) the sensors are sometimes dropped. This is treated by recalibration.
- π§ Mechanical damage: a fall in a phone can displace a magnetometer inside the case, in which case calibration won't help - you need repairs.
- π Incorrect data GPS: The compass relies on satellite data for accuracy. GPS slugs (for example, due to disconnected A-GPS), shooter will walk".
- π Reset to factory settings: after a hard reset, all sensors return to factory values, and they need to be reconfigured.
Usually, the first two causes are self-medicated, but you'll have to go to the service for mechanical damage or GPS problems. To diagnose the problem, try running the standard Compass app (if it's removed, install any of Google Play) and rotate the phone in your hands. If the arrow is smoothly following the movement, the sensor is good, but requires calibration. If the arrow is twitching or standing still, there may be a hardware malfunction.
Method 1: Calibration through the standard application "Compass"
The easiest way to do this is to run on 90% of Xiaomi Mi 9 devices with any version of MIUI. You donβt need root rights or third-party software.
- Open the Compass app (if not, download Compass 3D or Digital Compass from Google Play).
- Place your phone on a flat surface (like a table) and wait until the message βRotate the calibration deviceβ or similar prompt appears on the screen.
- Slowly rotate the phone on all three axes (as if you were drawing a sphere in the air), holding it in your hands. It is important to do this smoothly - sudden movements will reset the process.
- When the calibration scale is 100 percent complete, the compass needle should stabilize. If not, repeat the procedure.
If the compass is lying after calibration, check:
- πΆ Whether it's on GPS: Go to Settings. β Location and activate High Accuracy.
- π Whether the data are updated A-GPS: For this, use the app. GPS Status & Toolbox (available on Play Market).
- π‘οΈ Keep your phone away from metal objects, magnets and electronics.
Remove the magnet case |
Close all metal objects within a radius of 1 meter |
Turn on GPS in settings |
Charge your phone at least 30% |
Reset the device-->
Method 2: Calibration through the engineering menu (for experienced)
If the standard method didnβt work, you can use the hidden engineering menu Xiaomi Mi 9. This method requires caution β wrong actions can bring down other settings of the phone.
- Open the Phone app and type the combination: ##6484## (some firmware may run ##64663##).
- You will be taken to the MIUI Sensor Test menu. Find the Magnetic Sensor tab (or Magnetometer).
- Press Calibrate and follow the instructions on the screen: usually put the phone on the table and rotate it in a circle 2-3 times.
- Once completed, restart the device.
β οΈ Warning: Do not change other parameters in the engineering menu unless you know their purpose! For example, resetting the gyroscope or accelerometer data can lead to problems with autorotating the screen.
If #6484## does not work, try it.
- π§ Install the application MTK Engineering Mode (for MediaTek processors) or Qualcomm Engineer Mode (for Snapdragon).
- π± Use the alternative code: ##4636### - in the Testing menu, find the Sensors section.
What to do if the engineering menu is not opened?
Method 3: Calibration with GPS Status (for fine-tuning)
If the first two methods fail, use the third-party GPS Status & Toolbox app, which not only calibrates the compass, but also updates the A-GPS data, which improves navigation accuracy.
- Download and install GPS Status from Google Play.
- Open the app and go to the Compass tab.
- Press Calibrate and follow the hints: usually turn the phone in the shape of an eight or in a circle.
- After calibration, go to the GPS tab and press Manage A-GPS state β Reset, then Download. This updates the satellite data.
The advantage of this method is that GPS Status shows the signal/noise (SNR) of each satellite and the strength of the magnetic field, and if the magnetometer values (in microteslas) jump strongly after calibration, the sensor is defective.
| Parameter | Normal value. | What to do if you don't. |
|---|---|---|
| Magnetic field (X/Y/Z) | -50 to +50 ΞΌT (indoors) | Remove the source of interference or recalibrate |
| Number of satellites | More than 8 (in open areas) | Update the A-GPS or check the antenna |
| GPS accuracy | Less than 10 meters. | Enable High Accuracy in the settings |
| Compass deflection angle | Less than 5Β° when turning | Recalibrate or check the sensor |
Typical calibration errors and how to avoid them
Many Xiaomi Mi 9 users complain that the compass doesnβt calibrate or crashes quickly, and 99% of the time itβs due to errors:
- π΅ Indoor calibration with interference: metal structures, appliances or even reinforced walls distort the magnetic field. Solution: go out into the open (balcony, park).
- β‘ Battery discharge: at a charge level below 20%, the system may not save sensor settings.Solution: charge the phone to at least 30%.
- π Interrupted calibration: if you close the application or lock the screen during the process, the data will reset. Solution: do not interrupt the process until it is completed.
- π§ Using magnet covers: even a thin magnet in a bookcase knocks down a compass.Solution: remove the case before calibrating.
β οΈ Note: If the compass still shows incorrect data after 3-4 attempts to calibrate, check the sensor for hardware damage. To do this, install the Sensor Test application (for example, AndroSensor) and compare the magnetometer readings with other devices. A difference of more than 20% indicates a fault.
π‘
If the compass only works unstable in a particular application (like PokΓ©mon GO or Google Maps), try clearing that app's cache in Settings β Apps β [Title] β Storage β Clear cache.
How to check if the compass is calibrated correctly
After calibration, you need to make sure that the sensor is working correctly.
- Real-world test: Go outside and run Google Maps. Compare the direction of the blue dot (your location) to the real landmarks (e.g., the sun at noon should be south). If the dot turns smoothly as it changes direction, the compass works.
- AndroSensor check: Install the AndroSensor app. Open the Magnetic Field tab. Turn your phone, X, Y, Z should change smoothly. The jumps are about interference.
- Comparison to a physical compass: Take a normal tourist compass. Put it next to your phone and compare it. Permissible deviation is up to 10.Β° (because of the electronics in the phone).
If the compass has passed all the tests, but the navigation applications still have a malfunction, the problem may be:
- π‘ Bad signal. GPS (check in GPS Status).
- π² Errors of the application itself (update it or reinstall it).
- π§ Incorrect settings MIUI (Enable high accuracy in location).
π‘
If the compass after calibration works correctly, but after a few days it gets knocked back down again, it's a problem in the software. Try updating MIUI to the latest version or resetting (but not data!) to Settings β About Phone β Reset.