Method 1: Command line method
Linux method to prevent the monitor from sleeping:
# setterm -blank 0 # setterm -blank n (n为等待时间)
Free video tutorial recommendation:linux video tutorial
Method 2: Edit the configuration file
Editxorg.conf
, add the following options to closexscreen saver
directly:
Section “ServerFlags” Option “BlankTime” “0″ #关闭黑屏 Option “StandbyTime” “0″ #关闭待机功能 Option “SuspendTime” “0″ #关闭睡眠功能 Option “OffTime” “0″ EndSection
Restart after modification and it will take effect.
Editing the xorg.conf file has the same effect as using the xset command. You can use xset -q to view the settings and current configuration.
# xset -q //查看设置和当前配置 # xset -dpms //Energy Star features off # xset +dpms //Energy Star features on
Recommended related articles and tutorials:linux tutorial
The above is the detailed content of How to prevent the monitor from sleeping in Linux. For more information, please follow other related articles on the PHP Chinese website!