不使用时如何关闭显示器电源?

不使用时如何关闭显示器电源?

我想在 X 时间不活动后关闭 Debian 8 服务器的显示。

我尝试编辑我的/etc/X11/xorg.conf,现在看起来像:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 375.20  (buildmeister@swio-display-x86-rhel47-06)  Tue Nov 1
5 17:49:44 PST 2016

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option "StandbyTime" "1"
    Option "SuspendTime" "1"
    Option "OffTime" "1"
    Option         "BlankTime" "1"
EndSection

Section "Files"
EndSection

Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
EndSection

Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "Unknown"
        HorizSync       28.0 - 33.0
        VertRefresh     43.0 - 72.0
        Option         "DPMS"
EndSection

Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        SubSection     "Display"
                Depth       24
        EndSubSection
EndSection

现在它熄灭了,但显示屏仍然打开(因为我有液晶显示屏,背光始终打开)

如何完全关闭显示屏?我正在使用 nvidia 显卡。

答案1

要使 X 会话的屏幕消隐,请放入您的.xinitrc或类似的内容:

xset dpms A B C

其中A B C分别是待机、挂起和关闭电源的超时值。我想如果你把它们都做得一样的话,到时候它就会断电。

要使 tty 屏幕消隐,请使用:

setterm -blank 0 -powerdown 0

在那儿。您还可以通过重定向将其发送到特定的 tty;即,追加>>/dev/ttyX.

有关使用 DPMS 的更完整信息请参见此处:

https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling

相关内容