不可能重复: 我的问题与无法在 Ubuntu 16.04 LTS 中更改亮度因为我已经尝试了那里的大多数解决方案但都没有用。
每当我尝试使用系统设置->亮度和锁定->亮度滑块来更改亮度时,移动滑块都没有效果,而当我关闭系统设置时,滑块会回到全亮度位置。
键盘上的按钮具有相同的效果。
lspci
:
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
06:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
lspci -nnk | grep -A2 VGA
:
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b)
Subsystem: Dell Haswell-ULT Integrated Graphics Controller [1028:0651]
Kernel driver in use: i915
ls /sys/class/backlight/
:
dell_backlight intel_backlight
答案1
手动更改文件/sys/class/backlight/xxx/brightness
,将xxx
替换为dell_backlight
和intel_backlight
,以找出哪个接口负责您的背光控制。
要更改值,请/sys/class/backlight/xxx/brightness
打开终端并运行:
sudo bash -c "echo 5 > /sys/class/backlight/xxx/brightness;"
然后创建(/etc/X11/xorg.conf
如果不存在)并添加:
Section "Device"
Identifier "Card0"
Driver "intel"
Option "Backlight" "xxx"
EndSection
编辑后/etc/X11/xorg.conf
重新启动系统并让我知道它是否有效。`
答案2
您可以运行适用于所有显卡的这个命令:
for gcard in /sys/class/backlight/* ; do sudo bash -c "echo 5 > $gcard/brightness" ; done
如果您的帐户有sudo
权限,您只需将上述一行添加到您的帐户即可~/.bashrc
完成。
更新:但是,当您锁定/解锁笔记本电脑时,此方法可能不起作用。在这种情况下,您可以编写一个脚本,假设其名称为~/.brightnesss_adjuster.sh
(并使其可执行),内容如下:
#!/bin/bash
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | ( while true
do read X
if echo $X | grep "boolean false" &> /dev/null; then
for gcard in /sys/class/backlight/* ; do sudo bash -c "echo 5 > $gcard/brightness" ; done
fi
done )
然后将这一行添加到您的~/.bashrc
:
# brightness set up
~/.brightness_adjuster.sh &