Setting up the proximity sensor on Xiaomi Redmi 9

Redmi 9 smartphones have proven to be reliable devices with excellent value for money, but the software features of the MIUI shell sometimes require manual fine-tuning. One of the most common problems that users face is the incorrect operation of the proximity sensor, which does not go out during a conversation or, conversely, turns off prematurely. This creates significant discomfort when communicating, since the cheek can accidentally press the end button or turn on the speaker.

In this article, we will discuss in detail how to turn on the proximity sensor on the Xiaomi Redmi 9, conduct its accurate calibration and eliminate software failures. It is important to understand that in most cases, the problem lies not in the physical failure of the sensor, but in a software conflict or calibration failure after a system update.

We will look at both standard methods through the engineering menu and more advanced methods using hidden test codes. AMOLED-screens IPS-The algorithms of the sensor may vary slightly depending on the firmware version. Follow the instructions consistently to achieve the perfect result.

The operating principle and location of the sensor on the Redmi 9

The proximity sensor on Xiaomi Redmi 9 is an infrared sensor that detects the distance from the phone to the object, in this case to your ear. When you hold the smartphone to your face during a call, the sensor captures the reflected IR signal and sends a command to the system to turn off the display. This prevents accidental pressing and saves battery power. On the Redmi 9 model, this component is usually hidden under the top of the screen or integrated into the front camera module.

Unlike older models, where the sensor was placed in a separate hole, Redmi 9 uses virtual sensor technology or hidden placement, which makes it vulnerable to contamination or overlap with low-quality protective glass, the accuracy of operation depends on the cleanness of the upper part of the screen and the absence of foreign objects in the speaker area.

Sometimes users confuse the proximity sensor with the light sensor, which regulates the brightness of the screen. Although they are often located nearby, it is the IR sensor that is responsible for turning off the screen when the call is made. If it is not working correctly, the system can "think" that the phone is in your pocket, and lock the screen at the wrong time.

⚠️ Warning: Do not physically press the sensor area or use sharp objects to β€œclean” it, this can lead to permanent damage to the matrix or plume.

Understanding the physical location and the way it works helps diagnose the problem more quickly, so if the screen only goes out when you press it tightly, maybe the sensor sensitivity is down, and if the screen doesn't go out at all, you probably need software calibration.

Basic check through the engineering menu

The first step to turn on or test the sensor on Redmi 9 is to use the built-in engineering menu, a secure tool that allows you to test all hardware components without having to get super-user rights, and it uses a special code to access it that activates the diagnostic mode.

Open the standard Phone app and type in the combination ##6484##. If the code is entered correctly, the CIT menu will open. In the test list, you need to find the item associated with the proximity sensor, it can be called Proximity Sensor, PSensor or have a number that depends on the firmware version.

πŸ“Š Have you encountered a proximity sensor problem?
Yeah, the screen's not going out.
Yeah, the screen goes out on its own.
No, it's working perfectly.
There are other problems with calls.

Inside the test, you'll see two values: distance in centimeters and status (Near/Far). Close the top of the screen with your palm, the value should change to "Near" (Close), and the screen will go out. If the values do not change, the sensor can be turned off software or locked by the system. Checking in CIT is the fastest way to determine whether the sensor is physically alive.

  • πŸ“± Make sure the test shows changing numbers when moving your hand.
  • πŸ” Check if there is a screen screen screen that covers the upper frame.
  • πŸ”„ Restart the device if the test does not start the first time.

If the sensor responds instantly and correctly in the engineering menu, but there are problems in normal call mode, then it is a matter of software settings or application conflict, in which case physical repair is not required.

Calibration of the sensor through hidden code

The most effective way to solve sensor problems on Xiaomi Redmi 9 is to force calibrate, which resets the current sensor readings and sets new reference values. Often, it is downgraded calibration that causes the screen to stay on during a conversation.

To start the calibration process, open the "call" and enter the code ##64663## or go through the settings: Settings β†’ About Phone β†’ MIUI version (you need to quickly click 5-7 times on the version bar to appear on the test menu). In the list that opens, select Proximity Sensor. You will see a screen with the "Calibration" button and current readings.

β˜‘οΈ Checklist before calibration

Done: 0 / 4

Put your phone on a flat horizontal surface, away from bright lights and objects. Nothing should cover the top of the screen. Press Calibration. If the calibration is successful, you'll see a Pass or Success message. If Fail appears, repeat the procedure to make sure the conditions are perfect.

⚠️ During calibration, you can not touch the screen or breathe on the top of the smartphone, this will knock down the readings and lead to an error.

After successful calibration, the device must be fully restarted, and the new parameters are required to be restarted, as the new parameters are only retained after restarting the system, and in most cases (about 90%), this procedure completely solves the sensor problem on the Redmi 9.

Configure through the MIUI Engineering Menu

If standard calibration doesn't work, you can try deeper tuning through the extended engineering menu. Some versions of MIUI for Redmi 9 have a separate section where you can manually change sensitivity thresholds. Be careful when changing these parameters, as incorrect values can completely disrupt the sensor.

Enter the engineering menu with the code ##3646633## (not working on all firmware, but it's worth a try). Go to the Hardware Testing β†’ Sensor β†’ Proximity Sensor tab. Here you can see Min and Max settings. Max should usually be in the range of 1000-2000 units, and Min should be close to 0.

There is also the option to force the sensor to turn on or off through this interface if it has been deactivated at the driver level.Look for the Enable Proximity option and make sure it is active.After making any changes, press the Set or Save button to save the settings to nonvolatile memory.

  • πŸ›  Do not change the values manually unless you know the exact parameters for your matrix model.
  • πŸ’Ύ Take a screenshot of the original values before editing so you can roll back.
  • πŸ”‹ Make sure your battery is above 20% before entering the engineering menu.

This method is considered more advanced and recommended for users who understand the changes, and for the average user, the basic calibration described in the previous section is sufficient.

Reset sensor settings via ADB

In cases where the software failure is deep and the phone menu does not respond to changes, you can use USB debugging and console commands ADB (Android Debug Bridge), which requires a connection to the computer, but allows you to reset the configuration files of the sensor clean.

To start, activate Developer Mode. Go to Settings β†’ About Phone and tap 7 times on MIUI Version. Then, in Advanced Settings β†’ For developers, turn on Debugging over USB. Connect your phone to a PC with ADB installed and enter a command to check the connection.

adb devices


adb shell am start -n com.miui.calibration/.psensor.PsensorCalibration

The second team will try to run the system calibration application directly, and if this doesn't work, you can try to remove the cache of the system application that handles phone calls, because it controls the sensor during the call. Clearing the phone application data will not delete your contacts if they are synchronized with the account, but reset the call settings.

Risks of using ADB
Using console commands carries minimal but present risk; incorrectly entering commands can lead to unstable system operation; it is recommended to back up the data before the procedure.

Using ADB commands is a last resort before completely resetting the phone.If this method didn’t help turn on the proximity sensor on the Xiaomi Redmi 9, it’s probably the hardware or the plume damage that’s causing the problem.

Resolving conflicts with protective glass

One of the most common but common causes of sensor failure on Redmi 9 is poor quality protective glass or film. Many accessories, especially cheap ones, do not have a special cutout or a transparent window in the upper speaker area. The black glass frame overlaps the IR radiation, and the sensor "thinks" that it is constantly in front of the object.

Carefully inspect the top of the screen when the display is off under bright light. If you see that the protective glass covers the area of the sensor (usually a narrow strip next to the speaker), this is the cause of the problem. The sensor cannot penetrate the layer of opaque film.

The solution here is to replace the accessory with a model marked "Full Coverage with Sensor Cutout" or remove the glass. No software settings will help if the physical path of the beam is blocked. This is a classic example of how the periphery affects the operation of a smartphone.

Type of screen protectionImpact on the sensorRecommendation
The original glass of XiaomiNo impact (there's a cutout)Use it.
Cheap full-screen filmBlocking the signal.Replace or remove
3D/5D glass without a cutoutPartial lockdownCheck the work
Hydrogel filmMinimum impactPermissible.

Always check the accessories compatibility with your model. Even if the seller claims that the glass is versatile, the Redmi 9 is important to the accuracy of the fit in the top frame.

Hardware malfunctions and repairs

If neither calibration, removal of the protective glass, nor resetting did not help turn on the proximity sensor, there is a high probability of hardware failure. On the Xiaomi Redmi 9, the sensor can be part of the charging plume (in some revisions) or the screen module. When a contact falls or gets moisture, the contact could move away or oxidize.

A common symptom of hardware breakdown is a complete lack of response in the CIT engineering menu. If the upper part of the screen is closed with your hand, the values in the Proximity Sensor test remain at zero or maximum and do not change, the sensor is dead.

πŸ’‘

Tip: Before going to the service center, try to gently warm up the top of the phone with a hairdryer (without overheating!) - sometimes this temporarily restores contact in the oxidized connectors, which will confirm the diagnosis.

Replacing the sensor on Redmi 9 requires disassembly skills and tools, as access to the sensor often requires removal of the display or back cover.

⚠️ Note: If the phone is under warranty, any_attempt_ Self-opening of the hull will lead to the loss of warranty obligations.

In some cases, it helps to solder the plume or replace the entire screen module if the sensor is integrated into it. The cost of repair is usually low, but requires professional intervention.

Frequently Asked Questions (FAQ)

Why does the app only work in the Phone app, but not in WhatsApp or Viber?
This is normal behavior for some versions of Android and MIUI. Third-party apps (messengers) use their call processing algorithms and may not request sensor data as aggressively as a system call. Check the settings of a particular application - sometimes there is an option "Use the proximity sensor".
Can a MIUI update break the sensor?
Yes, calibration files are often lost after a firmware update, and if the problem occurs immediately after the update, recalibration through the engineering menu (code ##64663##) solves the problem 99% of the time.
Does the cover affect the approach sensor?
Usually not, unless the case has thick sides that hang over the screen. However, if the case is not fit correctly and presses on the top frame, it can create micro-presses or overlap the sensor's view sector.
What if the screen goes out too early after calibration?
This means that the sensor sensitivity is too high. Try to wipe the screen with an alcohol napkin to remove the fat film that can distort the signal. If it doesn't work, repeat the calibration in a darker room, without bright light over your head.
Are there any applications to replace the standard sensor?
There are applications like Proximity Sensor Reset & Test that can software emulate the sensor or force the screen to turn on/off, but they are a crutch and consume the battery, and it's better to fix the root of the problem by setting up the system.