Why Xiaomiβs proximity sensor is failing and how to determine it
The proximity sensor in Xiaomi smartphones (including the Redmi, POCO and Mi lines) is responsible for automatically turning off the screen during a call when you hold the phone to your ear. If it doesn't work correctly, you'll encounter accidental cheekstrokes, inability to complete a call, or, conversely, an eternally burning display at the temple. The causes of failure range from software failures to physical damage: moisture under the glass, falls, factory defects, or even banal contamination of the infrared sensor.
The first sign of a malfunction is that the screen doesn't go out when you call, even if you hold the phone tightly to your ear. The second alarm is that the display turns off arbitrarily when you just hold the smartphone in your hand. In rare cases, the sensor is triggered with a delay of 2-3 seconds, which makes conversations uncomfortable. Before carrying the device to the service center, it is worth checking the performance of the sensor yourself, it will take no more than 5 minutes.
In this article, we'll look at 5 reliable diagnostic methods, from hidden engineering menus to specialized applications, how to interpret test results, what to do when software failures and when it's time to contact the wizard. And if your Xiaomi is still guaranteed, we'll show you how to save it when you check.
Method 1: Checking through the engineering menu (without root)
The most accurate method is to use a hidden engineering menu that is on all Xiaomi smartphones, which allows you to test the proximity sensor in real time, seeing its reaction to obstacles. Importantly, the codes for calling the menu differ depending on the processor (Qualcomm, MediaTek) and the version of MIUI.
For devices on Qualcomm Snapdragon (most flagships Mi and POCO F-series):
- Open the Phone app.
- Enter the combination: ##6484###.
- Select Proximity Sensor (or Approximation Sensor).
- Cover the top of the screen with your hand β the value should change from 5.00 to 0.00.
For smartphones on MediaTek (Redmi Note 8/9/10, POCO M-series):
- Enter the phone app: ##36446337##.
- Go to Hardware Testing β Sensor β Proximity Sensor.
- Check the reaction: cover the sensor with your finger β the numbers should jump between 1 (there is an obstacle) and 0 (there is no obstacle).
β οΈ Note: Not all codes work on new versions MIUI 14+. If nothing happens after entering the combination, try the alternative method in the following section.
Method 2: Testing with Sensor Test (Play Market)
If the engineering menu is not available, use third-party utilities. Innovative Apps' Sensor Test app (available on Google Play) shows the status of all sensors, including the proximity sensor, and its advantage is visualization of data in the form of a graph, which simplifies analysis.
Instructions:
- Install Sensor Test from the Play Market.
- Launch the app and find the Proximity tab.
- The screen will display a scale with two states: FAR (no obstacle) and NEAR (there is an obstacle).
- Raise your hand to the top of the screen (where the auditory speaker is located) β the status should change instantly.
What do the results mean?
- π’ The status changes quickly: the sensor works correctly.
- π‘ 1-2 seconds delay: possible contamination or weak plume contact.
- π΄ Status does not change: the sensor is faulty or disabled at the software level.
Make sure there is no protective film in the sensor area on the screen |
Close all background applications |
Turn off the power saving mode |
Check that there is no magnet case on the phone.-->
Method 3: Checking by call (quick test)
If you need to check the sensor urgently without installing apps, use a standard phone module, which doesn't give you accurate numbers, but it helps you detect gross malfunctions.
How to run the test:
- Call another phone (or use the code ##4636## to call the test menu).
- Take the call and hold the smartphone to your ear.
- The screen should be instantly turned off (within 0.5 seconds).
- Take the phone away from your ear, the display should light up again.
Typical problems with this test:
- π΅ The screen doesn't go out: the sensor doesn't pick up the obstacle, cause: pollution, plume damage, or software failure.
- π The screen flashes: the sensor is random, often involving moisture or mechanical damage.
- β³ Delay more than 1 second: Requires sensor cleaning or flashing.
π‘
If the screen doesnβt go out only in certain apps (like WhatsApp), the problem isnβt with the sensor, but with the settings of the specific software. Check the permissions for the microphone and phone in Settings β Apps.
Method 4: Diagnostics through ADB (for advanced users)
If standard methods fail, you can read the raw sensor data through the Android Debug Bridge (ADB), which requires you to connect the phone to your computer, but it gives you the most accurate information.
Instructions:
- Turn on Developer Mode on Xiaomi: go to Settings β About Phone and 7 times click on the MIUI version.
- Return to Settings β Additional β For developers and activate Debugging over USB.
- Connect your phone to your PC, install ADB Tools and execute the command:
adb shell dumpsys sensorserviceIn the output, find the proximity string. Notice the handle parameter (e.g. handle=5).
adb shell cat /sys/class/sensors/proximity/proximity_rawWhen you cover the sensor with your hand, watch the change in values. Normally, they should jump between 0 (obstacle) and 5 (free).
β οΈ Note: Some Xiaomi models (e.g. Redmi Note) 11) The path to the sensor file may be different. If the command doesn't work, try the adb shell cat. /sys/bus/iio/devices/iio:device*/in_proximity_raw.
Method 5: Visual inspection of the sensor
Sometimes the problem isn't with electronics, but with the clutter, and the proximity sensor on Xiaomi is next to the front camera and the auditory speaker, which is a small circular hole (or two on some models) that emits and receives infrared signals.
What to check:
- π Dust and dirt: Use a soft brush or compressed air (a canister to clean the technique) to remove particles from the hole.
- π§ Moisture: If the phone fell into the water, the sensor could oxidize.
- π‘οΈ Protective glass/film: some films block the IR signal. Try to remove it and repeat the test.
- π§ Mechanical damage: cracks in the glass above the sensor or dents in the case can distort the signal.
On Xiaomi models with AMOLED-screens (e.g. Mi 11, POCO F4) The proximity sensor is often integrated into the display, and in this case, visual inspection is useless, and software diagnostics are required.
What does the proximity sensor look like on popular Xiaomi models
Table: Common faults and their solutions
| Symptoms. | Probable cause | Decision |
|---|---|---|
| The screen doesn't go out when you ring. | Sensor contamination, software failure | Clean the sensor, reset the network settings (Settings) β SIM-map β Reset) |
| The screen goes out arbitrarily | Damage to plume, moisture | Disassemble phone, check contacts (experience required) |
| Delayed response 1-2 seconds | Weak sensor signal, outdated firmware | Update MIUI, calibrate the sensor through the engineering menu |
| The sensor only works in some applications. | Permit conflict | Reset permissions for a problem application (Settings β Apps β Permissions) |
| The sensor is not responding at all. | Hardware breakdown | Replacement of sensor or plume in the service center |
What to do if the sensor is not working: a step-by-step plan
If all tests show that the proximity sensor is faulty, follow the algorithm:
- Sometimes the crashes are temporary and disappear after the reboot.
- Update MIUI. Go to Settings β About Phone β System Update and install the latest version.
- Reset the network settings. This will help if the problem is related to the telephony module: β SIM-map β Resetting network settings.
- Calibrate the sensor. In the engineering menu (see Method 1), find the Calibration option and follow the instructions.
- Check on another launcher. Set the standard MIUI launcher (if you use a third-party launcher) and repeat the test.
- If nothing works, you need to replace the sensor or plume, the average cost of repair is 800-2000 rubles depending on the model.
β οΈ Note: On Xiaomi models with a sealed body (for example, Mi 11 Ultra, POCO F5) If you replace the sensor yourself, you'll lose water resistance, and then you'll have to have an authorized service that replaces the adhesives and the gaskets.
π‘
If the phone is warranty, do not open it yourself! Contact the official service center Xiaomi with the results of your tests - this will speed up the diagnosis and keep the warranty obligations.