diff --git a/README.md b/README.md index 0cbfe4f..bade0f7 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ See code for all available configurations. | Lenovo ThinkPad E470 | `` | Lenovo ThinkPad E495 | `` | | Lenovo ThinkPad L13 | `` | +| Lenovo ThinkPad L14 (Intel) | ` | +| Lenovo ThinkPad L14 (AMD) | ` | | Lenovo ThinkPad P53 | `` | | Lenovo ThinkPad T410 | `` | | Lenovo ThinkPad T420 | `` | diff --git a/flake.nix b/flake.nix index 29114f1..a4d562d 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,8 @@ lenovo-thinkpad-e470 = import ./lenovo/thinkpad/e470; lenovo-thinkpad-e495 = import ./lenovo/thinkpad/e495; lenovo-thinkpad-l13 = import ./lenovo/thinkpad/l13; + lenovo-thinkpad-l14-intel = import ./lenovo/thinkpad/l14/intel; + lenovo-thinkpad-l14-amd = import ./lenovo/thinkpad/l14/amd; lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410; lenovo-thinkpad-t420 = import ./lenovo/thinkpad/t420; diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix new file mode 100644 index 0000000..b16caf0 --- /dev/null +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/amd + ]; + + boot.kernelParams = [ + # With BIOS version 1.12 and the IOMMU enabled, the amdgpu driver + # either crashes or is not able to attach to the GPU depending on + # the kernel version. I've seen no issues with the IOMMU disabled. + "iommu=off" + ]; + + # As of writing this, Linux 5.8 is the oldest kernel that is still + # supported and has decent Renoir support. + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix new file mode 100644 index 0000000..e014b7d --- /dev/null +++ b/lenovo/thinkpad/l14/default.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ]; + + boot.kernelParams = [ + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + "acpi_backlight=native" + ]; +} diff --git a/lenovo/thinkpad/l14/intel/default.nix b/lenovo/thinkpad/l14/intel/default.nix new file mode 100644 index 0000000..088289f --- /dev/null +++ b/lenovo/thinkpad/l14/intel/default.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/intel + ]; + + services.throttled.enable = lib.mkDefault true; +}