我有一台最近才发布的联想 Legion 7 16ACHg6 (2021)。它配备了 AMD 5800H 和 NVIDIA RTX 3060 GPU。我发现的一个问题是背光亮度控制不起作用。即快捷键键盘按钮会调出亮度控制小部件,并且该小部件中的亮度值确实会进行调整,所以我猜键盘快捷键/按钮没问题。但背光不受控制。当我尝试通过 sysfs 控制背光时,我找到了一个 nvidia 文件夹,进入 actual_brightness 文件会调整该值,但什么也没发生。
我已将 BIOS 设置为使用独立显卡。我尝试过使用专有和开源(Nouveau)驱动程序,但都没有成功。我尝试过安装 NVIDIA 的较新驱动程序(从其网站下载的 465 版),但没有帮助。我尝试过运行主线工具来更新到 5.12 内核,但这也无济于事。我也尝试过添加Option "RegistryDwords" "EnableBrightnessControl=1"
到 xorg 配置的建议,但没有成功。我尝试过使用acpi_backlight=vendor
内核参数,在这种情况下,调整亮度会完全关闭显示器,我需要重新启动才能恢复。设置amdgpu.brightness=0
内核参数没有影响。我尝试过不同的 live-cd(Fedora 34、Garuda、Ubuntu 20.04 LTS),但都不起作用。在 Windows 上显然它可以正常工作。
使用xrandr
有效,但它并不能真正控制背光的亮度。
此时,我已经用尽了在互联网上能找到的所有选项。我想需要进行更深入的分析。但是我不知道从哪里开始。我的第一个想法是亮度是通过 PWM 信号控制的。在嵌入式 ARM 设备上,它们大多有一个专用的 SOC 引脚,但我不确定 x86 上是如何实现的。AMD CPU 可以直接做到这一点吗?它受 GPU 控制吗?是否有某种通过 I2C 控制的中间显示控制器?
编辑:我添加了 dmesg 输出的一些关键部分:
[ 0.000000] Linux version 5.12.1-051201-generic (kernel@gloin) (gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0, GNU ld (GNU Binutils for Ubuntu) 2.36.1) #202105021030 SMP Sun May 2 10:34:08 UTC 2021
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.12.1-051201-generic root=UUID=99416551-f8bc-413e-a118-d9c4845e7fa6 ro quiet splash vt.handoff=7
...
[ 0.000000] efi: EFI v2.70 by INSYDE Corp.
[ 0.000000] efi: ACPI=0xceffe000 ACPI 2.0=0xceffe014 TPMFinalLog=0xcef3f000 SMBIOS=0xcc70a000 SMBIOS 3.0=0xcc708000 MEMATTR=0xb65fc018 ESRT=0xb65e8418 MOKvar=0xcc6d0000 RNG=0xcc705d18 TPMEventLog=0xb652c018
[ 0.000000] efi: seeding entropy pool
[ 0.000000] random: fast init done
[ 0.000000] SMBIOS 3.3.0 present.
[ 0.000000] DMI: LENOVO 82N6/LNVNB161216, BIOS GKCN24WW 02/03/2021
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 3193.968 MHz processor
...
[ 0.311851] ACPI: EC: interrupt unblocked
[ 0.311852] ACPI: EC: event unblocked
[ 0.313133] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[ 0.313133] ACPI: EC: GPE=0x3
[ 0.313133] ACPI: \_SB_.PCI0.LPC0.EC0_: Boot DSDT EC initialization complete
[ 0.313133] ACPI: \_SB_.PCI0.LPC0.EC0_: EC: Used to handle transactions and events
[ 0.313169] iommu: Default domain type: Translated
[ 0.313169] pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=none,locks=none
[ 0.313169] pci 0000:01:00.0: vgaarb: bridge control possible
[ 0.313169] pci 0000:01:00.0: vgaarb: setting as boot device
[ 0.313169] vgaarb: loaded
...
[ 0.534844] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 0.534871] efifb: probing for efifb
[ 0.534882] efifb: showing boot graphics
[ 0.537785] efifb: framebuffer at 0xfa00000000, using 25600k, total 25600k
[ 0.537787] efifb: mode is 2560x1600x32, linelength=16384, pages=1
[ 0.537788] efifb: scrolling: redraw
[ 0.537788] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.537845] Console: switching to colour frame buffer device 160x50
[ 0.541740] fb0: EFI VGA frame buffer device
[ 0.543342] ACPI: AC: AC Adapter [ADP0] (off-line)
[ 0.543378] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[ 0.543390] ACPI: button: Power Button [PWRB]
[ 0.543409] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
[ 0.543417] ACPI: button: Lid Switch [LID0]
[ 0.543430] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[ 0.543457] ACPI: button: Power Button [PWRF]
[ 0.543508] Monitor-Mwait will be used to enter C-1 state
...
[ 0.806995] acpi device:01: registered as cooling_device16
[ 0.807027] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:00)
[ 0.807067] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/LNXVIDEO:00/input/input4
[ 0.807191] ACPI: video: Video Device [VGA] (multi-head: yes rom: no post: no)
[ 0.807316] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GP17.VGA.LCD._BCM.AFN7], AE_NOT_FOUND (20210105/psargs-330)
[ 0.807499]
Initialized Local Variables for Method [_BCM]:
[ 0.807500] Local0: 0000000038713046 <Obj> Integer 00000000000000FF
[ 0.807505] Local1: 0000000029383804 <Obj> Integer 0000000000000000
[ 0.807508] Initialized Arguments for Method [_BCM]: (1 arguments defined for method invocation)
[ 0.807508] Arg0: 00000000ceb92cb1 <Obj> Integer 0000000000000064
[ 0.807513] ACPI Error: Aborting method \_SB.PCI0.GP17.VGA.LCD._BCM due to previous error (AE_NOT_FOUND) (20210105/psparse-529)
[ 0.807609] ACPI: \_SB_.PCI0.GP17.VGA_.LCD_: _BCM evaluation failed
[ 0.807641] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:13/LNXVIDEO:01/input/input5
...
[ 2.692008] input: Ideapad extra buttons as /devices/pci0000:00/0000:00:14.3/PNP0C09:00/VPC2004:00/input/input11
[ 2.692077] ideapad_acpi VPC2004:00: Keyboard backlight control not available
[ 2.698741] ccp 0000:05:00.2: enabling device (0000 -> 0002)
[ 2.699039] ccp 0000:05:00.2: ccp: unable to access the device: you might be running a broken BIOS.
[ 2.703452] ideapad_acpi VPC2004:00: DYTC interface is not available
...
[ 4.424514] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input16
[ 4.424562] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input17
[ 4.424591] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input18
[ 4.424619] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input19
[ 4.424646] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input20
[ 4.424676] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input21
[ 4.466797] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:05:00.6/sound/card1/input22
[ 4.466857] input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:08.1/0000:05:00.6/sound/card1/input23
[ 4.498362] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 460.73.01 Thu Apr 1 21:40:36 UTC 2021
[ 4.504877] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 460.73.01 Thu Apr 1 21:32:31 UTC 2021
[ 4.537322] r8169 0000:03:00.0 eno1: Link is Down
[ 4.599300] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 4.599303] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
[ 4.607340] nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
[ 4.609244] nvidia-uvm: Loaded the UVM driver, major device number 507.
[ 4.781539] ACPI: \: failed to evaluate _DSM (0x1001)
[ 4.781546] ACPI: \: failed to evaluate _DSM (0x1001)
[ 4.850308] ACPI Warning: \_SB.PCI0.GPP0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20210105/nsarguments-61)
...
答案1
这似乎是某些专有 nvidia 驱动程序的问题。就我而言,从降级nvidia-driver-510
到nvidia-driver-470
软件和更新 > 附加驱动程序解决了我的 Lenovo Legion 7 (2021) 上的问题。
答案2
关注 dmesg 输出中的 ACPI 错误,特别是以下行:ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GP17.VGA.LCD._BCM.AFN7]
,我偶然发现另一个话题报告了相同类型的错误。科林·伊恩·金说:
ACPI 驱动程序尝试评估(执行)屏幕的 ACPI 亮度控制方法,但失败了,因为固件中的 ACPI AML 字节代码由于某种原因没有定义对象 _SB.PCI0.GP17.VGA.LCD._BCM.AFN7。所有这些的结果是 ACPI 亮度控制无法工作。这是一个固件问题,除了检查是否可以获得可以修复此问题的更新的 BIOS 固件外,我不知道有任何解决方法。
答案3
花了一些时间才弄清楚如何使键盘背光在 Lenovo Legion Slim 7 上的 Ubuntu 20 上工作。显然,联想已将支持内置到 BIOS 中,并且所有键盘快捷键都与 Windows 相同。Fn+Space在模式之间切换。使用 Linux 时灯熄灭的原因是 Linux 启动以某种方式将亮度设置为 0。您可以进入 LED 控制/sys/class
并在那里增加亮度,或者只需按Fn+Up箭头来增加亮度(Fn+Down arrow来降低亮度)。就是这样!
另外,如上文所述,xrandr
可用于控制屏幕亮度(通常的方法不起作用),但不能用于控制键盘 LED 亮度。修改 grub 文件没有任何帮助,所以最好不要这样做。
答案4
我能够通过首先更改etc/default/grub
、设置GRUB_CMDLINE_LINUX_DEFAULT
为来使我的联想 Legion 7 16ACHg6 的屏幕亮度正常工作quiet splash nvidia.NVreg_RegistryDWords=EnableBrightnessControl=1
然后我去了软件和更新 > 附加驱动程序并选择using NVIDIA driver metapckage from nvidia-driver-535(proprietary-tested)
而不是using X.Org X server - Nouveau display driver from xserver-xorg-video-nouveau (open source)
应用更改并重新启动后,屏幕亮度再次恢复正常。