友情链接:IT狂人博客

这个问题纠结了我快两年,主要是自己懒,写了个脚本来调节亮度,不过还是稍显不便。近日兴起折腾了一番,终于找到问题根结了。

There are many ways to control brightness. According to this discussion[1] and this wiki page [2], the control method could be divided into these categories:

  • brightness is controlled by vendor specified hotkey. And there is no interface for OS to adjust brightness.
  • brightness is controlled by OS:
    • brightness could be controlled by ACPI
    • brightness could be controlled by graphic driver.

All methods expose themselves to the user by /sys/class/brightness. And xrandr/xbacklight could use this folder and choose one method to control brightness. But
it is still not very clear which one xbacklight prefers by default. See FS#27677 for xbacklight, if you get "No outputs have backlight property." There
is a temporary fix if xrandr/xbacklight does not choose the right directory in /sys/class/brightness: You can specify the one you want in xorg.conf by setting the "Backlight" option of the Device section to the name of that directory

  • brightness is controlled by HW register throught setpci

ACPI

It is often possible to adjust the backlight by ACPI. This controls the actual LEDs or cathodes of the screen. When this ACPI option is available, the illumination is controllable using a GUI slider in the Display/Screen system settings or by simple commands
on the CLI.

Different cards might manage this differently. Check /sys/class/backlight to find out:

# ls /sys/class/backlight/
intel_backlight

So this particular backlight is managed by an Intel card. It is called acpi_video0 on an ATI card. In the following example, acpi_video0 is used.

The directory contains the following files and folders:

actual_brightness  brightness         max_brightness     subsystem/    uevent
bl_power device/ power/ type

The maximum brightness (often 15) can be found by running cat:

# cat /sys/class/backlight/acpi_video0/max_brightness
15

Brightness can then be set (as root) with echo. Obviously you cannot go any higher than your screen's maximum brightness. The values for maximum brightness and brightness in general vary wildly among cards.

# echo 5 > /sys/class/backlight/acpi_video0/brightness

Sometimes ACPI does not work well due to different motherboard implementations and ACPI quirks. This include some models with dual graphics (e.g. Nvidia-optimus/Radeon with intel (i915)) and some examples with this problem in notebooks such as Dell Studio, Dell XPS 14/15/17 and some Lenovo series, Kamal Mostafa kernel developer make patches for solved this issue included after 3.1 kernel version. You can try adding the following kernel parameters in your bootloader(grub, syslinux...) to adjust ACPI model:

acpi_osi=Linux acpi_backlight=vendor

or

acpi_osi=Linux acpi_backlight=legacy

acpi_backlight=vendor will prefer vendor specific driver (e.g. thinkpad_acpi, sony_acpi, etc.) instead of the ACPI video.ko driver.

看了这个之后,很显然,问题就在于acpi_backlight=vendor will prefer vendor specific driver (e.g. thinkpad_acpi, sony_acpi, etc.) instead of the ACPI video.ko driver.
所以我们只要sudo nano /etc/default/grub,
GRUB_CMDLINE_LINUX="“改为GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"重启即可,注意大小写Linux的L为大写。
然后sudo update-grub && sudo reboot

关注我的新浪微博

ubuntu亮度无法自动调节终极解决方案的更多相关文章

  1. svn 集成 redmine 账户验证的终极解决方案

    svn 集成 redmine 账户验证的终极解决方案 赖勇浩(http://laiyonghao.com) 动机 对于大部分开发团队来说,一般都需要一套 SCM 系统,通常是 svn + redmin ...

  2. Eclipse不自动编译java文件的终极解决方案

    最近我的eclipse经常犯傻,项目中总是有很多,启动项目也是没有启动类.查了下项目中生成的class文件,我靠竟然没有,或者还是以前的.原来是eclipse犯傻了,它没帮我自动编译java文件.一般 ...

  3. 【转】JSP中文乱码问题终极解决方案

    原文地址:http://blog.csdn.net/beijiguangyong/article/details/7414247 在介绍方法之前我们首先应该清楚具体的问题有哪些,笔者在本博客当中论述的 ...

  4. Xcode-调试断点不能停在代码区终极解决方案

    转发 调试断点不能停在代码区终极解决方案:  http://mobile.51cto.com/iphone-390082.htm

  5. VIM、GVIM在WINDOWS下中文乱码的终极解决方案

    文章转自:http://www.liuhuadong.com/archives/68 vim.gvim在windows下中文乱码的终极解决方案在windows下vim的中文字体显示并不好,所以我们需要 ...

  6. Android大图片裁剪终极解决方案(上:原理分析)

    转载声明:Ryan的博客文章欢迎您的转载,但在转载的同时,请注明文章的来源出处,不胜感激! :-)  http://my.oschina.net/ryanhoo/blog/86842 约几个月前,我正 ...

  7. 【原创】CHROME 最小字体限制为12PX的终极解决方案

    CHROME 最小字体限制为12PX的终极解决方案 本文由五月雨恋提供,转载请注明出处. 相信不少做网站的用户会有这样一个问题,Chrome 默认最小字体是12px(最新版英文也有此问题),这个是 C ...

  8. 绝对好文C#调用C++DLL传递结构体数组的终极解决方案

    C#调用C++DLL传递结构体数组的终极解决方案 时间 2013-09-17 18:40:56 CSDN博客相似文章 (0) 原文  http://blog.csdn.net/xxdddail/art ...

  9. Cygwin 各种情况下中文乱码--终极解决方案

    0.引言 本人从进公司以来一直负责公司Android平台下产品的NDK开发,用的工具: 01. Google的adt-bundle(集成了eclipse和sdk) 02. NDK 03. Cygwin ...

随机推荐

  1. 作品第二课----点击DIV显示其内容

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. RedHat/CentOS系统信息查看命令大全

    系统# uname -a               # 查看内核/操作系统/CPU信息# head -n 1 /etc/issue   # 查看操作系统版本# cat /proc/cpuinfo   ...

  3. 有7g和2g的砝码各一个,怎样称可以3次把140g东西分为50g和90g???????

    第一次:等分 50和90为   70 70 2.   7g 和2g  ,取出一个70中的9g   ,  61   70 3.利用 9g和2g砝码,取出61中的11克,前面的9 和 11 都放进70

  4. Spark RDD/Core 编程 API入门系列 之rdd实战(rdd基本操作实战及transformation和action流程图)(源码)(三)

    本博文的主要内容是: 1.rdd基本操作实战 2.transformation和action流程图 3.典型的transformation和action RDD有3种操作: 1.  Trandform ...

  5. 【转】shell 教程——01 Shell简介:什么是Shell,Shell命令的两种执行方式

    Shell本身是一个用C语言编写的程序,它是用户使用Unix/Linux的桥梁,用户的大部分工作都是通过Shell完成的.Shell既是一种命令语言,又是一种程序设计语言.作为命令语言,它交互式地解释 ...

  6. 基于粒子群算法求解求解TSP问题(JAVA)

    一.TSP问题 TSP问题(Travelling Salesman Problem)即旅行商问题,又译为旅行推销员问题.货郎担问题,是数学领域中著名问题之一.假设有一个旅行商人要拜访n个城市,他必须选 ...

  7. https_request请求接口返回数据

    定义一个https_request方法 <?php function https_request($url, $data = null) { $curl = curl_init(); curl_ ...

  8. iOS9上的Universal Link实现(教程)

    1.Universal Link 理解为苹果官方支持deeplink就行了 2.通过点击HTTP链接启动APP Web・iOS应用在支持Universal Link的前提下,当用户点击特点的链接时会自 ...

  9. 关于ABAP事件的一张图

    事件: 这里有几组事件关键字 ,这些事件关键字在特定环境下控制ABAP/4 程序流. 逻辑数据库 是典型报表程序的外部流控制的中心点.如果将逻辑数据库链接到报表 程序,将导致显示选择 屏幕,并决定系统 ...

  10. JDBC连接MySQL数据库

    import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sq ...