When the screen of a Xiaomi smartphone suddenly goes out immediately after you cover the top of the display with your palm or hold the device to your ear, many users are familiar with this situation. Most often, this is the regular operation of the proximity sensor, which is designed to save battery power and prevent accidental cheek pressing during a conversation. However, in the ecosystem of MIUI and HyperOS, this mechanism sometimes works incorrectly, causing irritation when the screen turns off at the wrong time, for example, when watching a video or reading.
Understanding the way sensors work is the first step to solving the problem. The top of the case contains hidden modules that respond to changes in light and proximity of foreign objects. If the phone goes out too sharply or does not respond to closure, you need to fine-tune the system. In this article, we will discuss the technical nuances of sensors, methods of software calibration and ways to eliminate hardware conflicts that interfere with the comfortable use of the gadget.
The principle of the sensor approach in smartphones Xiaomi
The screen-locking feature is based on an infrared sensor located at the top of the front panel. In modern Xiaomi, Redmi and POCO models, this sensor is often hidden under the display glass, making it invisible to the eye but sensitive to any obstacles. When you close the top panel, the IR flux reflects off the barrier and returns to the receiver, sending the system a signal that the device is in the ear or in the pocket.
The MIUI shell signal processing algorithm is set to instantaneous response, and this is necessary for safety: if the screen does not go out during the call, the cheek may press the reset button or turn on the speaker. However, high sensitivity can lead to false positives, for example, when viewing content in horizontal mode, the finger may block the sensor area, causing unnecessary blocking.
⚠️ Warning: If the screen goes out even with minimal touch of the top bezel, there may be static or greasy film on the surface of the glass that distorts the sensor readings.
It's important to distinguish between two types of sensors that can affect screen behavior: the first is a classic proximity sensor that responds to distance; the second is a light sensor that regulates brightness; in some cases, a software conflict between these modules leads the phone to perceive the dimming of the upper part as a command to turn off the backlight.
The main reasons for spontaneous screen suppression
If your phone goes out when you close the top panel in normal operation, there may be several reasons. Most often, the problem lies in software that misinterprets sensor data. Updating the MIUI system sometimes resets calibration data, which makes the sensitivity threshold too low.
The second common cause is physical obstruction: poor-quality protective glass that doesn't have a special cutout or a clear zone at the top can block the IR port. Even a microscopic crack in the sensor's area can scatter radiation, making the phone think it's closed.
- 📱 Application Conflict: Third-party programs to clean up memory or manage calls can intercept sensor control.
- 🧲 Magnetic cases: Some smart bookcases have magnets that are too powerful to affect the electronic components at the top of the case.
- 🔋 Energy saving: Aggressive power saving settings can force the sensors or screen to shut down at the slightest change in light conditions.
When a processor or battery overheats, the system can temporarily reduce sensor sensitivity or limit the display to stabilize the condition, and if the problem only occurs after a long game or video, it is probably due to thermal throttling of the components.
Diagnostics and testing of sensors through the engineering menu
To accurately determine the malfunction, you need to use built-in diagnostic tools. Xiaomi smartphones have a special engineering menu that is accessed through the code in the Phone application, which is the most reliable way to check whether the physical module itself or the problem in the software part is working.
To get into the test menu, open the caller and type the combination ##6484##. Once you enter the code, the CIT (Customer Interface Test) interface will open. Here is a complete list of all the device modules. You need to find the item "Proximity Sensor" or "Sensor".
☑️ Testing the sensor in CIT
In the test mode, you'll see numerical values. When nothing closes the top panel, the value should be close to 0 or 5.0 (depending on the firmware version). Once you close the sensor with your hand, the value should change (usually by 1 or 200+). If the numbers don't change at all, then the sensor is not physically working or disabled in the system. If the changes occur randomly, calibration is required.
| Parameter of the test | Normal condition (open) | Normal condition (closed) | Possible problem |
|---|---|---|---|
| Sensor value | 0.0 - 5.0 | 200.0 - 255.0 | Values don't change. |
| Screen reaction | horite | Gasnet | The screen is not responding. |
| Delay. | Instant. | Instant. | Delay over 1 second |
| Status of the test | Green / Pass | Green / Pass | Red / Fail |
Calibration of the proximity sensor: software methods
If testing shows that the sensor is responding but not correctly (e.g., the phone goes out when the hand is 5 cm away from the screen, not close), calibration is necessary. This is a procedure to “train” the system to the correct thresholds. In new versions of HyperOS and MIUI 14+, automatic calibration often occurs on its own when rebooting, but the manual method is more effective.
For manual calibration, use the ##6484## engineering menu again. Go to the "Proximity Sensor" section. The screen will have a "Calibration" or "Click to Calibrate" button. The process is simple: you have to remove all items from the top of the phone, press the calibration button, wait for completion, then close the sensor with your hand and press the button again to lock the lower threshold.
⚠️ Warning: During calibration, the phone should lie on a completely flat, monochromatic surface (preferably white).Do not allow shadow from the hands or head to hit the top of the device when you press the button.
There is also a hidden method of calibrating through the Phone app. Dial ##64663## (not working on all models). If the code is active, follow the instructions on the screen. After successful calibration, be sure to restart the device so that system services apply new sensitivity factors.
What if calibration doesn’t help?
Set up exceptions and work with protective accessories
Accessories are often incompatible, and if you use a security glass, make sure it has a high-quality black bezel that does not overlap the sensor's work area, and cheap glasses can have offset cutouts or lack of transparency in the IR port area, which is perceived by the system as permanent closure.
In Xiaomi’s system settings, you can try changing the behavior of the screen. Go to Settings → Screen and look for the option “Mode in your pocket.” Disabling this feature can solve the problem of false locks, although it will increase the risk of accidental pressing. It is also worth checking the “Block” settings and disabling the “Raise to Activate” function if it conflicts with the sensor.
- 🛡️ Removal of the protective glass: Try temporarily removing the protection to eliminate its effect on sensitivity.
- 🎨 The Dark Subject: In Rare Cases OLED-activation of a dark theme changes the algorithms of the light sensor, try to switch the topic.
- 🔄 Settings reset: If the problem appears after the update, resetting all apps (not data) can restore standard sensor profiles.
For users who often watch videos horizontally, there is a lifehack. In some video players (for example, YouTube or VLC), the settings have the option “Block the proximity sensor” or “Always keep the screen on”, Activating this feature within the application takes priority over system settings.
Radical methods: resetting and flashing
If neither calibration nor de-accessories helped, and the phone continues to go out with the slightest movement of the hand above the top panel, it may be that the system files responsible for the sensor drivers are damaged. In this case, you need a full reset to factory (Factory Reset).
You can reset via the recovery menu. Turn off the phone, then press the Volume Up + Power button combination (for some models Volume Down + Power). From the Recovery menu, select "Wipe Data" → "Wipe All Data" to delete all user data and return the factory configuration of the drivers.
adb reboot bootloader
fastboot flash recovery recovery.img
fastboot rebootAs a last resort, if the problem persists after the reset, you need to flash the device through your computer using the Mi Flash Tool utility. This is guaranteed to replace all system partitions, including those responsible for the operation of hardware modules. However, this is a complex procedure that requires an unlocked bootloader.
💡
Before performing a complete reset or flashing, be sure to remove SIM-This will prevent possible damage to the external media and eliminate read errors during the process.
Frequently Asked Questions (FAQ)
Why does the screen only go out in the Camera app?
Could the mud in the speaker grid cause this problem?
Does the “Always Screen On” feature on the sensor affect?
What to do if the sensor is filled with water?
💡
In most cases, the problem is solved by removing poor-quality protective glass or recalibrating through the CIT engineering menu.