0

Is there a possibility to disable the monitor sleep in Ubuntu server 14.04? After 10 minutes my monitor goes to sleep. I've already tried several options, from https://superuser.com/questions/152347/change-linux-console-screen-blanking-behavior/154388#154388

thomasd35
  • 23
  • 1
  • 5

1 Answers1

0

Do this from the console, as root:

# setterm -blank 0 >> /etc/issue

This will add the escape sequence to prevent console blanking to the file /etc/issue which is displayed before the "login: " prompt. Thus the blanking is effectively permanently disabled.

If you're leaving the screen running X, then the above won't have any effect. In that case running xset -dpms; xset s off may help, unless you're also running some other screensaver program, or if your desktop environment has its own ideas of powersaving/screen blanking/etc. so then you should investigate its settings in those areas.

wurtel
  • 15,835
  • 1
  • 29
  • 35
  • I tried this answer but it didn't solve my problem. – thomasd35 Sep 22 '15 at 11:17
  • did you log out after doing this? – wurtel Sep 22 '15 at 12:33
  • Yes, i rebooted the system. I also added the line myself to /etc/issue but that didn't solve my problem either. – thomasd35 Sep 22 '15 at 12:55
  • Ah, are you leaving it at the GUI, i.e. the X display? Try switching to the console via ctrl-alt-F1 and leaving it there. – wurtel Sep 22 '15 at 13:37
  • I'm using xserver to display a webpage and thats when the monitor goes to sleep. – thomasd35 Sep 22 '15 at 17:11
  • I've edited my answer to address the issue when running X. – wurtel Sep 23 '15 at 06:35
  • Thx for the update but i now get "unable to open display "" " 2 times – thomasd35 Sep 23 '15 at 09:54
  • Do this from an xterm and don't use `sudo` or similar i.e. run it as the normal user. – wurtel Sep 23 '15 at 12:36
  • I don't get any messages now, but the screen keeps blanking after 10 mins. – thomasd35 Sep 23 '15 at 13:31
  • Then you need to check your desktop environment's power settings, as I mentioned earlier. http://blog.tordeu.com/?p=292 may help; I don't use gnome myself. – wurtel Sep 23 '15 at 14:06
  • I just installed an ubuntu 14.04 server with xorg and firefox thats showing a website that needs to be always on. – thomasd35 Sep 23 '15 at 16:03
  • When the server starts, he also starts a init.d file to start this certain website. The file looks like this : "startx -e firefox "http://www.mywebsite.com" Looking at the answers i added an extra line "xset -dpms; xset s blank" but this didn't solve my problem. – thomasd35 Sep 25 '15 at 08:33
  • The `startx` keeps running as long as the firefox is active; so the `xset` is never executed. Try using `startx -e sh -c 'xset -dpms; xset s off; firefox mywebsite.com'` (note *not* `xset s blank` as that forces the blank!) – wurtel Sep 25 '15 at 10:15
  • Now i've got the following message, Loading extension GLX Xinit : connection to server lost – thomasd35 Sep 25 '15 at 13:31
  • Maybe it's best to switch the blanking off in the xorg config; see https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling or http://crunchbang.org/forums/viewtopic.php?pid=136543 – wurtel Sep 25 '15 at 13:55
  • Hi, i solved my problem using porteus-kiosk. Fast and easy to setup. – thomasd35 Oct 08 '15 at 13:06