ubuntu亮度無法自動調(diào)節(jié)終極解決方法
發(fā)布時間:2013-06-28 17:27:27 作者:佚名
我要評論
關(guān)于ubuntu亮度無法自動調(diào)節(jié)的問題,糾結(jié)了我快兩年,主要是自己懶,寫了個腳本來調(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.
看了這個之后,很顯然,問題就在于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.
看了這個之后,很顯然,問題就在于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 26.04 LTS(Resolute Raccoon)發(fā)布:內(nèi)存要求提至6GB
2026-04-23,Ubuntu 26.04 LTS 正式版按計劃如期發(fā)布,Ubuntu 26.04 LTS 搭載 Linux 內(nèi)核 7.0 和 GNOME 50 桌面環(huán)境,原生集成英偉達 CUDA,內(nèi)存要求提至 6GB2026-04-24
桌面生產(chǎn)力直接拉滿! Ubuntu安裝后別急著用這7個設(shè)置一定要改
Ubuntu桌面系統(tǒng)安裝成功后,不要急著使用,修改后桌面生產(chǎn)力直接拉滿,今天我就把這7個我每次必改的設(shè)置完整分享出來,配上詳細步驟和實際效果2026-04-15
CPU和硬盤要求保持不變! Ubuntu 26.04 LTS最低內(nèi)存運行要求提高到 6GB
Canonical即將發(fā)布“Resolute Raccoon”Ubuntu 26.04 LTS操作系統(tǒng),資料顯示推薦內(nèi)存提高至6GB,這是2018年以來首次重大變動2026-04-08
基于Linux7.0+GNOME50+Mesa26.0! Ubuntu 26.04 LTS Beta 版發(fā)布
Ubuntu 26.04 LTS測試版如期發(fā)布,此次更新將集成大量前沿開源技術(shù),Beta 測試版搭載了尚處于開發(fā)階段的 Linux 7.0 內(nèi)核、默認(rèn)采用最新的 GNOME 50.0 桌面組件、全新的 Mes2026-03-27
Ubuntu桌面系統(tǒng)爆致命漏洞! 30天可拿root權(quán)限
近日,全球知名網(wǎng)絡(luò)安全研究機構(gòu)Qualys的威脅研究部門正式披露了Ubuntu桌面系統(tǒng)的一個高危本地提權(quán)漏洞,其官方漏洞編號為CVE-2026-38882026-03-21
Ubuntu 25.10 系統(tǒng)正式發(fā)布:搭載 Linux 6.17 內(nèi)核
Ubuntu 25.10 系統(tǒng)代號“Questing Quokka”現(xiàn)已推出,集成最新的 GNOME 49 桌面環(huán)境,默認(rèn)僅啟用 Wayland 會話,提升了圖形體驗2025-10-10
Debian 13升級后網(wǎng)絡(luò)轉(zhuǎn)發(fā)等功能異常怎么辦? 并非錯誤而是管理機制變更
很多朋友反饋,更新到Debian 13后網(wǎng)絡(luò)轉(zhuǎn)發(fā)等功能異常,這并非 BUG 而是 Debian 13 Trixie 調(diào)整了管理機制,具體來說是sysctl變更為由systemd-sysctl主導(dǎo)且配置文件變成模塊2025-08-22
SSH中斷/寶塔面板異常/分區(qū)問題等! Debian 13升級注意事項匯總
前一段時間發(fā)布了debian13,我們也分享了debian12升級到debian13的圖文教程,很多朋友在升級的時候遇到了不少問題,今天我們就來看看Debian 13升級注意事項2025-08-21
Debian12怎么升級到Debian13? Debian系統(tǒng)升級教程
心念念的Debian13終于正式發(fā)布了,該怎么升級呢?下面我們就來看看Debian12升級到 Debian13的教程2025-08-21
Ubuntu 24.04.3 LTS 正式發(fā)布: 附更新內(nèi)容匯總
Ubuntu 24.04 這一長期支持版本發(fā)布了第三個點版本升級:Ubuntu 24.04.3 LTS,涵蓋桌面、服務(wù)器與云等版本,主要是將過去數(shù)月發(fā)布的安全更新、錯誤修復(fù)和穩(wěn)定性改進整合入2025-08-09


