Checking the proximity sensor on Xiaomi: from diagnosis to repair

The proximity sensor in Xiaomi smartphones is a small but critical component that is responsible for turning off the screen during a phone call. When you hold the device to your ear, the sensor registers the obstacle and extinguishes the backlight, preventing accidental pressing. If this mechanism fails, you risk not only interrupting the bell with your cheek, but also experiencing a rapid battery discharge due to the constantly active display.

Proximity sensor problems are one of the most common problems with Redmi Note, POCO X and other brands, and can range from software failures to physical damage to the sensor, but before you bring the phone to the service, you should check its performance yourself. In this article, we will examine all available diagnostic methods, from built-in tests to the use of engineering menus and third-party applications.

We will focus on models with AMOLED- screens, where sensor malfunctions are often disguised as problems with autobrightness, and you will learn how to distinguish a hardware defect from a software bug, and what to do if the sensor works β€œonce again.” All instructions are adapted for firmware MIUI 12-ZXXZ-14 and HyperOS, including global and Chinese versions.

If after checking it turns out that the sensor is defective, we will give recommendations for the temporary circumvention of the problem (for example, disabling the sensor in the settings) and tell you how much it will cost to replace it in the official Xiaomi service.

Signs of malfunction of the proximity sensor

The first step is to make sure the problem is really related to the sensor, not the other components of the smartphone.

  • πŸ“΅ The screen does not go out during a call, even when the phone is pressed against the ear, resulting in occasional pressing of buttons (e.g., turning off the microphone or completing the call).
  • πŸ”¦ The screen lights are turned on/off chaotically, for no apparent reason (e.g. while watching a video or reading).
  • πŸ“± Touch buttons under the screen (if any) cease to respond to touch when the sensor is activated.
  • πŸ”‹ The battery is discharged faster than usual β€” the sensor can constantly β€œthink” that something is approaching it, and without needing to turn off the screen.
  • πŸ› οΈ After a smartphone falls or hits, the screen stops correctly turning off when calling (a frequent sign of physical sensor damage).

It is important to distinguish between a malfunctioning proximity sensor and a gyro or accelerometer problem, for example, if the screen is rotating spontaneously, it is more related to the orientation sensor than the proximity sensor. β†’ Screen. β†’ In the pocket), which can lock the screen when accidentally touched.

On some Xiaomi models (e.g. Redmi Note 10 Pro or POCO F3), the proximity sensor is combined with the light sensor. If you have a lighting auto-regulation problem with your calls, it may indicate damage to the entire module.

⚠️ Warning: On smartphones with MIUI 14 and later, the screen shutdown function when calling may be tied to Special Options settings. Before diagnosing, check if the Settings β†’ Special Opportunities β†’ Physical Capabilities β†’ Automatically turn off the screen.

Method 1: Checking through the engineering menu (USSD codes)

The fastest way to test the sensor is to use a hidden engineering menu, which doesn't require root rights or special applications, just type in USSD- code in the standard Phone app.

Instructions:

  1. Open the Phone app and go to the Keyboard tab.
  2. Enter the code ##6484## (some firmware may not work – see alternative codes below).
  3. If the code works, you'll see the Manual Test menu. Select Proximity Sensor.
  4. The Value will appear on the screen, and hold your hand to the top of the screen (where the sensor is located) and change from 5 (or 1) to 0.

Alternative codes for different Xiaomi models:

  • πŸ“± ##4636## β†’ Phone Information β†’ Equipment Testing (works on POCO and old Redmis).
  • πŸ”§ ##284## is a direct test of the proximity sensor (for Android 10+-based firmware).
  • πŸ› οΈ ##36446337## is an extended diagnostic menu (may require a password, usually 1234 or 0000).

If the engineering menu does not open:

  • πŸ”„ Try entering the starless code: 6484 or 4636.
  • πŸ“± Make sure you use the standard Phone app, not Google Phone or a third-party dialer.
  • πŸ”§ Some HyperOS firmwares have the engineering menu locked β€” use the app method (see next section).

⚠️ Warning: Do not change other options in the engineering menu unless you are sure of their purpose! Incorrect settings can cause the network to crash or the processor to overheat.

πŸ“Š What code worked on your Xiaomi?
##6484##
##4636##
##284##
None worked.

Method 2: Diagnostics with Applications

If the USSD- codes don't work or you want more information, use third-party utilities to not only show the current state of the sensor, but also store the log of its operation for analysis.

Top.-3 check-in:

AnnexFunctionsLink (Google Play)Features
Phone Doctor PlusTest of the sensor of approach, illumination, accelerometer, etc.DownloadSimple interface, no advertising, works without root.
Sensor TestShows the sensor values in real time (graph + numbers).DownloadSupports sensor calibration (requires root for some functions).
CPU-ZShows the presence of the sensor and its model in the Sensors section.DownloadIt does not test the work, but it helps to make sure that the sensor is recognized by the system.

How to use Phone Doctor Plus:

  1. Install and open the application.
  2. Press the Start Test (Start Test).
  3. Scroll through to the Proximity Sensor section.
  4. Put your hand to the top of the screen and the status should change from Far to Near.

If the sensor is not responding:

  • πŸ”„ Reboot your smartphone and repeat the test.
  • πŸ“± Check if the sensor is covered with a protective film or case (especially relevant for models with a monobrae cutout).
  • πŸ”§ Update the firmware β€” some versions of MIUI had bugs with sensor drivers.

β˜‘οΈ Preparation for the sensor test

Done: 0 / 4

Method 3: Checking through the hidden CIT (Factory Mode) menu

Xiaomi smartphones have a hidden CIT (Factory Mode) menu that is used in factories to test devices before sale, which is more reliable than USSD- codes, and works even on locked firmware.

How to open CIT:

  1. Open the Phone app.
  2. Enter the code ##2846579## (on some models, #2846583###).
  3. Select ProjectMenu β†’ Proximity Sensor.
  4. You'll see a graph or a numerical value on the screen, and if you hold your hand, the value will change.

Decoding of values in CIT:

  • Value: 0 - The sensor detects an obstacle (the screen must go out).
  • Value: 1-5 - no obstacles (screen active)
  • Value: -1 - The sensor is not detected or faulty.

If the CIT menu does not open:

  • πŸ“± Try entering the code with another SIM- card (sometimes operators block service commands).
  • πŸ”§ HyperOS firmware may require a rollback to MIUI 13 (see the firmware section).
  • πŸ› οΈ On some models (Xiaomi 12T, Redmi K50) CIT locked - use ADB (method 4).
What to do if the CIT asks for a password?
On most Xiaomi smartphones, the password for CIT is the last 6 digits of IMEI (you can find out IMEI by code *#06#). If it does not fit, try combinations: 1234, 0000, 1122 or the date of production (MMYG format).

Method 4: Checking through ADB (for advanced users)

If standard methods don’t work, you can test the sensor using Android Debug Bridge (ADB), which requires connecting the smartphone to a computer, but gives the most accurate data.

What you need:

  • πŸ–₯️ Computer with installed Xiaomi drivers (download from the official website).
  • πŸ“± Included debugging by USB (Settings β†’ The phone. β†’ Version. MIUI β†’ 7 times press to unlock the developer mode, then Settings β†’ Additionally. β†’ For developers β†’ Debugging by USB).
  • πŸ”§ Utility. ADB Tools (download from Google website).

Step-by-step:

  1. Connect your smartphone to your PC via USB (select File Transfer mode).
  2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with adb.exe.
  3. Enter a command to check the list of sensors: adb shell dumpsys sensorservice Find the proximity line in the output - this will confirm that the sensor is recognized by the system.
  4. For the real-time test, use: adb shell getevent -l Bring your hand to the sensor - events with changing values should appear in the log.

Example output for the working sensor:

/dev/input/event3: 0003 0000 00000005 // obstacle removed


/dev/input/event3: 0003 0000 00000000 // obstacle detected

If the teams are not working:

  • πŸ”„ Make sure that debugging is enabled with USB and the connection permission appears on the smartphone screen (always allow checkbox).
  • πŸ“± Try another version of ADB (e.g. Minimal ADB).
  • πŸ”§ Some firmware requires root rights first (not recommended for beginners).

⚠️ Warning: The commands ADB may vary depending on the Android version. On Android 12+, additional resolution may be required to access the sensors: adb shell pm grant com.android.settings android.permission.DUMP.

πŸ’‘

If ADB doesn’t recognize the device, try reinstalling the drivers manually through Windows Device Manager. Download Mi USB Driver and select Update Driver for an unidentified device.

Method 5: Visual inspection and hardware diagnostics

If software tests show that the sensor is not working, it may be the physical damage to the sensor. On Xiaomi smartphones, the proximity sensor is usually located at the top of the screen, next to the speaker.

How to check the hardware:

  1. πŸ” Look at the top of the screen for cracks, dents, or traces of moisture, and even a small damage can make the sensor fail.
  2. πŸ“± Remove the protective film or glass β€” sometimes they block the infrared signal of the sensor.
  3. πŸ”¦ Illuminate a flashlight on the sensor area (usually a small hole or a transparent window next to the front camera). If the sensor is contaminated, clean it carefully with a cotton swab dipped in alcohol.

Typical causes of hardware malfunctions:

  • πŸ’§ Moisture intrusion (even if the phone hasn't sunk, condensation can damage the contacts).
  • πŸš€ A hit or fall (the sensor is attached to the motherboard with thin plumes).
  • ⚑ Overheating (e.g. after prolonged play or charging).
  • πŸ”§ Poor repair (if the screen or battery has been changed before)

If you suspect physical damage, but do not want to immediately carry the phone to the service, you can temporarily turn off the proximity sensor:

  1. Go to Settings β†’ System β†’ Additional β†’ Special. capabilities β†’ Physical capabilities.
  2. Turn off the option Automatic Screen Shutdown or Approach Sensor (the name may vary).

⚠️ Warning: Turning off the sensor will keep the screen from going out during calls, so to avoid accidental taps, use headphones or turn on speakerphones.

What to do if the sensor is not working?

If all tests have confirmed a sensor malfunction, you have several options for solving the problem:

  • πŸ”„ Software reset: Make a factory reset (Settings β†’ About Phone β†’ Settings Reset) Sometimes this helps with driver failures.
  • πŸ“± Firmware Update: Install the latest version of MIUI or HyperOS via Settings β†’ System Update. New firmware often fixes sensor bugs.
  • πŸ› οΈ Sensor replacement: If the sensor is physically damaged, it can be replaced at the service center. Cost of repair: Smartphone model Replacement cost (ruble) Redmi Note repair time 10/11/12 1 200–1 800 1–2 hour POCO X3/X4/X5 1 500–2 200 1 Xiaomi 11T/12/13 2 000–3 500 2–3 day-day
  • πŸ”§ Self-repair: If you have experience, you can replace the sensor yourself. This will require: A new sensor (buy on AliExpress or at local parts stores). A set of screwdrivers and a mediator for disassembly. A hairdryer or a station for warming up the screen (if the sensor is glued). ⚠️ Attention: Self-replacement of the proximity sensor on models with AMOLED- screens (for example, Xiaomi 12 Pro) can damage the display due to fragile plumes.

On Xiaomi models with an infrared proximity sensor (such as the Redmi Note 9 Pro), it can be temporarily tricked by pasting a piece of black tape over the sensor area, which will make the system think that something is always close to the phone, and the screen will go out when you call, but this method does not work on all firmware.

πŸ’‘

If the sensor stopped working after the firmware update, try rolling back to the previous version via Fastboot or MI Flash Tool. Instructions for your model can be found on the Xiaomi.eu forum.

FAQ: Frequent questions about the proximity sensor on Xiaomi

πŸ” Why does the proximity sensor work "once in"?
This can be caused by: unstable firmware (especially on custom ROMs); sensor contamination (dust, sweat, residue of adhesive from film); conflict with applications that use sensors (e.g. fitness trackers); Solution: clean the sensor, update the firmware, check Safe Mode.
πŸ“± Can I calibrate the proximity sensor on Xiaomi?
Most Xiaomi models don't have a built-in proximity sensor calibration feature, but you can try: Reset sensor settings via the engineering menu (code ##6484## β†’ Sensor Calibration). Use the Sensor Test app (requires root for calibration). If the sensor is physically fit, calibration can help with minor failures.
πŸ”§ Once the screen is replaced, the proximity sensor doesn't work. What do we do?
This is a common problem. Reasons: The sensor is not connected to the new screen (some models have it bundled with the display), the sensor plume is damaged when disassembling, the spare part incompatible (for example, a screen from another version of the model is installed), Solution: go back to the service where the screen was changed, and ask to check the connection of the sensor. If you bought it yourself, make sure that it is original (with the sensor included).
πŸ’‘ How do I know which proximity sensor is installed in my Xiaomi?
There are two ways: Through CPU-Z: open the application β†’ Sensors tab β†’ find a string with Proximity. Through ADB: adb shell cat /sys/class/sensors/proximity_sensor/name This will display a sensor model (e.g., cm3628 or stk3311).
πŸ› οΈ How much does it cost to replace the proximity sensor in an unofficial service?
The cost in informal services is usually 30-50% lower than in official: Redmi - 800-1 500 rubles. POCO - 1000-2000 rubles. Flagship models (Xiaomi 13, Mix) - 1,800-3000 rubles. However, be careful: non-original sensors can work incorrectly or quickly fail. Always ask for a warranty for repair.