Debian 9:背光亮度

Debian 9:背光亮度

我刚刚将带有 LXDE 的全新 Debian 9 安装到 ACER AMD 笔记本中,除了背光亮度外,一切似乎都工作正常。在启动过程中,会发生以下情况:

  • 一些消息和错误出现

    [FAILED] Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
    See 'systemctl status systemd-backlight@backlight:acpi_video0.service' for details.
    Starting Load/Save Screen Backlight Brightness of backlight:radeon_bl0
    ...
    [ OK ] Started Load/Save Screen Backlight Brightness of backlight:radeon_bl0
    
  • 通常背光亮度会重置为最大

为了将背光亮度设置到可接受的水平,迄今为止最好的解决方案似乎是在 Debian 初始化后立即打开终端并键入以下命令行:

  • tee /sys/class/backlight/radeon_bl0/brightness <<< 15

 

问题

  1. 如何避免开机时背光亮度被重置为最大?
  2. 如何设置背光亮度的快捷方式(例如:[Fn] + ←/→)?

 


调试

root@debian:~# dmesg | grep -i "error\|firmware\|backlight"
[    1.049855] pci 0000:01:00.0: [Firmware Bug]: disabling VPD access (can't determine size of non-standard VPD format)
[    7.729996] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[   12.960474] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_pfp.bin
[   13.017938] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_me.bin
[   13.043827] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_rlc.bin
[   13.161157] radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_uvd.bin
[   13.897112] [drm] radeon atom DIG backlight initialized

 

root@debian:~# systemctl status systemd-backlight@backlight:acpi_video0.service
● systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
   Loaded: loaded (/lib/systemd/system/[email protected]; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-06-16 06:37:19 -03; 29min ago
     Docs: man:[email protected](8)
  Process: 411 ExecStart=/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=1/FAILURE)
 Main PID: 411 (code=exited, status=1/FAILURE)

Jun 16 06:37:19 debian systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 06:37:19 debian systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Unit entered failed state.
Jun 16 06:37:19 debian systemd[1]: systemd-backlight@backlight:acpi_video0.service: Failed with result 'exit-code'.

硬件规格
笔记本 Aspire E1-421-0622|产品详情

  • AMD 2 Core™ 处理器 E1-1200 (1.4 GHz) 1MB 高速缓存 64 位处理
  • AMD Radeon HD 7310 图形控制器
  • 2Gb DDR3 SDRAM 内存
  • 256MB 共享显存

 

德安·斯特雷奇
debian-9.4.0-amd64-netinst.iso

答案1

您的系统似乎有两个用于背光控制的接口:backlight:acpi_video0backlight:radeon_bl0。显然,ACPI 接口不起作用,并且/或与 Radeon 特定接口一起使用时会导致问题。

由于 Radeon 特定的接口似乎工作正常,我会尝试告诉 systemd 首先停止使用 ACPI 背光接口:

systemctl mask systemd-backlight@backlight:acpi_video0.service

如有必要,可以通过以下方式撤消此操作:

systemctl unmask systemd-backlight@backlight:acpi_video0.service

如果这没有帮助,则需要进一步调查。

您应该journalctl -xb能够看到相当详细的消息版本仅适用于当前启动。默认情况下,Debian 9 中未启用 systemd 日志的持久存储,但启用它非常容易:只需mkdir /var/log/journal以 root 身份运行即可。然后,从下次启动开始,日志将被持久存储,您将能够使用例如查看上次启动从启动到关闭的日志journalctl -xb -1。最旧的日志最终将被自动清除,由journald可用磁盘空间的可配置标准控制。

答案2

打开文件/etc/default/grub并更新行:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

到线:

GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=video"

然后运行:

update-grub
reboot

如果这个参数不起作用,可能的替代参数(完整讨论位于内核命令行选项):

acpi_backlight=video
acpi_backlight=vendor
acpi_backlight=native
acpi_backlight=none

就我而言,acpi_backlight=video似乎已经解决了这两个问题:

  • 启动期间背光亮度不再重置为最大(问题 1)
  • [Fn] + ←/→被设置为减少/增加背光亮度的快捷方式(问题 2)

之后与快捷方式发生冲突[Fn] + ←,该快捷方式降低了背光亮度,但同时打开了“显示设置”窗口。刚刚打开Preferences > Setup Hot Keys并将“模糊”热键更改XF86Display为其他内容。

相关内容