使用电源管理

设置设备的闲置时间

可以指定系统设备(例如屏幕)在开始使用其低电源模式以前闲置时间的长度。要如此行,请改变 /etc/power.conf 文件中的阈值字段。

改变闲置时间的长度
  1. 作为超级用户,编辑 /etc/power.conf 文件。 键入:

    example# vi /etc/power.conf

  2. 修改需要的条目。

    如下所示,/etc/power.conf 文件中键盘和鼠标设备的闲置阈值已改为 300 秒(5 分钟)。


    # Power Management Configuration File
    #
    # Putting an entry in this file will only be effective if the 
    # driver for the device supports device power management. 
    # After the file is modified, pmconfig(1M) command must be
    # executed to activate the new change.
    #
    # Fields must be separated by white space or semicolons.
    # Note that physical dependents are automatically considered
    # by the power management framework.
    # Name           Threshold(s)       Logical Dependent(s)
    /dev/kbd         300
    /dev/mouse       300
    # NOTE: The entries below are only used when no window
    # system is running. When running the window system, monitor
    # power management is done by the screen saver functions.
    
    /dev/fb          0 0         /dev/kbd     /dev/mouse
    
    # Auto-Shutdown  Idle(min)  Start/finish(hh:mm)  Behavior
    autoshutdown     30          9:00 9:00           default
    
    statefile        /.CPR>

  3. 将新的设定值通知"电源管理"框架,键入:

    example# /usr/sbin/pmconfig

    运行 pmconfig 即根据目前在 /etc/power.conf 文件中定义的阈值将新的设定值通知了"电源管理"框架。