Debian 11 上的 Dell AIO 5400 亮度控制

Debian 11 上的 Dell AIO 5400 亮度控制

我有一台安装了 Debian 11(即将于 8 月 18 日发布)的 Dell AIO 5400。除了一个小问题,其他一切都运行良好。我无法控制亮度。我知道操作系统应该能够控制 AIO 屏幕的亮度(Windows 10 也可以),但在 Debian 上我无法控制它。

在 /sys/class/backlight 中,我看到两个目录 (acpi_video0 和 acpi_video1)。尝试调整两个文件夹中的 actual_brightness 值,但没有成功。

如果我在重启后在 grub 配置中指定 acpi_backlight=vendor 参数,则 /sys/class/backlight 目录绝对是空的。

所有驱动程序均已安装。Steam 运行完美。

串行通信

00:00.0 Host bridge: Intel Corporation 11th Gen Core Processor Host Bridge/DRAM Registers (rev 01)
00:02.0 VGA compatible controller: Intel Corporation TigerLake GT2 [Iris Xe Graphics] (rev 01)
00:06.0 PCI bridge: Intel Corporation 11th Gen Core Processor PCIe Controller (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Device 9a0d (rev 01)
00:0d.0 USB controller: Intel Corporation Tiger Lake-LP Thunderbolt 4 USB Controller (rev 01)
00:14.0 USB controller: Intel Corporation Tiger Lake-LP USB 3.2 Gen 2x1 xHCI Host Controller (rev 20)
00:14.2 RAM memory: Intel Corporation Tiger Lake-LP Shared SRAM (rev 20)
00:14.3 Network controller: Intel Corporation Wi-Fi 6 AX201 (rev 20)
00:16.0 Communication controller: Intel Corporation Tiger Lake-LP Management Engine Interface (rev 20)
00:17.0 SATA controller: Intel Corporation Device a0d3 (rev 20)
00:1d.0 PCI bridge: Intel Corporation Tiger Lake-LP PCI Express Root Port #9 (rev 20)
00:1f.0 ISA bridge: Intel Corporation Tiger Lake-LP LPC Controller (rev 20)
00:1f.3 Audio device: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
00:1f.4 SMBus: Intel Corporation Tiger Lake-LP SMBus Controller (rev 20)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Tiger Lake-LP SPI Controller (rev 20)
01:00.0 Non-Volatile memory controller: Kingston Technology Company, Inc. OM3PDP3 NVMe SSD (rev 01)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

lspci-v

00:02.0 VGA compatible controller: Intel Corporation TigerLake GT2 [Iris Xe Graphics] (rev 01) (prog-if 00 [VGA controller])
        DeviceName: Onboard - Video
        Subsystem: Dell Iris Xe Graphics
        Flags: bus master, fast devsel, latency 0, IRQ 137, IOMMU group 1
        Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 4000000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 4000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable+ 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)
        Capabilities: [320] Single Root I/O Virtualization (SR-IOV)
        Kernel driver in use: i915
        Kernel modules: i915

lsmod | grep -i i915

i915                 2715648  62
i2c_algo_bit           16384  1 i915
drm_kms_helper        274432  1 i915
cec                    61440  2 drm_kms_helper,i915
drm                   618496  17 drm_kms_helper,i915
video                  53248  2 dell_wmi,i915

有人告诉我尝试 xrandr --output eDP-1 --brightness 0.7,它成功了。所以看起来问题出在 ACPI 而不是屏幕上。但我不知道应该在 Grub 中指定哪些参数才能让它工作。

xrandr --listactivemonitors 
Monitors: 1
 0: +*HDMI-1 1920/527x1080/296+0+0  HDMI-1

有什么想法吗?

答案1

我研究的最新进展。也许这会对某些人有所帮助。

因此,当 xrandr 被澄清时控制屏幕亮度,我发现了一个 Arch Wiki 页面,它阐明了 i915 模块的大部分相同行为:https://wiki.archlinux.org/title/backlight#Unable_to_control_eDP_Panel_brightness_(Intel_i915_only)

根据此页面,我需要开发一个使用 inotify-tools 的自定义 Bash 脚本来监视 actual_brightness 文件中的变化并将值传递给 xrandr。因此,我对脚本进行了少许修改,现在它看起来像:

#/bin/sh

path=/sys/class/backlight/acpi_video0

luminance() {
    read -r level < "$path"/actual_brightness

    # 0.01 - scaling factor
    echo "scale=2; $level * 0.01" | bc
}

xrandr --output HDMI-1 --brightness "$(luminance)"

inotifywait -me modify "$path"/actual_brightness | while read; do
    xrandr --output HDMI-1 --brightness "$(luminance)"
done

我将此脚本设置为自动启动,它就可以正常工作。例如,我可以通过 brightctl 更改亮度,因为它会在 actual_brightness 文件上生成 MODIFY 事件。

brightnessctl -d acpi_video0 s 90
actual_brightness MODIFY

但在 KDE 控制中心,我仍然无法控制亮度值!KDE 使用 powerdevil 插件,我不知道为什么,但是 powerdevil 更改了 actual_brightness 文件,但它没有在此文件上生成修改事件。

如果我执行 cat > /sys/class/backlight/acpi_video0/actual_brightness,我会看到变化。

所以有一个问题。有人知道如何告诉 powerdevil 使用 MODIFY 事件生成来更改 actual_brightness 文件吗?或者至少使用 brightnessctl 工具来设置亮度?

我相信有一个 PowerDevil QML 或任何其他文件可以编辑以改变亮度调整行为。

答案2

又一个更新。尝试从 USB 启动 Ubuntu,亮度控制可以正常工作。

有“/sys/class/backlight/dell_uart_backlight“文件夹。对戴尔 UART 背光内核模块进行了一些调查。它包含在 Ubuntu 中的Linux 的 OEM软件包,这在 Debian 11 中几乎不可能安装。

https://lore.kernel.org/patchwork/patch/844937/

问题是,新的 Dell AIO 机器使用 UART 接口来调节亮度。它们需要合适的驱动程序,该驱动程序在 Ubuntu 内核(由 Canonical 修补)中可用,但在 Debian 中不可用。

期待...我不知道如何从源代码构建它。

相关内容