You can stop your iPhone from dimming after 5 seconds by turning off the auto-brightness feature. If it does not work, we recommend you try all our solutions provided in this article.