Read the statement by Michael Teeuw here.
Screen keeps going to black after a few minutes.
- 
 I followed these instructions to set up my magic mirror and turn off the screensaver and screen blanking but the screen is still going to black after a few minutes. Could someone please help me or let me know what I might be missing. Pretty much new to coding, so I am trying to find my way around. "Step 3 
 Let’s disable the screen saver and screen blanking as well. This needs to be done in two places. First in the autostart configuration:
 sudo nano /etc/xdg/lxsession/LXDE-pi/autostartAnd add the following to the bottom of the file: @xset s noblank @xset s off @xset -dpms 0_1466022921947_049-configure-rpi-sm.pngNext in the X-windows manager configuration: 
 sudo nano /etc/lightdm/lightdm.confScroll down to the [SeatDefaults] section and look for the xserver-command line below that. Change the line to look like this: 
 xserver-command=X -s 0 -dpms(so you’re removing the # on the front, and adding the missing bits at the end.) Again, hit CTRL-X and say Y(es) to saving the file.
 Note from admin: Please use Markdown on code snippets for easier reading! 
- 
 @tjop true, so disable the sleeping function of the pi should work right? 
- 
 run 
 nano /home/pi/.config/lxsession/LXDE-pi/autostart
 Comment out (put a # in front of) the lines that are already in the file and add these 4 lines.@xset s off @xset -dpms @xset s noblank @midori -e Fullscreen -a http://localhost/MagicMirror/index.phpThis will disable the screensaver and start the magic mirror on boot and skip loading the LXDE GUI. quoted from “https://www.reddit.com/r/raspberry_pi/comments/3oktfu/magic_mirror_how_to/” 
 Note from admin: Please use Markdown on code snippets for easier reading! 
- 
 @chengstark said in Screen keeps going to black after a few minutes.: https://www.reddit.com/r/raspberry_pi/comments/3oktfu/magic_mirror_how_to/ I went ahead and tried what you suggested and it wasn’t successful. I couldn’t get it to auto-start or stop it from going to sleep. I wish I could give more details, but I am completely new to coding. 
- 
 An extreme measure here would be to try this: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=41898&start=25 xscreensaver can be used right off the menu… you can set/turn on/turn off functions. 

