From 50e35e3bb54cf99e731ebf563e9b37ec027ccf82 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Fri, 25 Oct 2024 14:50:12 +0200 Subject: [PATCH] Add hardware support for Lenovo LOQ 15aph8 --- README.md | 3 ++- flake.nix | 1 + lenovo/loq/15aph8/README.md | 14 ++++++++++++++ lenovo/loq/15aph8/default.nix | 22 ++++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lenovo/loq/15aph8/README.md create mode 100644 lenovo/loq/15aph8/default.nix diff --git a/README.md b/README.md index cd519b2..14f8d54 100644 --- a/README.md +++ b/README.md @@ -212,6 +212,7 @@ See code for all available configurations. | [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `` | | [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | +| [Lenovo LOQ 15APH8 (lenovo/loq/15aph8) | `` | | [Lenovo ThinkPad A475](lenovo/thinkpad/a475) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | @@ -340,7 +341,7 @@ See code for all available configurations. | [Supermicro X12SCZ-TLN4F](supermicro/x12scz-tln4f) | `` | | [System76 (generic)](system76) | `` | | [System76 Darter Pro 6](system76/darp6) | `` | -| [System76 Gazelle 18](system76/gaze18) | `` | +| [System76 Gazelle 18](system76/gaze18) | `` | | [System76 Galago Pro 5](system76/galp5-1650) | `` | | [Toshiba Chromebook 2 `swanky`](toshiba/swanky) | `` | | [Tuxedo InfinityBook v4](tuxedo/infinitybook/v4) | `` | diff --git a/flake.nix b/flake.nix index 8302950..ac479cb 100644 --- a/flake.nix +++ b/flake.nix @@ -150,6 +150,7 @@ lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; + lenovo-loq-15aph8 = import ./lenovo/loq/15aph8; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/loq/15aph8/README.md b/lenovo/loq/15aph8/README.md new file mode 100644 index 0000000..7fede51 --- /dev/null +++ b/lenovo/loq/15aph8/README.md @@ -0,0 +1,14 @@ +# Lenovo LOQ 15APH8 + +Tested on LOQ 15APH8 (82XT) with: +- AMD Phoenix GPU +- NVIDIA GeForce RTX 4050 Max-Q +- AMD Phoenix1 integrated graphics + +## Features Requiring Configuration +For optimal power management, consider adding: + +```nix +services.power-profiles-daemon.enable = true; +powerManagement.powertop.enable = true; +``` diff --git a/lenovo/loq/15aph8/default.nix b/lenovo/loq/15aph8/default.nix new file mode 100644 index 0000000..0418300 --- /dev/null +++ b/lenovo/loq/15aph8/default.nix @@ -0,0 +1,22 @@ +{ lib, ...}: { + imports = [ + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/nvidia/prime.nix + ../../../common/gpu/nvidia/ada-lovelace + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ]; + + hardware.nvidia.prime = { + amdgpuBusId = lib.mkDefault "PCI:5:0:0"; + nvidiaBusId = lib.mkDefault "PCI:1:0:0"; + }; + + # Power management - using mkDefault as these can be overridden + hardware.nvidia.powerManagement.enable = lib.mkDefault true; + hardware.nvidia.modesetting.enable = lib.mkDefault true; + services.thermald.enable = lib.mkDefault true; + + # These will merge with user settings, so no mkDefault needed + hardware.amdgpu.initrd.enable = true; +}