vanadium: update notes on how kernel options works

This commit is contained in:
Primrose 2025-09-14 09:33:04 +08:00
parent 7211dd62f6
commit 8317538cf2
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -3,6 +3,8 @@ final: prev: let
in { in {
linuxPackages = final.linuxPackagesFor ( linuxPackages = final.linuxPackagesFor (
prev.linuxPackages.kernel.override { prev.linuxPackages.kernel.override {
# TODO: The error message is quite unintuitive, maybe improve it?
# https://github.com/NixOS/nixpkgs/issues/82951
structuredExtraConfig = with lib.kernel; { structuredExtraConfig = with lib.kernel; {
# optimisation for ryzen 7 # optimisation for ryzen 7
# https://wiki.gentoo.org/wiki/Ryzen # https://wiki.gentoo.org/wiki/Ryzen
@ -32,13 +34,13 @@ in {
X86_AMD_PSTATE = yes; X86_AMD_PSTATE = yes;
X86_POWERNOW_K8 = no; X86_POWERNOW_K8 = no;
# With amd_pstate=active ondemand won't be available anyway.
# Without more testing, we should accept the claim that its more power efficient and stick to it
CPU_FREQ = yes; CPU_FREQ = yes;
X86_INTEL_PSTATE = lib.mkForce no; X86_INTEL_PSTATE = lib.mkForce no;
CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = lib.mkForce no; CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = lib.mkForce no;
CPU_FREQ_DEFAULT_GOV_ONDEMAND = yes; CPU_FREQ_DEFAULT_GOV_ONDEMAND = yes;
# TODO: The error message is quite unintuitive, maybe improve it? # ERROR: could not insert 'amd_freq_sensitivity': No such device
# https://github.com/NixOS/nixpkgs/issues/82951
# TODO: boot and see if there's such a module to add and be loaded
X86_AMD_FREQ_SENSITIVITY = module; X86_AMD_FREQ_SENSITIVITY = module;
# skipping firmware loading section since it's handled by other parts of nixos options # skipping firmware loading section since it's handled by other parts of nixos options