The screen goes out when you close the camera Xiaomi: the solution

The situation when the smartphone screen suddenly goes out during an important conversation or watching a video, familiar to many owners of devices Xiaomi, Redmi and Poco. Most often it happens when you hold the phone to your ear or just accidentally overlap the top of the display where the proximity sensor is located. For the Android operating system in the shell of MIUI or HyperOS, this is a signal that the device is near the ear, and it automatically turns off the light to save energy and prevent accidental brushing.

But in some cases, the sensor sensitivity is not properly tuned, or the module itself is contaminated, leading to false positives. The user may simply hold the phone in his hand, read an article or watch a movie when the display goes out, blocking the interface. This is especially annoying when you have to urgently respond to a message or take a screenshot. The main reason lies in the software algorithm for processing data from an infrared sensor located in the upper frame or under the screen.

In this article, we will discuss in detail why the screen goes out when you close the camera or the top of the case, and what methods exist to solve this problem. We will look at both standard system settings and hidden engineering menus for accurate calibration, and will also discuss hardware malfunctions and the impact of protective glasses on the operation of sensors.

The principle of the sensor approach in smartphones Xiaomi

To effectively combat this problem, you need to understand the physical nature of the phenomenon. At the top of the smartphone, often next to the speaker and the front camera, there's a special module. It consists of an infrared emitter and a receiver. The emitter emits an invisible beam that bounces off nearby objects and returns back to the receiver. The system analyzes the time and intensity of the reflection, determining the distance to the object.

When you close the camera or the top of the screen with your palm, you're actually mimicking the phone's lifting to your ear. The MIUI algorithm interprets this as the beginning of a phone conversation. At which point the operating system forcibly shuts down the display to avoid accidental earstrokes and save battery power. Under normal conditions, it's a useful feature, but when it's sensitive, it becomes an obstacle to it.

Modern models of Xiaomi use different technologies of placement of the sensor. IPS-The sensor is usually seen as a small black circle next to the camera. AMOLED-The sensor is often hidden under the screen layer, making it less visible, but more dependent on the quality of the calibration and the presence of a protective film. Incorrect interpretation of data from such a hidden sensor leads to the fact that the screen goes out even with minimal overlap of the zone.

πŸ“Š How often do you go out your screen for no reason?
Every day.
Once a week.
Rarely.
Never encountered it.

The main reasons for false alarm sensor

There are several key factors that cause malfunctions, and most often the problem is not a malfunction, but a software failure or external obstacles, and understanding the cause allows you to choose the right method of troubleshooting, without resorting to complex repairs.

The first and most common cause is pollution: Dust, greasy finger marks, or pile from your pocket can cover an infrared port, and even a thin film of dirt can scatter infrared rays, making the system think that the sensor is in front of an object at close range, in which case the screen goes out when you just hold the phone without completely covering the top.

The second important factor is security accessories, because improperly selected protective glass or film can block the sensor's range, especially for black glasses with a darkened upper band that often enters the sensor area, and cheap cases with high sides can create shadows over the sensor at a certain angle of inclination.

  • πŸ›‘ Frontal chamber contamination and dynamics of dust or fat.
  • πŸ›‘ Use of poor-quality protective glass that covers the sensor.
  • πŸ›‘ Software failure in the work of drivers MIUI or hyperos.
  • πŸ›‘ Incorrect factory calibration of the proximity sensor.
  • πŸ›‘ Conflict of third-party applications intercepting screen control.

Also worth mentioning are software conflicts, which are often noticed by some users after updating their firmware that the screen is going out more often than usual, which may be due to a change in sensitivity thresholds in the new version of Android, in which case resetting or recalibrating through the engineering menu helps.

πŸ’‘

Use microfiber and a small amount of alcohol to clean the top of the smartphone carefully. Avoid getting liquid into the speaker's openings.

Checking and cleaning the sensor area

Before you go into deep system settings, you need to rule out physical reasons. Visual inspection and high-quality cleaning solve the problem in 60% of cases. Carefully examine the top of the screen in good lighting. You are interested in the area around the front camera and the speaker.

To clean, use a special napkin for optics or soft fabric made of microfiber. If the contamination is severe, you can slightly moisturize the fabric, but in no case splash liquid directly on the screen. With careful circular movements, wipe the upper frame. Pay attention to the speaker grid, which often fills with dust that can block infrared radiation.

If you have a security glass on your phone, check it fits. It should not have any bubbles of air or chips in the top. Try temporarily removing the glass or film and checking the sensor, and if the problem is gone, it means that the accessory was the cause, and it should be replaced with a better one that has a cutout under the sensor.

⚠️ Attention! Do not use sharp objects (needles, toothpicks) to clean the speaker mesh or sensor hole.You can damage the speaker membrane or scratch the sensor, resulting in expensive repairs.

After cleaning, do a test: cover the top of the screen with your hand during a bell or in check mode. If the screen only goes out with a full and tight press of the palm, and not with a light touch, then sensitivity is normal. If the reaction remains hypersensitive, then we go to software methods.

β˜‘οΈ Cleaning the proximity sensor

Done: 0 / 5

Engineering menu and calibration of the proximity sensor

If physical cleaning doesn't work, you need to calibrate the sensor, and Xiaomi and Redmi have a special engineering code that allows you to access the hardware testing, which allows you to reset the current values and reconfigure the sensor to the current operating conditions.

To enter the test menu, open the Phone app and type ##6484##. Some models may have different codes, such as ##4636##, but the first option is standard for the CIT (Customer Integration Test). Once you enter the code, a menu with a long list of tests will open. You need to find the "Proximity sensor" or "Proximity Sensor".

In the window that opens, you'll see the current distance value, which is usually shown in centimeters or units (0 or 1). Put your phone on a flat surface, making sure nothing is covering the top. Press Calibrate. The system will ask you to remove your hand from the sensor and then, vice versa, close it. Follow the instructions on the screen.

The sequence of actions for the CIT menu:


1 Enter the code ##6484##




2.Find Proximity sensor




3.Push Calibrate.




4. Remove the hand (Wait for 0)




Close the sensor (Wait for 1)




6. Wait for the message Success

The calibration process can take a few seconds. It's important that you don't shake the phone or change the lights abruptly. If the calibration is successful, you'll see a message called "Success" or "Pass," and then you'll need to fully restart the device so that the new parameters are saved in the system. Check if the screen is now going out correctly.

What to do if calibration fails?
If the system writes Fail, try repeating the procedure 3-5 times. Sometimes it takes several cycles to pinpoint the boundaries. If nothing helps, maybe the sensor is physically faulty.

Locking and screen settings

In some cases, the problem is solved not through calibration, but through changing the interface settings. The MIUI shell offers various display modes that can affect the behavior of sensors. It is also worth checking the screen locking settings, since some smart locking functions can conflict with the proximity sensor.

Go to Settings β†’ Lock screen. You should turn off the options associated with lifting to turn on or unlocking in the face if they work incorrectly. Sometimes constantly polling sensors for these functions causes a false screen quenching. Try to switch the topic to standard - custom themes may contain errors in the screen control code.

Pay special attention to In-Pack mode, which is designed to prevent accidental taps when the phone is in the bag. If it is set too aggressively, the screen can go out even if you lightly cover the top with your hand. Turn off this feature in lock screen settings or in advanced settings to check if the problem disappears.

Setting upLocation on the menuRecommended valueImpact on the problem
Pocket mode.Settings β†’ Lock screenOff (for test)High: Often causes false positives
Lifting up for inclusionSettings β†’ Lock screenOff.Medium: Uses the same sensors
Adaptive brightnessSettings β†’ ScreenOn/offLow: rarely affects the quenching
Dark subject matterSettings β†’ ScreenAnybodyLow: Does not affect the sensor

It's also worth checking if you have a gesture control app or a black screen, which often has its own proximity sensors that can conflict with the system's, and if you start to turn off the screen after installing such software, delete the app.

πŸ’‘

Turning off In-Pack mode is the fastest software method to eliminate false screen quenching if calibration doesn’t help.

Hardware malfunctions and module repairs

If neither cleaning nor software settings work, there is a high probability of hardware failure. The proximity sensor is a physical component that can fail due to impacts, moisture or production defects, in which case the screen may go out chaotically or not go out at all.

A common cause of failure is a plume connecting the sensor board to the motherboard, which can cause the contact to break down, and the sensor module itself could burn out. In modern smartphones, the sensor is often integrated into the front camera plume or into the screen module, making it difficult to diagnose.

You can run an extended hardware test to check, and you can run an automatic test of all components in the same CIT engineering menu, and if the proximity sensor test shows a constant failure (Fail) even after multiple calibration attempts, that's a direct indication that you need to replace the part.

⚠️ Attention! Self-disassembly of Xiaomi smartphone can lead to loss of warranty.If the device is warranty service, contact an authorized service center for diagnosis and replacement of the module.

In a service center, the master will replace either the sensor itself (if it is separate), the plume, or the entire screen assembled, depending on the design of the model, and the cost of such repairs is usually small unless you need to replace the display. However, if the phone is old, sometimes it is cheaper to use a software crutch that disables the sensor than to repair the device.

Frequently Asked Questions (FAQ)

Why does the screen go out only when you call, but not on the menu?
This is normal behavior. The system activates the maximum sensitivity proximity sensor in phone call mode to prevent the cheek from pressing reset or volume buttons. In normal operation, the sensor can be polled less often or with different sensitivity thresholds.
Can I completely disable the proximity sensor on Xiaomi?
The system cannot completely disable the sensor, as it is a critical feature for calls, but it can be reduced by turning off In-Pack mode and recalibrating, and only completely disabling it is possible through root rights and modification of system files, which is not recommended for ordinary users.
Does the magnetic case affect the sensor?
Yes, magnetic latches on bookcases can create magnetic fields that work with sensors, including the Hall sensor and sometimes the proximity sensor. If the screen goes out when the case is just next to you, try changing the accessory to a non-magnetic one.
What if the problem has increased after Android update?
After major updates (e.g., switching from MIUI 12 to 13 or HyperOS), hardware configuration files are often lost, in which case be sure to calibrate through the engineering menu again, as new drivers may require different reference values.
Will resetting to factory settings help?
Hard Reset helps if the problem is caused by a deep software conflict or an error in the cache of the system. However, before you do it, make sure to back up the data, because all files will be deleted. If the reset does not help, the reason is hardware.