每次进入Linux Deepin 12.06系统时屏幕亮度都为最高,网上能搜索到的几种解决方法要么太复杂要么无效。其实解决这个问题只需要两行代码。
Linux Deepin 12.06的亮度设置保存在”/sys/class/backlight/acpi_video0/brightness”。每次进入系统时这个文件都会被重置为最大值7,所以直接更改这个文件的值是没用的。我们可以用以下两个步骤来让系统启动后自动设置屏幕的亮度值。
	
	更改rc.local文件使系统在启动时自动更改/sys/class/backlight/acpi_video0/brightness文件权限
	更改.profile文件使系统在用户登录时自动更改birghtness的值
	 
	具体操作步骤:
	第一步,更改rc.local文件使系统在启动时自动更改/sys/class/backlight/acpi_video0/brightness文件权限
在终端输入
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
插入这句话到代码中:
chmod a+w /sys/class/backlight/acpi_video0/brightness
保证修改后代码如下,注意删除exit前的“#”
	#!/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.
	chmod a+w /sys/class/backlight/acpi_video0/brightness
	exit 0
保存退出。
	
	第二步,更改.profile文件使系统在用户登录时自动更改birghtness的值
进入主文件夹,点击“查看”,点击“显示隐藏文件”。找到.profile文件,双击打开。
在.profile最后一行添加
echo 2 > /sys/class/backlight/acpi_video0/brightness
其中数字2为你设定的屏幕亮度值,最大值为7。
保存退出。
	
	这样每次进入系统后屏幕的亮度都会自动设置为.profile文件中设定的值。
顺便说以下,网上所说的直接在rc.local添加代码更改brightness的值的方法在Linux Deepin 12.06不可行。
	
	本文来自路志伟的投稿。

