Home  >  Article  >  Operation and Maintenance  >  How to prevent the monitor from sleeping in Linux

How to prevent the monitor from sleeping in Linux

王林
王林Original
2019-12-25 16:16:596521browse

How to prevent the monitor from sleeping in Linux

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

Edit xorg.conf, add the following options to close xscreen 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn