From 03dedf4cfd6762810b08b452258dd64e6584259a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 14 Mar 2020 20:55:05 -0700 Subject: [PATCH] thinkpad/t495: fix backlight save/load and and battery conditioning. Saving/loading the backlight state requires the acpi_backlight=native kernel parameter. acpi_call is required by TLP to get access to battery conditioning information from the firmware. Signed-off-by: David Anderson --- lenovo/thinkpad/t495/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lenovo/thinkpad/t495/default.nix b/lenovo/thinkpad/t495/default.nix index 51ddb5c..64957e6 100644 --- a/lenovo/thinkpad/t495/default.nix +++ b/lenovo/thinkpad/t495/default.nix @@ -4,8 +4,13 @@ imports = [ ../. ../../../common/cpu/amd + ../../../common/pc/laptop/acpi_call.nix ]; + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + boot.kernelParams = [ "acpi_backlight=native" ]; + # see https://github.com/NixOS/nixpkgs/issues/69289 boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; }