If your iPhone or iPad has a broken sleep/wake button (a top button or a side button depending on the device), you can still lock your screen (or even restart) using an accessibility feature called AssistiveTouch. Here’s how.
AssistiveTouch lets you simulate physical movements, gestures, and button presses with simple menu options on the touchscreen of your iPhone or iPad. This includes locking your screen and restarting your device. To enable it, first open Settings on your iPhone or iPad.
In Settings, go to Accessibility > Touch.
In “Touch”, tap on “AssistiveTouch”.
Next, enable the switch next to “AssistiveTouch”.
A special AssistiveTouch button (which looks like a gray square with a white circle in the middle) will appear on the side of the screen.
Whenever AssistiveTouch is enabled, this AssistiveTouch button will always stay onscreen, though sometimes it may turn transparent or temporarily disappear to get away from you. You can reposition it by dragging it with your finger.
To put your iPhone or iPad to sleep without using the power button, press the AssistiveTouch button once. In the menu that appears, tap “Device”.
In the device menu, tap “Lock screen”.

After typing, your screen dims. You just locked your device without using your top or side button! Do you ever feel like a hacker? AssistiveTouch is really a very powerful tool.
Here’s something even cooler: you can also completely restart your iPhone or iPad using AssistiveTouch. Just press the AssistiveTouch button, then go to Device > More and press “Restart”. This is equivalent to turning off your device and then turning it back on.
RELATED: How to Use an iPhone with a Broken Home Button
How to Wake Your iPhone or iPad Without a Power Button
After locking your screen, you can wake your iPhone or iPad by pressing the Home button (if your device has one), tapping the screen on some devices (see Settings > General > Accessibility > Tap to wake.) , or by physically lifting the device (if “Raise to Wake” is enabled). You can also try using “Hey Siri” (if enabled) while your iPhone or iPad is locked.
If for some reason you cannot wake the device, charging it or receiving a notification will also turn on the screen, giving you the ability to interact with and unlock your iPhone or iPad.
Also, if you rely on your iPhone or iPad for critical tasks and can afford a repair or replacement, consider contacting Apple Support or visiting an Apple Store to learn about repair options. Good luck!
RELATED: How to Set Up and Use Siri on an iPhone