Why the screen dims when listening to voice on Xiaomi

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.

๐Ÿ“Š How often do you lock your screen when listening?
Constantly, very annoying.
Sometimes it depends on the application.
Rarely, hardly ever notice.
Never, I have a different model.

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

Done: 0 / 6

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 TeamDescription of actionRisk of error
settings put system proximity_on_turn_on 0Disables the screen response to the sensor when turned onLow.
settings put secure proximity_sensor_enabled 0Completely shutting down the sensor (not recommended)High-pitched
adb shell pm disable-user --user 0 com.miui.screenrecorderDisabling system notes (sometimes conflict)Medium.
Use with cautionMay require resetting of settingsOnly for the experienced.
How to install ADB on your computer?
To work with ADB commands, you need to download the Platform Tools package from Google's official website. Unpack the archive, open the command line in the folder and connect the phone with debugging enabled via USB. Enter the adb device command to check the connection.

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.

Why does the screen go out only on WhatsApp, and not on Telegram?
Different apps use different Android APIs to work with sound. WhatsApp uses Call Audio mode more aggressively, which is tightly tied to the proximity sensor. Telegram and Viber often use a media stream that does not require locking the screen, a special option is included in the chat settings.
Can a virus cause a screen lock?
In theory, it can control sensors, but in practice, it's rare, and most often the culprit is a conflict between system libraries after a failed MIUI update or the installation of questionable memory cleaners that go into system settings.
Will the sensor calibration reset my personal data?
No, calibration of the proximity sensor through the engineering menu or ADB-The team only affects the system configuration files of the equipment. Your photos, contacts and correspondence will remain intact.