下面方法经测试修改,可以使用!
打开看看,下面有个brightness文件,用快捷键调节一下亮度,发现里面数字可以跟着变,用快捷键调整到合适的亮度,我这里是1854。
调出终端(ctrl+alt+t)
sudo echo 1854(根据前面看到的值) >/sys/class/backlight/intel_backlight/brightness看看亮度会不会变化,有可能提示权限不足。继续……
sudo su
切换到root用户试试
echo 1854 >/sys/class/backlight/intel_backlight/brightness
亮度变化了,确认就是这个文件。
如果是快捷方式,看下这个文件的实际地址。
echo 1854 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
看下亮度是否变化,如果变化。
chmod 777 /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightnessexit
回到普通用户。
echo 1854 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
亮度变化了。
2、修改/etc/init.d/rc.local
sudo gedit /etc/init.d/rc.local
内容如下,增加红色字体部分。
#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
if [ ! -w /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness ];then
echo "a" | sudo -S chmod 777 /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
fi
echo 1854 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
在里面加上了红色那句,然后重启。