所以我见过几次这种情况,但没有找到解决办法。我也不知道这是否是与计算机硬件相关的问题。
我的亮度键(fn+F2和F3)在 Ubuntu 16.04 中设置亮度不起作用,我有一台 HP Pavillion 笔记本电脑。有人能帮我解决这个问题吗?我见过一种“解决方案”,下载一个名为“亮度控制器”的应用程序,但这对我来说不是真正的解决方案。
如果可以的话,请帮助我。谢谢 W
acpi_listen
在终端中运行命令时,我得到以下输出:
video/brightnessdown BRTDN 00000087 00000000
video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000
video/brightnessup BRTUP 00000086 00000000
答案1
在终端中运行
acpi_listen
,测试系统是否接收到按键事件。然后按Fn+ F2& Fn+ F3。以下是输出示例:# acpi_listen PNP0C14:00 000000d0 00000000 video/brightnessup BRTUP 00000086 00000000 PNP0C14:00 000000d0 00000000 video/brightnessdown BRTDN 00000087 00000000
看看你是否可以使用以下方式控制背光
sudo apt-get install xbacklight xbacklight -inc 20 xbacklight -dec 20
另一次较低级别的尝试
# ls -l /sys/class/backlight/ lrwxrwxrwx 1 root root 0 Jun 10 13:56 /sys/class/backlight/intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight # ls -l /sys/class/backlight/intel_backlight/ total 0 -r--r--r-- 1 root root 4096 Jun 10 14:28 actual_brightness -rw-r--r-- 1 root root 4096 Jun 10 14:28 bl_power -rw-r--r-- 1 root root 4096 Jun 10 15:19 brightness lrwxrwxrwx 1 root root 0 Jun 10 14:28 device -> ../../card0-LVDS-1 -r--r--r-- 1 root root 4096 Jun 10 14:28 max_brightness drwxr-xr-x 2 root root 0 Jun 10 14:28 power lrwxrwxrwx 1 root root 0 Jun 10 14:28 subsystem -> ../../../../../../../class/backlight -r--r--r-- 1 root root 4096 Jun 10 14:28 type -rw-r--r-- 1 root root 4096 Jun 10 14:28 uevent # echo 3600 > /sys/class/backlight/intel_backlight/brightness
按照说明设置 ACPI 脚本耳机断开连接时会执行什么代码?
/etc/acpi/events/intel-backlight
event=video/brightness* action=/etc/acpi/intel-backlight.sh
/etc/acpi/intel-backlight.sh
#!/bin/bash x=$(cat /sys/class/backlight/intel_backlight/actual_brightness) if [ "$2" == "BRTUP" ] then x=$(echo $x+490 | bc) echo $x > /sys/class/backlight/intel_backlight/brightness fi if [ "$2" == "BRTDN" ] then x=$(echo $x-490 | bc) echo $x > /sys/class/backlight/intel_backlight/brightness fi
使用 使脚本可执行
chmod +x /etc/acpi/intel-backlight.sh
。