您可以尝试在/etc/rc.local中添加一行,以设置所需的亮度级别。要编辑文件,请运行
sudo -H gedit /etc/rc.local
并添加以下内容
echo X > /sys/class/backlight/intel_backlight/brightness
这样最终结果看起来像这样
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo X > /sys/class/backlight/intel_backlight/brightness
exit 0
X
用所需的亮度级别代替。
如果/etc/rc.local不存在(如Ubuntu新发行版一样),则需要创建它,并使用以下命令使其可执行:
printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local
sudo chmod +x /etc/rc.local
PS:或者,可以/sys/class/backlight/acpi_video0/brightness
替代上述内容。亮度水平变化很大,范围从0到10或到1000。要找到最大值,请尝试
cat /sys/class/backlight/acpi_video0/max_brightness
or
cat /sys/class/backlight/intel_backlight/max_brightness