Turn off the screen automatically when closing the front camera on Xiaomi: 5 proven ways

Do you close the cover of the case or just cover the front camera on Xiaomi and the screen immediately goes out? This feature, designed to save battery power, often annoys users β€” especially when you watch a video, read an article or use your phone as an alarm clock. In this article, we will discuss why this happens and how to turn off the screen when you close the camera on any Redmi, POCO and Mi smartphones with MIUI 12-14 firmware.

The problem is that the proximity sensor, which is located next to the front camera on many Xiaomi models, when you close it (like a magnetic latch case or even a finger), the system perceives this as a signal to lock the screen, but the good news is that this feature can be deactivated, and we will show you all possible ways, from standard settings to hidden commands for experienced users.

Why does the screen go out when the front camera is closed?

The culprit is the proximity sensor, which is often integrated into the front camera module on Xiaomi, and its main task is to turn off the screen during a phone conversation when you hold the device to your ear. However, on some models (Redmi Note 10 Pro, POCO X3 Pro, Mi 11, etc.), the sensor also works when the camera is physically closed:

  • πŸ“± Magnetic lock cases – many Xiaomi cases are equipped with a magnet that locks the lid.
  • πŸ‘† Touching with your finger – if you accidentally hit the camera area, the screen may go out.
  • πŸ”„ Problems with sensor calibration - after the update MIUI Mechanical damage or sensor may not work properly.

Interestingly, on some models (e.g. Redmi 9T or POCO M3) this feature is disabled by default, and on flagships (Xiaomi 13, Mi 12) it is enabled, due to different firmware versions and hardware solutions.

Method 1: Disabling the proximity sensor in the MIUI settings

The easiest way is to deactivate the proximity sensor through the standard menu, but in the latest versions of MIUI 13-14, this parameter is hidden deeper than before.

  1. Open the Settings. β†’ System system β†’ Additionally.
  2. Select Special Opportunities.
  3. Scroll down to the Physical buttons section and click Autolock the screen.
  4. Turn off the option of Locking the proximity sensor.

If your MIUI version doesn’t have this item, try an alternative path:

Settings β†’ Screen β†’ Autolock β†’ Approach Sensor (disable)

Check out the MIUI version (Settings β†’ About the phone)

Backup your settings (Settings β†’ Additional β†’ Backup)

Make sure the battery is more than 30% charged.

Close all background applications-->

Important! On some models (Redmi Note 8 Pro, POCO F1), the automatic screen switching off during calls may stop working after the sensor is turned off, in which case you will have to manually lock the screen with a power button.

Method 2: Using a Hidden Engineering Menu (for the experienced)

If standard settings don't work, you can use the Engineering Mode, which is a method that requires caution, because incorrect actions can disrupt the sensors.

  1. Open the phone app and enter the combination: ##6484###
  2. Select Proximity Sensor (Proximity Sensor).
  3. In the PS Calibration section, press Do Calibration.
  4. After calibration, go back and turn off the PS Auto Test option.

If the combination doesn’t work, try alternative code for new models:

#4636## β†’ Testing β†’ Sensors β†’

πŸ’‘

Before entering the engineering menu, write down the current sensor values (e.g., take a picture of the screen) to help restore the settings if something goes wrong.

⚠️ Attention: On Xiaomi 12/13 and POCO F4 The engineering menu can be blocked. ADB-team (mode) 4).

Method 3: Adjusting through ADB (for advanced users)

If the previous methods didn’t work, the Android Debug Bridge remains (ADB) β€” So you're going to need a computer to do a deep setup. USB-Cable, Step-by-step:

  1. Enable Developer Mode: Settings β†’ About Phone β†’ MIUI Version (click 7 times)
  2. Activate USB Debugging in Settings β†’ Additional β†’ For developers.
  3. Connect your phone to your PC, open the command line (Windows) or terminal (Mac/Linux) Enter: adb shell settings put global proximity_delay 2500 This command increases the sensor response delay to 2.5 seconds.
  4. To completely disable the sensor, use: adb shell settings put global proximity_sensor_enabled 0

After completion ADB-When you have commands, reset your phone, or the changes may not take effect, use the same command with a value of 1 instead of 0 to get it back.

Xiaomi modelSupports ADB?Recommended team
Redmi Note 11/12Yes.proximity_delay 3000
POCO X4 ProYes.proximity_sensor_enabled 0
Mi 11 LiteYes (requires unlocking the bootloader)proximity_delay 1500
Xiaomi 13 ProPartially (restrictions of MIUI 14)Use Method 5 (Magisk)
πŸ“Š Which method did you try first?
Standard settings
Engineering menu
ADB-team
Another way.

Method 4: Installation of a Magisk module (for rooted devices)

If your Xiaomi has an unlocked bootloader and Magisk is installed, you can use special modules to turn off the proximity sensor.

  • πŸ”§ Disable Proximity Sensor – Deactivates the sensor completely.
  • ⚑ Sensor Disabler – allows you to selectively turn off sensors.
  • πŸ› οΈ MIUI Tweaks – Extended settings for MIUI, including sensor control.

Installation instructions:

  1. Download the module (for example, with XDA Developers).
  2. Open Magisk Manager and go to the Modules section.
  3. Click Install from Storage and select the downloaded file.
  4. Reboot the phone.

⚠️ Note: Installing Magisk modules can lead to loss of warranty and unstable system operation. TWRP or MIUI Backup.

What to do after installing the module, the phone stops seeing SIM-map?
This is a well-known problem in some Xiaomi models. MIUI 13+. Decision: 1. Remove the module through Magisk Manager. 2. Restore the boot section with Fastboot: Fastboot Flash boot magisk_patched.img 3. If the problem persists, reset settings (without deleting data).

Method 5: Alternative solutions (if nothing helps)

If all of the above methods have not worked, try the workarounds:

  • πŸ“± Use a case without a magnet - many cases for Xiaomi have a magnetic lock that triggers the sensor. Replace the case with a model without magnets.
  • πŸ”„ Reverse to the old version MIUI β€” If the problem occurs after the update, you can return the previous firmware through the Mi Flash Tool.
  • πŸ› οΈ Contact the service center – if the sensor is physically damaged (for example, after a fall), you may need to replace the camera module.

For the POCO F3 and Redmi K40, users have found an unusual solution: if you don't cover the camera completely (for example, leave a small gap), the sensor doesn't work. This method is not universal, but it can help as a temporary measure.

πŸ’‘

On Xiaomi 12T and later, the proximity sensor is often integrated into the display, in which case it can only be turned off via ADB or Magisk, since standard MIUI settings do not provide this option.

Frequent Mistakes and How to Avoid Them

When trying to disable the proximity sensor, users often encounter typical problems:

Mistake.Reason.Decision
No "approximation sensor" in the settingsOutdated or modified firmwareUpdate MIUI to the latest version or use ADB
After the sensor is turned off, the screen is not locked during calls.Sensor fully deactivatedUse the team. proximity_delay shutdown
ADB-commands are not appliedNot enabled debugging on USB or no driversCheck the connection and install the Mi PC Suite
Phone overheats after sensor shutdownBackground processes not optimizedClean the cache in Settings β†’ Storage

If you have artifacts on the screen or spontaneous reboots after manipulating the sensor, immediately reset the settings to factory settings (Settings β†’ Additional β†’ Resetting).

Can I turn off the proximity sensor without root rights?
In most cases, standard settings are sufficient. MIUI or ADB-root rights are only required for Magisk module installation or deep system modification.
Why did the MIUI update start working again?
Updates often reset user settings. After the update, check the sensor settings in Settings β†’ Special Opportunities or Re-Apply ADB-team.
Will it work on the POCO F5?
On the POCO F5 (and other new models with MIUI 14), the standard sensor shutdown can be blocked.Use ADB or Magisk.
Can the sensor be turned off for specific applications only?
No, the proximity sensor is system-level and unrelated to individual programs, and the alternative is to use applications like Tasker to automatically lock the screen under different conditions.
How to check if the proximity sensor is working?
Type the code ##6484## in the phone app, select Proximity Sensor and hold your hand to the top of the screen. If the values change from 5.00 cm to 0.00 cm, the sensor is in good working order.