Welcome 微信登录

首页 / 操作系统 / Linux / 完美解决Linux Deepin 12.06屏幕亮度不能保存的问题

每次进入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不可行。本文来自路志伟的投稿。 Fedora 17 安装极点五笔Ubuntu上尝试新的Firefox OS(B2G)相关资讯      Linux Deepin 
  • Deepin 2014 Alpha –准备进入全新  (04/15/2014 20:49:12)
  • 深度专访:Linux Deepin图标的故事  (03/28/2014 11:09:45)
  • Linux Deepin镜像服务已覆盖德国  (03/13/2014 07:57:08)
  • Linux Deepin 2013多国语言安装镜  (04/12/2014 09:12:25)
  • Linux Deepin镜像服务覆盖范围新增  (03/13/2014 12:03:23)
  • Linux Deepin新增斯洛伐克、意大利  (03/06/2014 07:41:08)
本文评论 查看全部评论 (0)
表情: 姓名: 字数