Ubuntu – Stop monitor from going to sleep in ubuntu 16.04

16.04multiple-monitorspower-managementxorg

I want to stop monitor from going to sleep in ubuntu 16.04. I am using /etc/X11/xorg.conf file in Ubutnu 14.04, which has below lines written in it.

Section "ServerFlags" 
Option "BlankTime" "60" 
Option "StandbyTime" "0" 
Option "SuspendTime" "0" 
Option "OffTime" "0" 
EndSection

And it is working fine in Ubuntu 14.04 but not working in Ubuntu 16.04.

During research I have found that xorg.conf is removed in Ubuntu 16.04. I want to do the same in Ubuntu 16.04. if anybody has any idea about the same then please let me know.

Thanks.

Best Answer

You can use gsettings for enabling and disabling monitor from going to sleep:

  • Disable turning off screen

    gsettings set org.gnome.desktop.session idle-delay 0
    
  • Enable turning off screen with 5 min delay

    gsettings set org.gnome.desktop.session idle-delay 300