A broken power button on Xiaomi is a problem that many users face after a year or two of active use. The button can stick, stop responding to presses or completely fall off after a fall. But what if you urgently need to lock the screen and the mechanical button does not work? In this article, we will examine all possible ways, from built-in MIUI functions to technical solutions using ADB.
It's important to understand that locking the screen without the power button depends on the firmware version, the smartphone model and the current state of the system. For example, on the Xiaomi Redmi Note 10 Pro with MIUI 14, gestures are available that are not available on older versions like MIUI 11. We will look at universal methods, and also point out nuances for specific devices.
If your smartphone is discharged or completely turned off, some of the ways will not be available β in this case, you will need hardware repair or connection to charge, followed by the use of alternative locking methods, but in 90% of cases the problem is solved software.
1. Use of a screen lock gesture (for MIUI 12 and later)
Starting with MIUI 12, Xiaomi added a hidden dual tap lock feature, similar to the famous gesture on the Nexus and Pixel, but by default it is disabled. Here's how to activate it:
- Open Settings β Special Features β Gestures and Movements β Double-touch to lock.
- Turn on the "Double touch to lock" switch.
- Test the feature: Twice tap the empty space on the home screen or in any app (except the keyboard).
If the item is not on the menu, then your firmware does not support the function, in which case try alternative methods from the following sections.
π‘
On some models (e.g. POCO F3), the gesture only works on stock firmware, and once custom ROMs like the Pixel Experience are installed, the function may be lost.
- β It works on: Redmi Note 11/12, POCO X4 Pro, Xiaomi 12/13 s MIUI 12+
- β Does not work on: devices with MIUI 11 and older, and on Black Shark
- π Alternative: Swipe down the screen gesture (should be included in Settings) β Lock screen β Additional settings)
2. Block through the notification panel (the fastest way)
The most obvious, but often ignored, way is to use the lock button in the notification bar, which is available on all Xiaomi smartphones regardless of the firmware version:
- Swipe your finger down from the top of the screen to open the notification bar.
- Find the "Block" icon (usually in the lower right corner next to the brightness).
- Click on it β the screen will immediately lock.
If no button:
- π§ Go to Settings. β Notification panel β Edit the Quick Settings Panel.
- π Find the βBlockβ icon and drag it to the active area.
- π± On some models (e.g. Redmi) 9A) button hidden β try swiping the panel to the left to display additional icons.
An important nuance: if the smartphone is connected to charging, the lock button in the notification panel may disappear. This is due to the settings "Unlock when connecting charging" in Settings β Lock screen β Additional.
3. Voice command via Google Assistant
If your Xiaomi has Google Assistant installed (or Alice from Yandex), you can block the screen with a voice, which works even if the power button is completely broken:
- Activate voice assistant: For Google Assistant: say "OK, Google" or hold the Home button (if you have one). For Alice, say "Alice" or click on the Yandex widget.
Tell the team:
- π£οΈ "Block the screen (for Google Assistant).
- π£οΈ "Lock the phone" or "Switch off the display" (for Alice).
If the assistant answers that he cannot execute the command:
- π§ Check the permissions: Settings β Annexes β Google (or Yandex) β Permits β Special access β Gesture management.
- π Reinstall the assistant app.
- π± In some models (for example, POCO M4 Pro) voice lock disabled by default due to security policy.
Why does the voice assistant not block the screen?
4. Blocking through ADB (for advanced users)
If the software methods donβt help, you can lock the screen via Android Debug Bridge (ADB).This requires pre-configuration, but works on 100% of Xiaomi devices (if USB debugging is enabled).
Preparation:
- Turn on Developer Mode: Go to Settings β About Phone β MIUI Version. Click on MIUI Version 7 times until the notification βYou are a developer!β appears.
Activate the debugging via USB:
- Go to Settings. β Additionally. β For developers.
- Turn on the USB debugging switch.
- Connect your smartphone to your PC and confirm your trust in your computer.
Commands for lockdown:
adb shell input keyevent 26 # Simulating the power button
adb shell dumpsys power set-screen-state 0 # Forced screen shutdownIf the commands don't work:
- β οΈ Make sure that MIUI Optimization is disabled in the developer settings (can block) ADB-team).
- π§ Try the alternative command: adb shell input keyevent KEYCODE_POWER.
- π± On some models (e.g. Xiaomi) 11T) Requires unlocking of the loader.
Developer mode enabled |Debugging by USB|Installed ADB drivers on PC|Smartphone connected via original cable |Allowed trust in PC-->
5. Automatic locking by timer
If the power button is broken but the smartphone is still working, set up automatic locking after a certain interval of inactivity. This will not replace manual locking, but will reduce the risk of accidental pressing:
- Go to Settings β Lock screen β Autolock.
- Choose the minimum time of 15 seconds or 30 seconds.
- Activate the βBlock when you press the power buttonβ option (yes, it works even if the button is broken β the system emulates the press).
Xiaomi with MIUI 14+ has a hidden function called "Pack Lock" that works on the proximity sensor. To turn it on, run the command in ADB:
adb shell settings put secure pocket_mode 1| Xiaomi model | Minimum Auto-Block Time | Support for pocket sensor |
|---|---|---|
| Redmi Note 10/11 | 15 seconds. | Yes (ADB requires) |
| POCO X3/X4 | 30 seconds | No. |
| Xiaomi 12/13 | 5 seconds | Yes (includes in settings) |
| Redmi 9/9A | 1 minute | No. |
π‘
Autolocking does not replace manual locking, but it reduces the risk of battery drain and accidental pressing. For maximum safety, combine it with a double tap gesture.
6. Screen lock applications (decision side)
If the built-in methods don't work, install a third-party app. The best options for Xiaomi are:
- π Gravity Screen β locks the screen when placed in a pocket or on a table (using a proximity sensor and an accelerometer).
- ποΈ Tap, Tap β Double-touch lock (similar to built-in function, but with advanced settings).
- π€ MacroDroid β creates automatic rules (for example, locking when connecting to Bluetooth headphones).
How to set up Gravity Screen:
- Install the app from Google Play.
- Open it and grant permissions for special access (to work with the lock screen).
- Enable the options: "Blocking when stowed in a pocket" (using the proximity sensor). "Blocking when placed on a table" (accelerometer sensor).
β οΈ Note: Apps like Gravity Screen require constant back-up, which can increase battery consumption by 5 to 10 percent. MIUI Application may close β add it to exceptions in Settings β Battery β Optimizing the battery.
7 Hardware Solutions: What to Do When Nothing Helps
If the software methods donβt work, the problem may be:
- π Battery discharge (smartphone does not respond to commands).
- π οΈ Damaged power button plume (requires repair).
- π Firmware failure (reset or flashing is needed).
Interim decisions:
- π Connect your smartphone to charging β sometimes it allows you to βwake upβ the system and use software methods.
- π Reboot the device through ADB: adb reboot
- π± If the screen responds to touch, try calling Safe Mode (hold the βStopβ button in the power menu) β it turns off third-party apps that can block gestures.
Permanent decisions:
- π οΈ Replacement of the power button β costs 500-1500 β½ service-centre.
- π§ Flashing β if the problem is in the software (for example, after a failed update).
- π² Using a smartphone without a power button β if you have set up alternative locking methods, you can use the device further (but the risk of accidentally unlocking remains).
β οΈ Attention: On Xiaomi with AMOLED-If the power button breaks, try to lock the screen at least once every 10-15 minutes.