设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 技术文摘 查看内容

完美解决Linux Deepin 12.06屏幕亮度不能保存的问题

2012-7-24 10:53| 发布者: 红黑魂| 查看: 3538| 评论: 0|来自: Ubuntu之家

摘要: 每次进入Linux Deepin 12.06系统时屏幕亮度都为最高,网上能搜索到的几种解决方法要么太复杂要么无效。其实解决这个问题只需要两行代码。 Linux Deepin 12.06的亮度设置保存在”/sys/class/backlight/acpi_video0/br ...

每次进入Linux Deepin 12.06系统时屏幕亮度都为最高,网上能搜索到的几种解决方法要么太复杂要么无效。其实解决这个问题只需要两行代码。
Linux Deepin 12.06的亮度设置保存在”/sys/class/backlight/acpi_video0/brightness”。每次进入系统时这个文件都会 被重置为最大值7,所以直接更改这个文件的值是没用的。我们可以用以下两个步骤来让系统启动后自动设置屏幕的亮度值。

  1. 更改rc.local文件使系统在启动时自动更改/sys/class/backlight/acpi_video0/brightness文件权限
  2. 更改.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不可行。

本文来自路志伟的投稿。

原创文章如转载请注明:转自Ubuntu之家 {www.ubuntuhome.com}


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部