系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Ubuntu調(diào)整及保存屏幕亮度失敗

Ubuntu調(diào)整及保存屏幕亮度失敗怎么辦?

時間:2015-04-17 17:44:56 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時看資訊 2. 請使用手機瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20150417/45840.html 手機查看 評論

  在Ubuntu系統(tǒng)中,有時會因為屏幕太亮或太暗需要調(diào)節(jié)屏幕亮度, 卻發(fā)現(xiàn)屏幕亮度無法調(diào)整,或調(diào)整后無法保存,遇到這種問題該如何解決呢?

 Ubuntu調(diào)整及保存屏幕亮度失敗怎么辦?

  測試環(huán)境:

  Acer Aspire 5750G

  NVIDIA GeForce GT630M

  Ubuntu 12.04 x86_64

  其他情況解決方法類似。

  調(diào)節(jié)屏幕亮度

  Fn不能調(diào)節(jié)屏幕的亮度。因為fn調(diào)節(jié)的是/sys/class/backlight/acpi_video0/brightness文件,而I卡的文件是/sys/class/backlight/intel_backlight/brightness。

  一、測試代碼

  啟動系統(tǒng),出現(xiàn)grub菜單時,按“e”編輯,在有l(wèi)inux內(nèi)核路徑那一行,添加“acpi_backlight=vendor”,如:

  linux /boot/vmlinuz-3.2.0-30-generic root=UUID=75c414be-2e17-407a-b699-94f6a398dff7 ro acpi_backlight=vendor quiet splash

  如果能正常啟動,且用fn能調(diào)節(jié)屏幕亮度,說明成功,接著下一步。

  二、修改grub

  sudo vi /etc/default/grub

  找到:

  GRUB_CMDLINE_LINUX=“”

  改為:

  GRUB_CMDLINE_LINUX=“acpi_backlight=vendor“

  我的grub文件如下:

  # If you change this file, run ‘update-grub’ afterwards to update

  # /boot/grub/grub.cfg.

  # For full documentation of the options in this file, see:

  # info -f grub -n ‘Simple configuration’

  GRUB_DEFAULT=0

  #GRUB_HIDDEN_TIMEOUT=0

  GRUB_HIDDEN_TIMEOUT_QUIET=true

  GRUB_TIMEOUT=3

  GRUB_DISTRIBUTOR=`lsb_release -i -s 2》 /dev/null || echo Debian`

  GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash“

  GRUB_CMDLINE_LINUX=”acpi_backlight=vendor“

  # Uncomment to enable BadRAM filtering, modify to suit your needs

  # This works with Linux (no patch required) and with any kernel that obtains

  # the memory map information from GRUB (GNU Mach, kernel of FreeBSD 。。。)

  #GRUB_BADRAM=”0x01234567,0xfefefefe,0x89abcdef,0xefefefef“

  # Uncomment to disable graphical terminal (grub-pc only)

  #GRUB_TERMINAL=console

  # The resolution used on graphical terminal

  # note that you can use only modes which your graphic card supports via VBE

  # you can see them in real GRUB with the command `vbeinfo‘

  #GRUB_GFXMODE=640x480

  # Uncomment if you don’t want GRUB to pass ”root=UUID=xxx“ parameter to Linux

  #GRUB_DISABLE_LINUX_UUID=true

  # Uncomment to disable generation of recovery mode menu entries

  #GRUB_DISABLE_RECOVERY=”true“

  # Uncomment to get a beep at grub start

  #GRUB_INIT_TUNE=”480 440 1“

  更新grub.cfg

  ➜ ~ sudo update-grub

  查看grub.cfg 發(fā)現(xiàn)其中每個啟動項都加入了“acpi_backlight=vendor”

  ➜ ~ vi /boot/grub/grub.cfg

  設(shè)定屏幕初始亮度

  重啟后發(fā)現(xiàn),屏幕亮度又恢復(fù)為最大亮度。

  查看影響屏幕亮度的文件

  ➜ ~ vi /sys/class/backlight/intel_backlight/brightness

  調(diào)節(jié)幾次屏幕亮度發(fā)現(xiàn)其中數(shù)值會改變,我的筆記本數(shù)值范圍為0~976。

  手動修改該數(shù)值,會發(fā)現(xiàn)屏幕亮度隨之改變(需要root用戶執(zhí)行):

  ➜ ~ su

  Password:

  root@ www.linuxidc.com :/home/congbo# echo 500 》 /sys/class/backlight/intel_backlight/brightness

  因此,將該語句添加到 /etc/rc.local 就能開機自動設(shè)定屏幕初始亮度了。

  修改/etc/rc.local如下(需要root用戶執(zhí)行):

  #!/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.

  echo 500 》 /sys/class/backlight/intel_backlight/brightness

  exit 0

  調(diào)節(jié)gamma值

  ➜ ~ xgamma -gamma .7

  -》 Red 1.000, Green 1.000, Blue 1.000

  《- Red 0.700, Green 0.700, Blue 0.700

  上面就是Ubuntu調(diào)節(jié)及保存屏幕亮度失敗的解決方法了,出現(xiàn)這種問題的時候,先測試代碼,再修改grub即可。

發(fā)表評論

0

沒有更多評論了

評論就這些咯,讓大家也知道你的獨特見解

立即評論

以上留言僅代表用戶個人觀點,不代表系統(tǒng)之家立場

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄