From 8296b88560d8ac07a885452e094cd454de90ea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 4 Aug 2021 13:54:40 +0200 Subject: [PATCH] Add Thinkpad P14s --- README.md | 1 + lenovo/thinkpad/p14s/amd/gen2/default.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 lenovo/thinkpad/p14s/amd/gen2/default.nix diff --git a/README.md b/README.md index b187da6..25caa0f 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ See code for all available configurations. | [Lenovo ThinkPad L14 (AMD)](lenovo/thinkpad/l14/amd) | `` | | [Lenovo ThinkPad P1](thinkpad/p1) | `` | | [Lenovo ThinkPad P1 Gen 3](lenovo/thinkpad/p1/3th-gen) | `` | +| [Lenovo ThinkPad P14s AMD Gen 2](lenovo/thinkpad/p14s/amd/gen2) | `` | | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | diff --git a/lenovo/thinkpad/p14s/amd/gen2/default.nix b/lenovo/thinkpad/p14s/amd/gen2/default.nix new file mode 100644 index 0000000..ee3d52a --- /dev/null +++ b/lenovo/thinkpad/p14s/amd/gen2/default.nix @@ -0,0 +1,21 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../../../../../common/pc/laptop/acpi_call.nix + ]; + + # 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"]; + + # Wifi support + boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ]; + hardware.firmware = [ pkgs.rtw89-firmware ]; + + # For support of newer AMD GPUs, backlight and internal microphone + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.13") pkgs.linuxPackages_latest; +} \ No newline at end of file