If the screen of iPhone is not automatically switching OFF, even after several minutes of inactivity, the problem is usually due to the Auto-Lock feature not working on your device.
Auto-Lock Not Working on iPhone
The default setting on iPhone is to automatically switch OFF the display, when it is unlocked and remains unused or inactive for a period of 1 minute.
This feature on iPhone is designed to save battery life and to prevent the possibility of someone else being able to gain access to your unlocked device.
Hence, if the Auto-Lock feature is not working on iPhone, it leads to loss of battery life and increases the possibility of your device being accessed by others.
1. Make Sure Auto-Lock is Enabled
The first step is to check and confirm that Auto-Lock feature is enabled on your device.
Go to Settings > Display & Brightness > Auto-Lock > On the next screen, select 2 minutes or any other duration that is suitable for your unique requirements.
After this, you will find the screen of your iPhone switching OFF after 2 minutes of inactivity. If you want to save more battery life, you can set the Auto-Lock period to the default 1 minute period.
2. Disable Low Power Mode
If the Auto-Lock option is greyed and you are unable to change the Auto-Lock period, the problem is usually due to iPhone being in Low Power Mode.
Go to Settings > Battery > move the toggle next to Low Power Mode to OFF Position.
After disabling Low Power Mode, you should be able to change the Auto-Lock Setting on your iPhone.
3. Restart iPhone
Sometimes, the problem is due to stuck Apps and processes interfering with proper functioning of your device.
Go to Settings > General > Shut Down > use the Slider to Power OFF iPhone.
Allow iPhone to completely Shut Down > Wait for 30 seconds > Restart iPhone and see if the Camera is now working properly.
4. Disable Assistive Touch
If you are using Assistive Touch, disable this feature on your iPhone and see if this helps in fixing the Auto-Lock problem on your iPhone.
Go to Settings > Accessibility > Touch > AssistiveTouch > On the next screen, move the toggle next to AssistiveTouch to OFF position.
5. Install Updates
Make sure that your iPhone is up-to-date with the latest version iOS.
Go to Settings > General > tap on Software Update.
On the next screen, tap on Download and Install (If an Update is available) and follow the instructions to install updates.
6. Reset All Settings
If above methods did not help, you can try to Reset All Settings on your iPhone to Factory Default Settings and see if this helps in fixing the problem.
Go to Settings > General > Transfer or Reset iPhone > Reset > On the pop-up, select Reset All Settings option.
This step will not erase any data from your iPhone, but it will erase your WiFi Network Password and disconnect your device from from internet.
After iPhone restarts, you will be required to join WiFi Network by entering your WiFi Network Password.