From 49f1d1e1f83a394a9a69bf2e5443de352ffd7924 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:23:35 +0200 Subject: [PATCH 1/4] lenovo/thinkpad/l14/amd: enable AMD GPU config --- lenovo/thinkpad/l14/amd/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index c2d1534..bf475f7 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -4,6 +4,7 @@ imports = [ ../. ../../../../common/cpu/amd + ../../../../common/gpu/amd ]; boot.kernelParams = [ From 9ff8606e7ee40e32395d672f540c6f4072aeb24d Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:27:37 +0200 Subject: [PATCH 2/4] lenovo/thinkpad/l14/amd: switch to soft iommu mode to prevent mmcblk kernel panic --- lenovo/thinkpad/l14/amd/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index bf475f7..d2803e2 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -12,10 +12,13 @@ # 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. # - # BIOS version 1.13 claims to fix IOMMU issues, but we leave the - # IOMMU off to avoid a sad experience for those people that drew + # BIOS version 1.13 fixes the IOMMU issues, but we leave the IOMMU + # in software mode to avoid a sad experience for those people that drew # the short straw when they bought their laptop. - "iommu=off" + # + # Do not set iommu=off, because this will cause the SD-Card reader + # driver to kernel panic. + "iommu=soft" ]; # As of writing this, Linux 5.8 is the oldest kernel that is still From 2c549a1bfb593f03c7107348fea07f5f894ed7ad Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:27:53 +0200 Subject: [PATCH 3/4] lenovo/thinkpad/l14: enable SSD config --- lenovo/thinkpad/l14/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lenovo/thinkpad/l14/default.nix b/lenovo/thinkpad/l14/default.nix index e014b7d..42bf014 100644 --- a/lenovo/thinkpad/l14/default.nix +++ b/lenovo/thinkpad/l14/default.nix @@ -3,6 +3,7 @@ { imports = [ ../. + ../../../common/pc/laptop/ssd ../../../common/pc/laptop/acpi_call.nix ]; From 03eba5720afdea051ba32c2c06c9424c3c2f300e Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Wed, 25 Aug 2021 23:28:28 +0200 Subject: [PATCH 4/4] lenovo/thinkpad/l14/amd: drop workaround for old kernels ... because the latest supported NixOS runs on Linux 5.10 by default. --- lenovo/thinkpad/l14/amd/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lenovo/thinkpad/l14/amd/default.nix b/lenovo/thinkpad/l14/amd/default.nix index d2803e2..bb21621 100644 --- a/lenovo/thinkpad/l14/amd/default.nix +++ b/lenovo/thinkpad/l14/amd/default.nix @@ -20,8 +20,4 @@ # driver to kernel panic. "iommu=soft" ]; - - # 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; }