网上常用xset dpms关闭和打开显示器:
//关闭
xset dpms force off
//打开
xset dpms force on
实际使用时发现这种方式关闭之后仍然能通过鼠标唤醒。于是在google查找后找到另一种更好用的方式:
//关闭
vcgencmd display_power 0
//打开
vcgencmd display_power 1
非常好用,实测不会因鼠标移动唤醒。
网上常用xset dpms关闭和打开显示器:
//关闭
xset dpms force off
//打开
xset dpms force on
实际使用时发现这种方式关闭之后仍然能通过鼠标唤醒。于是在google查找后找到另一种更好用的方式:
//关闭
vcgencmd display_power 0
//打开
vcgencmd display_power 1
非常好用,实测不会因鼠标移动唤醒。