From fb5770d1ce8ae0e1d31848083140fcf69458bc4e Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Sat, 11 Jul 2026 22:35:57 +0400 Subject: [PATCH] boot: kernel 7.x for FLM NPU firmware, raise amdgpu GTT to 56 GiB --- modules/boot.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/boot.nix b/modules/boot.nix index c33db11..0573e96 100644 --- a/modules/boot.nix +++ b/modules/boot.nix @@ -2,9 +2,23 @@ { config, pkgs, lib, ... }: { - # Use latest kernel instead of LTS - # boot.kernelPackages = pkgs.linuxPackages_latest; - # Note: security.nix forces hardened kernel, so we use that. + # Kernel 7.x: the in-tree amdxdna driver on 6.18 is too old for FastFlowLM + # (flm validate: kernel_ok=false, and it loads NPU firmware 1.0.0.63 while + # FLM needs >=1.1.0.0 — the 7.x driver loads npu_7.sbin = 1.1.2.64 instead). + boot.kernelPackages = pkgs.linuxPackages_latest; + + # amdgpu GTT (dynamically shared system RAM the iGPU can address) raised to + # 56 GiB. On kernel 6.18 `amdgpu.gttsize` is deprecated; TTM controls it in + # 4 KiB pages: 56 GiB / 4 KiB = 14680064. Pair with a shrunken BIOS UMA/VRAM + # carve-out (set to 1-2GB in UEFI; VRAM peak observed is ~2.5G and buffers + # spill to GTT) so ~60GB system RAM backs this pool — GTT is reclaimable, + # only consumed when the GPU actually touches it. + # Merges with boot.kernelParams in power.nix (list options are concatenated). + # Verify after reboot: cat /sys/class/drm/card*/device/mem_info_gtt_total + boot.kernelParams = [ + "ttm.pages_limit=14680064" + "ttm.page_pool_size=14680064" + ]; # Lanzaboote Secure Boot boot.loader.systemd-boot.enable = lib.mkForce false;