Mode in your pocket on Xiaomi: the full guide

Modern Xiaomi, Redmi and POCO smartphones are equipped with many sensors that make using the gadget comfortable and safe. One of these features is the so-called “mode in the pocket.” This option prevents accidental screen presses when the device is in a confined space, such as in a trouser or bag. Without this feature, the phone could unlock, make an emergency call or launch the application simply from friction against the fabric.

The system relies on data from the proximity sensor and the light sensor. When you remove the phone, the sensors detect a sharp dimming and proximity of an alien object. The MIUI or HyperOS system instantly responds to this event by blocking the touchscreen. However, users often face the opposite situation: the screen does not go out, the battery is discharged, and in your pocket there is a hot device with a voice recorder or camera on.

In this article, we will explore how this technology works, why it sometimes fails, and how you can flexibly customize it to your needs. Understanding the mechanics of sensors will help avoid many unpleasant situations associated with “pocket dialing” or battery discharge at the most inopportune time.

The principle of operation of sensors and the logic of the system

The foundation of the function is an infrared proximity sensor, usually located at the top of the front panel, which emits an invisible beam and analyzes its reflection. If the reflected signal returns quickly, the system realizes that the object in front of the screen is less than 2-3 centimeters away, which is interpreted as the phone being in your pocket.

In parallel, a light sensor works. The combination of “near object” plus “no external light” gives the Android operating system a command to block input from the touchscreen. It is important to note that some Xiaomi budget models use a virtual sensor that works less accurately than the physical one, which can lead to false positives.

⚠️ Warning: Oversensitivity of the proximity sensor can cause the screen to go out during a conversation if you just press your phone with your cheek without even putting it in your pocket.

The MIUI shell data algorithm has several layers of protection. First, the system ignores short-term dimming so as not to lock the screen when you just wave your hand. Then, if the dimming is stable, the input lock is activated. Only after the device is removed and the light appears, the screen becomes responsive again.

💡

If the proximity sensor is not working properly, try to wipe the top of the screen with an alcohol napkin - fat pollution often distorts the sensor readings.

Where to find the settings in your pocket

Users often search for a separate app or hidden menu, but the settings are located in the standard security section.The path may vary slightly depending on the firmware version, but the overall logic remains the same for all devices of the brand.

  • 📱 Open the standard Safety app (green zipper icon) that is preinstalled on all Xiaomi smartphones.
  • 🔧 At the bottom of the screen, find and click on the gear icon or go to the Settings section».
  • 🚫 Find an item called “Mode in your pocket” or “Pocket mode».
  • ✅ Activate or deactivate the switch in front of the desired option.

In some versions of HyperOS, this item can be duplicated in the general system settings. To do this, go to Settings → Screen and Brightness or Settings → Special Features. If you can't find the option in specified places, search by settings by typing in "pocket".

Note that global firmware versions can translate item names in different ways, such as “Pocket mode” or “Prevent accidental touches.” The absence of an explicit switch in new versions of Android could mean that the feature is now controlled exclusively by system algorithms without the ability to manually disable users.

What to do if the item is not on the menu?
If you don’t find the switch, try typing ##6484# (not working on all models) to enter the engineering menu, but be careful when changing the settings there.

Instructions for disabling and enabling the function

Many users prefer to turn it off completely because they find it unnecessary or annoying, especially for those who wear a phone in transparent cases or use black-framed protective glass that can overlap the sensor.

☑️ Algorithm of the deactivation mode

Done: 0 / 1

Once you switch the switch to "Off" position, the system will stop blocking the screen when dimming, which means that random taps in your pocket will become possible, locking the screen on the timer will continue to work, but the protection against "pocket dial" will disappear.

If you need to turn the mode back on, just repeat the same steps. Turning on is especially recommended for users who carry a smartphone in their jeans pockets along with keys or trifle. Metal objects can create pressure on the screen, which without sensor protection will lead to chaotic interface actions.

Status.Sensor actionScreen reactionRisk of accidental action
Mode on.Blocking the touchscreenGasping or not respondingMinimum
Mode off.Ignored.It's working normally.High-pitched
Contaminated sensorFalse testimonyShimmering/extinguishingMedium.
Sensor damaged.No reaction.It's not going out.critical

Remember that disabling the protection increases the vulnerability of the device in crowded places. A phone accidentally removed from your pocket can unlock and start dialing or sending messages if a reliable biometric security method or pin is not installed.

💡

Disabling the mode in the pocket is convenient for users of protective glasses with wide frames, but increases the risk of accidentally unlocking the device.

Why the screen does not go out in your pocket: reasons and solutions

When the pocket mode is not working, it is one of the most common complaints of Xiaomi owners: the screen continues to burn, the device heats up, and the battery loses charge rapidly, most often the problem lies in the physical obstacle to the sensor.

The first thing you need to check is a safety glass or a film, and if they're curved or they have a black edge that covers the top of the screen, the sensor will be blind, and it won't be able to detect the object coming because it will be closed, and in this case, it will only help to replace the accessory with a better one, with a cutout under the sensor.

  • 🧼 Pollution: Dirt, dust, or fat in the dynamic conversational speaker region.
  • 📱 Case: A tight case with high sides can mechanically press on the sensor area.
  • 🔧 Failure of the software: an error in the service of system processes Android.
  • 💥 Damage: Mechanical impact could damage the plume or the sensor itself.

If physical reasons are excluded, try software reset. Rebooting the device often resolves temporary driver conflicts. You can also use the sensor calibration via the engineering menu, although in modern versions of MIUI access to it is limited. Enter the code # #6484## in the call app and select "Proximity Sensor" to check its operation.

📊 How often do you have a screen in your pocket?
Always working perfectly: Sometimes there are failures: Never fades: I do not use this function at all

The problem of false positives and unlocking

The reverse problem is when the phone thinks it's in your pocket, even though it's on the table, the screen goes out, and you can only wake it up with a power button or double tapping (if it's on), which often happens when you use certain types of cases or if the phone is lying down on a dark surface.

False positives can also be caused by software bugs after a system update, in which case cleaning the Security and Settings app cache helps. Go to Settings → Apps → All applications, find the system services you need, and select Clear Cache.

⚠️ Note: Do not use magnetic holders for the car in the area of the upper edge of the phone, the magnetic field can (interfere) with the work of the Hall sensors and the approach.

Another reason could be a "wake-up" or "double tapping" function, which can conflict with pocket mode. If the phone is in a narrow pocket and vibrates slightly from movement, the motion sensor can activate the screen, and the proximity sensor can not have time to block it.

The influence of covers and accessories on the work of sensors

Choosing accessories for Xiaomi is not just a matter of aesthetics, but also functionality. Cheap cases made of thick silicone rubber can shift and close the light sensor, resulting in the phone being constantly in a state of “half-dusk”, automatically reducing the brightness or not locking in the pocket.

Magnetic clasp cases are particularly critical. The magnet embedded in the lid is designed to put the phone into sleep mode when it closes. If the magnet is weak or incorrectly positioned, the system may not know if the cover is closed or if the phone is just in your pocket, which causes the touchscreen to lock when it is not needed, or vice versa.

For users actively operating the mode in their pocket, it is recommended to choose thin overhead cases or transparent plastic linings that have precise cutouts under the top panel. Avoid accessories with decorative elements in the area above the speaker.

💡

When buying a protective glass, choose options labeled “Case Friendly” or with a reduced coating area to leave the sensors open.

Diagnostics and calibration of the proximity sensor

If you suspect that the sensor is not working properly, you can do a self-diagnosis. The CIT (Cellular Industry Test) engineering menu has a special test to check the sensor. When you bring your hand to the top of the screen, the values should change from 5.0 (far) to 0.0 (close).

In some cases, calibration helps, and in the same engineering menu, you can select Proximity Sensor, close the sensor with your hand, and press Calibration. Once you've calibrated successfully, the phone will retain new basic senses, which can help if the sensor has lost track of nearby objects.

However, if software methods don't work, there's a hardware malfunction, and replacing the proximity sensor is a low-cost procedure that requires disassembling the device. In modern smartphones, the sensor is often integrated into the front camera plume or speaker, making repairs more difficult.

Can this feature be removed from the phone?
You can’t remove the system component completely without rooting and deep firmware modification, but you can minimize its impact by disabling all associated options in security and special features settings.
Why doesn’t the new Xiaomi have a mode switch in your pocket?
In the new versions of HyperOS and MIUI 14, the company has implemented machine learning algorithms that automatically detect where you are in your pocket. Manual control is abolished, since the system itself decides when to lock the screen (based on) analysis of user behavior.
Does the pocket mode affect the alarm clock?
No, the alarm clock should sound even if the phone is locked in pocket mode. However, if the alarm clock's Pocket Mode feature is enabled (in some models), the sound can be muted until you reach the phone so as not to stun you in your pocket.
What if the screen goes off while watching a video?
This is a classic sign of a malfunction or contamination of the proximity sensor, check if the top edge of the phone is covered by your hand when horizontally held, if the problem persists, calibrate or replace the protective glass.