ubuntu亮度无法自动调节终极解决方案 ubuntu18亮度调节

   2023-02-10 学习力0
核心提示:友情链接:IT狂人博客 这个问题纠结了我快两年,主要是自己懒,写了个脚本来调节亮度,不过还是稍显不便。近日兴起折腾了一番,终于找到问题根结了。 There are many ways to control brightness. According to this discussion[1] and this wiki page [2

友情链接: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

 


关注我的新浪微博

 
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

  • Ubuntu使用——15(thinkphp路由报错Non-static method think\Route::get() should not be called statically)
    Ubuntu使用——15(thinkphp路由报错Non-static
    在route.php中添加代码:use think\Route;Route::get('/',function (){return 'hello world';});在浏览器中输入http://localhost/tp5-git/public/index.php,报错:[8192] ErrorException in route.php line 13Non-static method think\Route::get() should n
    03-08
  • Ubuntu与Window双系统安装的注意事项
    Ubuntu与Window双系统安装的注意事项
      UBUNTU与WINDOW双系统安装的注意事项 由 匿名 (未验证) 提交于 2019-05-18 10:07:41登录 发表评论29 次浏览假定电脑里面已经存在了Window系统,安装另外一个Linux系统:第一:首先确定电脑里面的window系统引导方式电脑系统的引导方式分为:(1)传统
    03-08
  • Ubuntu 图形界面损坏修复方法!!!亲测有用!!!
    Ubuntu 图形界面损坏修复方法!!!亲测有用!
    1.现象今天做实验的时候打开Ubuntu虚拟机,输入密码之后发现变成这样:然后重新开机,到了输入密码界面不输入,而是输入快捷键CTRL+alt+F1,输入用户名+密码进入之后输入ls,发现我的文件还在,心想这不是系统炸了啊上网搜说是图形界面损坏于是重新来:(参考
    03-08
  • Ubuntu终端输入异常、无法退格(删除文本)、使用方向键命令
    Ubuntu终端输入异常、无法退格(删除文本)、使
    1 起因为了学习嵌入式开发安装去安装的ncurses库,使用命令:sudo apt-get install libncurses5-dev导致系统自带的ncurses-base被自动删除。2 出现的问题误删ncurses-base后导致终端输入窗口出现了一系列的问题:Ubuntu终端输入无法退格(删除文本)、使用↑
    03-08
  • Raspberry Pi (Ubuntu) 上的 VNC 无监视器
    Raspberry Pi (Ubuntu) 上的 VNC 无监视器
    超级方便的无监视器VNC方便的树莓派远程桌面操作,无需显示器\(^^)/通过在页面末尾设置“无显示器设置”,可以在启动树莓派之前和之后连接和断开 HDMI 显示器电缆(这很重要)。来自主 PC 的远程桌面环境树莓派 4Ubuntu 20.04(64位)服务器+桌面设置VNC 设
    03-08
  • 免费供个人使用最多3个! !我尝试注册 ESM 将 Ubuntu LTS 版本的支持期延长 5 年
    免费供个人使用最多3个! !我尝试注册 ESM 将
    我个人使用 Ubuntu 作为我的 Linux 机器的操作系统。 Ubuntu 有正常版本和 LTS(长期支持)版本的操作系统。至此,版本号奇数为普通版,偶数为LTS版,LTS版长期支持5年,而普通版有支持期半年左右。。由于Linux机器用作GPU服务器,由于驱动程序和库的兼容性等
    03-08
  • [WSL2 Ubuntu22.04] 尝试使用 WSLg 运行 Elixir Desktop(未完成)
    [WSL2 Ubuntu22.04] 尝试使用 WSLg 运行 Elixir
    现状启用 WSLg 后,Elixir Desktop 会不会像在 Ubuntu 上一样工作?Elixir 桌面示例我试着跑步窗口显示并似乎在移动,但 Todo 应用程序未显示在窗口中。这是一个空白的显示。显示窗口和菜单。Extra 的内容也可以单独使用。如果您使用 Extra 的 Open Browser
    03-08
  • ubuntu中vi下删除键和上下左右键输入字符异常(
     刚安装的Ubuntu系统,使用vi编辑文本的时候,出现以下现象:点删除键输入了 D回车无效上下左右为字母光标乱跳 原因:自带的vi功能问题 解决:卸载原有vi,重新安装完整版本vim执行以下命令即可: sudo apt-get remove vim-common sudo apt-get install v
    02-10
  • ubuntu禁止ping操作(禁用ICMP协议访问) icmp
    ping命令是计算机之间进行相互检测线路完好的一个应用程序,计算机间交流数据的传输没有经过任何的加密处理,因此我们在用ping命令来检测某一个服务器时,可能在因特网上存在某个非法分子,为了安全我们把ping给禁止掉。通过专门的黑客程序把在网络线路上传输
    02-10
  • Ubuntu16配置静态IP ubuntu16.04配置静态ip
    一、静态IP地址配置sudo vi/etc/network/interfaces然后按照如下格式修改:注意这里的网卡名字是ens33auto loiface lo inet loopbackauto ens33iface ens33 inet staticaddress 192.168.1.106netmask 255.255.255.0gateway 192.168.1.1二、配置DNS#临时修改su
    02-10
点击排行