Why you need a proximity sensor in a smartphone and how it works
The proximity sensor is a small but critical component of modern smartphones that automatically shuts down the screen during phone calls. When you hold the device to your ear, the infrared sensor registers the obstacle and extinguishes the display, preventing accidental tapping of the cheek or ear. On Xiaomi smartphones, this sensor is integrated into the top of the case next to the speaker and front camera.
Without proper operation of the sensor, you will face a number of inconveniences: the screen will remain active during a conversation (which leads to the pressing of the buttons with the cheek), quickly discharge the battery due to constant lighting, and in some cases even interrupt the call when accidentally touching touch elements. This is especially important for owners of models with AMOLED-screens where constant lighting during the call can cause pixels to burn out.
In the line of Xiaomi proximity sensor is used in all devices, from the budget Redmi to the flagship Xiaomi 13/14 series. However, its settings may vary depending on the firmware version: MIUI 12/13/14 or the new HyperOS. In this article, we will discuss how to turn on, calibrate and diagnose the sensor on any Xiaomi device, and also consider the typical problems and ways to solve them.
Where is the proximity sensor on Xiaomi: a visual guide
Before you set up the sensor, it is important to understand where it is physically located. On most Xiaomi smartphones, the proximity sensor is placed at the top of the front panel, next to:
- π Speaking speaker (usually left or center)
- π· Front camera (can be on the right or under the speaker)
- π‘ Light sensor (often combined into one module)
To accurately identify its location, flash a flashlight to the top of the screen: the proximity sensor usually looks like a small round or oval hole (sometimes closed with black glass). On some models (for example, Xiaomi Mi 11 or Redmi Note 12 Pro+), it can be hidden under the display, but its operation is still based on infrared radiation.
If you are not sure if you have a sensor in your model, check the specifications on the official Xiaomi website or use the AIDA64 app (Sensors section). The lack of a sensor is unlikely - even in the cheapest devices (for example, Redmi A2) it is present, but can be disabled by default.
Step-by-step: how to turn on the proximity sensor on Xiaomi
In most cases, the proximity sensor is activated by default, but sometimes its operation can be disrupted after updating the firmware, resetting settings or installing custom ROMs. To turn on or restart the sensor, follow the following steps:
- Open Settings (the gear icon on the home screen or in the application menu).
- Go to the Appendix section β Application management.
- Click on the three dots in the top right corner and select Special Access.
- Tapping on Battery Optimization (in some versions of MIUI, this item may be called AutoRun or Application Permissions).
- Find Phone (calling app) in the list and make sure all permissions are included for it, including Sensors and AutoRun.
- Return to Settings β System β Additional β Special features and check if the sensor is manually disabled.
βοΈ Checking the proximity sensor
If the sensor is still not working after this manipulation, try restarting the phone or resetting the phone application settings (in Settings β Apps β Phone β Storage β Reset). In rare cases, you may need to calibrate the sensor, as we will discuss in the next section.
Calibration of the proximity sensor: when and how to conduct it
Calibration of the sensor is required if it is triggered too late, too early or does not respond at all to the approach.
- π Firmware updates (especially when switching to HyperOS)
- π οΈ Screen repair (if the sensor has been disabled or damaged)
- π± Unofficial firmware installations (e.g. LineageOS or Pixel Experience)
Please note that not all Xiaomi models support this method and the wrong actions can lead to failures!
β οΈ Warning: The engineering menu contains parameters critical to the operation of the device. Do not change the settings if you are not sure about their purpose.
Calibration instructions:
- Open the phone app and enter the combination: ##6484###
- If the code doesnβt work, try the alternative: ##4636## (select Testing β Sensor Test).
- In the test menu, find the Proximity Sensor.
- Follow the instructions on the screen: You usually need to cover the sensor with your hand and remove it several times to automatically adjust.
- After calibration, restart the device.
π‘
If the engineering menu is not available, try using the Sensor Test app from Google Play, which will show the current sensor values and help diagnose the problem without risk.
Table: Compatibility of sensor switching methods with different versions of MIUI and HyperOS
| Activation method | MIUI 12 | MIUI 13/14 | HyperOS | Notes |
|---|---|---|---|---|
| Through Settings β Special Access | β Yes. | β Yes. | β Yes. | Universal method for all models |
| Engineering menu (#6484##) | β Yes. | β οΈ Partially. | β No. | HyperOS replaced with Diagnostic in the settings |
| Sensor Test Application | β Yes. | β Yes. | β Yes. | Requires rights to access sensors |
| Resetting the settings Phone | β Yes. | β Yes. | β Yes. | Do not delete call data, only settings |
| Calibration via ADB | β Yes. | β Yes. | β Yes. | For experienced users, PCs are required |
On HyperOS devices (such as Xiaomi 14 or Redmi K70), the engineering menu can be blocked. Instead, use the built-in Diagnostic app, which is available in the Service folder on the home screen.
Typical proximity sensor problems and their solutions
If the sensor doesn't work even after calibration, the reasons can be both software and hardware, and let's look at the most common scenarios and how to fix them:
1.The sensor doesn't work during the call
- π Check the protective film or case: thick glass or opaque case can block the infrared signal. Try to remove the accessories and test the sensor.
- π± Update the firmware: go to Settings β The phone. β Update the system and install the latest version MIUI/HyperOS.
- π Reset network settings: sometimes the problem is related to a conflict of network settings. β SIM-maps and mobile networks β Resetting network settings.
2.The sensor is activated too late or too early
This indicates that the calibration is not correct. Repeat the procedure through the engineering menu (see section above) or use the Proximity Sensor Reset app from Google Play. If the problem persists, check the device for physical damage (cracks near the sensor, moisture).
3. the sensor is unstable (it turns on, then not)
Possible causes:
- π Battery savings: disable optimization for the Phone app in battery settings.
- π οΈ Conflict with other apps: temporarily disable antivirus, cache cleaners and ad blocking programs.
- π‘ Bad plume contact: if the phone fell or was repaired, the sensor plume could have moved away.
What if the sensor is physically damaged?
Additional settings: how to turn off the sensor or change its sensitivity
In some situations, users want to disable the proximity sensor β for example, if it is too aggressive or interferes with the headset β in two ways:
Method 1: Through setting up special features
- Go to Settings β Special features β System settings.
- Find Automatic Screen Disconnect (or Approximation Sensor).
- Turn off the slider.
Method 2: With ADB (for power users)
If standard settings do not allow you to turn off the sensor, use the ADB command:
adb shell settings put system proximity_delay 2500This command increases the sensor delay to 2.5 seconds (default: 200-500 ms). To return the standard settings, type:
adb shell settings delete system proximity_delayβ οΈ Warning: Disabling the proximity sensor can cause random taps during calls and quick battery discharge. Use this method only if really necessary.
π‘
On most Xiaomi smartphones, the proximity sensor cannot be turned off completely without root rights. The alternative is to increase the delay or use applications like Proximity Sensor Fix.