Many owners of Xiaomi smartphones and sub-brands Redmi or POCO face an obvious problem: while listening to voice messages in popular messengers, the deviceโs screen suddenly goes out, not because of energy savings, but because of the operation of the proximity sensor, which mistakenly interprets the position of the phone in the ear as the beginning of a telephone conversation, as a result, the system blocks the display to prevent accidental cheekstrokes, but the user has to turn on the screen again to see the context of the correspondence or respond.
Making matters worse, the MIUI shell and its new version of HyperOS have aggressive sensor control algorithms, often culprits being security windows that overlap the top of the display, or software failures in the Phone and SystemUI system application. Understanding the physical nature of this phenomenon is the first step to solving, because in many cases the problem lies not in the breakdown, but in the logic of the software.
In this article, we will discuss in detail the mechanics of sensors, methods of software calibration and methods of circumventing the constraints that the manufacturer implements for security, you will learn to distinguish between hardware defect and software glitch, and also learn how to turn off the screen lock when playing audio while maintaining the functionality of the phone as a whole.
Physics of the process: how the proximity sensor works
The main culprit behind the screen going out is the infrared proximity sensor at the top of the smartphone, which is often hidden under the display in modern models, making it more sensitive to contamination and calibration errors. The principle of its operation is simple: it emits an IR ray and reads its reflection. If an object (for example, a finger or cheek) is closer to 2-3 centimeters, the system receives a signal of approach.
When you hold your phone to your ear to listen to a voice message, you automatically activate this mechanism. However, unlike a regular call, messengers like WhatsApp or Telegram don't always correctly process the "conversation is over" state. If you remove the phone from your ear but the sensor still "sees" your finger or edge of the case, the screen will remain off until the timeout goes off or you press the power button.
๐ก
Try to slightly change the angle of the phone while listening to a message โ this often helps the sensor to โlet goโ the screen if it is blocked falsely.
Importantly, in models with a cut-out droplet or hole in the screen, the sensor can be shifted to the side. Using thick black-framed protective glasses often overlaps the sensitivity zone, creating a constant approach effect. In such cases, the system thinks that the phone is constantly in the ear, and blocks the display immediately after the sound is played.
- ๐ด The sensor emits invisible light and measures the time of its return.
- ๐ก Excessive sensor sensitivity โ a common problem of stock firmware.
- ๐ข Contamination of the top of the screen with fat leads to false positives.
- ๐ต Some cases physically cover the area of the sensor.
Interface problems MIUI and HyperOS
Xiaomiโs shells are known for their deep modifications of standard Android. One such modification is the rigid binding of screen locks to media playback events in certain applications. The system tries to predict user actions, but the algorithms often work incorrectly. For example, the โpocket modeโ function can be activated too early if the phone is lying on a surface with an uneven texture.
Another aspect is optimizing the background processes to save battery power, MIUI It can aggressively "sleep" the display if the messenger application goes into the background or changes the focus of the input. AMOLED-It's a system that mistakenly classifies listening to voice as a pause in use.
โ ๏ธ Warning: Forced shutdown of system services responsible for sensors through ADB This can cause the ear-to-ear function to fail during normal calls.
Users often notice that after updating the firmware, the problem appears or, conversely, disappears. This is due to the fact that Xiaomi engineers periodically change the sensitivity thresholds in the drivers. If you have a problem after the update, most likely, the logic of Proximity Sensor in the kernel of the system has changed.
Settings of the proximity sensor in the engineering menu
You can use a hidden engineering menu to diagnose and set up the initial setup, which is a safe way to check if the phone sees you at all, and you use a special code in the call app to log into the hardware test menu, so you can weed out software errors from the physical sensor failure.
In the menu that opens, you'll find the item associated with the Proximity Sensor. Here you'll see a graph or numerical values that change when you hold your hand to the top of the screen. If the values don't change or change randomly, you may need calibration. Some versions of MIUI have automatic calibration available that resets the base values of the sensor.
##6484##Type this code in the Phone app to get into the CIT (Customer Information Test) menu. Search the Proximity Sensor list and click on it. Stick your finger to the top of the screen and remove your finger - values should vary from 0.0 to 5.0 (or similar). If the value is stuck, the screen will go out constantly.
โ๏ธ Testing the sensor in CIT
Solutions through hidden developer settings
There's a deeper level of customization that's available through the developer menu, where you can control how you interact with sensors, but be careful, because changing those settings affects all applications that use a light sensor, and it's a powerful tool that requires understanding the implications.
To activate the developer menu, you need to click on the MIUI version several times in the About Phone section. Once the corresponding notification appears, go to the advanced settings. Find the section associated with sensors or input. Some firmware has the option Disable Proximity Sensor, but it is rare and mostly in test builds.
A more effective method is to use the ADB command to change system flags, which allows you to disable the screen lock specifically for multimedia streams without affecting phone calls, which requires a computer connection and the presence of debugging over USB.
| ADB Team Team | Description of action | Risk of error |
|---|---|---|
| settings put system proximity_on_turn_on 0 | Disables the screen response to the sensor when turned on | Low. |
| settings put secure proximity_sensor_enabled 0 | Completely shutting down the sensor (not recommended) | High-pitched |
| adb shell pm disable-user --user 0 com.miui.screenrecorder | Disabling system notes (sometimes conflict) | Medium. |
| Use with caution | May require resetting of settings | Only for the experienced. |
How to install ADB on your computer?
The influence of third-party applications and messengers
WhatsApp, Telegram and Viber have their own playback settings, and recent versions have features that force the audio to "earpiece" when the phone is held, which automatically activates the proximity sensor.
In the settings of the messenger itself, you can often find the option "Push to the ear" or "Replay audio." If this feature is active, the application will ignore your actions with the volume buttons and rely only on the sensor. Disabling this option transfers the sound immediately to the main speaker, and the screen stops turning off, since the system does not go into phone conversation mode.
Itโs also worth checking the app permissions. If the messenger is not allowed to control sensors or screen in the background (which energy-saving MIUI profiles often do), it can behave unpredictably. Make sure that your main communication applications have a โNo Limitsโ profile in the battery settings.
- ๐ฑ Turn off "Ear Address" in Telegram settings (Settings) โ chat).
- ๐ฑ On WhatsApp, this option is in Settings. โ chat โ To the ear.
- ๐ฑ Check if the application is not worth the energy saving mode.
- ๐ฑ Update the messenger app to the latest version.
โ ๏ธ Attention: After updating the messenger settings may reset. Always check the playback settings after the app update.
Hardware causes and protective accessories
If software isn't working, you should look at the physical state of the device. As mentioned earlier, the protective glass is the sensor's main enemy. Even a slight shift in the glass when you stick it or its poor quality (too thick adhesive or black bezel) can block the IR beam. Remove the case and wipe the top of the phone with an alcohol napkin.
The problem can also be the deformation of the body after a fall: a microscopic shift in the plume of the display or the sensor module itself leads to the fact that it โlooksโ not directly, but at an angle. In such cases, software calibration gives only a temporary effect, and a visit to the service center is required to re-adhearse the sensor or replace the plume.
๐ก
In 80% of cases, the problem is solved by removing the protective glass or adjusting the sensitivity in the engineering menu, not repairing.
On older models with mechanical home buttons or capacitive buttons, the sensor is often located next to the speaker. On new models with subscreen sensors, screen cleanliness is critical. The fat spots at the top of the display create a โconstant touchโ or approach effect, causing the screen to dim at every opportunity.