很多人在安装Ubuntu之后,出现屏幕的亮度无法调节和无法保存的问题,可以尝试通过下面的方法解决,方法很简单,代码不需要备份,如果不生效,可以参照着修改回来。
方法:解决reboot后无法保存屏幕亮度 sudo gedit /etc/rc.local 打开后你会看到如下内容: #!/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. #exit 0 插入这句话到代码中: echo 0 > /sys/class/backlight/acpi_video0/brightness,保证修改后代码如下,注意exit前的“#” #!/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 0 > /sys/class/backlight/acpi_video0/brightness exit 0 或者放在最后也可:
其中echo 后面的值为0-10,对应为0到100%,如echo 5表示一半亮度。 保存后退出,重启就可以了。 注意:大多数人都是acpi_video0,根据自己/sys/class/backlight/下面文件决定。
方法:亮度调节 亮度调节依赖与你的bios和内核版本,你可以尝试以下代码。 kernel boot选项: 当你启动系统时,出现在grup的屏幕时,按e键进行编辑,在kernel这一行添加: nomodeset acpi_backlight=vendor 退出启动,如果能正常启动,就把这项选项添加到默认的选项中,编辑文件/etc/default/grub: # command line sudo -e /etc/default/grub # graphical gksu gedit /etc/default/grub 把这一行改成如下: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor" 保存,更新grup: sudo update-grub
相关主题 |