How to check the proximity sensor on Xiaomi: from diagnosis to calibration

Owners of Xiaomi and Redmi smartphones often face a situation when during a conversation the screen does not go out if you bring the device to the ear. This is not only annoying, leading to accidental cheek presses, but also significantly accelerates battery discharge. Proper operation of the proximity sensor is critical for comfortable use of the gadget, but many users do not know how to check its condition without contacting the service center.

Sensor problems can be caused by software failures, physical damage or contamination. MIUI and HyperOS have powerful self-diagnostic tools that allow you to quickly identify the cause of the malfunction, and 90% of the time, the problem is solved by simple software calibration through an engineering menu or cleaning the sensor area from dust.

In this article, we will take a look at all the ways that sensor functionality can be tested, from standard tests to third-party applications, how to distinguish software glitch from hardware failure and what to do if the screen stops responding to the approximation, and understanding how this module works will help you avoid unnecessary repair costs.

Principle of operation and location of the sensor on Xiaomi

The proximity sensor is a small infrared module, consisting of a emitter and receiver. It emits invisible light and analyzes its reflection from objects. If the light is reflected (the object is close), the screen goes out; if not, it remains active. On Xiaomi smartphones, this component is most often hidden under the protective glass at the top of the display, next to the talk speaker. In older models, it could be carried to the upper end, making it more vulnerable to dust.

An optical sensor requires a clean surface to work properly. Any contamination, whether it's greasy prints, dust or poorly pasted protective film, can distort readings. Modern flagships use ultrasonic or laser technologies integrated directly into the screen structure, making them less susceptible to external factors, but their diagnosis requires careful attention.

⚠️ Warning: If you have recently changed a display or protective glass, make sure that the wizard used a quality glue and did not block the working window of the sensor.

Understanding the physical location of the element helps to diagnose correctly. Don't cover the entire top of the screen chaotically. You need to cover the area of the infrared emitter to the system to detect the change in light. In models with a cutout (" bangs") or a hole under the camera, the sensor often hides in a thin frame around them.

Diagnostics through CIT Engineering Menu

The most reliable and accurate way to test Xiaomi’s proximity sensor is to use the built-in CIT (Customer Integration Test) menu, which is available on all brand devices and does not require superuser rights. It allows you to test each smartphone module separately from the main operating system, which eliminates the influence of third-party applications.

To enter the test mode, you need to open the standard Phone app and type a special code. On most MIUI devices, this is a combination of ##64663##. If the code does not work, try ##6484#. Once you enter the characters, you will open a menu with a list of all available tests.

Inside the test, you'll see a numerical value and a color indicator. Usually the screen is green, and the numbers show the distance in centimeters. Hold your hand to the top of the screen without touching it. The numbers should change (often become zero or minimum), and the color of the indicator should change to red or another, indicating the proximity of the object.

β˜‘οΈ Checking in CIT menu

Done: 0 / 6

If the values don't change or change randomly even without, it indicates a problem. Some firmware versions require you to press the Calibrate button after the test to reset the readings. It's important to check in bright light to better see the changes on the screen, although the sensor itself works independently of external light.

Using code to check the sensor

There is an alternative, faster code that runs the proximity sensor test right away, bypassing the main CIT menu. Type ##7726## in the dialer. This method is convenient if you need to quickly check only one module without wandering through a list of dozens of tests. However, on new versions of HyperOS, this code can be blocked by developers.

When you run the test, the system will ask you to cover the top of the screen with your hand, if the sensor is working, the phone will vibrate or sound to confirm that it is working, a message "Pass" may appear on the screen or a green light will light up, and the lack of response indicates that the hardware is not receiving data or transmitting it to the system.

⚠️ Warning: Do not glue the top of the screen permanently, even for the sake of a test. Prolonged sensor overlap can cause the module to overheat or falsely trigger pocket mode, causing you to miss important calls.

Sometimes the code may fail due to carrier restrictions or regional firmware settings, and you should use the first method through the full CIT menu or third-party apps, and make sure that the phone settings do not include Do Not Disturb or Air Mode, which may block some system functions during tests.

What do I do if the codes don't work?
If none of the secret codes opens the menu, you may have a global version of the firmware with stripped down functionality or custom build installed. In that case, go to Settings β†’ About Phone β†’ Press 7 times on the MIUI version to enable advanced features, then try the codes again. If it doesn’t work, use the apps from the Play Market.

Verification through system and application settings

Beyond the secret codes, the basic check can be done through the standard settings menu. Go to Settings β†’ About Phone β†’ All specs (or Version of the Kernel) and find the hardware testing section. In some MIUI shells, the path looks like Settings β†’ Advanced Settings β†’ Date and Time (a rare interface bug) or through the recovery menu. However, the most affordable standard method is to check the sensor’s performance in real-world conditions through call settings.

Open the Phone app, click three dots in the corner and select Settings. Find Mode in your pocket or Approximation Sensor. This often shows the status of the module. If the switch is active but the screen doesn't go out when you call, the system can give a malfunction notification, and you can also use third-party utilities from Google Play, such as Proximity Sensor Reset or Sensor Test.

Third-party applications provide more detailed information, including a real-time graph of how values change, which helps you understand whether the sensor is "dripping" (the readings are jumping) or just dead. Popular applications like Sensor Sense, AIDA64, which show raw data, which is useful for advanced users.

πŸ“Š How often do you get your screen stuck during a call?
Every day.
Once a week.
Rarely, only in my pocket.
Never encountered it.

When using third-party software, pay attention to permissions. The application needs access to sensors, but don't give unnecessary rights to contacts or microphones unless this is directly necessary for the test. After diagnosis, such applications should be removed so that you do not waste resources in the background.

Procedure for calibration of the proximity sensor

If the sensor is working but with errors (the screen goes out too soon or later), it needs calibration. This is the process of adjusting sensitivity thresholds. On Xiaomi smartphones, calibration is often done automatically every time the device is turned on, but you can manually run it through the same CIT engineering menu.

In the test menu, select "Proximity sensor" and press the "Calibration" button. You will be asked to remove your hand from the screen and then close the sensor. The system will record the minimum and maximum light values. Once successful, the message "Success" will appear. If the calibration fails, try repeating the procedure 2-3 times, changing the angle of the hand.

For models with a virtual sensor (powered by a front-facing camera and AI algorithms), calibration may not be available manually, in which case resetting the camera settings or updating drivers through the update center helps, sometimes it helps to simply reset all the phone settings, but this is an extreme measure that requires data backup.

πŸ’‘

Before calibrating, be sure to wipe the top of the screen with an alcohol napkin. Fat spots from the ear during a conversation are the main cause of incorrect readings that the calibration will not be able to correct.

It's important to understand the difference between software calibration and physical adjustment, because if there's a crack on the sensor or it's moved away from the plume, the software methods are useless. The table below shows the main symptoms and their probable causes.

Symptoms.Probable causeMethod of decision
The screen doesn't go out when you ring.Sensor contamination or software failureCleaning, calibration through CIT
The screen goes off on its own.Damage to the plume or filmFilm removal, plume replacement
Sensor drebbing (flashing)Unstable stress or oxidationChecking contacts, resetting settings
No reaction in CIT testPhysical failure of the moduleReplacement of the sensor in the service

Program conflicts and system updates

Often the problem is not hardware, but software. After updating MIUI or Android, driver conflicts may occur. If the sensor stopped working after the update, try clearing the cache of the Phone app and system services. To do this, go to Settings β†’ Apps β†’ All apps β†’ Phone β†’ Memory β†’ Clear the cache.

Also, sensor performance can be affected by installed design themes or third-party launchers that intercept screen control. Try switching to the standard theme and the classic interface to eliminate this factor. Some optimizers and antiviruses can also block sensor access to save energy.

⚠️ Note: Installing custom firmware (Global on the Chinese version or vice versa) without first flashing the region can lead to incorrect operation of the proximity sensor due to differences in drivers.

If nothing works, consider rolling back the system to an earlier version or performing a full reset.Remember that reset will delete all data, so be sure to back up important files and contacts before starting the procedure.

πŸ’‘

If the calibration and cleaning of the cache did not help, and in the engineering menu the sensor shows β€œ0” or does not respond – this is in 95% of cases a physical malfunction that requires replacing the module.

Frequently Asked Questions (FAQ)

Why is the proximity sensor only half-functioning?
Partial operation usually means that the emitter is still functioning, but the receiver is contaminated or damaged, and it can also be a sign of oxidation of the contacts on the plume, try thorough cleaning and calibration, if it does not help, you will need to disassemble and clean the contacts.
Can the protective glass block the sensor?
Yes, this is a very common problem. Cheap glass often has opaque edges or poor transparency in the sensor area, and the glue used in the sticker could leak under the glass. Try removing the glass and checking the sensor without it.
How to check the sensor if the screen is not turned on?
If the screen is black, use voice commands (if enabled) or connect the phone to your computer. On a PC, you can use phone control software (such as Mi PC Suite or ADB) to run tests or see the sensor's logs.
Does frost affect the sensor?
Yes, at low temperatures (below -10Β°C), electronics can be unstable, lithium-ion batteries and optical sensors are sensitive to cold, and let the phone warm up indoors before making any conclusions about the breakdown.