ubuntu亮度無法自動(dòng)調(diào)節(jié)終極解決方法
發(fā)布時(shí)間:2013-06-28 17:27:27 作者:佚名
我要評(píng)論

關(guān)于ubuntu亮度無法自動(dòng)調(diào)節(jié)的問題,糾結(jié)了我快兩年,主要是自己懶,寫了個(gè)腳本來調(diào)節(jié)亮度,不過還是稍顯不便。近日興起折騰了一番,終于找到問題根結(jié)了
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
ACPIIt 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.
看了這個(gè)之后,很顯然,問題就在于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
本文來源:博客園 作者:浮沉雄鷹
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
ACPIIt 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.
看了這個(gè)之后,很顯然,問題就在于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
本文來源:博客園 作者:浮沉雄鷹
相關(guān)文章
新特性搶先看! Ubuntu 25.04 Beta 發(fā)布:Linux 6.14 內(nèi)核
Canonical公司近日發(fā)布了Ubuntu 25.04 Beta版,這一版本被賦予了一個(gè)活潑的代號(hào)——“Plucky Puffin”(勇敢的海雀),據(jù)悉,正式的穩(wěn)定版預(yù)計(jì)將在2025年4月17日與廣大用戶2025-03-29如何讓 Ubuntu 居中顯示窗口? 3種方法實(shí)現(xiàn)Ubuntu窗口居中顯示
個(gè)人習(xí)慣不管打開終端窗口還是文件管理器窗口,都希望居中顯示,不太喜歡Linux下自動(dòng)隨意的擺放位置,下面我們就來看看詳細(xì)設(shè)置方法2025-03-11Ubuntu 24.04.2 LTS 正式發(fā)布: 帶來全新硬件支持啟用堆棧HWE
buntu 24.04 LTS 的第 2 個(gè)小版本Ubuntu 24.04.2 LTS 正式發(fā)布,出了修復(fù)漏洞以外,它還帶來了全新的硬件支持啟用堆棧(HWE),讓系統(tǒng)性能和硬件兼容性更上一層樓2025-02-25怎么關(guān)閉Ubuntu無人值守升級(jí)? Ubuntu禁止自動(dòng)更新的技巧
Ubuntu Linux系統(tǒng)禁止自動(dòng)更新的時(shí)候,提示“無人值守升級(jí)在關(guān)機(jī)期間,請(qǐng)不要關(guān)閉計(jì)算機(jī)進(jìn)程”,該怎么解決這個(gè)問題?詳細(xì)請(qǐng)看下文介紹2025-01-20高效管理你的Linux系統(tǒng): Debian操作系統(tǒng)常用命令指南
在Debian操作系統(tǒng)中,了解和掌握常用命令對(duì)于提高工作效率和系統(tǒng)管理至關(guān)重要,本文將詳細(xì)介紹Debian的常用命令,幫助讀者更好地使用和管理Debian系統(tǒng)2025-01-20debian更新系統(tǒng)的命令怎么用? 輕松配置Debian自動(dòng)更新的技巧
Debian不手動(dòng)更新怎么體驗(yàn)新系統(tǒng)?Debian提供了一個(gè)既簡(jiǎn)單又高效的解決辦法——自動(dòng)更新,該怎么用呢?詳細(xì)請(qǐng)看下文介紹2025-01-20如何配置Ubuntu無人值守升級(jí)? 手動(dòng)操作實(shí)現(xiàn)Ubuntu自動(dòng)升級(jí)技巧
無人值守升級(jí)是一個(gè)用于自動(dòng)更新 Debian 和 Ubuntu 系統(tǒng)的開源項(xiàng)目,該項(xiàng)目的主要目的是確保系統(tǒng)能夠定期自動(dòng)安裝安全更新,從而保持系統(tǒng)的安全性和穩(wěn)定性2025-01-20Ubuntu系統(tǒng)怎么安裝Warp? 新一代AI 終端神器安裝使用方法
Warp是一款使用Rust開發(fā)的現(xiàn)代化AI 終端工具,該怎么再Ubuntu系統(tǒng)中安裝使用呢?下面我們就來看看詳細(xì)教程2025-01-20Debian如何查看系統(tǒng)版本? 7種輕松查看Debian版本信息的實(shí)用方法
Debian是一個(gè)廣泛使用的Linux發(fā)行版,用戶有時(shí)需要查看其版本信息以進(jìn)行系統(tǒng)管理、故障排除或兼容性檢查,在Debian系統(tǒng)中,有幾種不同的方法可以查看版本信息2025-01-17解決VMware中Ubuntu虛擬機(jī)鼠標(biāo)閃爍或指針位置不正確的方案
剛下載虛擬機(jī)后,電腦在虛擬機(jī)內(nèi)出現(xiàn)了鼠標(biāo)閃爍或者鼠標(biāo)指針位置不對(duì)的問題,該怎么解決呢?下面我們就來看看詳細(xì)教程2025-01-09