启用 systemd-backlight@intel_backlight 而不是 systemd-backlight@acpi_video0

Bab*_*yan 6 arch-linux systemd

我有 2 个文件/sys/class/backlight/-acpi_video0intel_backlight. intel_backlight是控制我的屏幕亮度(回声/猫)的acpi_video0那个,但是是默认设置。

默认情况下,该服务systemd-backlight@acpi_video0.service是启用的,它应该在关机/启动时保存/恢复亮度,但它不起作用,因为它指向错误的文件。

尝试启用时systemd-backlight@intel_backlight.service,我收到以下消息:

The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

Big*_*uge 1

您可能只是缺少backlight:命令的一部分:

# systemctl enable systemd-backlight@backlight:intel_backlight.service
Run Code Online (Sandbox Code Playgroud)

您可能还需要转义:,即:

# systemctl enable systemd-backlight@backlight\:intel_backlight.service
Run Code Online (Sandbox Code Playgroud)

由于 /sys/class/backlight/ 中有两个文件夹,因此您可能有两个显卡。Arch wiki建议在引导加载程序中添加以下内核参数之一:

acpi_backlight=video
acpi_backlight=vendor
acpi_backlight=native
acpi_backlight=none
Run Code Online (Sandbox Code Playgroud)