Setup of the proximity sensor on Xiaomi Mi 9: from calibration to repair

Xiaomi Mi 9 โ€“ the flagship of 2019, which still remains relevant thanks to powerful โ€œironโ€ and regular updates MIUI. But even these devices have sensor problems over time, and one of the most common bugs is that the proximity sensor doesn't work properly, so the screen doesn't go out when you call, or it accidentally shuts down when you watch a video.

In this article, you will find step-by-step instructions for setting up the sensor, how to calibrate it through the engineering menu, and tips for fixing hardware faults, and we will discuss why the sensor can "glut" after an update. MIUI, How to check its performance without special applications, and what to do if the screen has stopped responding to the approach of the hand or ear during a conversation.

Important: If youโ€™ve never been to Xiaomiโ€™s engineering menu, donโ€™t worry, all activities are safe if you follow instructions, and if the sensor is physically damaged (like after a fall), weโ€™ll tell you how to diagnose the problem and what to do next.

What is the proximity sensor and how it works in the Xiaomi Mi 9

The proximity sensor is an infrared sensor located at the top of the screen next to the front camera, and its main task is to detect when you bring the phone to your ear during a call to automatically turn off the screen and prevent accidental tapping.

Xiaomi Mi 9 uses a sensor from STMicroelectronics (model) VD6283), which operates on the basis of infrared radiation: the principle of operation:

  1. The sensor emits an IR ray.
  2. If an obstacle appears near (for example, an ear or a palm), the beam is reflected.
  3. The sensor captures the reflected signal and sends a command to the system to turn off the screen.

In practice, it looks like this: when you call, the screen goes out 1-2 seconds after the phone comes to your ear, and after you pull the device away, the sensor again detects the absence of an obstacle, and the screen turns on.

โš ๏ธ Warning: If the sensor is dusty or closed with film/glass, it may not work properly, for example, the screen will go out spontaneously or will not react to the approach.

In addition to calls, the proximity sensor is used:

  • ๐Ÿ“ž To lock the screen during a speakerphone conversation (if the option is enabled in the settings).
  • ๐ŸŽฎ In some games (for example, for gesture control).
  • ๐Ÿ”’ To protect against accidental pressing in your pocket (Smart Lock function).

๐Ÿ“Š How often do you have problems with the proximity sensor?
Never.
We used to, but I decided.
Sometimes it's slug.
Not working.

Signs of malfunction of the proximity sensor

If the proximity sensor on the Xiaomi Mi 9 doesnโ€™t work properly, youโ€™ll notice the following symptoms:

Problem.Possible causeHow it manifests
The screen does not go out during the call.Sensor contamination, software failure, plume damageWhen talking, the screen remains active, random pressing is possible.
The screen goes off spontaneously.Incorrect calibration, interference from the cover / glassThe display is turned off when watching a video or in the menu
Sensor reacts with a delayOutdated firmware, application conflictThe screen goes out in 3-5 seconds after approaching
The sensor doesn't work at all.Hardware breakdown, disconnection in settingsThe screen never goes out when you ring.

The most common cause of failures is software errors after an update MIUI. For example, in versions MIUI 12.5-14 were sensor bugs for some users:

  • ๐Ÿ› ๏ธ Physical damage (fall, ingress of moisture).
  • ๐Ÿ“ฑ Incorrect calibration after resetting settings.
  • ๐Ÿ”„ Conflict with applications (for example, launchers or modified firmware).

โš ๏ธ Attention: If the sensor stopped working after changing the screen, most likely, the master damaged the plume or did not connect it back.

Before sinning on hardware breakdown, check the sensor for performance.

How to check the proximity sensor on Xiaomi Mi 9

There are several ways to diagnose - from standard tools MIUI We'll start with the simplest of tests.

Method 1: Testing through phone settings

1. Open the Phone application and dial the combination:

##6484##

(This is a universal code for testing sensors on Xiaomi.)

2. In the menu that opens, select Proximity Sensor.

3. Raise your hand to the top of the screen:

  • ๐ŸŸข If the sensor is working, you will see a green indicator and a value of 0 cm (approximation) / 5 cm (no obstacle).
  • ๐Ÿ”ด If the sensor does not respond, the values will not change or there will be a Failed error.

Method 2: Checking through the Engineering Menu

This method provides more detailed information:

  1. Call the phone in the app: ##4636##
  2. Select Phone Information โ†’ Sensors.
  3. Find the Proximity sensor string and check the reaction to the approach of the hand.

If the sensor does not respond in any of the tests, the problem may be:

  • ๐Ÿ”ง Disabled sensor in settings (see next section).
  • ๐Ÿ“‰ Refreshing the old slate (refresh) MIUI last-minute).
  • ๐Ÿ’ฅ Hardware failure (required repair).

๐Ÿ’ก

If tests show that the sensor is working but the screen does not go out during the call, check the settings of the Phone app - the option to Lock the screen during the call may be disabled.

How to turn on and calibrate the proximity sensor

If the sensor is working but is unstable (for example, the screen goes out with a delay), it needs to be calibrated. You can do this through the engineering menu.

Step 1: Entering the Engineering Menu

1. Open the Phone application and enter:

##3646633##

(Alternative code for Xiaomi with Snapdragon processor)

2. Select Hardware Testing from the menu โ†’ Sensor โ†’ Proximity Sensor.

Step 2: Calibration of the sensor

1. Press Calibrate (Calibrate).

2. Place the phone on a flat surface with the screen up and wait for the process to be completed (usually takes 10-15 seconds).

3. After calibration, check the sensor response by holding your hand to the top of the screen. The values should change from 5 (no obstacle) to 0 (there is an obstacle).

If the calibration didnโ€™t help, try resetting the sensor settings:

  1. In the engineering menu, select Clear Data.
  2. Reboot the phone.
  3. Recalibrate.

Make sure that the sensor does not receive direct light.|Remove the cover and the protective glass|Close all background applications|Battery charge over 20%-->

โš ๏ธ Note: Do not calibrate in bright sunlight - the infrared sensor may not work properly due to external IR sources.

Step 3: Checking the settings MIUI

Sometimes the sensor works, but the screen does not go out due to the disabled options in the MIUI. To fix this:

  1. Go to Settings. โ†’ Annexes โ†’ Phone. โ†’ Locking the screen during the call.
  2. Make sure the option is on.
  3. In the Settings section โ†’ Display. โ†’ Turn over/Sensors check if the proximity sensor is switched off.

๐Ÿ’ก

If after calibration the sensor still works unstable, try to update the firmware or make a reset to factory settings (with data saving).

What to do if the sensor does not work after the MIUI update

Many users of Xiaomi Mi 9 are faced with the fact that the proximity sensor stops working after the update MIUI. It's connected to:

  • ๐Ÿ› Bugami in the new version of firmware (especially relevant for the MIUI 13โ€“14).
  • ๐Ÿ”„ Conflict with user settings (for example, if you changed settings through a user interface) ADB).
  • ๐Ÿ“ฅ Incomplete update installation (sensor files not updated).

Decisions:

Method 1: Retrace to the previous version of MIUI

If the sensor was working before the update, you can return the old firmware:

  1. Download the archive with the desired version MIUI Mi 9 (codename cepheus) from Xiaomi Firmware Updater.
  2. Go to Settings โ†’ About the phone โ†’ System update.
  3. Click on the three dots in the upper right corner โ†’ Select a firmware file.
  4. Please enter the downloaded archive and confirm the rollback.

โš ๏ธ Attention: Firmware rollback will reset all settings to factory. Pre-back up through Settings โ†’ Additionally. โ†’ Backup.

Method 2: Reset sensor settings through ADB

If rollback is not an option, try resetting sensor settings through ADB:

  1. Install Platform Tools on your PC.
  2. Enable USB Debugging in Settings โ†’ About Phone โ†’ MIUI version (click 7 times, then go back to Additional โ†’ For Developers).
  3. Connect your phone to your PC and execute the command: adb shell settings delete global device_proximity_offset
  4. Reset the device.

After that, the sensor should work normally, and if it doesn't, it could be the hardware.

Hardware malfunctions: when you need to replace the sensor

If the software methods didn't work, it's likely that the proximity sensor is physically damaged.

  • ๐Ÿ’ง Moisture falling under the screen (even if the phone did not sink, condensation could damage contacts).
  • ๐Ÿš€ Falling phone (especially on top of where the sensor is located).
  • ๐Ÿ”ง Poor screen repair (damage to sensor plume).

How to diagnose a hardware breakdown:

Sign.Probable causeDecision
The sensor does not respond in any test.Sensor or plume damaged.Replacement of sensor or plume
The screen goes out arbitrarily, even without approaching.Short circuit in the sensor circuitDiagnostics at the service center
The sensor works, but only at a certain angle.Damaged IR emitter or receiverReplacement of sensor

Replacing the sensor on the Xiaomi Mi 9 is possible, but requires experience.

  • ๐Ÿ› ๏ธ It is necessary to disassemble the phone, disconnect the screen plume and carefully replace the sensor (the cost of the part is about 500-1000). โ‚ฝ).
  • ๐Ÿ”ง Tools will be required: screen suction cup, plastic mediator, tweezers and hair dryer to soften glue.
  • โš ๏ธ Risk of damaging the plume of the touchscreen or display with careless disassembly.

Where to buy a proximity sensor for Xiaomi Mi 9?
On AliExpress (search on request "VD6283 For Xiaomi Mi 9" - price from 300 โ‚ฝ, Delivery can take 2-4 weeks, on the Beru or Yandex Market - more expensive (800-1500). โ‚ฝ), Xiaomi service centers have original parts, but the price can go up to 2000. โ‚ฝ work.

If you're not sure about your skills, you should go to the service. The average cost of replacing a sensor in a workshop is 1,500-2,500. โ‚ฝ.

Frequent Questions and Myths About the Approach Sensor

There are many myths around Xiaomi sensors. Let's take a look at the most popular ones.

Myth 1: โ€œThe approach sensor can be repaired with a warm-up hairdryer.โ€

โŒ Heating can temporarily resuscitate oxidized contacts, but:

  • The risk of damaging the screen or battery.
  • The effect will be short-term (1-2 weeks).
  • The Xiaomi Mi 9 has a thermopaste under the chip that can melt.

Myth 2: โ€œCalibration through secret codes ruins the phoneโ€

โœ… The engineering menu is Xiaomi's official tool, and calibrating the sensor can't do harm if you're not a good fit:

  • You do not change other settings (for example, the parameters of the communication module).
  • Do not interrupt the calibration process.
  • Use the correct codes (see section above).

Myth 3: โ€œNo proximity sensor is needed โ€“ you can turn it offโ€

โš ๏ธ You're not recommended. Without the sensor, you're going to be exposed to:

  • Accidental taps during the call (call reset, turn on speakerphone).
  • Quick battery discharge (the screen remains on during the call).
  • Problems with some applications (for example, Google Assistant may not respond to voice commands)

๐Ÿ’ก

If the sensor interferes (for example, because of the case), it is better to reconfigure its sensitivity through the engineering menu than to turn it off completely.

๐Ÿ” How to find out which proximity sensor is installed in my Xiaomi Mi 9?
Xiaomi Mi 9 uses STMicroelectronics sensor VD6283. You can find the model: through the application AIDA64 (In the engineering menu (#3646633## โ†’ Hardware Testing โ†’ If the sensor is not detected, it is likely to be damaged or disabled at the firmware level.
๐Ÿ› ๏ธ Can I turn off the proximity sensor if it interferes?
If the sensor is not working properly, it is better to calibrate it (see section above), reduce sensitivity through the engineering menu (Perximity offset), use a case without a cutout for the sensor (if the problem is external interference). To completely shut down, root rights or command are required. ADB: adb shell settings put global device_proximity_offset 255 (significance 255 switch off).
๐Ÿ“ฑ Why the proximity sensor only works in some applications?
This is because: Not all apps support sensor interaction (e.g. WhatsApp can ignore it). In the settings of a particular app (e.g. Phone or Zoom), the option to lock the screen when approaching is disabled. MIUI No sensor support. Check the settings of the app or update it to the latest version.
๐Ÿ”„ After resetting the sensor stopped working?
Resetting to factory settings can reset the sensor calibration.Try: Go to the engineering menu and repeat the calibration (##3646633##).Update MIUI Reset the sensor settings through the ADB (If nothing helps, maybe the reset damaged the system files - try reflashing the phone via Fastboot.
๐Ÿ’ฐ How much does it cost to replace the proximity sensor in the service center?
Cost depends on the region and type of service: Official service Xiaomi: 1800-2500 โ‚ฝ (Unofficial workshops: 1000-1800 โ‚ฝ (Self-replacement: 500-1000 โ‚ฝ (Before replacing, make sure that the problem is in the sensor, not in the plume or firmware.