The modern smartphone is a complex mechanism in which every element, even the most inconspicuous, plays a critical role. One of these components is the proximity sensor, which often stays in the shadow of usersโ attention until it starts to fail. Owners of Xiaomi, Redmi and POCO devices often face a situation where the screen goes out during a conversation or, conversely, refuses to respond to the hand being brought to the top of the case.
To understand why an infrared sensor is behaving incorrectly, we need to understand the physics of the process and the software algorithms that control this node. It is this module that is responsible for saving battery power and preventing accidental cheekstrokes during a call. In this article, we will look in detail at the device, methods for its accurate calibration and ways to eliminate common software errors.
Principle of operation and location of the sensor
The sensor is based on infrared light that is invisible to the human eye. At the top of the smartphone body, usually next to the speaker, there's a emitter and a receiver. When you bring the phone to your ear, the IR ray bounces off the surface of your cheek and returns to the receiver, sending the system a signal to lock the display.
Xiaomiโs current models often use a virtual sensor that emulates the operation of a physical sensor using artificial intelligence algorithms.This allows manufacturers to make screens without cutouts and bezels, but sometimes leads to false positives in the pocket or when using protective glasses.
โ ๏ธ Warning: If you use a wide black-framed protective glass, it can block the sensor's area of operation, causing the screen to lock permanently.
The accuracy depends on the cleanliness of the surface and the absence of foreign objects. Even a thin layer of fat or dust can distort the reflection of the signal, making the system think that the phone is near the ear. Regularly rubbing the top of the case with a soft cloth helps to avoid many false positives.
๐ก
Use microfiber to clean the speaker area โ the fuzzy tissues can leave microscopic fibers interfering with the sensor.
Diagnosis and check of health
Before you start to complex manipulations with the engineering menu, it is worth doing a basic diagnostics. In the shell of MIUI and the new HyperOS, a powerful testing tool is built in, allowing you to check the health of all hardware modules without installing third-party software.
To start the diagnosis, open the Phone app and enter the universal code ##64663##. In the CIT menu that opens, select โProximity sensor.โ You will be asked to close the top of the smartphone with your hand โ if the counter increases and the screen goes out, then the part is working.
- ๐ Check if the indicator responds to hand movement at a distance 2-3 centimeter.
- ๐ฑ Make sure that no background processes are running during the test that block the sensor.
- ๐งน Clean the speaker area of contamination before re-checking.
- ๐ Restart the device if the test freezes in the initialization phase.
If the sensor is unstable in a standard test, the problem may be a software conflict, and some third-party applications for managing calls or recording conversations can intercept the sensor without giving it back to the system.
Calibration through the Engineering Menu
The most effective way to fix a software failure is to perform a forced calibration, which resets the current sensitivity values and forces the system to relearn how to determine the distance to the object, without the need for superuser rights.
Go to the diagnostic menu with code ##64663## and select "Proximity sensor." The "Calibration" button will appear on the screen. Place your phone on a flat horizontal surface so that nothing covers the top of the case. Press the calibration button and wait for the process to complete, which usually takes a few seconds.
Once you're successful, you'll see a message called "Pass" or "Calibration Success." If the process fails, repeat the procedure 2-3 times. In rare cases, you'll need to reset your system completely to apply new calibration settings.
โ๏ธ Calibration algorithm
Setting Sensitivity in Hidden Menus
Some versions of Xiaomi firmware offer advanced settings for trigger thresholds, especially for users who wear a phone in tight cases or use custom protective glass.
To access advanced settings, you sometimes need to activate the developer mode. Go to Settings โ About phone and 7 times click on the build number. Then, in the โAdditionalโ menu, find the โDraw-up Sensorโ item. Here you can change the sensitivity factor.
| Parameter | Default value | Recommended value | Impact |
|---|---|---|---|
| Threshold Low | 200 | 150-250 | Removal response threshold |
| Threshold High | 500 | 450-550 | Approaching trigger threshold |
| Delay Time | 0 ms | 100-200 ms | Delayed reaction (anti-drop) |
| Sensitivity | Medium | High/Low | General sensitivity of the module |
Changing these parameters requires caution. Too low values can cause the screen to not go out even when pressed tightly against the ear. Too high values will cause permanent false locks in the pocket.
Risks of changing system parameters
Virtual sensor problems and solutions
Many modern Xiaomi models, such as the Mi 11 series or Redmi Note 10, lack a physical IR sensor, instead using an algorithm that analyzes data from an accelerometer, gyroscope and camera, which creates unique problems that can not be solved by simply cleaning glass.
The main difficulty of the virtual sensor is that it can respond to glare, sudden changes in lighting, or even certain colors of clothing lying next to the phone. If your screen goes out for no reason, try turning off the Smart Lock or Pocket Mode feature in the lock settings.
- ๐ซ Turn off โMode in your pocketโ in the lock screen settings.
- ๐ Check if the camera is closed with a cutout case.
- ๐ Reduce the brightness of the autobrightness if it is not working properly.
- ๐ Update the firmware to the latest available version.
In some cases, patches or modified cores that change the algorithms of the virtual sensor can help, but this requires unlocking the bootloader, which can invalidate the warranty.
๐ก
A virtual sensor depends on the quality of the MIUI algorithms, so updating the system is often the only way to fix it.
Third-party management applications
If regular funds do not help, specialized applications from the Google Play store come to the rescue. Programs like โProximity Sensor Reset & Fixโ or โSensor Testโ allow you to conduct a deep diagnosis and forcibly restart the sensor driver.
These utilities often feature Force Calibration, which ignores system limitations, and can be especially useful on older devices where drivers may have been damaged after an Android update.
โ ๏ธ Note: Only download sensor applications from trusted developers. Deep access programs can collect data about your actions.
Sometimes installing such an application creates a conflict with the system service com.android.phone. If after installing third-party software problems worsen, delete the application and reset the network settings.