现在的位置: 首页 > 综合 > 正文

ubuntu 12.04保存屏幕亮度解决方法

2017年10月23日 ⁄ 综合 ⁄ 共 988字 ⁄ 字号 评论关闭

Ubuntu 12.04 LTS不能自动保存亮度:每次登陆、解锁后,都是最大亮度,非常讨厌!
1、打开终端,输入命令查看本机支持的最大亮度值
cat /sys/class/backlight/acpi_video0/max_brightness

我的笔记本支持最大亮度为20
kashu@ubuntu:~$ cat /sys/class/backlight/acpi_video0/max_brightness
20

2、编辑这个文件
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

插入这句话到代码中:

echo 16 > /sys/class/backlight/acpi_video0/brightness

就像我下面的一样:
kashu@ubuntu:~$ cat /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.
echo 15 > /sys/class/backlight/acpi_video0/brightness
exit 0

其中echo 后面的值为0-20,对应为0到100%,如echo 10表示一半亮度


转载自:http://linzhibin824.blog.163.com/blog/static/7355771020133532038651/

抱歉!评论已关闭.