1,cat /etc/default/acpi-support ,发现最后有这么一段注释:
# Note: to enable "laptop mode" (to spin down your hard drive for longer
# periods of time), install the laptop-mode-tools package and configure
# it in /etc/laptop-mode/laptop-mode.conf.
好了,原来先要安装 laptop-mode-tools这个工具,OK,很简单
apt-get install laptop-mode-tools
安装完这个工具之后就会自动启用 laptop mode,下边打开 /etc/laptop-mode/laptop-mode.conf 进行配置
2,配置/etc/laptop-mode/laptop-mode.conf
(1), 配置交流电模式下使用 laptop mode:
#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=1
#电池那默认已经设为1了
(2),配置LCD亮度控制
在/etc/laptop-mode/laptop-mode.conf 中左寻右觅都木有找到 CONTROL_BRIGHTNESS
这个选项,查看帮助手册:man laptop-mode.conf,发现LCD亮度控制原来是在
/etc/laptop-mode/conf.d/lcd-brightness.conf 这个文件里。OK,打开这个文件,进行以下设置:
#
# Should laptop mode tools control LCD brightness?
# 设为1,启用
CONTROL_BRIGHTNESS=1
#
# Commands to execute to set the brightness on your LCD
# “echo 13” 就是要将亮度值 13 写入 BRIGHTNESS_OUTPUT文件中,亮度值根据自己的情况进行取值。
BATT_BRIGHTNESS_COMMAND="echo 13"
LM_AC_BRIGHTNESS_COMMAND="echo 13"
NOLM_AC_BRIGHTNESS_COMMAND="echo 13"
BRIGHTNESS_OUTPUT="/sys/class/backlight/acpi_video0/brightness"
OK,以上配置完成之后,重启即可。这样每次启动系统就不用手动去按Fn+F6/F7了
注意:将echo xx > /sys/class/backlight/acpi_video0/brightness 写入 rc.local 也不起作用。通过 laptop mode tools 来控制则能达到我们的目的。
阅读(1016) | 评论(0) | 转发(0) |