Ubuntu – Prevent screen from turning black on server

14.04serverxbmc

I have an Ubuntu server installation with XBMC. After 5 minutes of inactivity the screen turns black and can't be woken up with the remote control. However a keyboard press does wake it up. Since I don't want to use a keyboard this is very annoying.

The black screen doesn't seem to be issued by XBMC itself. It's own screensaver is set to dim after 3 minutes, which it does. XBMC is started using xinit.

I'd like to prevent the screen from turning black or find a way to wake it up using the remote.

What I've tried so far is:

  • Set GRUB_CMDLINE_LINUX_DEFAULT="consoleblank=0" in /etc/default/grub and run update-grub.
  • Add BLANK_TIME=0 and POWERDOWN_TIME=0 in /etc/kbd/config

Best Answer

xset -display :0 s off 
xset -display :0 -dpms 
xset -display :0 s noblank 

I run this on startup (add it to /etc/rc.local) and it works fine. ;)

:0 of course has to be the display you want to keep from turning black.