装过 Ubuntu 的童鞋可能都遇到过这种问题,设置好合适的屏幕亮度关机重新启动后屏幕亮度又变为最大值。
针对这种情况,我上网找了一些资料,经过个人的尝试后问题得到解决!稍微整理了一下分享给大家:
1、首先我们打开这个文件 sudo gedit /etc/rc.local 内容如下
#!/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.
exit 0
2、我们在exit 0前面插入一段脚本
echo 5 > /sys/class/backlight/acpi_video0/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 5 > /sys/class/backlight/acpi_video0/brightness
exit 0
3、重启即可
注意:
在此处需要注意一下上面红字描述的部分,部分笔记本电脑可能不一样,需要自己查看一下。如果不一样,替换成你的文件名即可。
cd /sys/class/backlight/
ls
acpi_video0 radeon_bl0
echo 5 > /sys/class/backlight/acpi_video0/brightness 中的数字5代表屏幕亮度系数,5代表50%亮度!改成自己需要的数值即可。