How to calibrate the proximity sensor on Xiaomi Redmi Note 8 Pro with MIUI 12: the complete guide

The proximity sensor in the Xiaomi Redmi Note 8 Pro is responsible for automatically turning off the screen during phone calls when you hold the device to your ear. However, users often face a situation where the screen does not go out when you call or, conversely, does not turn on after a conversation is completed, These problems are especially relevant for devices running MIUI 12, where the algorithms of the sensors have been changed compared to previous versions of the firmware.

In 80 percent of cases, sensor malfunctions are not caused by hardware failure, but by software failure or miscalibration. The manufacturer has built-in tools for diagnosing and adjusting the sensor, but they are hidden in the engineering menu. This article will help you to perform calibration yourself without going to the service center, saving time and money. We will look at official methods through MIUI settings, hidden engineering codes and alternative solutions for complex cases.

Signs of malfunction of the proximity sensor

Before you start calibrating, it is important to make sure that the problem is really related to the proximity sensor, and not to the other components of the smartphone.

  • πŸ“± The screen does not go out when you bring the phone to your ear during a call (the most common sign)
  • πŸ”„ The screen does not turn on after the conversation is over, pressing the power button is required.
  • πŸ“ž During the call, the screen accidentally presses buttons (nose, ear touches the sensor)
  • πŸ”¦ In the dark, the sensor can be seen glowing red/green but not responding to obstacles.
  • 🎧 Problems arise only when using headphones with a microphone

If you see at least one of these signs, there's a 95% chance that the problem lies in the proximity sensor or its software settings, except that if the screen doesn't respond to touch at all (not just when calling), it could indicate a malfunction of the display module or plume.

⚠️ Note: On the Redmi Note 8 Pro, the proximity sensor is combined with the light sensor. If the automatic brightness settings of the screen stop working after calibration, this means that the sensor is physically damaged and requires replacement.

Preparing the phone for calibration

Before starting the procedure, several mandatory steps must be taken to avoid errors and ensure the correct operation of the sensor:

  1. Clean the sensor area. Wipe the top of the screen (near the speaker) with a dry microfiber wipe. Dust, greasy traces, or protective glass can block the infrared signal.
  2. Remove the case. Tight covers (especially metal covers) often overlap the sensor. Check the sensor without accessories.
  3. Check for updates. Go to Settings β†’ About Phone β†’ System Update and install the latest security patches. Sensor bugs have been patched in MIUI 12.0.3.0 and higher.
  4. Disable third-party applications that may affect sensors (such as screen locking or changing the call interface).

It is also recommended to back up important data through Settings β†’ Additional β†’ Backup and Reset. Although calibration should not delete files, in rare cases, interference with the engineering menu can cause a system failure.

πŸ“Š You have already tried to calibrate the sensor yourself?
Yeah, but it didn't help.
Yeah, it helped temporarily.
No, I'm afraid to break something.
No, I didn't know about that possibility.

Method 1: Calibration through the engineering menu (the most reliable way)

The Xiaomi Engineering Menu contains hidden tools for diagnosing and configuring hardware components. For the Redmi Note 8 Pro running MIUI 12, the sensor calibration menu is accessed via a special code:

  1. Open the Phone app and enter the combination: ##6484## Once entered, the MIUI Version menu will automatically open (don’t be afraid – this is normal).
  2. Go back to the home screen and open the Phone app again. Now type in ##4636## This will open the engineering testing menu.
  3. In the menu, select Sensor Test.
  4. Find the Proximity Sensor string and tap it.
  5. A graph will appear on the screen showing the sensor readings. Close the sensor with your hand (or hold the phone to your ear) - the values should change from 5.0 cm to 0.0 cm. If there is no reaction, the sensor is defective.
  6. To calibrate, press the Calibrate button and follow the instructions on the screen. Usually you need to close the sensor for 5 seconds, then open.

After calibration, restart the phone. Check the sensor during a test call (e.g., 112, the call will be canceled automatically). If the problem persists, proceed to the next method.

Cleared the dust and grease sensor |Cut the phone case |Cut the MIUI updates |Disabled third-party phone apps |Cut backup data-->

Method 2: Reset sensor settings via MIUI Hidden Settings

If the engineering menu is not available (for example, after updating the firmware), you can use an alternative method through hidden MIUI settings. This method is less reliable, but helps in 30-40% of cases:

  1. Install MIUI Hidden Settings from Google Play (requires MIUI 12 or later).
  2. Open the application and grant superuser rights (if requested).
  3. Go to the Sensors section.
  4. Find the Proximity Sensor Calibration and select it.
  5. Press Reset to Default, then confirm the action.
  6. Go back to the main menu and select Restart SystemUI to apply the changes.

Important: After the sensor is reset via Hidden Settings MIUI, the automatic brightness settings of the screen may not work correctly for 10-15 minutes. This is normal - the system recalibrates the light sensor.

⚠️ Attention: Some versions MIUI Hidden Settings may contain advertisements or request unnecessary permissions. Install the app only from the official store and disable access to contacts/messages.

Method 3: Manually configure via ADB (for power users)

If standard methods didn’t work, you can try calibrating the sensor via Android Debug Bridge (ADB), a method that requires connecting the phone to a computer and basic command-line knowledge.

Instructions:

  1. Download and install ADB Tools on your computer.
  2. Turn on the phone to Debug USB in Settings β†’ About Phone β†’ MIUI version (tap 7 times on the line, then return to Additional β†’ For developers).
  3. Connect your phone to your PC and enter in the command line: adb shell su echo 1 > /sys/class/sensors/proximity/prox_cal If you request root rights, confirm it.
  4. Close the sensor with your hand for 5 seconds, then release it. Repeat it 3 times.
  5. Enter the command to save calibration: echo 0 > /sys/class/sensors/proximity/prox_cal
  6. Reboot your phone with the reboot command.

If the sensor is unstable after rebooting, try repeating the procedure or return to factory settings via Settings β†’ Additional β†’ Resetting (select Reset Network and Sensor Settings).

What if the ADB can’t see the device?
If the adb device command does not show your Redmi Note 8 Pro, follow the following steps: 1. Install official Xiaomi drivers from the manufacturer's website. 2. Check if File Transfer is enabled when connecting via the manufacturer's website. USB. 3. Try another one. USB-cable (preferably original). 4. In the Developer's room, enable the option to Cancel Authorization USB-debugging, then disconnect/connect the phone again. 5 If you use Windows, disable driver signatures via gpedit.msc (for power users).

Alternative solutions if calibration does not help

If all of the above methods fail, the problem can go deeper, from a software failure to a physical sensor malfunction.

Problem.Possible causeDecision
Sensor does not respond to calibrationSensor plume or contacts damagedDisassemble the phone and check the connection of the plume (experience is required)
Calibration resets after resettingFailure in the NVRAM (energy-independent memory) sectionRun a reset via Fastboot with fastboot erase nvram
The sensor only works in the engineering menu.Conflict with firmware or modemRefuse your phone to a stable version of MIUI via the Mi Flash Tool
The screen goes out too early/lateIncorrect thresholds in build.propChange ro.lge.proximity.delay=25 by 100 (root required)

If you are not sure about your skills, it is better to contact the Xiaomi service center.The cost of replacing the proximity sensor for the Redmi Note 8 Pro is about 800-1500 rubles (2026), which is cheaper than the risk of damaging the phone when self-repair.

πŸ’‘

Before visiting the service center, unplug your pattern lock or password from your phone, and many workshops refuse to work with locked devices because of the risk of data loss.

Prevention of problems with the proximity sensor

To avoid repeated sensor failures, follow these guidelines:

  • πŸ›‘οΈ Use only original or certified security glass, cheap metalized glass blocks infrared signal.
  • πŸ”„ Regularly (once in) 2-3 month) clean the sensor area from dust and fat with an alcohol napkin.
  • πŸ“± Avoid falls and phone bumps – the proximity sensor is sensitive to mechanical damage.
  • πŸ”‹ Don't let the battery run out completely. A sudden power outage can reset the calibration of the sensors.
  • πŸ”„ Postmajor updates MIUI (For example, from version 11 to version 12, always reset the sensor settings.

It is also useful to disable battery optimization for system applications that are responsible for the operation of sensors. To do this, go to Settings β†’ Applications β†’ Application Management β†’ Three points (menu) β†’ Special Access β†’ Battery Optimization and select All applications. Find the phone and System interface, then turn off optimization for them.

πŸ’‘

If the proximity sensor starts to glitches after a phone drop or moisture hits, calibration in 99% of cases will not help - you need to replace the sensor or the entire display module.

Frequently asked questions

Can I calibrate the sensor without an engineering menu?
Yes, but the efficiency will be lower. Try Hidden Settings reset method with MIUI, or use apps like Google Play's Sensor Test for manual calibration, but these methods don't give you the accuracy that the original engineering menu does.
After calibration, the automatic brightness stopped working.
This means that the proximity sensor and the light sensor reset at the same time. Return the brightness settings manually: go to Settings β†’ Display β†’ Auto Brightness and calibrate again, following the hints on the screen. If it does not help, reset through the engineering menu (#6484###).
How often should the sensor be calibrated?
Normally, calibration is required every 6-12 months, most often the procedure is necessary if: the phone often falls or is subjected to vibrations; You regularly change covers or protective glasses; There was a firmware update with a change in the core of the system; The battery has discharged "to zero" several times in a row.
Could a faulty proximity sensor affect other functions?
Yes, but indirectly. For example: If the sensor constantly "thinks" that the phone is held to the ear, Wi-Fi/mobile network may be turned off to save energy; Incorrect data from the sensor can cause false alarms of the function of lift to wake up; In rare cases, failures of the proximity sensor lead to increased battery consumption (the system constantly polls the sensor).
Is there a difference in calibration between the global and Chinese versions of MIUI 12?
Yes, in Chinese firmware (China ROM), the engineering menu may have a different interface, and some ADB commands are blocked. For the Global ROM, all of the methods described work without restrictions. If you have Chinese firmware, it is recommended to temporarily switch to global through the Mi Flash Tool before calibrating.