The reason your iPhone’s screen keeps dimming and turning off is because of a feature called “Auto-Lock,” which automatically puts the iPhone into a sleep/lock mode after a certain period of time. Two-thirds of the way through the set period, the screen dims to half brightness. To fix it, we need to turn “Auto-Lock” off.

First, open the “Settings” app by tapping the “gear” icon. Swipe down in the middle of your iPhone’s home screen to use Apple’s built-in Spotlight search if you can’t find the app on your device.

In “Settings,” tap “Display & Brightness.”

In the “Display & Brightness” settings, scroll down and tap “Auto-Lock.”

In “Auto-Lock,” you will see a list of time options. These determine the length of time your iPhone’s screen will stay lit before turning off and going into Lock mode.

Here, we’re going to turn it off entirely, so select “Never.”

After that, exit “Settings.” Whenever you wake your iPhone, its screen will stay lit and will not go into Lock mode until you push the power button.

If you keep having trouble with a dimming screen even with “Auto-Lock” disabled, it could be because “Auto-Brightness” is enabled. “Auto-Brightness” can be disabled under the Accessibility options in the Settings app.

RELATED: How to Disable Auto-Brightness on Your iPhone

It’s Usually Best to Reenable Auto-Lock Again Later

There are some drawbacks to disabling “Auto-Lock.” The first is battery life: Your phone will run out of battery charge much faster if you forget to turn the screen off. The second is security: If you leave your phone on and it does not lock automatically, anyone can potentially use it.

So, it might be best to turn the “Auto-Lock” feature back on when you’re done. To do that, just repeat the steps above and select a time limit from the list instead of “Never.” Good luck!

RELATED: 8 Tips for Saving Battery Life on Your iPhone