How to get Xiaomi phone locked when the case is closed: the complete guide

Are you tired of constantly pressing the power button to lock the Xiaomi screen? Or worrying that the phone will accidentally unlock in the bag and start calling or opening apps? There is a solution: automatic locking when closing the case is a feature that saves battery power and protects against accidental pressing. But not all cases and not all Xiaomi models support it out of the box.

In this article, we will discuss how to turn on lock when closing the case on different versions of MIUI (12 to 15), which cases are suitable for this, and what to do if the function does not work. And also talk about hidden settings that the manufacturer does not advertise, but which can save your screen from unnecessary inclusions.

Why does Xiaomi phone not lock when the case is closed?

If your Xiaomi ignores the closure of the case, the reasons may be both software and hardware.

  • πŸ”Ή There is no magnet in the case – the function only works when there is a built-in magnet (usually in the upper left corner).
  • πŸ”Ή The magnet is too weak – cheap cases are often equipped with low-quality magnets that are not recognized by the Hall sensor.
  • πŸ”Ή The function is disabled in the settings - in some firmware MIUI The option is hidden or reset after the update.
  • πŸ”Ή Hall sensor damaged – if the phone fell or was repaired, the sensor could fail.
  • πŸ”Ή Incompatibility with the version MIUI β€” into MIUI 14/15 The logic of the function has changed.

Before you sin on the hardware, check the settings. Often the problem is solved in just 2 clicks.

πŸ“Š What kind of case you have on Xiaomi?
Original (from Xiaomi)
Magnet-sided
No magnet.
I don't know.

Which covers support automatic locking?

Not every magnet case is suitable for Xiaomi, but here are the key criteria for choosing:

Type of caseSupport for blockingNotes
Original Xiaomi cases (Smart Cover series)βœ… Yes.The magnet is optimally located, guaranteed to work on all models.
Magnet cases from third-party brands (Spigen, Ringke)⚠️ Partially.Depends on the phone model. Not everyone is good for the Redmi Note 12 and POCO X5.
Book cases without magnet❌ No.The lock will not work, but you can use a closing gesture (see section below).
Silicone and transparent covers❌ No.There is no magnet, but some models support touch-sensitive shutdown (e.g. Xiaomi 13 Ultra).

Tip: If you are not buying a case from Xiaomi, check with the seller whether he supports Hall Sensor for your model. For example, for the POCO F5, the magnet cases in the upper left corner are suitable, and for the Redmi 10 – in the center of the upper part.

πŸ’‘

Before buying a case, check its compatibility on the manufacturer's website. For example, Spigen has a filter for Xiaomi models marked "Magnet Compatible".

How to turn on lock when closing the case in MIUI 14/15

The instructions vary depending on the firmware version. In recent versions of MIUI, the path to settings has changed, and in some regional firmware, the option is hidden.

Method 1: Standard settings (for most models)

  1. Open the Settings β†’ Display.
  2. Scroll down and select Lock when closing the case (or Smart Cover in English).
  3. Activate the switch. If you don't have an option, see Method 2.

Method 2: Hidden menu (for MIUI 14+)

If there is no standard item, try this method:

  1. Open the Settings. β†’ The phone.
  2. Click 5 times on the MIUI version to activate the developer mode.
  3. Return to Settings β†’ Additional β†’ Special Opportunities.
  4. Find the Approach Sensor/Hall and turn on the Case Mode.

1.Make sure the magnet case is installed correctly

2.Reset the phone (sometimes the sensor "wilts")

3. check if there are any metal objects near the top of the phone

4. Update MIUI to the latest version-->

Note: On some models (e.g. Xiaomi 12T), the case lock function only works when Always On Display is turned off. Turn it off in Settings β†’ Screen β†’ Always On Display.

What to do if the function is not working?

If you have enabled the setting but the phone is still not locked, try these steps:

  • πŸ”§ Check the Hall sensor: install the Sensor Test app from Google Play and check the magnet response.
  • πŸ”„ Reset the screen settings: Settings β†’ System system β†’ Resetting settings β†’ Resetting display settings.
  • πŸ“± Change the case: If the magnet is weak, try to attach another magnet to the top of the phone (for example, from headphones).
  • πŸ”© Update the firmware: in MIUI 15 fixes Hall sensor bugs for Redmi Note 12 Pro+ and POCO X5 Pro.
How to check the Hall sensor without apps?
Turn on the call mode and hold the magnet to the top of the phone. If the sensor is working, the speaker will turn off (as when you bring it to the ear).

If nothing helps, there may be a hardware problem.

⚠️ Warning: Don't try to disassemble the phone yourself - the Hall sensor is soldered to the motherboard. Contact the Xiaomi service center to check the sensor circuit (error code for the wizard: HALL_SENSOR_FAULT).

Alternative ways to lock the screen

If your case doesn't support the magnet, or the Hall sensor is broken, there are workarounds:

1. Closing gesture (for book covers)

Some Xiaomi models (such as the Mi 11 and newer) support locking by closing the case.

  1. Install a case-book without a magnet.
  2. Turn on Settings β†’ Display β†’ Gestures β†’ Closing the case.
  3. Activate the option to Lock the screen when closing.

2. Automatic locking by timer

Set up a short screen wait time:

  • πŸ•’ Settings β†’ Display. β†’ Sleeping after 15 seconds of inactivity.
  • πŸ”’ Settings β†’ Lockdown and protection β†’ Autolock in 5 seconds.

Blocking applications

If the standard tools don't work, install utilities like Smart Cover or Gravity Screen, which use a gyroscope and accelerometer to detect when the phone is in the case.

⚠️ Note: Blocking applications may conflict with MIUI Optimization. Once installed, disable optimization for them in Settings β†’ Annexes β†’ Application management β†’ Threefold β†’ Special access β†’ Optimizing the battery.

Comparison of blocking methods: which is better?

Each method has pros and cons. Here's a comparison table:

MethodPlusesConsSuitable for
Magnetic case + Hall sensorInstant lockdown, no delaysRequires a case with a magnet, the sensor may breakAll Xiaomi models with Hall sensor
Closing gesture of the caseIt works without a magnet.Not all models can cause false positives.Mi 11/12/13, POCO F4/F5
Timer autolockNo need for a cover, secure.The screen is locked even when it is not necessary.All models.
Blocking applicationsFlexible settings, work without a magnetBattery consumption, possible bugsOlder models without Hall sensor

πŸ’‘

The best option is the original case Xiaomi Smart Cover + enabled function in the settings. This ensures stable operation without unnecessary battery consumption.

Frequent Mistakes and How to Avoid Them

Users often encounter typical problems when setting up a lock case. Here's how to solve them:

  • 🚫 Error: "Function is on, but screen is not locked." Solution: Check if metal objects (keys, coins) are in the way of the sensor. Also turn off Always On Display - it may conflict with the Hall sensor.
  • 🚫 Error: "Phone locks, but doesn't unlock when you open the case." Solution: Enable Settings β†’ Display. β†’ Lift to wake up or touch the screen twice.
  • 🚫 Error: β€œThe function disappeared after the update MIUI". Solution: Reset screen settings (Settings) β†’ System system β†’ Resetting settings β†’ Reset display settings) or roll back to the previous firmware version.

If you use custom firmware (like LineageOS or Pixel Experience), the case lock feature may not work, in which case you either have to return to MIUI or use blocking apps.

My Xiaomi is not responding to the case closing.
First, check: Is there a magnet in the case (please hold a metal object to it - if it is attracted, the magnet is there), is the function enabled in the settings (Settings β†’ Display β†’ Lock when closing the case), is the Hall sensor working (check through Sensor Test). If everything is fine, but the function does not work, try resetting the screen settings or updating the firmware.
Can I unlock my phone when I open my cover?
Yes, but only if you have the original Xiaomi Smart Cover case. To do this: Turn on Settings β†’ Display β†’ Raise to wake up. Activate Double Touch to wake up. When you open the case, the screen will turn on, but you will need a swipe or fingerprint to fully unlock it.
Is Samsung’s case suitable for Xiaomi?
The magnets in Samsung cases are arranged differently, and the Hall sensor at Xiaomi does not recognize them, except for universal cases with adjustable magnet (for example, some Spigen models).
How to disable the lock with a cover if it interferes?
Just turn off the function in the settings: Go to Settings β†’ Display. Find Lock when you close the case and deactivate the switch. If there is no point, reset the screen settings or check if a third-party application is installed to lock.
Will the battery run out faster if you use a lock case?
No, on the contrary, it saves charge. The Hall sensor consumes minimal energy, and locking the screen when the case is closed prevents accidental switching that consumes the battery.