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:
- Open the Phone app and go to the Keyboard tab.
- Enter the code ##6484## (some firmware may not work β see alternative codes below).
- If the code works, you'll see the Manual Test menu. Select Proximity Sensor.
- 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.
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:
| Annex | Functions | Link (Google Play) | Features |
|---|---|---|---|
| Phone Doctor Plus | Test of the sensor of approach, illumination, accelerometer, etc. | Download | Simple interface, no advertising, works without root. |
| Sensor Test | Shows the sensor values in real time (graph + numbers). | Download | Supports sensor calibration (requires root for some functions). |
| CPU-Z | Shows the presence of the sensor and its model in the Sensors section. | Download | It 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:
- Install and open the application.
- Press the Start Test (Start Test).
- Scroll through to the Proximity Sensor section.
- 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
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:
- Open the Phone app.
- Enter the code ##2846579## (on some models, #2846583###).
- Select ProjectMenu β Proximity Sensor.
- 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?
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:
- Connect your smartphone to your PC via USB (select File Transfer mode).
- Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with adb.exe.
- 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.
- 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 detectedIf 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:
- π Look at the top of the screen for cracks, dents, or traces of moisture, and even a small damage can make the sensor fail.
- π± Remove the protective film or glass β sometimes they block the infrared signal of the sensor.
- π¦ 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:
- Go to Settings β System β Additional β Special. capabilities β Physical capabilities.
- 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.