Xiaomi 12 is a flagship smartphone with advanced hardware, but even in such a device can have problems with the proximity sensor. This small but important sensor is responsible for turning off the screen during phone conversations, preventing accidental pressing of the cheek or ear. However, users often find that the screen does not go out when you bring the phone to the ear, or vice versa β does not turn on after the call is completed. In this article, we will discuss how to properly configure the proximity sensor on Xiaomi 12, calibrate it manually and fix typical malfunctions.
Proximity sensor problems can be caused by software failures (e.g., after a MIUI update) and hardware defects (sensor contamination, plume damage).We will look at all possible diagnostic and solution methods, from basic settings to hidden engineering menus. We will focus on sensor calibration, which often solves the problem without going to the service center.
If you notice that the Xiaomi 12 screen is unpredictable during a call, whether it turns on/off spontaneously or does not react to an approach, donβt rush to carry the phone for repair. In 80% of cases, the problem can be fixed by yourself following our recommendations. And for those who like to dig deeper, we will reveal the secrets of the engineering menu and sensor testing through ADB.
What is a proximity sensor and how it works on Xiaomi 12
The proximity sensor is an infrared sensor located at the top of the Xiaomi 12 screen (near the speaker and the front camera), its main task is to detect when the phone is near the ear or other object, and automatically turn off the screen light during a call.
- π± Accidental taps on the screen with the cheek or ear
- π Unnecessary battery consumption (screen is one of the main consumers of energy)
- π€― Discomfort from the screen on during a conversation
The Xiaomi 12 uses an infrared proximity sensor that emits invisible light and analyzes the reflected signal. If an object (such as an ear) is too close, the sensor sends a command to the system to turn off the display. Once the object is removed, the screen is turned on again, ideally this process should be instantaneous, but in practice users often face delays or false positives.
It's important to understand that the proximity sensor works in tandem with a light sensor (which regulates the brightness of the screen). Sometimes failures in one sensor can affect the other. For example, if the light sensor is contaminated, this can lead to a malfunction of the proximity sensor. On Xiaomi 12, both sensors are located in the same module, so their cleanliness and serviceability are critical.
β οΈ Attention: If the proximity sensor stopped working after the phone fell or moisture hit, the problem is likely hardware.
Signs of malfunctioning proximity sensor on Xiaomi 12
How do you know if your Xiaomi 12βs proximity sensor isnβt working properly?
- π΅ The screen does not go out during the call, even when the phone is held to the ear.
- π¦ The screen does not turn on after the conversation is over (you have to press the power button)
- π€ The sensor is triggered arbitrarily β the screen goes out for no reason or flashes during a call.
- π± In some applications (for example, in messengers for voice messages), the screen behaves unpredictable.
- π§ After updating MIUI sensor stopped responding to the approach
If you see any of these signs, it means that the sensor needs adjustment or diagnosis, but before you start calibrating, make sure that the problem is not with the protective film or the case, because too thick film or a case with high sides can block the infrared signal of the sensor, which causes it to fail.
It is also worth checking whether Do Not Disturb or Save Battery is activated, some users confuse their effect with a sensor malfunction, for example, in Extreme Saving mode, the system can turn off sensors to reduce power consumption.
Basic setting of the proximity sensor through the Xiaomi 12 menu
Before you start to make complex manipulations, try the basic settings. In most cases, the problem is solved through the standard Xiaomi 12 menu.
- Open the Settings β Screen.
- Scroll down and find the Automatic Screen Shutdown (or Approach Sensor in some versions of MIUI).
- Make sure the switch is activated. If it's not activated, move on to the next step.
- Go back to the main Settings menu β Applications β Application Management.
- Find the Phone app and open its settings.
- Check Permissions: The app must have access to body sensors and phone calls.
If your version of MIUI doesn't have an explicit point to adjust the proximity sensor, it doesn't mean it doesn't. The manufacturer often hides these options in the engineering menu. But before you climb in, try resetting the screen settings:
- Go to Settings β System β Resetting settings.
- Select Reset screen settings (not to be confused with a full reset!).
- Confirm the action and restart the phone.
This method helps in 30% of cases when the failure is caused by a configuration conflict after the update. If the problem persists, proceed to calibration.
βοΈ Preparation for calibration of the proximity sensor
Calibration of the proximity sensor through the engineering menu
If the basic settings didn't work, it's time to move on to calibrating the sensor, and for that, we're going to need the Xiaomi 12 engineering menu, which is hidden from the general public, and there are two ways to get there: through code or through ADB. We'll look at both.
Method 1: Through Secret Code (Simple Method)
The fastest way to open the engineering menu is to enter a special code in the Phone app:
- Open the standard phone application.
- Go to the keyboard tab (as if you are going to dial a number).
- Enter the code: ##6484## or #4636###.
- If the code works, you will see the Testing menu or the Engineering menu.
If the code doesn't work, your version of MIUI is blocking this method, so use method 2 with ADB.
Method 2: ADB (for advanced users)
For this method, you'll need a computer with ADB drivers installed and USB debugging enabled on your phone.
- Activate Developer Mode: Go to Settings β About Phone β Click 7 times on the MIUI version.
- Return to Settings β Additional β For developers and enable USB debugging.
- Connect Xiaomi 12 to your computer and confirm the debugging permission.
- Open the command prompt (or Terminal on Mac/Linux) and type:
adb shell am start -n com.android.settings/.DevelopmentSettingsAfter completing the command, the developer menu will open, where you can find additional options for testing sensors.
When you're in the engineering menu, look for the Proximity Sensor section, and here you'll see the current sensor readings in real time.
- Press Calibrate (or Calibration).
- Follow the instructions on the screen: usually you need to close and open the sensor with your hand.
- After completion, save the settings and restart the phone.
β οΈ Attention: Incorrect calibration may worsen the sensor. If the problem worsens after the procedure, reset the screen settings (described above) and recalibrate.
What to do if the engineering menu is not opened?
Checking the proximity sensor with third-party applications
If you don't want to mess around with the engineering menu or it's not available, you can use third-party tools to diagnose the sensors, and they show real data from the sensors and help you see if the proximity sensor is working.-3 apps 12:
| Annex | Functions | Reference |
|---|---|---|
| Sensor Test | It shows the values of all sensors in real time, including the approximation, and there's a validation test. | Google Play |
| Phone Doctor Plus | Full phone diagnostics, including sensor, screen, battery tests, suitable for detecting hardware problems. | Google Play |
| CPU-Z | It shows the phone's specifications, including sensor information, and it's useful for checking if they're in the system. | Google Play |
How to use the Sensor Test to check the proximity sensor:
- Install and open the application.
- Go to the Proximity tab (or Approximation Sensor).
- Look at the current value. Usually 0 means there are no objects nearby, and 1 or 5 (depending on the model) means that the object is detected.
- Close the sensor with your hand, the value should change, and if it stays 0 or changes unstablely, the sensor is defective.
If the app shows that the sensor is working correctly, but the problem during calls remains, it is likely that the firmware or conflict with another application (for example, with a launcher or a Magisk module, if you have root).
π‘
If the proximity sensor is working too late (the screen is going out with a delay), try turning off animations in the developer settings. To do this, go to Settings β For developers and set all three animation options (Animation Score, Transition Animation Score, Animation Duration Duration Scale) on Off..
Fixing software failures: reset, update, and clean firmware
If the calibration and application testing didn't work, the problem could be in the software.
- π Update. MIUI Sensor bugs are often fixed in new builds. Check the updates in Settings. β The phone. β Updating the system.
- π§Ή Clear the cache. Go to Settings. β Memory. β Clear the cache. It won't delete your data, but it can solve the problem with the sensor hanging.
- π² Reset the settings of the Phone app. Go to Settings. β Annexes β Application management β Phone. β Warehouse β Clear the data. Attention: this will delete the call history!
- π§ Perform a factory reset (last resort). Pre-backup data through Settings β The phone. β Backup.
If you use custom firmware (like LineageOS or Pixel Experience), the problem may be building it. Try flashing your phone to an official MIUI via Fastboot or Mi Flash Tool. Firmware instructions can be found on the Xiaomi.eu or 4PDA forums.
It's also worth checking if the sensor is in conflict with the Magisk or Xposed modules installed. Turn off all modifications and check the sensor's performance. If the problem is gone, turn on the modules one by one to find the culprit.
π‘
Before resetting to factory settings, make sure to check if your contacts are saved to your Google or Mi Cloud account.
Hardware problems: when you need to replace the sensor
If all software methods have been tried, but the proximity sensor on the Xiaomi 12 still doesnβt work, itβs probably a hardware problem.
- π§ Moisture infestation β even if the phone hasnβt sunk, condensation or high humidity can damage the sensor.
- π₯ Hit or fall β the sensor may move away from the board or the plume may be damaged.
- π§΄ Sensor contamination β dust, fat, or adhesive residue from the film blocks the infrared signal.
- π Problems with the plume β oxidation or break of contacts on the flexible plume of the sensor.
It is difficult to diagnose a hardware malfunction on your own, but you can try the following:
- Carefully clean the sensor area (top of the screen) with an alcohol wipe.
- Light a flashlight on the sensor β if it is contaminated, you will see stains or stains.
- Check if the top of the screen is moving away (sometimes after the display is replaced, the sensor stops working due to improper assembly).
If you suspect a hardware breakdown, it is better to contact the service center.Replacement of the proximity sensor on Xiaomi 12 is inexpensive (from 800 to 1500 rubles depending on the region), but requires accuracy - the sensor is soldered to a flexible plume, which is easy to damage if unqualified repair.
β οΈ Warning: If you choose to replace the sensor yourself, buy only original parts. Cheap Chinese counterparts often have incompatible connectors or incorrect calibration, which will lead to repeated failures.