Why the proximity sensor on Xiaomi does not work

When the proximity sensor on Xiaomi’s smartphone stops responding, it’s one of the most annoying issues for users. Instead of turning the screen off while talking, the display keeps burning and you accidentally press the volume or reset buttons with your cheek, not only hindering comfortable communication, but can also lead to random actions such as putting the call into hands-free mode or setting it on hold.

The root of this malfunction is often software conflicts between MIUI or HyperOS, which misinterpret sensor signals, but there is no way to rule out the physical contamination of the upper speaker area where the infrared emitter is usually located, or the consequences of a recent device crash. Understanding the nature of the failure is the first step to successfully restoring the functionality of the gadget.

In this article, we'll go into all the possible reasons why the sensor is not behaving properly, and we'll offer proven solutions. From simple manipulation of the protective film to hidden engineering menus, you'll get a full set of diagnostic tools. You don't have to bring the phone to the service right away, because in most cases, you can fix the problem yourself in a few minutes.

The main causes of failures in the sensor

The first thing to rule out is the banal physical obstacle. The proximity sensor on Xiaomi is a tiny infrared module located next to a speaker. If there's a protective film or glass on the screen that doesn't have a special cutout, or if they're just contaminated with fat and dust, the infrared beam bounces back, and the system thinks the phone is near the ear.

⚠️ Attention: Even a microscopic layer of dust in the grid, the speaker can block the signal. Carefully wipe the top of the device with a soft cloth soaked in an alcohol solution.

The second common cause is software bugs after a firmware update. Xiaomi engineers periodically change the algorithms for working with hardware, and sometimes new versions of Android conflict with sensor drivers. In this case, the calibration can go wrong, and the phone will no longer understand when the object is close and when far.

Also consider the impact of third-party applications: some call management software, voice recorders or memory cliners can intercept the sensor's control. If a problem occurs immediately after installing a new software, try removing it and checking the phone's performance in clean mode.

Checking and cleaning the sensor area

Before you go into complex settings, you need to make sure that the device is physically clean. On models with a notch or a hole (punch-hole), the sensor is often hidden under the layer of the display, but on classic models with a frame it is visible to the naked eye. Pollution in this area is the main reason why the screen does not go out.

Use a dry toothbrush with soft bristles to gently dust out of the speaker grid. Movements should be light to avoid damaging the membrane. If you carry the phone in a case, check if it covers the side of the sensor area. Some tight cases can mechanically press the area of the sensor, distorting its readings.

πŸ’‘

Use a regular stationery eraser for careful cleaning of the plastic frame around the speaker - it perfectly removes fat plaque, which is not visible to the eye, but blocks IR rays.

After cleaning, make a test call, and if things haven't changed, it's probably a software part, and it's important to understand that even a small amount of skin fat left over from a conversation can create enough film to disrupt the infrared diode.

Calibration methods for the proximity sensor

If physical cleaning didn't work, you need to do software calibration, and there's a hidden engineering menu in the MIUI shell that allows you to reset the sensor to factory values, and that's the most effective way to fix the situation when the sensor is bugging for no apparent reason.

To access the diagnostics, open the Phone app and dial ##6484##. The CIT menu will open for you. Find the Proximity Sensor item in the list. Click on it and follow the instructions on the screen: usually you need to close your hand on the top of the phone and then remove your hand.

β˜‘οΈ Calibration order in CIT

Done: 0 / 1

After successful calibration, the value should change, and at the end of the test, a Pass button will appear. If the test is passed, but the problem persists, try restarting the device. In some cases, you need to repeat the procedure 2-3 times so that the system finally remembers the correct values.

⚠️ Warning: Do not press the Fail button during the test unless you are sure of the result, this may reset the calibration to an incorrect state, and you will have to start the process again.

Settings through the Engineering Menu and ADB

For advanced users who don’t have standard calibration, there are deeper customization methods, sometimes helping to change the sensitivity through the engineering menu available under the code ##3646633#. However, this method does not work on all processors (MediaTek vs. Snapdragon) and can be dangerous for inexperienced users.

A safer and more versatile option is to use ADB (Android Debug Bridge) debugging, and by connecting your phone to your computer, you can send a command to reset the sensor settings, which is especially true if the CIT menu is missing or there are errors.

adb shell settings put system proximity_sensor_use_debounce 0


adb shell settings put system proximity_sensor_check_distance 3

These commands change the debounce and the response distance. The 3 is standard, but it can be varied. Once you have the commands, make sure you reboot the smartphone completely.

What if the ADB can’t see the phone?
To work, ADB must enable Developer Mode. To do this, click on MIUI Version 7 times in the About Phone settings. Then activate USB Debugging in the advanced settings.

Influence of protective glasses and accessories

Very often, users are unaware that the cause of the malfunction was a recently pasted protective glass. Cheap accessories can have too thick adhesive layer or poor quality glass that scatters infrared radiation. The sensor sends a signal, it reflects off the inner surface of the glass and comes back, blocking the screen.

To test this theory, carefully remove the protective coating and wipe the screen. If the sensor is working correctly after that, you will either have to accept the lack of protection, or buy a quality glass labeled "Compatible with Proximity Sensor" or has a special cutout.

πŸ’‘

The quality of the protective glass directly affects the operation of the sensor: cheap copies often block the IR beam, making calls impossible without the use of hands-free communication.

Also, look at the magnetic rings for holders in the car. If the ring is glued too close to the upper end, the magnetic field can theoretically affect the operation of electronic components, although this is less common than the problem with light reflection.

Comparison of models and hardware features

The proximity sensor issues are widespread in certain smartphone series, such as the Redmi Note line and some Poco models, which have historically had software bugs in early firmware, and understanding the hardware architecture of your device helps you find a solution faster.

Model/SeriesType of sensorFrequent problemRecommended solution
Redmi Note 8/9/10Virtual (under the screen)High sensitivity to filmsFilm removal, CIT calibration
Xiaomi Mi 9T / K20Mechanical (retractable)Contamination of the machineryCleaning of the retractable module
Poco X3 NFCInfrared (framed)Failure of drivers after the updateResetting, flashing
Redmi 9A / 9CClassic IRLow sensitivitySetup via ADB

As you can see from the table, the location of the sensor plays a key role: virtual sensors embedded under the display are most affected by external factors, such as the quality of the protective coating. Mechanical sensors found in older models with a retractable camera suffered from dust entering the housing.

πŸ“Š What problem does the proximity sensor have you encountered?
Screen goes out immediately, not allowing to press the button: Sensor works only in the horizontal position: No problems, everything works perfectly

When hardware component replacement is required

If neither cleaning nor calibration nor flashing has helped, there is a high probability of hardware failure, and the proximity sensor is a physical module that could have failed due to impact, moisture or just factory defect, and then software methods are useless.

Symptoms of hardware failure often include persistent false positives (the screen goes out on its own in your pocket) or a complete failure to react to the approach of any objects. In the CIT engineering menu, the test will show a value of "0.0" (closed) constantly, even if the hand is removed from the screen.

Replacing the sensor in modern Xiaomi smartphones often requires replacing the plume to which it is soldered, or even completely replacing the display module, since the sensor can be integrated into the design of the screen. This is an expensive procedure, so before contacting the service make sure that you have tried all the software methods.

Can a virus block the sensor?
In theory, malware can intercept sensor control, but in practice, this is extremely rare, most often the fault of aggressive battery optimizers or applications for managing calls that the user installs himself.
Will resetting to factory settings help?
Yes, a full reset deletes all user data and returns the system to its original state, which eliminates software conflicts, but it won't help if the problem is caused by physical damage or glass failure.
Why did the Android sensor disappear after the update?
The update could change the algorithms of the drivers, in which case it helps to recalibrate through the engineering menu or wait for a patch from the manufacturer fixing the bug of the new firmware version.
Does the sensor have an effect on the "In your pocket" mode?
Pocket Mode uses the proximity sensor to block random taps, and if that mode is on and the sensor is contaminated, the phone can behave unpredictably. Try turning it off in the lock settings.