From 93030acc16854853024f67686d76b0cc463b56bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 18 Feb 2023 07:04:56 +0100 Subject: [PATCH] p14s: do not include acpi_backlight on newer kernel versions --- lenovo/thinkpad/p14s/amd/gen2/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix index c80a703..fb4e3e4 100644 --- a/lenovo/thinkpad/p14s/amd/gen2/default.nix +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -1,6 +1,4 @@ - -{ lib, pkgs, ... }: - +{ lib, pkgs, config, ... }: { imports = [ ../../../../../common/pc/laptop/acpi_call.nix @@ -9,8 +7,9 @@ # For suspending to RAM, set Config -> Power -> Sleep State to "Linux" in EFI. # amdgpu.backlight=0 makes the backlight work - # acpi_backlight=none allows the backlight save/load systemd service to work. - boot.kernelParams = ["amdgpu.backlight=0" "acpi_backlight=none"]; + # acpi_backlight=none allows the backlight save/load systemd service to work on older kernel versions + boot.kernelParams = [ "amdgpu.backlight=0" ] ++ lib.optional (lib.versionOlder config.boot.kernelPackages.kernel.version "6.1.6") "acpi_backlight=none"; + # Wifi support hardware.firmware = [ pkgs.rtw89-firmware ];